Announcement

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

    Does SmartGWT support/integrate with Spring 3.0?

    I'm trying to integrate my app so that it uses Spring 3.0 and DMI together. Spring 3.0 eliminated the org.springframework.web.context.ContextLoaderServlet in favor of a ServletContextListener, org.springframework.web.context.ContextLoaderListener.

    I changed my web xml, so that it has this:

    Code:
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>classpath:app-config.xml</param-value>
    	</context-param>
    
    	<listener>
    		<listener-class>
    			org.springframework.web.context.ContextLoaderListener
    		</listener-class>
    	</listener>
    On startup I get failures:

    Code:
         [exec] 12:18:24,728 INFO  [STDOUT] 2011-02-15 12:18:24,728 [main] INFO  com.isomorphic.base.ISCInit - Isomorphic SmartClient Framework (SC_SNAPSHOT-2011-01-25/Pro Deployment 2011-01-25) - Initialization Complete
         [exec] 12:18:24,729 INFO  [STDOUT] 2011-02-15 12:18:24,729 [main] INFO  com.isomorphic.base.ISCInit - No ServletContext available yet - using container IO for now
         [exec] 12:18:24,753 INFO  [STDOUT] Problem loading builtinTypes.xml
         [exec] 12:18:24,778 INFO  [STDOUT] Exception when loading from __USE_CONTAINER__/jets/sc/system/schema/builtinTypes.xml:
         [exec] java.io.IOException: Configured for containerIO, but servletContext not available!  You need to install the Init servlet
         [exec] 	at com.isomorphic.io.ISCFile.<init>(ISCFile.java:139)
         [exec] 	at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:135)
         [exec] 	at com.isomorphic.xml.XML.getXMLDocument(XML.java:254)
         [exec] 	at com.isomorphic.xml.XML.toDSRecords(XML.java:262)
         [exec] 	at com.isomorphic.xml.XML.toDSRecords(XML.java:265)
         [exec] 	at com.isomorphic.datasource.BasicDataSource.<clinit>(BasicDataSource.java:1603)
         [exec] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         [exec] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         [exec] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         [exec] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         [exec] 	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
         [exec] 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
         [exec] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
    and these:

    Code:
        [exec] 12:18:25,048 INFO  [STDOUT] 2011-02-15 12:18:25,048 [main] WARN  com.isomorphic.validation.Validation - No such type 'string', not processing field value at /DataSource[@ID=InstantDataApp]/ID
         [exec] 12:18:25,048 INFO  [STDOUT] 2011-02-15 12:18:25,048 [main] WARN  com.isomorphic.validation.Validation - No such type 'string', not processing field value at /DataSource[@ID=InstantDataApp]/inheritsFrom
         [exec] 12:18:25,049 INFO  [STDOUT] 2011-02-15 12:18:25,049 [main] WARN  com.isomorphic.validation.Validation - No such type 'string', not processing field value at /DataSource[@ID=InstantDataApp]/fields/field[@name=ID]/name
         [exec] 12:18:25,050 INFO  [STDOUT] 2011-02-15 12:18:25,050 [main] WARN  com.isomorphic.validation.Validation - No such type 'string', not processing field value at /DataSource[@ID=InstantDataApp]/fields/field[@name=ID]/type
         [exec] 12:18:25,051 INFO  [STDOUT] 2011-02-15 12:18:25,051 [main] WARN  com.isomorphic.validation.Validation - No such type 'boolean', not processing field value at /DataSource[@ID=InstantDataApp]/fields/field[@name=dataSources]/multiple
         [exec] 12:18:25,051 INFO  [STDOUT] 2011-02-15 12:18:25,051 [main] WARN  com.isomorphic.validation.Validation - No such type 'string', not processing field value at /DataSource[@ID=InstantDataApp]/fields/field[@name=dataSources]/name
         [exec] 12:18:25,051 INFO  [STDOUT] 2011-02-15 12:18:25,051 [main] WARN  com.isomorphic.validation.Validation - No such type 'string', not processing field value at /DataSource[@ID=InstantDataApp]/fields/field[@name=dataSources]/type
         [exec] 12:18:25,052 INFO  [STDOUT] 2011-02-15 12:18:25,052 [main] WARN  com.isomorphic.validation.Validation - No such type 'boolean', not processing field value at /DataSource[@ID=InstantDataApp]/fields/field[@name=userTypes]/multiple
    ...
    Is there a special configuration I need to get SmartGWT to work with Spring 3.0? Are they compatible?

    Thanks,
    Chris

    #2
    What this suggests is actually a classloader issue. You've got the Init servlet running, but subsequent logs indicate that classes are being loaded in a context where the Init servlet has not run.

    This can happen from having multiple copies of Isomorphic .jars or other server .jars in your classpath.

    Comment


      #3
      I think there is a disconnect here. Spring no longer provides a ContextLoaderServlet - they have switched to using a listener, and it is my understand the listeners execute after the Servlets have loaded.

      The example provided in spring-hibernate-dmi will not run under Spring 3.0 as is. Has Isomorphic integrated with Spring 3.0 yet? Are they compatible? Is there an example I can use that demonstrates a working configuration?

      Thanks,
      Chris

      Comment


        #4
        Yes, they are compatible and other users have reported success. We don't have a sample in the Showcase. Regardless, your problem is not strictly related to your Spring 3.0 upgrade, it's a classloader issue - please see previous response for how to resolve it.

        Comment

        Working...
        X