Page 2 of 2

Re: Serviio gives error when attempting to start

PostPosted: Sat Mar 31, 2012 7:11 am
by Mendoza
Thanks, I have tried and it seems like there are many 'slf4j-api.jar' files, all connected to applications using Java. I looked up slf4j on internet and it seems to be something used by applications as a logging facade for Java. I am not sure I should delete them all...

Is there a way to get a log file from a Serviio failed attempt to start? Maybe could I see which file specifically is the problem?

Re: Serviio gives error when attempting to start

PostPosted: Sat Mar 31, 2012 5:25 pm
by Capitrium
Hmm... I'm not sure if this will work or not, but you can try this:

1) In a Finder window, open up the Package Contents of your Serviio.app file. (Go to wherever you saved Serviio and right-click/two-finger-click on the app, then click on 'Show Package Contents')

2) Go into the Contents directory and open up the Info.plist file. Copy this file to another location before you make any edits so that you can restore if need be!

3) Scroll down until you see something like
  Code:
<key>Java</key>
    <dict>
      <key>MainClass</key>
      <string>org.serviio.MediaServer</string>
      <key>JVMVersion</key>
      <string>1.6+</string>
      <key>ClassPath</key>
      <array>
        <string>$JAVAROOT/concurrent.jar</string>
        <string>$JAVAROOT/derby.jar</string>
        <string>$JAVAROOT/freemarker.jar</string>
        <string>$JAVAROOT/groovy-all.jar</string>
        <string>$JAVAROOT/gson.jar</string>
        <string>$JAVAROOT/httpcore.jar</string>
        <string>$JAVAROOT/jaudiotagger.jar</string>
        <string>$JAVAROOT/jcl-over-slf4j.jar</string>
        <string>$JAVAROOT/jcs.jar</string>
        <string>$JAVAROOT/jdom.jar</string>
        <string>$JAVAROOT/jul-to-slf4j.jar</string>
        <string>$JAVAROOT/log4j.jar</string>
        <string>$JAVAROOT/org.restlet.ext.gson.jar</string>
        <string>$JAVAROOT/org.restlet.ext.net.jar</string>
        <string>$JAVAROOT/org.restlet.ext.xstream.jar</string>
        <string>$JAVAROOT/org.restlet.jar</string>
        <string>$JAVAROOT/rome-modules.jar</string>
        <string>$JAVAROOT/rome.jar</string>
        <string>$JAVAROOT/sanselan.jar</string>
        <string>$JAVAROOT/serviio.jar</string>
        <string>$JAVAROOT/slf4j-api.jar</string>
        <string>$JAVAROOT/slf4j-log4j12.jar</string>
        <string>$JAVAROOT/winp.jar</string>
        <string>$JAVAROOT/xstream.jar</string>
        <string>$JAVAROOT/config</string>
      </array>

4) Find the lines containing the slf4j* files.

5) Leave the Info.plist file open, and go back to your Finder window. Go into the Resources/Java directory.

6) Right-click/two-finger-click on each of the slf4j* files and click 'Get Info'. In the window that opens, copy the full path to the file (this is found after where it says 'Where:' in the info pane).

7) Go back to the Info.plist file, and replace '$JAVAROOT/slf4j*.jar' with the full paths you copied in the previous step. This should set up Serviio so that it looks at the slf4j*.jars that were included in the Serviio package, and not any other slf4j*.jars that are floating around on your classpath.

8) Post back here with the results! :P

Re: Serviio gives error when attempting to start

PostPosted: Sun Apr 01, 2012 8:31 am
by Mendoza
Thank you again for your help Capitrium.

I have done that (I also did it for the Serviio console package) but it didn't help. This is how the Info.plist file looks like now:

