FAQ  •  Register  •  Login

Java error at startup

<<

JJ_Day

Serviio newbie

Posts: 6

Joined: Fri May 23, 2014 2:09 am

Post Fri May 23, 2014 2:35 am

Java error at startup

Hi,

I installed Serviio, ffmpeg and openjdk6 from ports on a FreeBSD 9.2 system. All three programs and dependent programs installed and registered properly. ffmpeg seems to run properly for preliminary testing. However, when I start Serviio, java fails with the following errors to the console:
  Code:
Starting serviio.
Exception in thread "main" java.lang.NoClassDefFoundError: org/serviio/MediaServer
Caused by: java.lang.ClassNotFoundException: org.serviio.MediaServer
   at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.serviio.MediaServer. Program will exit.

Nothing is logged in the serviio.log file.

The runtime user is set to "dlna" and it owns or has read/write permission to all serviio and jave files so it appears to be a configuration problem. Unfortunately, I am not familiar with java so do not know where to look for the problem. Could someone provide help please?

TIA -- JJ
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri May 23, 2014 4:23 pm

Re: Java error at startup

serviio.jar is not on the classpath in the startup script. I think someone solved it on the forum before, try to search
<<

JJ_Day

Serviio newbie

Posts: 6

Joined: Fri May 23, 2014 2:09 am

Post Fri May 23, 2014 6:01 pm

Re: Java error at startup

Thanks for the information. A forum search found a QNAP installation instruction that had the same problem. His solution was to run as 'admin'. The same solution (running as 'root') works for me.

However, knowing the name of the specific file needed, I found one directory in the middle of the class access path that had permissions set only for root. Changing those permissions to 755 resolves the problem and I now can run properly.

I have one problem remaining that I have not found addressed in searches: The machine has several interfaces and selects the wrong interface to bind discovery to.
1 - Can Serviio broadcast discovery on more than one interface?
2 - How do I configure the interface(s) I want to bind discovery to?

TIA - JJ
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat May 24, 2014 12:46 pm

Re: Java error at startup

1- no
2 - set it in the console
<<

JJ_Day

Serviio newbie

Posts: 6

Joined: Fri May 23, 2014 2:09 am

Post Thu Jun 05, 2014 8:38 pm

Re: Java error at startup

Thank you very much for the information. I was able to finish the setup, load my local library and it streams properly over my LAN. However, when I try to start up without the Internet connected, it terminates with the following messages:
  Code:
2014-06-02 21:26:55,711 ERROR [ApplicationInstanceManager] DC-MH-f: DC-MH-f
java.net.UnknownHostException: DC-MH-f: DC-MH-f
   at java.net.InetAddress.getLocalHost(InetAddress.java:1461)
   at org.serviio.ApplicationInstanceManager.registerInstance(ApplicationInstanceManager.java:68)
   at org.serviio.MediaServer.checkForRunningInstances(MediaServer.java:283)
   at org.serviio.MediaServer.main(MediaServer.java:106)
