Announcement

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

    DataSource.addDynamicDSGenerator causes NullPointerException

    Hello,

    I'm seeing NullPointerException thrown by DataSource.addDynamicDSGenerator call when invoked from Servlet.init method during the application startup:
    Code:
    Loading modules
       com.epacube.ao.approval
          Validating <servlet> tags for module 'approval'
          For additional info see: file:/C:/springsource/sts-2.9.2.RELEASE/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201206290132-rel-r37/gwt-2.4.0/doc/helpInfo/servletMappings.html
             [WARN] Module declares a servlet class 'com.google.gwt.junit.server.JUnitHostImpl', but the web.xml has no corresponding declaration; please add the following lines to your web.xml:
    <servlet>
      <servlet-name>jUnitHostImpl</servlet-name>
      <servlet-class>com.google.gwt.junit.server.JUnitHostImpl</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>jUnitHostImpl</servlet-name>
      <url-pattern>/approval/junithost/*</url-pattern>
    </servlet-mapping>
    ISC: Configuring log4j from: file:/C:/workspace-sts-2.9.2-epacube-omm/omm/target/omm-1.0-SNAPSHOT/WEB-INF/classes/log4j.isc.config.xml
    === 2012-09-22 10:29:58,019 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from [No class name provided]
    === 2012-09-22 10:29:58,020 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework - Initializing
    === 2012-09-22 10:29:58,024 [main] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
    === 2012-09-22 10:29:58,136 [main] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/workspace-sts-2.9.2-epacube-omm/omm/target/omm-1.0-SNAPSHOT/WEB-INF/lib/isomorphic-core-rpc-3.1.d20120921.jar!/framework.properties
    === 2012-09-22 10:29:58,136 [main] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
    === 2012-09-22 10:29:58,136 [main] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
    === 2012-09-22 10:29:58,141 [main] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/C:/workspace-sts-2.9.2-epacube-omm/omm/target/omm-1.0-SNAPSHOT/WEB-INF/lib/isomorphic-core-rpc-3.1.d20120921.jar!/isc_interfaces.properties
    === 2012-09-22 10:29:58,141 [main] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
    === 2012-09-22 10:29:58,144 [main] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/C:/workspace-sts-2.9.2-epacube-omm/omm/target/omm-1.0-SNAPSHOT/WEB-INF/classes/server.properties
    === 2012-09-22 10:29:58,169 [main] INFO  Logger - Logging system started.
    === 2012-09-22 10:29:58,170 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (SNAPSHOT_v8.3d_2012-09-21/EVAL Deployment 2012-09-21) - Initialization Complete
    === 2012-09-22 10:29:58,173 [main] ERROR ISCInit - Can't find marker file for webRoot: C:/workspace-sts-2.9.2-epacube-omm/omm/target/omm-1.0-SNAPSHOT/approval/sc for configured/autodetected webRoot - if you moved the 'isomorphic' directory, please set isomorphicPathRootRelative in server.properties to the new location and restart the servlet engine.
    === 2012-09-22 10:29:58,173 [main] INFO  ISCInit - WebRoot auto-detection failed - using container IO
    === 2012-09-22 10:29:58,190 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Base
    === 2012-09-22 10:29:58,190 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework is already initialized
    Problem loading builtinTypes.xml
    Exception when loading from __USE_CONTAINER__/approval/sc/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:581)
    	at com.epacube.ao.server.CustomInitServlet.init(CustomInitServlet.java:14)
    	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433)
    	at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
    	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    	at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616)
    	at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
    	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
    	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
    	at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
    	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    	at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
    	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    	at org.mortbay.jetty.Server.doStart(Server.java:222)
    	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    	at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
    	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)
    CustomInitServlet is just a way to add my DS generator:
    Code:
    public class CustomInitServlet extends HttpServlet {
    
    	@Override
    	public void init() throws ServletException {
    		DataSource.addDynamicDSGenerator(new SchemaAwareDSGenerator(), "dynamic_");
    	}
    }
    I only see the problem if the servlet is configured to load on startup. Everything works fine if servlet is inited by hitting the mapped url. It seems that DataSource.addDynamicDSGenerator must be called at a particular point in time, not during the application startup. The documentation doesn't specify any particular way this API should be used. What's the correct way to call it?

    #2
    Doesn't look like a timing issue, it looks like you may not have run a GWT compile after modifying your .gwt.xml to add SmartGWT <inherits>. Files that should exist under the war/ directory after a GWT compile are missing.

    Comment


      #3
      Originally posted by Isomorphic View Post
      Doesn't look like a timing issue, it looks like you may not have run a GWT compile after modifying your .gwt.xml to add SmartGWT <inherits>. Files that should exist under the war/ directory after a GWT compile are missing.
      This is exactly right! The project is a maven project, so everything under webapp gets copied into \target\omm-1.0-SNAPSHOT folder. GWT compile correctly places the system files under \target\omm-1.0-SNAPSHOT\approval\sc. I verified that \target\omm-1.0-SNAPSHOT\approval\sc\system\schema\builtinTypes.xml file indeed exists before launching the project in hosted mode. What happens next doesn't make any sense though. Shortly after project launches the entire \target\omm-1.0-SNAPSHOT\approval\sc\system\schema gets wiped out causing the NullPointerException. A few seconds later all the files come back, so the "delayed" servlet loading works.
      I'm seeing this behavior in STS 2.9.2 and STS 3.0 I ended up copying \sc\system\schema into the source webapp folder for now, but it would complicate future upgrades. Is there a better way to keep the generated files in place when using Eclipse with maven project? Any advice would be greatly appreciated.

      Comment


        #4
        We're not sure what your setup is, but it sounds like whatever generated your Maven config has bugs - it's not valid to move files out of webroot during servlet engine startup (obviously).

        You could try the Maven setup shown here - so far as we know it doesn't have this issue.

        Comment


          #5
          Similar Issue but my log is a little different

          SNAPSHOT_v9.1d_2013-12-17/PowerEdition Deployment 2013-12-17

          IE-8

          For some reason my server starts up fine when I comment out this line:

          Code:
          com.isomorphic.datasource.DataSource.addDynamicDSGenerator(new PivotTableTreeDSGenerator(this), "pivot_table_tree_fact_");
          But when I uncomment out that line, here is my startup log:

          Code:
          "C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.42\bin\catalina.bat" run
          [2014-01-30 11:11:42,511] Artifact TZWEB-2.00:war exploded: Server is not connected. Deploy is not available.
          Using CATALINA_BASE:   "C:\Documents and Settings\smitj01\.IntelliJIdea13\system\tomcat\Unnamed_TZWEB-2_00"
          Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.42"
          Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.42\temp"
          Using JRE_HOME:        "C:\Program Files\Java\jdk1.7.0_45"
          Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.42\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.42\bin\tomcat-juli.jar"
          Connected to the target VM, address: '127.0.0.1:1095', transport: 'socket'
          Jan 30, 2014 11:11:45 AM org.apache.catalina.core.AprLifecycleListener init
          INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_45\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Java\jre6\bin;C:\Program Files\Java\jdk1.6.0_20\bin;C:\Program Files\sqljdbc_3.0\enu\auth\x86;C:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files\Apache Software Foundation\apache-maven-2.2.1\bin;C:\Documents and Settings\smitj01\My Documents\src\spring-roo-1.1.2.RELEASE\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\IDM Computer Solutions\UltraCompare;C:\Program Files\IDM Computer Solutions\UltraEdit-32\;.
          Jan 30, 2014 11:11:46 AM org.apache.coyote.AbstractProtocol init
          INFO: Initializing ProtocolHandler ["http-bio-8080"]
          Jan 30, 2014 11:11:46 AM org.apache.coyote.AbstractProtocol init
          INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
          Jan 30, 2014 11:11:46 AM org.apache.catalina.startup.Catalina load
          INFO: Initialization processed in 2137 ms
          Jan 30, 2014 11:11:46 AM org.apache.catalina.core.StandardService startInternal
          INFO: Starting service Catalina
          Jan 30, 2014 11:11:46 AM org.apache.catalina.core.StandardEngine startInternal
          INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
          Jan 30, 2014 11:11:46 AM org.apache.coyote.AbstractProtocol start
          INFO: Starting ProtocolHandler ["http-bio-8080"]
          Jan 30, 2014 11:11:46 AM org.apache.coyote.AbstractProtocol start
          INFO: Starting ProtocolHandler ["ajp-bio-8009"]
          Jan 30, 2014 11:11:46 AM org.apache.catalina.startup.Catalina start
          INFO: Server startup in 127 ms
          Connected to server
          [2014-01-30 11:11:46,823] Artifact TZWEB-2.00:war exploded: Artifact is being deployed, please wait...
          Jan 30, 2014 11:11:47 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
          INFO: validateJarFile(C:\Documents and Settings\smitj01\IdeaProjects\PIVOTTABLEINTEGRATION\out\artifacts\TZWEB_2_00_war_exploded\WEB-INF\lib\gwt-user.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
          Jan 30, 2014 11:11:47 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
          INFO: validateJarFile(C:\Documents and Settings\smitj01\IdeaProjects\PIVOTTABLEINTEGRATION\out\artifacts\TZWEB_2_00_war_exploded\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
          Jan 30, 2014 11:11:56 AM org.apache.catalina.startup.HostConfig deployDirectory
          INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.42\webapps\manager
          2014-01-30 11:12:26,901 DEBUG [com.anstca.tz.server.floater.pivottable.dao.PivotTableDaoJdbcImpl] - <==>PivotTableTreeDSGenerator pre-loading...>
          ISC: Configuring log4j from: file:/C:/Documents%20and%20Settings/smitj01/IdeaProjects/PIVOTTABLEINTEGRATION/out/artifacts/TZWEB_2_00_war_exploded/WEB-INF/classes/log4j.isc.config.xml
          === 2014-01-30 11:12:27,213 [.0.1] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework - Initializing
          === 2014-01-30 11:12:27,213 [.0.1] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
          === 2014-01-30 11:12:27,401 [.0.1] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: file:/C:/Documents%20and%20Settings/smitj01/.IntelliJIdea13/system/tomcat/Unnamed_TZWEB-2_00/work/Catalina/localhost/tzw/loader/framework.properties
          === 2014-01-30 11:12:27,401 [.0.1] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
          === 2014-01-30 11:12:27,401 [.0.1] INFO  ConfigLoader - Successfully loaded project.properties from CLASSPATH at location: file:/C:/Documents%20and%20Settings/smitj01/IdeaProjects/PIVOTTABLEINTEGRATION/out/artifacts/TZWEB_2_00_war_exploded/WEB-INF/classes/project.properties
          === 2014-01-30 11:12:27,401 [.0.1] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: file:/C:/Documents%20and%20Settings/smitj01/.IntelliJIdea13/system/tomcat/Unnamed_TZWEB-2_00/work/Catalina/localhost/tzw/loader/isc_interfaces.properties
          === 2014-01-30 11:12:27,401 [.0.1] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
          === 2014-01-30 11:12:27,416 [.0.1] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/C:/Documents%20and%20Settings/smitj01/IdeaProjects/PIVOTTABLEINTEGRATION/out/artifacts/TZWEB_2_00_war_exploded/WEB-INF/classes/server.properties
          === 2014-01-30 11:12:27,432 [.0.1] INFO  Logger - Logging system started.
          === 2014-01-30 11:12:27,432 [.0.1] INFO  ISCInit - No ServletContext available yet - using container IO for now
          === 2014-01-30 11:12:27,432 [.0.1] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (SNAPSHOT_v9.1d_2013-12-17/PowerEdition Deployment 2013-12-17) - Initialization Complete
          Problem loading builtinTypes.xml
          Exception when loading from __USE_CONTAINER__/com.anstca.tz.Main/sc/system/schema/builtinTypes.xml:
          java.io.IOException: Configured for containerIO, but servletContext not available!  You need to install the Init servlet
          	at com.isomorphic.io.ISCFile.<init>(ISCFile.java:162)
          	at com.isomorphic.xml.XML.getXMLDocument(XML.java:286)
          	at com.isomorphic.xml.XML.toDSRecords(XML.java:294)
          	at com.isomorphic.xml.XML.toDSRecords(XML.java:298)
          	at com.isomorphic.xml.XML.toDSRecords(XML.java:301)
          	at com.isomorphic.datasource.DataSource.<clinit>(DataSource.java:645)
          	at com.anstca.tz.server.floater.pivottable.dao.PivotTableDaoJdbcImpl.<init>(PivotTableDaoJdbcImpl.java:42)
          	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
          	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
          	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
          	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1000)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
          	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
          	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
          	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
          	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
          	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
          	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
          	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
          	at org.springframework.security.config.http.UserDetailsServiceFactoryBean.cachingUserDetailsService(UserDetailsServiceFactoryBean.java:48)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
          	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1025)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:921)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
          	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:629)
          	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1045)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:949)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
          	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
          	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
          	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:615)
          	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1045)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:949)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
          	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
          	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
          	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
          	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
          	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
          	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
          	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:610)
          	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
          	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
          	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
          	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
          	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
          	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
          	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
          	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
          	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
          	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
          	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1551)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
          	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
          	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
          	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:622)
          	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:569)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
          	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
          	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
          	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
          	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
          	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
          	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)
          	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
          	at sun.rmi.transport.Transport$1.run(Transport.java:177)
          	at sun.rmi.transport.Transport$1.run(Transport.java:174)
          	at java.security.AccessController.doPrivileged(Native Method)
          	at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
          	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
          	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
          	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          	at java.lang.Thread.run(Thread.java:744)
          
          2014-01-30 11:12:27,510 DEBUG [com.anstca.tz.server.floater.pivottable.dao.PivotTableDaoJdbcImpl] - <==>PivotTableTreeDSGenerator loaded.>
          === 2014-01-30 11:12:28,447 [.0.1] INFO  ISCInit - Auto-detected webRoot - using: C:\Documents and Settings\smitj01\IdeaProjects\PIVOTTABLEINTEGRATION\out\artifacts\TZWEB_2_00_war_exploded
          === 2014-01-30 11:12:28,510 [.0.1] INFO  PreCache - Isomorphic PreCache servlet loading
          === 2014-01-30 11:12:28,572 [.0.1] INFO  PoolManager - SmartClient pooling started for 'DataSource' objects
          === 2014-01-30 11:12:28,651 [.0.1] DEBUG XML - Parsed XML from C:\Documents and Settings\smitj01\IdeaProjects\PIVOTTABLEINTEGRATION\out\artifacts\TZWEB_2_00_war_exploded\com.anstca.tz.Main\sc\system\schema\DataSource.ds.xml: 16ms
          === 2014-01-30 11:12:29,041 [.0.1] DEBUG XML - Parsed XML from C:\Documents and Settings\smitj01\IdeaProjects\PIVOTTABLEINTEGRATION\out\artifacts\TZWEB_2_00_war_exploded\com.anstca.tz.Main\sc\system\schema\DataSourceField.ds.xml: 16ms
          === 2014-01-30 11:12:29,119 [.0.1] DEBUG XML - Parsed XML from C:\Documents and Settings\smitj01\IdeaProjects\PIVOTTABLEINTEGRATION\out\artifacts\TZWEB_2_00_war_exploded\com.anstca.tz.Main\sc\system\schema\Validator.ds.xml: 15ms
          === 2014-01-30 11:12:29,135 [.0.1] DEBUG XML - Parsed XML from C:\Documents and Settings\smitj01\IdeaProjects\PIVOTTABLEINTEGRATION\out\artifacts\TZWEB_2_00_war_exploded\com.anstca.tz.Main\sc\system\schema\ValueMap.ds.xml: 0ms
          ...
          My *gwt.xml file looks like this:

          Code:
          <?xml version="1.0" encoding="UTF-8"?>
          <module rename-to="com.anstca.tz.Main">
              <inherits name="com.google.gwt.user.User"/>
              <inherits name="com.google.gwt.http.HTTP" />
          
              <inherits name="com.smartgwt.tools.SmartGwtTools"/>
              <inherits name="com.smartgwtee.SmartGwtEENoScript"/>
              <inherits name="com.smartgwtee.tools.Tools"/>
          
              <inherits name='pl.rmalinowski.gwt2swf.GWT2SWF' />
              <entry-point class="com.anstca.tz.client.MainEntryPoint"/>
          Is there anything obvious I'm missing?

          Comment


            #6
            Read the docs about the InitServlet. It must execute before you begin calling server-side APIs such as addDynamicDSGenerator.

            Comment


              #7
              Looking at the Server Javadoc for com.isomorphic.base.Init it says to set the startup priority as low as possible, which I am doing.

              Is there other docs I should be looking at as well?

              Comment


                #8
                Did you already look into the things mentioned earlier in this thread - forgetting to run a GWT compile, or using an invalid Maven (or other) build script that does not place resources under webroot until after server startup?

                Comment


                  #9
                  A simple reference to this doc:

                  http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/ServerInit.html

                  "The Spring framework attempts to initialize itself in similar ways to the Smart GWT framework, and similarly it wants its own initialization to be the very first thing that happens. This can cause problems in certain cases. For example, one known problem occurs when you define DataSource instances as Spring beans, and Spring gets to initialize itself first: it attempts to instantiate a instance of the bean, which ultimately calls into our framework code before the framework has been initialized.
                  The solution to this is to use the InitListener, and to ensure that it is declared in your web.xml file before the Spring ContextLoaderListener."

                  Moving the InitListener above the ContextLoaderListener in the web.xml solved my issue.

                  Comment

                  Working...
                  X