Announcement

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

    BuiltinDS evaluation setup Unable to load properties file

    Hi,

    I'm new to SmartGWT (2.4), and I'm trying to set up the builtinds example according to the README.txt in the smaples directory.

    I've done everything according to the setup instructions, and when I go to run the application (as web application per instructions), I get two errors; the first of which is "Unable to load properties file...<myPath>/smartgwtee-2.4/samples/built-in-ds/war/WEB-INF/logging.properties"

    Obviously the file isn't there, is this supposed to be included in the project?

    Thanks,

    #2
    I had the same problem. Creating an empty properties file made the error go away but I don't know why the file was missing to begin with.

    Comment


      #3
      What IDE and application server are you using? This isn't coming from SmartGWT, so presumably some third-party system is looking for this file.

      Comment


        #4
        Thanks for quick reponse. Rather than just quote versions I've tried to give as much detail as possible in the steps I've followed to reproduce the problem. I am new to SmartGWT as well as IDE/web development in general so it may well be that I've missed something that a more experienced person would consider trivial/obvious. Nevertheless I have had 20 years in software development so feel I should be able to follow instructions reasonably accurately.

        The software versions I'm using are:

        smartgwtee-3.0p
        Eclipse Version: Indigo Service Release 1 Build id: 20110916-0149

        Google App Engine Java SDK 1.6.3 1.6.3.v201202290255r37 com.google.appengine.eclipse.sdkbundle.e37.feature.feature.group Google, Inc.
        Google Plugin for Eclipse 3.7 2.5.2.v201202290255-rel-r37 com.google.gdt.eclipse.suite.e37.feature.feature.group Google, Inc.
        Google Web Toolkit SDK 2.4.0 2.4.0.v201202290255-rel-r37 com.google.gwt.eclipse.sdkbundle.e37.feature.feature.group Google, Inc.

        The last three are as reported by the Eclipse Installation Details dialog. Note that it is not a clean install of Eclipse - there are other pieces of software I've installed using the Eclipse Install tool such as Subclipse and Atlassian.

        I started with the Quick Start Guide which recommends starting with the built-in-ds project. I used the README.txt for that project, starting from scratch with a new project. Under "Build Prerequisites" it says

        "Ensure GWT_HOME to the location of your Google Web Toolkit SDK directory."

        Since I installed the GWT using Eclipse I'm guessing that I don't need to define GWT_HOME independently, that is, Eclipse ensures it's on the path for me, correct? Otherwise I would need to define GWT_HOME to point to a folder in the depths of the Eclipse installation where Eclipse put it - please let me know.

        I ignored the "Build and deployment using ant" section.

        Following instructions in the "Eclipse Configuration" section I:

        - Set the Eclipse Classpath variable SGWTEE_HOME ... In my case the value of path is "C:/Downloads/smartgwtee-3.0p".

        - Follow the instructions for "Working with Existing Projects" with the GEP: http://code.google.com/eclipse/docs/existingprojects.html

        This URL now redirects to

        https://developers.google.com/eclipse/docs/existingprojects

        Under the heading Importing your application into Eclipse, it indicates you can either create a new project or import it "if your application's source tree already contains a .project file". I can see that built-in-ds has a .project file so I go for the import: File > Import > General and selecting Existing Projects into Workspace. In the Import dialog I select a root directory of:

        C:\Downloads\smartgwtee-3.0p\samples\built-in-ds

        and then click Finish. The project, builinds, then appears in the Package Explorer.

        The link also has a section "Enabling Google SDKs if your project already has a WAR directory" which I assume I have to follow as well. Enabling Google Web Toolkit for the project I found was not necessary because the "Use Google Web Toolkit" box was already ticked in the "Properties for builtinds" dialog. The "Use Google App Engine" box on the other hand was not ticked so I ticked this. Setting the war directory I think is also unnecessary because under Properties -> Google > Web Application the "This project has a WAR directory" was already ticked and a value of 'war' was already in the "WAR directory" field.
        Still under the "Enabling Google SDKs.." section it finally says "If your project depends on libraries not provided by the GWT and App Engine SDKs, put them in <WAR>/WEB-INF/lib and add them to your Java build path. This approach should work for most existing Java web applications, including server-side Java applications (such as those made from the App Engine template), and GWT 1.6 or later projects." I don't know about other libraries so do nothing with this.

        The final section in the link talks about working with GWT 1.5 and earlier so I ignore that and go back to the README.txt. It says:

        - Finally, create a launch configuration and launch the app as described here:
        http://code.google.com/eclipse/docs/running_and_debugging.html

        This URL redirects to:

        https://developers.google.com/eclipse/docs/running_and_debugging

        This page is entitled "Running and Debugging with a Pre-GWT 2.0 SDK" which doesn't apply to me though it gives a link to "new documentation" so I follow that to:

        https://developers.google.com/eclipse/docs/running_and_debugging_2_0

        The page starts with "If you created a project using the New Web Application Wizard,..." which doesn't apply to me but I get the idea that I can right-click the Eclipse project and go to Run As -> Run Configurations... to set up a configuration for the builtinds project. I follow the instructions on the page as best I can making sure the settings in my configuration look sensible by comparison:

        Main Tab:
        Name: BuiltInDS
        Project: builtinds
        Main class: com.google.gwt.dev.DevMode
        GWT Tab:
        Log level: Info
        Code Server Port: 9997 (note this field not shown on web page)
        Available Modules: BuiltIn DS - com.smartgwt.sample

        I ignore the "Additional Arguments" section.
        Clicking the Run button on the bottm right of the Run Configurations dialog I get the console output below.

        Initializing App Engine server
        18-Apr-2012 19:35:01 com.google.apphosting.utils.jetty.JettyLogger info
        INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
        18-Apr-2012 19:35:01 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
        INFO: Successfully processed C:\Downloads\smartgwtee-3.0p\samples\built-in-ds\war\WEB-INF/appengine-web.xml
        18-Apr-2012 19:35:01 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
        INFO: Successfully processed C:\Downloads\smartgwtee-3.0p\samples\built-in-ds\war\WEB-INF/web.xml
        18-Apr-2012 19:35:01 com.google.appengine.tools.development.AbstractContainerService loadPropertiesFile
        WARNING: Unable to load properties file, C:\Downloads\smartgwtee-3.0p\samples\built-in-ds\war\WEB-INF\logging.properties
        java.io.FileNotFoundException: C:\Downloads\smartgwtee-3.0p\samples\built-in-ds\war\WEB-INF\logging.properties (The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at com.google.appengine.tools.development.AbstractContainerService.loadPropertiesFile(AbstractContainerService.java:526)
        at com.google.appengine.tools.development.AbstractContainerService.updateLoggingConfiguration(AbstractContainerService.java:475)
        at com.google.appengine.tools.development.AbstractContainerService.staticInitialize(AbstractContainerService.java:388)
        at com.google.appengine.tools.development.AbstractContainerService.loadAppEngineWebXml(AbstractContainerService.java:369)
        at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:237)
        at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
        at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
        at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
        at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
        at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
        at com.google.gwt.dev.DevMode.main(DevMode.java:311)
        18-Apr-2012 19:35:01 com.google.apphosting.utils.jetty.JettyLogger info
        INFO: jetty-6.1.x
        18-Apr-2012 19:35:02 com.google.apphosting.utils.jetty.JettyLogger warn
        WARNING: failed com.google.appengine.tools.development.DevAppEngineWebAppContext@1c27a09{/,C:\Downloads\smartgwtee-3.0p\samples\built-in-ds\war}: java.lang.NoClassDefFoundError: org/hsqldb/Server
        18-Apr-2012 19:35:02 com.google.apphosting.utils.jetty.JettyLogger warn
        WARNING: failed JettyContainerService$ApiProxyHandler@9cc962: java.lang.NoClassDefFoundError: org/hsqldb/Server
        18-Apr-2012 19:35:02 com.google.apphosting.utils.jetty.JettyLogger warn
        WARNING: 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:191)
        at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
        at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
        at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
        at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
        at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
        at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
        at com.google.gwt.dev.DevMode.main(DevMode.java:311)
        Caused by: java.lang.ClassNotFoundException: org.hsqldb.Server
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 20 more
        18-Apr-2012 19:35:02 com.google.apphosting.utils.jetty.JettyLogger info
        INFO: Started SelectChannelConnector@0.0.0.0:8888
        18-Apr-2012 19:35:02 com.google.appengine.tools.development.DevAppServerImpl start
        INFO: The server is running at http://localhost:8888/
        18-Apr-2012 19:35:02 com.google.appengine.tools.development.DevAppServerImpl start
        INFO: The admin console is running at http://localhost:8888/_ah/admin

        Comment


          #5
          Wow that was thorough.

          The problem is that you are deploying to Google App Engine, which is a cloud hosting solution similar to Amazon's EC2. You probably didn't mean to do this, and you can avoid this via changing your Run Configuration to not use Google App Engine.

          Comment


            #6
            OK, thanks for that, now makes sense. I thought there was a built-in version of it as well as the cloud version.

            So I opened the builtinds project properties, went to Google -> App Engine and unticked the "Use Google App Engine" box and clicked OK. Eclipse now shows an error against the project:


            "The project 'builtinds' does not have any GWT SDKs on its build path builtinds Unknown Google Web Toolkit Problem"

            I assume there's little point continuing - or should I ignore the error and try running the project anyway?

            Comment


              #7
              App Engine offers a local server for testing only - unless you plan to use GAE for final deployment there's no point in using this test server.

              Right-clicking on that issue in Eclipse should lead you through a wizard to get your GWT SDK installed.

              Comment


                #8
                OK thanks, I'll investigate. I assume that, as far as you can tell, I have not missed anything when following the README.txt?

                Comment


                  #9
                  Well, you skipped the GWT_HOME step so that's why your project doesn't know where GWT is. As far as ending up trying to deploy to App Engine, this was probably something like a checkbox that looked important that you checked but shouldn't have.

                  Comment


                    #10
                    Oh right, so I DO need to set GWT_HOME - kind of crucial then. Further to my earlier post, when I said

                    "Since I installed the GWT using Eclipse I'm guessing that I don't need to define GWT_HOME independently, that is, Eclipse ensures it's on the path for me, correct?"

                    answer is, incorrect, I DO need to define it.

                    Also

                    "Otherwise I would need to define GWT_HOME to point to a folder in the depths of the Eclipse installation where Eclipse put it - please let me know."

                    In my case this is "C:\Downloads\eclipse\plugins\com.google.gwt.eclipse.sdkbundle_2.4.0.v201202290255-rel-r37\gwt-2.4.0"

                    Look OK?

                    Comment


                      #11
                      No, no reason to stick it there - put it anywhere you like, tell Eclipse where it is, and Eclipse will copy the necessary resources into that deployment directory you found.

                      Comment

                      Working...
                      X