Announcement

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

    Help smartclient + java + eclipse

    Hi, I am choosing GUI web framework for some projects, and after having a look to some of them we liked SmartGwt for having these sophisticated widgets as nested filter for grids. We use Eclipse and Java for development and integrated correctly with SmartGwt.

    We want database backend for data and it seems that we need SmartClient for this, as SmartGwt seems to work with xml and json only.

    Now I tried to do the same with SmartClient and discovered that:
    - It is easy to make applications with the tools available in the evaluation package that connects sql db to visual components, but I did not succeed in making them from eclipse.
    - All apps seems to be intended to be written in JSP or XML.

    What I would thank is:
    - Some recipe to make SC work with Java and Eclipse
    - In case I am not doing the right way and SC is not intended to be used like that let me know the proper way.

    The reason for using Java is that these applications are part of complex architectures with more components. We have already done projects using Java and GWT.

    Thanks in advance,
    txemi.
    Last edited by josemiguel; 15 Feb 2010, 10:11.

    #2
    See the FAQ - you need SmartGwt Pro or EE, you should never
    mix SmartClient and SmartGWT, each is self-contained. The FAQ also explains how to use Visual Builder.

    Comment


      #3
      Hi, I downloaded smartgwtee and as you said it seems it is what I am looking for as it is Java oriented, not visual tools. I had not seen the small link to it on http://www.smartclient.com/product/download.jsp

      We are considering purchasing it and I am testing it. I tell you the problems I found in case you can help with some tip.

      What I am trying to do: I want to connect some grid to an sql source and test further. (hibernate, datasource inheritance...)

      The problems I found:
      1) I was not able to integrate with eclipse galileo, not for a new project, not for the examples provided, that does not run or compile. So not debug, not nice error messages. Adding all "jars" to a new GWT project does not seems to work, neither does importing it.
      2) The examples run correctly with "ant hosted" so I modified the code to change to a sql datasource as I saw visual builder did, but not having verbose error messages I did not manage to fix problems and make it work.

      Actually I am reading docs again and looking for more debug information. Thanks in advance for any tip.
      txemi.

      Comment


        #4
        In previous post I told I was not able to integrate smartgwtee and eclipse. What I mean is that I was not able for sql examples. I have no problem with simple examples like those in

        http://www.youtube.com/watch?v=1jOSscxiOyw

        Comment


          #5
          Partially solved

          I managed to connect one of the examples to a mysql db. (I looked at files generated by visual builder an did the same in the example).

          The thing in witch I did not succeed is in building this project from scratch or imported in eclipse. I would thank help on this.

          Thanks int advance,
          txemi.

          Comment


            #6
            Each sample project has a readme with instructions on importing it into Eclipse.

            Comment


              #7
              We followed the instructions and got next error inside eclipse.
              We tried with gwt 1.6, 1.7, 2.0...
              The example we are trying to run is built-in-ds but it happens with all examples from smartgwtee-2.0.
              We had to manually create two files: appengine-web.xml and logging.properties.
              I paste the error.

              (<unknown>:24558): GLib-WARNING **: g_set_prgname() called multiple times
              18-feb-2010 11:52:55 com.google.apphosting.utils.jetty.JettyLogger warn
              ADVERTENCIA: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@1875a06{/,/media/DatosDivisoftExt/jmmartinez/datos/desarrollo/eclipse/smartgwtee-2.0/builtinds/war}
              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:530)
              at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
              at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
              at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
              at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
              at org.mortbay.jetty.Server.doStart(Server.java:217)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:188)
              at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:120)
              at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
              at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:86)
              at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365)
              at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590)
              at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
              at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
              Caused by: java.lang.ClassNotFoundException: org.hsqldb.Server
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              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.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              ... 20 more
              18-feb-2010 11:52:55 com.google.apphosting.utils.jetty.JettyLogger warn
              ADVERTENCIA: failed JettyContainerService$ApiProxyHandler@29fe15
              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:530)
              at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
              at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
              at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
              at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
              at org.mortbay.jetty.Server.doStart(Server.java:217)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:188)
              at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:120)
              at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
              at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:86)
              at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365)
              at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590)
              at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
              at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
              Caused by: java.lang.ClassNotFoundException: org.hsqldb.Server
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              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.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              ... 20 more
              18-feb-2010 11:52:55 com.google.apphosting.utils.jetty.JettyLogger warn
              ADVERTENCIA: 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:530)
              at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
              at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
              at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
              at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
              at org.mortbay.jetty.Server.doStart(Server.java:217)
              at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
              at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:188)
              at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:120)
              at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
              at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:86)
              at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365)
              at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590)
              at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
              at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
              Caused by: java.lang.ClassNotFoundException: org.hsqldb.Server
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              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.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              ... 20 more
              The server is running at http://localhost:8888/

              (<unknown>:24558): GLib-WARNING **: g_set_prgname() called multiple times
              18-feb-2010 12:05:36 com.google.apphosting.utils.jetty.JettyLogger warn
              ADVERTENCIA: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@1875a06{/,/media/DatosDivisoftExt/jmmartinez/datos/desarrollo/eclipse/smartgwtee-2.0/builtinds/war}
              java.lang.RuntimeException: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
              at com.smartgwt.sample.server.listener.HSQLServletContextListener.contextDestroyed(HSQLServletContextListener.java:89)
              at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:564)
              at org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:485)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
              at org.mortbay.jetty.Server.doStop(Server.java:270)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at com.google.appengine.tools.development.JettyContainerService.stopContainer(JettyContainerService.java:197)
              at com.google.appengine.tools.development.AbstractContainerService.shutdown(AbstractContainerService.java:126)
              at com.google.appengine.tools.development.DevAppServerImpl.shutdown(DevAppServerImpl.java:311)
              at com.google.appengine.tools.development.gwt.AppEngineLauncher$AppEngineServletContainer.stop(AppEngineLauncher.java:60)
              at com.google.gwt.dev.HostedMode.doShutDownServer(HostedMode.java:313)
              at com.google.gwt.dev.HostedModeBase.shutDown(HostedModeBase.java:575)
              at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:409)
              at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
              Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              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.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:169)
              at com.smartgwt.sample.server.listener.HSQLServletContextListener.contextDestroyed(HSQLServletContextListener.java:77)
              ... 16 more
              18-feb-2010 12:05:36 com.google.apphosting.utils.jetty.JettyLogger warn
              ADVERTENCIA: failed JettyContainerService$ApiProxyHandler@29fe15
              java.lang.RuntimeException: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
              at com.smartgwt.sample.server.listener.HSQLServletContextListener.contextDestroyed(HSQLServletContextListener.java:89)
              at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:564)
              at org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:485)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
              at org.mortbay.jetty.Server.doStop(Server.java:270)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at com.google.appengine.tools.development.JettyContainerService.stopContainer(JettyContainerService.java:197)
              at com.google.appengine.tools.development.AbstractContainerService.shutdown(AbstractContainerService.java:126)
              at com.google.appengine.tools.development.DevAppServerImpl.shutdown(DevAppServerImpl.java:311)
              at com.google.appengine.tools.development.gwt.AppEngineLauncher$AppEngineServletContainer.stop(AppEngineLauncher.java:60)
              at com.google.gwt.dev.HostedMode.doShutDownServer(HostedMode.java:313)
              at com.google.gwt.dev.HostedModeBase.shutDown(HostedModeBase.java:575)
              at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:409)
              at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
              Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              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.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:169)
              at com.smartgwt.sample.server.listener.HSQLServletContextListener.contextDestroyed(HSQLServletContextListener.java:77)
              ... 16 more
              18-feb-2010 12:05:36 com.google.apphosting.utils.jetty.JettyLogger warn
              ADVERTENCIA: failed Server@1df9485
              java.lang.RuntimeException: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
              at com.smartgwt.sample.server.listener.HSQLServletContextListener.contextDestroyed(HSQLServletContextListener.java:89)
              at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:564)
              at org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:485)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
              at org.mortbay.jetty.Server.doStop(Server.java:270)
              at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
              at com.google.appengine.tools.development.JettyContainerService.stopContainer(JettyContainerService.java:197)
              at com.google.appengine.tools.development.AbstractContainerService.shutdown(AbstractContainerService.java:126)
              at com.google.appengine.tools.development.DevAppServerImpl.shutdown(DevAppServerImpl.java:311)
              at com.google.appengine.tools.development.gwt.AppEngineLauncher$AppEngineServletContainer.stop(AppEngineLauncher.java:60)
              at com.google.gwt.dev.HostedMode.doShutDownServer(HostedMode.java:313)
              at com.google.gwt.dev.HostedModeBase.shutDown(HostedModeBase.java:575)
              at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:409)
              at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
              Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
              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.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:169)
              at com.smartgwt.sample.server.listener.HSQLServletContextListener.contextDestroyed(HSQLServletContextListener.java:77)
              ... 16 more

              Comment


                #8
                Does not happen with a fresh install, following the instructions provided. If you want to see this sample work, do a fresh install.

                Comment


                  #9
                  We did a fresh install as you said:

                  1) Fresh Galileo
                  2) Fresh SDK with 1.7, 1.6, 2.0
                  3) Import sample project (built-in-ds)
                  4) Set SGWTEE_HOME
                  5) Activate App Engine for that project

                  After activating App engine complains about appengine-web.xml and logging.properties

                  Error is the same reported above.

                  Wit no App Engine it builds but does not find EntryPoint.

                  We did not expect that building a sample application would be so tricky. Tomorrow will have to take the decision, we spent several days with it and we are afraid that daily development with smartgwtEE could be too difficult.

                  We would highly appreciate some tutorial from make a very simple db application from scratch. If it does exists we would thank the link.

                  Thank you very much for your patience.

                  Comment


                    #10
                    Since the samples run fine from the command prompt using "ant hosted" and "ant war" to build the war, the issue is clearly with the setup of the project in Eclipse and not a problem with SmartGWT EE itself and you're equally likely to run into similar configuration issues with any other project since SmartGWT EE does not impose any special configuration requirements - its the standard GWT prescribed directory structure.

                    Now we've tested the sample projects using Eclipse and have created the Eclipse project files but perhaps something in your environment is different. For instance, since you're getting a "Caused by: java.lang.ClassNotFoundException: org.hsqldb.Server" exception, it means that the hsql jar files are not being deployed in your WEB-INF/lib when you're trying to run so try to narrow down the cause of this especially since you say you have included all the "jars" located under SGWTEE_HOME/lib. This should however be done for you with the Eclipse project file does set this up.

                    Have you verified that you have set the Eclipse SGWTEE_HOME variable as described in the README.txt? This is the Eclipse Classpath variable and not the system CLASSPATH variable.

                    Set the Eclipse Classpath variable SGWTEE_HOME to point to the root directory of the SmartGWT EE distribution.
                    (Eclipse -->Preferences -->Java --> Build Path -->Classpath Variables). This is required because the included Eclipse
                    project files load the required jar files from SGWTEE_HOME/libs
                    We would recommend that before activating app engine, try to get the provided samples working in your Eclipse environment fist by carefully following the instructions in README.txt. Several other users have successfully run the samples using the provided Eclipse project files for the samples.
                    Last edited by smartgwt.dev; 18 Feb 2010, 11:18.

                    Comment


                      #11
                      Also, to clear up possibly more fundamental confusion - Google App Engine (GAE) is a separate offering from Google, not part of SmartGWT. The files you report needing to create - "appengine-web.xml and logging.properties" - are related to GAE, and you should read the GAE documentation to understand these. It is not a SmartGWT problem.

                      Furthermore, GAE supports persistence via JPA, and not directly via SQL. The example you have chosen to start with - "builtinds" - starts an HSQL database and demonstrates direct integration with SQL. This example will not run on GAE. The appropriate approach for GAE integration is shown by this sample which demonstrates a custom DataSource. Instead of Hibernate code you would use the JPA APIs supported by GAE.

                      Once you understand the fundamentals of the situation, you should come to the correct conclusion that SmartGWT is working fine and exactly as advertised, but that you need to understand more about GAE. If you want help getting SmartGWT running on GAE, consider sponsoring the creation of a GAE-specific sample project. This would get you going in a hurry.

                      Comment


                        #12
                        I am looking for a SmartClient 8.0 developer for a 1 or 2 page application to start with.

                        Can someone please tell me how to find one?

                        David

                        www.RescueMissionForChildren.org

                        davidasa88@gmail.com

                        Comment

                        Working...
                        X