Announcement

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

    NullPointerException related to builtInTypes.xml

    I've just tried to roll out some new features in one of our apps that rely on the June 12 3.1d build. I'm now getting these errors on deployment to our production environment. Every thing works fine in development:

    Code:
    [#|2012-06-25T09:44:59.738-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=10;_ThreadName=Thread-2;|=== SmartClient Init: log4j.isc.c\
    onfig.xml not found in CLASSPATH. Assuming log4j configuration for com.isomorphic is located in some other log4j configuration file.|#]
    
    [#|2012-06-25T09:44:59.925-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=10;_ThreadName=Thread-2;|Problem loading builtinTypes.xml|\
    #]
    
    [#|2012-06-25T09:44:59.928-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=10;_ThreadName=Thread-2;|Exception when loading from __USE\
    _CONTAINER__/isomorphic/system/schema/builtinTypes.xml:
    java.lang.NullPointerException
    	at com.isomorphic.io.ISCFile.lastModified(ISCFile.java:419)
            at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:131)
            at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:74)
    	at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:138)
            at com.isomorphic.xml.XML.getXMLDocument(XML.java:255)
            at com.isomorphic.xml.XML.toDSRecords(XML.java:263)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:266)
            at com.isomorphic.datasource.DataSource.<clinit>(DataSource.java:571)
            at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:119)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:127)
            at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:94)
    	at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:89)
            at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:83)
            at com.isomorphic.servlet.PreCache.preLoadDataSources(PreCache.java:135)
    	at com.isomorphic.servlet.PreCache.init(PreCache.java:83)
            at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1444)
            at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1241)
    	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5093)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:5380)
            at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
    What's really bad is that I'm no longer generating any log file. I do indeed have a "com.isomorphic" section in my regular log4j.xml file, which used to produce a log of this application's status. The entry is:

    Code:
    <logger name="com.isomorphic">
          <level value="INFO" />
    </logger>
    Note that this is also the first release where we're using the server-side features, including an Oracle connection pool configured via server.properties.

    The app has multiple tabs, and the functionality on the older tabs (predating this release) works fine. The new tab on the app that makes use of a server-side DataSource (with that Oracle connection pool) does not load, and because of the logging problem I can't see what the errors are. The other, older features of the app (which are extensive, including other server-side (GWT-RPC) database connectivity using our own framework) all work fine.

    I have done thorough cleanups of all older Isomorphic resources prior to our production builds (including any gwt-unitCache directories) and have restarted our Glassfish server numerous times.

    I'm out of ideas...

    Thanks.

    #2
    This looks like either the imports are wrong (still importing *.SmartGWT not *.SmartGWTPro) or a GWT compile has not been run since changing the imports. Just run through all the steps in the install guide whether it's your provide IDE setup or build scripts for the production environment.

    Comment


      #3
      I haven't been able to figure this one out yet... got caught up in another problem... Please see my next post.

      Comment


        #4
        Got this all working... it was a CLASSPATH problem.

        Steps 4 & 5 of the install guide say to put the log4j.config.xml (which I took to be 'log4j.isc.config.xml') and the server.properties file in the 'src' dir of the project. This indeed works when running locally (hosted mode), but did not work when deployed in production. We'll have to check our CLASSPATH setup there.

        Moving those files to the war/WEB-INF/classes directory solved the problem and the app runs fine in both hosted and production, and the logging works fine again as well. I was also glad to see that I'm able to run in production with webroot: __AUTODETECT__

        Comment


          #5
          As the install docs mention, these files are placed in the src/ dir as a means of getting them into the CLASSPATH. If placed directly into WEB-INF/classes in Eclipse, Eclipse tends to overwrite these files silently.

          A normal ant-based build should be copying them from src/ into classes/ or a .jar within WEB-INF/lib so if you want to figure out the underlying cause that would be where to start.

          Comment


            #6
            Yes, we are looking into our production build scripts to see why the push from src to WEB-INF/classes isn't taking place. For what it's worth, we use JetBrains IDEA and it doesn't have the "overwrite" issue you mention with Eclipse.

            Thanks.

            Comment

            Working...
            X