FAQ  •  Register  •  Login

Cannot create instance of SOAP MessageFactory

<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Thu Dec 27, 2018 9:51 am

Cannot create instance of SOAP MessageFactory

I'm not able to connect to serviio from my blu-ray anymore, not sure if this is the cause:
  Code:
2018-12-27 09:07:04,661 ERROR [SOAPMessageParser] Cannot create instance of SOAP MessageFactory
javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
   at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:120)
   at org.serviio.upnp.protocol.soap.SOAPMessageParser.<clinit>(SOAPMessageParser.java:35)
   at org.serviio.upnp.protocol.soap.ServiceInvoker.invokeService(ServiceInvoker.java:70)
   at org.serviio.upnp.webserver.ServiceControlRequestHandler.handleRequest(ServiceControlRequestHandler.java:65)
   at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:66)
   at org.apache.http.protocol.HttpService.doService(HttpService.java:423)
   at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:78)
   at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:341)
   at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:204)

  Code:
2018-12-27 08:52:19,411 INFO  [MediaServer] ------------------------------------------------------------------------
2018-12-27 08:52:19,411 INFO  [MediaServer] Serviio DLNA media streaming server v 1.10.1 (rev. 3e5b0ba57122)
2018-12-27 08:52:19,412 INFO  [MediaServer] Petr Nejedly 2009-2018
2018-12-27 08:52:19,412 INFO  [MediaServer] http://www.serviio.org
2018-12-27 08:52:19,412 INFO  [MediaServer]
2018-12-27 08:52:19,412 INFO  [MediaServer] Java 10.0.2-Oracle Corporation amd64
2018-12-27 08:52:19,412 INFO  [MediaServer] OS Linux 4.15.0-43-generic
2018-12-27 08:52:19,412 INFO  [MediaServer] File encoding: UTF-8
2018-12-27 08:52:19,413 INFO  [MediaServer] Headless mode enabled: true
2018-12-27 08:52:19,413 INFO  [MediaServer] User: serviio
2018-12-27 08:52:19,413 INFO  [MediaServer] User home dir: /home/serviio
2018-12-27 08:52:19,413 INFO  [MediaServer] Temp dir: /tmp
2018-12-27 08:52:19,413 INFO  [MediaServer] ------------------------------------------------------------------------

  Code:
● serviio.service - Serviio Media Server
   Loaded: loaded (/lib/systemd/system/serviio.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-12-27 09:34:02 UTC; 15min ago
  Process: 5714 ExecStop=/opt/serviio/bin/serviio.sh -stop (code=exited, status=0/SUCCESS)
 Main PID: 5776 (java)
    Tasks: 120 (limit: 3973)
   CGroup: /system.slice/serviio.service
           └─5776 java --add-modules jdk.unsupported -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -Djava.net.preferIPv4Stack=true -Djava.awt.headless=tru

Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:204)
Dec 27 09:48:27 carmona serviio.sh[5776]: Exception in thread "Thread-1107" java.lang.NullPointerException
Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.serviio.upnp.protocol.soap.SOAPMessageParser.parseSOAPMessage(SOAPMessageParser.java:48)
Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.serviio.upnp.protocol.soap.ServiceInvoker.invokeService(ServiceInvoker.java:70)
Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.serviio.upnp.webserver.ServiceControlRequestHandler.handleRequest(ServiceControlRequestHandler.java:65)
Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:66)
Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.apache.http.protocol.HttpService.doService(HttpService.java:423)
Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:78)
Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:341)
Dec 27 09:48:27 carmona serviio.sh[5776]:         at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:204)
<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Sun Dec 30, 2018 1:51 am

Re: Cannot create instance of SOAP MessageFactory

This is actually affecting both of my devices that connect to serviio. The blu-ray is older and doesn't see serviio at all. The TV is newer and does see it, but when I click on the icon, just shows a loading animation, and never connects. I did see an older post that seems to indicate it could be an issue with my Java install, but would like confirmation before I start stabbing somewhat blindly for a solution.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Dec 30, 2018 4:56 pm

