Results 1 to 2 of 2

Thread: adapter.xml

  1. #1
    Member
    Join Date
    May 2010
    Location
    Singapore
    Posts
    3

    adapter.xml

    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(Secure ClassLoader.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.j ava:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
    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(Secure ClassLoader.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.j ava:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
    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.LiteralBasedPr ovider
    </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

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    This seems to be a java-related issue.
    If your class were just missing, you would get a ClassNotFoundException rather 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.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 11:41 AM.