chewjq
Hi all,
I have put the HelloWorld example in custom java package called Lightstreamer. I am getting this error when trying to start the LS server.
java.lang.NoClassDefFoundError: HelloWorldDataAdapter (wrong name: Lightstreamer/HelloWorldDataAdapter)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at com.lightstreamer.h.ad.loadClass(ad.java)
at com.lightstreamer.k.z.a(z.java)
at com.lightstreamer.k.z.a(z.java)
at com.lightstreamer.k.z.b(z.java)
at com.lightstreamer.k.m.a(m.java)
at com.lightstreamer.h.b.run(b.java)
19-May-10 11:00:08,494 |ERROR|LightstreamerLogger.init |main |Error while loading the Adapters
java.lang.Exception: Unexpected error in Data Adapters initialization
at com.lightstreamer.k.z.a(z.java)
at com.lightstreamer.k.z.b(z.java)
at com.lightstreamer.k.m.a(m.java)
at com.lightstreamer.h.b.run(b.java)
Caused by: java.lang.NoClassDefFoundError: HelloWorldDataAdapter (wrong name: Lightstreamer/HelloWorldDataAdapter)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at com.lightstreamer.h.ad.loadClass(ad.java)
at com.lightstreamer.k.z.a(z.java)
Am I defining the custom java package right in adapter.xml?
<?xml version="1.0"?>
<adapters_conf id="HELLOWORLD">
<metadata_provider>
<adapter_class>
com.lightstreamer.adapters.metadata.LiteralBasedProvider
</adapter_class>
</metadata_provider>
<data_provider>
<adapter_class>Lightstreamer.HelloWorldDataAdapter</adapter_class>
</data_provider>
</adapters_conf>
Would appreciate any help on this! thanks in advance :Smile_Ab:
Dario Crivelli
This seems to be a java-related issue.
If your class were just missing, you would get a ClassNotFoundExceptionrather than a NoClassDefFoundError .
So, it seems that some class on which your Lightstreamer.HelloWorldDataAdapter depends is not included in the jar you submit to Lightstreamer.
Try adding a main to your adapter class and launching it from the command line, without Lightstreamer Server involved.