Announcement

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

    Trouble with SmartGwtEE 2.3 examples

    I'm trying to get the smart-gwt-ee 2.3 GAEDS example running and it's giving me grief. I believe I've followed the README.txt instructions, but it still keeps giving me problems. I am working through them, but I wonder why it does not work out of the box? (I'm still presuming I am doing something wrong).

    1) First problem, the classpath in the samples points to hibernate-tools.jar which is not in the smart-gwt-ee lib folder. Easy fix, delete the inclusion (but why is it in the sample CP)

    2) The WAR does not have smart-gwt lib jars in it's class path (or I am doing something quite wrong). For example, Jetty blows up because it can't find DataSourceLoader. I can fix this by copying in the appropriate jar to WAR/WEB-INF/lib folder (actually I dumped the whole SGWTEE lib folder in).

    And finally, the sample worked. So, I am posting this for two reasons. 1 to find out if I am simply doing something wrong, and 2 to help improve the samples so that they run out of the box.

    #2
    Have you looked at the installation instructions in the README file? It indicates how to get the lib files into your classpath.

    Comment


      #3
      I had the same grief you're talking about. Basically, just following the instructions in the README won't help you if you're using Eclipse. You need to look in the build.xml file (Ant) and see which libraries it's expecting to be in the \war\WEB-INF\lib directory (it has an include of an entire directory of jars with a bunch of excludes directives). Or just do what I did. Copy all of the libraries that are in your build path into the \war\WEB-INF\lib directory and rebuild / deploy your project to GAE then it'll work fine.

      Or forget eclipse and use Ant. BTW, I couldn't get the Ant build to work inside eclipse either but I don't recall off hand what the error was.

      Comment


        #4
        um, once again, from the README:

        - Set the Eclipse Classpath variable SGWTEE_HOME to point to the root directory
        of the SmartGWT EE distribution. This is configured through
        Eclipse --> Preferences --> Java --> Build Path --> Classpath Variables.
        The included Eclipse project files load JARs from $SGWTEE_HOME/libs.
        This is how you get the libs in your path.

        Comment


          #5
          As I said, I followed the readme.txt instructions and read over it several times. Adding SGWTEE_HOME helps eclipse compile, but when I "run as Web Application" from eclipse, it fails because of missing jars that it expects.

          There is likely another way to add a classpath when running the war folder, rather than copying all the files in. But copying is probably good as the war is then a self contained executable.

          I respectfully meant the above as questions and suggestions to improve the readme.txt file.

          I am using Eclipse Galileo (3.5), GWT 2.0.0, App Engine 1.3.0, and Java 6 (1.6.0_21)
          Last edited by carchrae; 4 Sep 2010, 02:33.

          Comment


            #6
            You're right, that setting SGWTEE_HOME lets it build but doesn't bring the libs down into the war where they need to be for the project to actually run once deployed to GAE. That's why I manually copied the libraries. If someone has a way that automatically will bring these libs into the war on an Eclipse build, I'm all ears (no pun intended).

            Comment


              #7
              I am still wondering if there is an alternate way of running the project without having to copy the .jar files into the war lib folder. Anyone?

              Comment


                #8
                Eclipse will build Ant projects as well. Try building the ant project inside Eclipse (Right click on the build.xml - build - debug - repeat). It'll copy the libraries into the proper directory for you. You'll need to set environment variables of course and you might need to tweak it a little to get it working.

                Comment


                  #9
                  Greetings,
                  After following the readme and setting the SGWTEE_HOME variable I have gotten a few of the samples to run just fine, but the GAEDS example is still running into an error when it tries to include hibernate-tools.jar. I can't find this jar anywhere and I'm wondering if it got deprecated or if I just failed to install something. All the other jars are where they are supposed to be.

                  Description Resource Path Location Type Project 'GAEDS' is missing required library: 'C:\downloads\Google\smartgwtee-2.4\lib\hibernate-tools.jar' GAEDS Build path Build Path Problem

                  SmartGWT 2.4
                  Eclipse Helios (362), GWT 2.2.0, App Engine 1.4.3, and Java 6 (1.6.0_23)

                  Comment


                    #10
                    First, a sanity check; if you don't plan deployment to GAE (Google App Engine) don't bother troubleshooting this.

                    Second, GAE doesn't use/allow Hibernate, it uses DataNucleus. This is a spurious dependency which doesn't come from the original sample project and may have something to do with resources you still have lying around from playing with other sample project.

                    Comment


                      #11
                      Well I do plan on deploying to GAE. I have heard of others doing this and am very interested in any documentation that points to using SmartGWT within the GAE framework.

                      And the classpath for the ds-gae has hibernate links in it, so I may just go about removing those and see if it works.

                      Comment


                        #12
                        Here's the GAE Overview doc. We'll check on the classpath issue.

                        Comment


                          #13
                          Confirmed that when we upgraded to a new Hibernate version the Hibernate .jars were inadvertently added to the GAE sample, thanks for catching this, we're removing them. You should be able to proceed by just deleting the entries as you suggested.

                          Comment


                            #14
                            I removed that the reference to the hibernate-tools.jar. That seemed to only cause more problems. I'll try and create something separate from ds-gae.

                            Comment


                              #15
                              You need to remove references to hibernate*.jar. annotations, entitymanager, etc.

                              Comment

                              Working...
                              X