Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    java.lang.NoClassDefFoundError: org/hsqldb/Server

    Hi,

    I'm new to SmartGWT (2.4), and I'm trying to set up the builtinds example. It looks like everything is set, except the database.

    My Eclipse console reports the following when attempting to start the web application:

    [WARN] failed JettyContainerService$ApiProxyHandler@3f4ebd: java.lang.NoClassDefFoundError: org/hsqldb/Server
    [WARN] Error starting handlers
    java.lang.NoClassDefFoundError: org/hsqldb/Server......

    Full output from Eclipse console:

    Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
    Successfully processed /Users/binarygiant/smartgwtee-2.4/samples/built-in-ds/war/WEB-INF/appengine-web.xml
    Successfully processed /Users/binarygiant/smartgwtee-2.4/samples/built-in-ds/war/WEB-INF/web.xml
    [WARN] failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@cc7439{/,/Users/binarygiant/smartgwtee-2.4/samples/built-in-ds/war}: java.lang.NoClassDefFoundError: org/hsqldb/Server
    [WARN] failed JettyContainerService$ApiProxyHandler@19d12cc: java.lang.NoClassDefFoundError: org/hsqldb/Server
    [WARN] Error starting handlers
    java.lang.NoClassDefFoundError: org/hsqldb/Server
    at com.smartgwt.sample.server.listener.HSQLServletContextListener.contextInitialized(HSQLServletContextListener.java:59)
    at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185)
    at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:149)
    at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
    at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:119)
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:431)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1053)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)
    at com.google.gwt.dev.DevMode.main(DevMode.java:282)
    Caused by: java.lang.ClassNotFoundException: org.hsqldb.Server
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 20 more
    The server is running at http://localhost:8888/


    Can anyone out there point me in the right direction?

    Thanks in advance
    Last edited by binarygiant; 16 Feb 2011, 12:20.

    #2
    sounds like you're missing the database jar. find out which jar is missing and copy it into war/lib. i had issues before with the paths of some of the demos. i think some versions of eclipse automatically copy in the jars and some don't.

    Comment


      #3
      atomatom,

      Thanks for the reply. How would one go about finding out which jar is missing? I'm not sure what jars are supposed to be in the war/lib folder. For example, what is the name of the database jar? hsqldb.jar? I assume that's what you mean.

      Thanks,

      BG

      Comment


        #4
        You seem to have a leading comma in the filesystem path reported by Eclipse for where it's looking for the .jars. You might have tried to type in two paths in some Eclipse dialog where only one is expected.

        Comment


          #5
          This is out-of-the-box, as downloaded from the smartclient site. I have the same issues on linux, windows, and mac os x (all downloaded separately).

          Comment


            #6
            Well no, "out of the box" it works (for everyone else).

            Do you have any kind of beta software involved - beta version of Eclipse, of GWT, of the GWT Eclipse plugin, etc?

            Comment


              #7
              So everyone else can you point me in the right direction? Can't get this working. Colleague seems to have the same issue following the readme to the letter.

              I can't get this thing running.

              Comment


                #8
                List out every possible detail you can obtain about your environment - versions of everything involved including OS versions and all tools involved. That's the only way we can get to the bottom of this when everyone else has it working fine.

                Comment


                  #9
                  It helps to make your environment variables persistent....

                  Once I did that, the ant build worked properly.

                  Builtinds project runs but when I select a data source from the UI, I get a socket creation error.

                  23:55:03.434 [ERROR] [builtinds] 23:55:03.417:XRP9:WARN:RPCManager:socket creation error, response: {operationId: "animals_fetch",
                  clientContext: Obj,
                  context: Obj,
                  transactionNum: 0,
                  httpResponseCode: 200,
                  httpResponseText: "//isc_RPCResponseStart-->[{queueStatus:-..."[142],
                  xmlHttpRequest: [object XMLHttpRequest],
                  transport: "xmlHttpRequest",
                  status: -1,
                  clientOnly: undef,
                  httpHeaders: Obj,
                  isStructured: true,
                  callbackArgs: null,
                  results: Obj,
                  queueStatus: -1,
                  isDSResponse: true,
                  invalidateCache: false,
                  data: "socket creation error",
                  startRow: 0,
                  endRow: 0,
                  totalRows: 0}

                  com.smartgwt.client.core.JsObject$SGWT_WARN: 23:55:03.417:XRP9:WARN:RPCManager:socket creation error, response: {operationId: "animals_fetch",
                  clientContext: Obj,
                  context: Obj,
                  transactionNum: 0,
                  httpResponseCode: 200,
                  httpResponseText: "//isc_RPCResponseStart-->[{queueStatus:-..."[142],
                  xmlHttpRequest: [object XMLHttpRequest],
                  transport: "xmlHttpRequest",
                  status: -1,
                  clientOnly: undef,
                  httpHeaders: Obj,
                  isStructured: true,
                  callbackArgs: null,
                  results: Obj,
                  queueStatus: -1,
                  isDSResponse: true,
                  invalidateCache: false,
                  data: "socket creation error",
                  startRow: 0,
                  endRow: 0,
                  totalRows: 0}
                  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                  at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                  at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
                  at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
                  at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
                  at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
                  at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
                  at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
                  at java.lang.Thread.run(Thread.java:680)

                  Comment


                    #10
                    Was some step not listed in the readme required in order to "make your environment variables persistent"?

                    This socket creation error looks like HSQL hasn't started, which suggests that you did not get the necessary entries from web.XML (some involve HSQL). More details will be in the server-side log - always check this, always post this when looking for help.

                    Comment


                      #11
                      I misinterpreted the line in the readme "ensure gwt_home..." to mean set that variable like the swgtee_home in eclipse. Then when I simply exported the variable from terminal it didn't work either (for obvious reasons).


                      As far as the database not starting, it works in other examples and can be started alone and manged from the swing client. I'll look at the files you mentioned. Thanks again.

                      Comment


                        #12
                        I downloaded eclipse 3.6 (Helios) the GWT eclipse plugings for 3.6 and the smartGWT EE and when I follow all the steps to run one of the samples I get the same error even though all the SGWTEE_HOME/lib jar files are in the classpath for the project and exported with the project as well.

                        Do i really have to physically copy all those jars to the WEB_INF/lib as well. That does not seem right, and if I really need to copy them, then why wouldn't the sample already have them there.

                        Comment


                          #13
                          No, you don't need to copy them, the environment variable is sufficient. Look for a basic error such as a typo.

                          Comment


                            #14
                            Same problem with missing jar files. did you find a way to avoid copying them from the smartgwt/lib folder?

                            Comment


                              #15
                              Same question as on your other thread - what IDE and application server are you using? Something is special in your environment.

                              Comment

                              Working...
                              X