<key>Java</key>
<dict>
<key>MainClass</key>
<string>org.serviio.MediaServer</string>
<key>JVMVersion</key>
<string>1.6+</string>
<key>ClassPath</key>
<array>
<string>$JAVAROOT/concurrent.jar</string>
<string>$JAVAROOT/derby.jar</string>
<string>$JAVAROOT/freemarker.jar</string>
<string>$JAVAROOT/groovy-all.jar</string>
<string>$JAVAROOT/gson.jar</string>
<string>$JAVAROOT/httpcore.jar</string>
<string>$JAVAROOT/jaudiotagger.jar</string>
<string>/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/jcl-over-slf4j.jar</string>
<string>$JAVAROOT/jcs.jar</string>
<string>$JAVAROOT/jdom.jar</string>
<string>/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/jul-to-slf4j.jar</string>
<string>$JAVAROOT/log4j.jar</string>
<string>$JAVAROOT/org.restlet.ext.gson.jar</string>
<string>$JAVAROOT/org.restlet.ext.net.jar</string>
<string>$JAVAROOT/org.restlet.ext.xstream.jar</string>
<string>$JAVAROOT/org.restlet.jar</string>
<string>$JAVAROOT/rome-modules.jar</string>
<string>$JAVAROOT/rome.jar</string>
<string>$JAVAROOT/sanselan.jar</string>
<string>$JAVAROOT/serviio.jar</string>
<string>/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/slf4j-api.jar</string>
<string>/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/slf4j-log4j12.jar</string>
<string>$JAVAROOT/winp.jar</string>
<string>$JAVAROOT/xstream.jar</string>
<string>$JAVAROOT/config</string>
</array>
<key>VMOptions</key>
<string>-Xmx384m -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20</string>
<key>Properties</key>
<dict>
<key>java.awt.headless</key>
<string>true</string>
<key>serviio.home</key>
<string>$JAVAROOT</string>
<key>derby.system.home</key>
<string>$JAVAROOT/library</string>
<key>file.encoding</key>
<string>UTF-8</string>
<key>java.net.preferIPv4Stack</key>
<string>true</string>
</dict>
</dict>
</dict>
</plist>

Re: Serviio gives error when attempting to start

PostPosted: Thu Apr 12, 2012 8:14 pm
by Mendoza
Any more ideas? :roll:

Re: Serviio gives error when attempting to start

PostPosted: Tue Apr 24, 2012 7:25 am
by Folderboy
Any progress - having similar problems. Have tried all the suggested Java 'tweeks'.

Re: Serviio gives error when attempting to start

PostPosted: Wed Jun 06, 2012 8:47 am
by paulb92
I seem to have a fix for this, sorry if this has been posted elsewhere.

For each of the apps package contents you need to chmod +x the JavaApplicationStub. Haven't had a chance to see if this works with my TV or investigate if this is a good thing to do but serviio and serviio console will start after this mod.

Terminal o/p -

[paulbs-mac-pro:/Applications/Serviio.app/Contents] paulb% cd MacOS/
[paulbs-mac-pro:Serviio.app/Contents/MacOS] paulb% ls
JavaApplicationStub ffmpeg
[paulbs-mac-pro:Serviio.app/Contents/MacOS] paulb% ls -la
total 14920
drwx---rwx 4 paulb staff 136 6 Jun 18:13 .
drwx---rwx 6 paulb staff 204 6 Jun 18:13 ..
-rw----rw- 1 paulb staff 45760 1 Feb 06:41 JavaApplicationStub
-rw----rw- 1 paulb staff 7586384 1 Feb 06:41 ffmpeg
[paulbs-mac-pro:Serviio.app/Contents/MacOS] paulb% chmod +x JavaApplicationStub
[paulbs-mac-pro:Serviio.app/Contents/MacOS] paulb% ls -la
total 14920
drwx---rwx 4 paulb staff 136 6 Jun 18:13 .
drwx---rwx 6 paulb staff 204 6 Jun 18:13 ..
-rwx--xrwx 1 paulb staff 45760 1 Feb 06:41 JavaApplicationStub
-rw----rw- 1 paulb staff 7586384 1 Feb 06:41 ffmpeg
[paulbs-mac-pro:Serviio.app/Contents/MacOS] paulb% cd ..
[paulbs-mac-pro:/Applications/Serviio.app/Contents] paulb% cd ..
[paulbs-mac-pro:/Applications/Serviio.app] paulb% cd ..
[paulbs-mac-pro:/Applications] paulb% cd Serviio-Console.app/Contents/MacOS/
[paulbs-mac-pro:Serviio-Console.app/Contents/MacOS] paulb% ls
JavaApplicationStub
[paulbs-mac-pro:Serviio-Console.app/Contents/MacOS] paulb% chmod +x JavaApplicationStub

I'll do a full test tomorrow to see if this is a true fix.

Cheers

Paulb

Re: Serviio gives error when attempting to start

PostPosted: Thu Jun 07, 2012 11:27 pm
by paulb92
I also had to chmod +x the ffmpeg binary to get this working properly and its all working now.

So in summary

In the Serviio-Console.app package
chmod +x JavaApplicationStub
In the Serviio.app
chmod +x JavaApplicationStub
chmod +x ffmpeg

Fixed this for me.

Cheers

Paulb

Re: Serviio gives error when attempting to start

PostPosted: Fri Jun 20, 2014 11:21 pm
by johnnyboloni
I've tried everything on this thread but I still get the same error message. Any further suggestions?

Thanks,
Yoni