2014-06-02 21:26:55,745 INFO  [MediaServer] ------------------------------------------------------------------------
2014-06-02 21:26:55,745 INFO  [MediaServer] Serviio DLNA media streaming server v 1.4.1.2 (rev. 3753eff81a2f+)
2014-06-02 21:26:55,745 INFO  [MediaServer] Petr Nejedly 2009-2014
2014-06-02 21:26:55,746 INFO  [MediaServer] http://www.serviio.org
2014-06-02 21:26:55,746 INFO  [MediaServer]
2014-06-02 21:26:55,746 INFO  [MediaServer] Java 1.6.0_32-Sun Microsystems Inc.
2014-06-02 21:26:55,746 INFO  [MediaServer] OS FreeBSD i386 9.2-RELEASE
2014-06-02 21:26:55,746 INFO  [MediaServer] File encoding: UTF-8
2014-06-02 21:26:55,747 INFO  [MediaServer] Headless mode enabled: true
2014-06-02 21:26:55,748 INFO  [MediaServer] User: dlna
2014-06-02 21:26:55,748 INFO  [MediaServer] User home dir: /home/dlna
2014-06-02 21:26:55,748 INFO  [MediaServer] Temp dir: /tmp/
2014-06-02 21:26:55,748 INFO  [MediaServer] ------------------------------------------------------------------------
2014-06-02 21:26:56,136 INFO  [WebServer] Socket buffer set to 65535 bytes
2014-06-02 21:26:56,142 INFO  [RestletServer] Starting Restlet server (/rest) exposed on port 23423
2014-06-02 21:26:56,274 INFO  [RestletServer] Starting Restlet server (/cds) exposed on port 23424
2014-06-02 21:26:56,275 INFO  [RestletServer] Starting Restlet server (/mediabrowser) exposed on port 23424
2014-06-02 21:26:56,314 INFO  [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2014-06-02 21:26:56,343 INFO  [DatabaseManager] Using DERBY database language
2014-06-02 21:26:59,512 INFO  [MediaServer] ------------------------------------------------------------------------
2014-06-02 21:26:59,513 INFO  [MediaServer] License: PRO (EVALUATION, id: 11111111-1111-1111-1111-111111111113)
2014-06-02 21:26:59,513 INFO  [MediaServer] ------------------------------------------------------------------------
2014-06-02 21:26:59,538 INFO  [Device] Created UPnP Device with UUID: 3bd8e982-6199-350a-871a-18eca4d5aa0f, bound address: 192.168.252.1
2014-06-02 21:26:59,866 WARN  [ProfilesDefinitionParser] Cannot get name of the local computer: DC-MH-f: DC-MH-f
2014-06-02 21:27:01,098 INFO  [ProfilesDefinitionParser] Parsing Profiles definition
2014-06-02 21:27:01,249 ERROR [MediaServer] An unexpected error occured. Ending the application. Message: replacement
java.lang.NullPointerException: replacement
   at java.util.regex.Matcher.replaceFirst(Matcher.java:867)
   at java.lang.String.replaceFirst(String.java:2158)
   at org.serviio.profile.ProfilesDefinitionParser.getDeviceDescription(ProfilesDefinitionParser.java:378)
   at org.serviio.profile.ProfilesDefinitionParser.processProfileNode(ProfilesDefinitionParser.java:229)
   at org.serviio.profile.ProfilesDefinitionParser.parseDefinition(ProfilesDefinitionParser.java:164)
   at org.serviio.profile.ProfileManager.parseProfilesFromFile(ProfileManager.java:181)
   at org.serviio.profile.ProfileManager.loadProfiles(ProfileManager.java:156)
   at org.serviio.MediaServer.main(MediaServer.java:122)
2014-06-02 21:27:01,253 WARN  [IndexedDiskCache] Region [online_technical_metadata] Disk cache not shutdown properly, shutting down now.
2014-06-02 21:27:01,253 WARN  [IndexedDiskCache] Region [tokens] Disk cache not shutdown properly, shutting down now.
2014-06-02 21:27:01,257 WARN  [IndexedDiskCache] Region [thumbnails] Disk cache not shutdown properly, shutting down now.


Is this just a DNS resolution issue? Or, is Serviio unable to operate with only a LAN connection? If so, is there something I can configure to allow proper start up without the Internet connected?

TIA - JJ
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Jun 09, 2014 7:11 pm

Re: Java error at startup

It needs a NIC adapter, no need for internet connection. it looks like you disabled the LAN NIC and Serviio cannot get the localhost IP address basically.
<<

JJ_Day

Serviio newbie

Posts: 6

Joined: Fri May 23, 2014 2:09 am

Post Sat Jun 14, 2014 2:49 am

Re: Java error at startup

Thank you for the response.

In the hope of helping someone else who has the same problem I am posting the resolution. Similar information is in thread "CentOS Error when starting Serviio" although the error is not actually specific to the OS.

The default NIC for the machine is WLAN0 (wifi). It is a DHCP connection as assigned by the AP and used for DNS resolution. Unless wifi is connected, the machine has no reolution for names and the actual IP address of the computer name does not exist. Adding an entry to /etc/hosts with the computer hostname and IP address of the NIC used for SERVIIO discovery eliminates the problem. Adding any IP address for the hostname will also eliminate the problem but seems to slow SERVIIO performance. Note though that this solution has the potential to cause other problems when the default NIC is enabled since the hosts entry will never match the public resolution of the machine.

JJ

Return to Serviio Support & Help

Who is online

Users browsing this forum: Google [Bot] and 15 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.