Re: Cannot create instance of SOAP MessageFactory

It's due to Java 10, try running with Java 8. Although I thought this was fixed in 1.10.1. You could also try Java 11.
<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Sun Dec 30, 2018 6:05 pm

Re: Cannot create instance of SOAP MessageFactory

Ok. I wondered about that, but kind of thought the same thing, that Java 10 was working even though official documentation says to use 8.
<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Sun Dec 30, 2018 7:04 pm

Re: Cannot create instance of SOAP MessageFactory

Installed 8 and tried changing the version in the serviio.sh file but either that's not the right place, or I did it wrong, still getting 10 as version serviio is loading.

  Code:
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
    [ -n "$SERVIIO_HOME" ] &&
        SERVIIO_HOME=`cygpath --unix "$SERVIIO_HOME"`
    [ -n "$JAVA_HOME" ] &&
        JAVA_HOME=`/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java "$JAVA_HOME"`
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Dec 31, 2018 12:57 am

Re: Cannot create instance of SOAP MessageFactory

NuttBoxer wrote:Installed 8 and tried changing the version in the serviio.sh file but either that's not the right place, or I did it wrong, still getting 10 as version serviio is loading.

  Code:
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
    [ -n "$SERVIIO_HOME" ] &&
        SERVIIO_HOME=`cygpath --unix "$SERVIIO_HOME"`
    [ -n "$JAVA_HOME" ] &&
        JAVA_HOME=`/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java "$JAVA_HOME"`


You have to switch it at the OS level. When I was experimenting with Mint, I had the same issue. Do a search on the web for changing the default Java version in Linux and you should find the command string pretty fast.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Mon Dec 31, 2018 1:54 am

Re: Cannot create instance of SOAP MessageFactory

In that case seems like I should just un-install 10. I thought there was a way to run everything else on 10 and just serviio on 8.
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Dec 31, 2018 2:27 am

Re: Cannot create instance of SOAP MessageFactory

I don't think so, but then I'm no expert on Linux. :)
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Mon Dec 31, 2018 3:13 am

Re: Cannot create instance of SOAP MessageFactory

Neither am I, but seems like there would be a way to choose a jre version in the Serviio settings somewhere.

Thinking about it, if I remove 10, it's just going to change again when I update the server, so keeping both does make more sense. Pointed Ubuntu over to 8, stopped and started the service, and everything is back up and running.

I kind of suspected 10 might be the issue as I think it was installed on the updates I ran right before serviio stopped working, but wanted to ask instead of just assuming. Appreciate everyone's help!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Dec 31, 2018 11:56 am

Re: Cannot create instance of SOAP MessageFactory

you should be able to run many versions of Java on your OS.

Just set

  Code:
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre


either earlier in the serviio.sh file, or export it in your shell before running servio.sh
<<

kairoh

DLNA master

Posts: 180

Joined: Sun Aug 08, 2010 10:41 am

Location: France

Post Wed May 22, 2019 8:20 pm

Re: Cannot create instance of SOAP MessageFactory

Just change one line in serviio.sh

  Code:
case "$JAVA_VERSION" in
    \1.8*) JAVA9_OPTS="" ;;
    *) JAVA9_OPTS="--add-modules jdk.unsupported" ;;
esac


to

  Code:
case "$JAVA_VERSION" in
    \1.8*) JAVA9_OPTS="" ;;
    *) JAVA9_OPTS="--add-modules java.xml.ws" ;;
esac


This works with java 9 and should work newer version.

Explanation : starting from java 9, JVM was cut in many modules.
Some of them aren't loaded by default, like SOAP webservice (java.xml.ws).
This option force to load this module.
Serviio WebUI console developer : New Homepage | Support | Project | Issues

Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 42 guests

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