Known Problems and their Solutions.

Library "dcpssaj" could not be loaded: no dcpssaj in java.library.path

Full error message:

Library "dcpssaj" could not be loaded: no dcpssaj in java.library.path

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opensplice.dds.dcps.ReportStack.start()V

at org.opensplice.dds.dcps.ReportStack.start(Native Method)

at org.opensplice.dds.dcps.DomainParticipantFactoryImpl.create_participant(DomainParticipantFactoryImpl.java:92)

at DDS.DomainParticipantFactory.create_participant(DomainParticipantFactory.java:59)

at lac.cnet.sddl.udi.opensplice.OpenSpliceAbstractionComponent.createParticipant(OpenSpliceAbstractionComponent.java:98)

at lac.cnet.sddl.udi.opensplice.OpenSpliceAbstractionComponent.createParticipant(OpenSpliceAbstractionComponent.java:72)

at lac.cnet.sddl.udi.core.OpenSpliceLayer.createParticipant(OpenSpliceLayer.java:39)

at br.com.meslin.main.benchmark.mrudp.HelloCoreServer.<init>(HelloCoreServer.java:39)

at br.com.meslin.main.benchmark.mrudp.HelloCoreServer.main(HelloCoreServer.java:34)

Root Cause:

  1. The conflict between OpenSplice and OpenCV. Or...

  2. Missing environment variables.

Solution or Workaround 1:

Insert the OpenSplice as JRE native library. If JRE native library is not available, use any other library.

Or even better (but not tested yet): in Java Build Path, under the Source tab, expand any source directory and add the native library location.

Solution or Workaround 2:

Check OpenSplice environment variables:

  • OSPL_HOME

  • PATH

  • LD_LIBRARY_PATH

  • CPATH

  • OSPL_URI

This piece of code can help you to ensure the environment variables are available to the program:

System.out.println("Using OSPL_HOME: " + System.getenv("OSPL_HOME"));

System.out.println("Using PATH: " + System.getenv("PATH"));

System.out.println("Using LD_LIBRARY_PATH: " + System.getenv("LD_LIBRARY_PATH"));

System.out.println("Using CPATH " + System.getenv("CPATH"));

System.out.println("Using OSPL_URI " + System.getenv("OSPL_URI"));


Null pointer exception when running the Contextnet Gateway

$ java -jar /opt/ContextNet/contextnet-2.7.jar 127.0.0.1 5500 OpenSplice

Working Directory = /home/meslin

Exception in thread "main" java.lang.NullPointerException

at lac.cnet.sddl.udi.opensplice.OpenSpliceAbstractionComponent.createPublisher(OpenSpliceAbstractionComponent.java:157)

at lac.cnet.sddl.udi.core.OpenSpliceLayer.createPublisher(OpenSpliceLayer.java:80)

at lac.cnet.gateway.components.Gateway.prepareEntityManager(Gateway.java:234)

at lac.cnet.gateway.components.Gateway.<init>(Gateway.java:173)

at lac.cnet.gateway.tool.GatewayTest.main(GatewayTest.java:39)


Root cause

Misconfigured ospl.xml file.

Solution or Workaround:

Replace the ospl.xml file ;)

Null pointer exception when running the Contextnet Gateway

$ java -jar /opt/ContextNet/contextnet-2.7.jar 127.0.0.1 5500 OpenSplice

Working Directory = /home/meslin

Exception in thread "main" java.lang.NullPointerException

at lac.cnet.sddl.udi.opensplice.OpenSpliceAbstractionComponent.createPublisher(OpenSpliceAbstractionComponent.java:157)

at lac.cnet.sddl.udi.core.OpenSpliceLayer.createPublisher(OpenSpliceLayer.java:80)

at lac.cnet.gateway.components.Gateway.prepareEntityManager(Gateway.java:234)

at lac.cnet.gateway.components.Gateway.<init>(Gateway.java:173)

at lac.cnet.gateway.tool.GatewayTest.main(GatewayTest.java:39)

Root cause

A already running gateway using the same port:

$ ps -alx | grep java

0 1003 8133 8083 20 0 14716 924 pipe_w S+ pts/1 0:00 grep --color=auto java

0 0 19057 19013 20 0 7735576 392260 - Sl ? 150:27 java -jar /opt/ContextNet/contextnet-2.7.jar 172.17.0.2 5500 OpenSplice

Solution or Workaround:

Use the already running instance. Or kill it:

$ kill -9 19057