Announcement

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

    3.1d Hibernate DataSource Regression

    I'm trying to migrate a new application to 3.1d, as it seems likely that 3.1 will be released before development is complete.
    The behavior of the HibernateDataSource, though, has changed. None of the annotated fields are being automatically declared in the auto-inherited datasource object.
    Here is the annotated class:
    Code:
    package com.examples;
    
    import java.util.Date;
    
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    
    @Entity
    @Table(name="BOOK")
    public class Book {
    	private Long id;
    	private String title;
    	private Date datePublished;
    	/**
    	 * @return the id
    	 */
    	@GeneratedValue(strategy = GenerationType.IDENTITY)
    	@Id
    	@Column(name="BOOK_ID")
    	public Long getId() {
    		return id;
    	}
    	/**
    	 * @param id the id to set
    	 */
    	public void setId(Long id) {
    		this.id = id;
    	}
    	/**
    	 * @return the title
    	 */
    	@Column(name="BOOK_TITLE")
    	public String getTitle() {
    		return title;
    	}
    	/**
    	 * @param title the title to set
    	 */
    	public void setTitle(String title) {
    		this.title = title;
    	}
    	/**
    	 * @return the datePublished
    	 */
    	@Column(name="DATE_PUBLISHED")
    	public Date getDatePublished() {
    		return datePublished;
    	}
    	/**
    	 * @param datePublished the datePublished to set
    	 */
    	public void setDatePublished(Date datePublished) {
    		this.datePublished = datePublished;
    	}
    	
    	
    }
    Here is book.ds.xml:
    Code:
    <DataSource ID="book" serverType="hibernate"
    	beanClassName="com.examples.Book" 
    	schemaBean="com.examples.Book">
    	<fields>
    		<field name="id" type="sequence" hidden="true" primaryKey="true" />
     	</fields>
    </DataSource>
    Here is the output using v3.0 of the DataSourceLoader servlet:
    Code:
    isc.DataSource.create({
        ID:"book",
        inheritsFrom:isc.DataSource.create({
            xmlFromConfig:"true",
            ID:"book_inheritsFrom",
            dataSourceVersion:"1",
            entityName:"com.samples.Book",
            serverType:"hibernate",
            generatedBy:"v8.2p_2012-04-30/Enterprise Deployment 2012-04-30",
            fields:[
                {
                    name:"id",
                    type:"integer"
                },
                {
                    name:"title",
                    type:"text"
                },
                {
                    name:"datePublished",
                    type:"date"
                }
            ]
        })
    ,
        fields:[
            {
                hidden:true,
                primaryKey:true,
                name:"id",
                type:"sequence"
            }
        ],
        serverType:"hibernate"
    })
    And here is the output using 3.1d of the DataSourceLoader servlet:
    Code:
    if (window.isc == undefined || window.isc.DataSource == undefined){  alert("Can't load DataSources - SmartClient runtime not loaded");}isc.DataSource.create({
        allowAdvancedCriteria:true,
        ID:"book",
        autoDeriveSchema:true,
        inheritsFrom:isc.DataSource.create({
            allowAdvancedCriteria:true,
            dropExtraFields:true,
            ID:"Book_inheritsFrom",
            serverType:"hibernate",
            generatedBy:"SNAPSHOT_v8.3d_2012-08-13/Enterprise Deployment 2012-08-13",
            fields:[
            ]
        })
    ,
        fields:[
            {
                hidden:true,
                primaryKey:true,
                name:"id",
                type:"sequence"
            }
        ],
        serverType:"hibernate"
    })
    Last edited by joe.parks@hyperproductive.com; 15th Aug 2012, 04:34. Reason: Found the problem in latest 3.0p as well

    #2
    Looking at the log, it doesn't seem to recognize that
    Code:
    org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
    is an extension of
    Code:
    org.springframework.orm.hibernate3.LocalSessionFactoryBean

    Comment


      #3
      I upgraded to Hibernate 4, so that I could use the appropriate LocalSessionFactoryBean directly. (The hibernate4 LocalSessionFactoryBean enables annotation scanning, rather than needing the Spring subclass for hibernate3 that enables annotation scanning.)

      Now I get an error & stack trace:
      Code:
      13:58:52,210 INFO  [STDOUT] === 2012-08-14 13:58:52,210 [80-1] DEBUG DataSource - In DS.forName() for 'book' with DSRequest: null
      13:58:52,211 INFO  [STDOUT] === 2012-08-14 13:58:52,211 [80-1] DEBUG HibernateDataSource - Looking up session factory with lookup style 'spring'
      13:58:52,211 INFO  [STDOUT] === 2012-08-14 13:58:52,211 [80-1] WARN  HibernateDataSource - Factory bean is not an instance of either org.springframework.orm.hibernate3.LocalSessionFactoryBean or org.springframework.orm.hibernate4.LocalSessionFactoryBean class - is Spring correctly installed and configured?
      13:58:52,213 INFO  [STDOUT] === 2012-08-14 13:58:52,211 [80-1] ERROR DataSourceLoader - Exception while attempting to load a DataSource
      java.lang.Exception: Failed to lookup Hibernate sessionFactory via Spring bean &sessionFactory.
      	at com.isomorphic.hibernate.HibernateDataSource.initStaticConfigAndSessionFactory(HibernateDataSource.java:580)
      	at com.isomorphic.hibernate.HibernateDataSource.getConfigFromMappedClass(HibernateDataSource.java:5025)
      	at com.isomorphic.hibernate.HibernateDataSource.fromMappedClass(HibernateDataSource.java:5003)
      	at com.isomorphic.hibernate.HibernateDataSource.init(HibernateDataSource.java:217)
      	at com.isomorphic.datasource.DataSource.initialize(DataSource.java:400)
      	at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:163)
      	at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:385)
      	at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:110)
      	at com.isomorphic.datasource.DataSource.forName(DataSource.java:204)
      	at com.isomorphic.datasource.DataSource.forName(DataSource.java:195)
      	at com.isomorphic.datasource.DataSource.forName(DataSource.java:184)
      	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.DataSourceLoader.processRequest(DataSourceLoader.java:126)
      	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:94)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
      	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
      	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      	at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
      	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
      	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
      	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      	at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:127)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
      	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
      	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      	at java.lang.Thread.run(Thread.java:662)
      Here is the Spring configuration:
      Code:
      	<bean id="sessionFactory"
      		class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
      		<property name="dataSource" ref="myDataSource" />
      		<property name="packagesToScan" value="com.examples" />
      		<property name="hibernateProperties">
      			<value>
      				hibernate.show_sql=true
      				hibernate.validator.apply_to_ddl=false
                      hibernate.validator.autoregister_listeners=false
                  </value>
      		</property>
      	</bean>

      Comment


        #4
        I wrote a quick servlet to see what was coming back from the Spring context:
        Code:
        public class HelloServlet extends HttpServlet {
        	@Override
        	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
        			throws ServletException, IOException {
        		resp.setContentType("text/html");
        		final PrintWriter out = resp.getWriter();
        		out.println("<html><head><title>Hello</title></head><body>");
        		try {
        			final WebApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext());
        			final Object sessionFactoryBean = applicationContext.getBean("sessionFactory");
        			out.println("sessionFactoryBean class: " + sessionFactoryBean.getClass());
        		} catch (Exception e) {
        			out.println("<pre>");
        			e.printStackTrace(out);
        			out.println("</pre>");
        		}
        		out.println("</body></html>");
        		out.flush();
        	}
        }
        Here's the output:
        Code:
        sessionFactoryBean class: class org.hibernate.internal.SessionFactoryImpl

        Comment


          #5
          I updated the servlet to also perform some comparisons against org.hibernate.SessionFactory.

          Code:
          final boolean assignableFrom = SessionFactory.class.isAssignableFrom(sessionFactoryBean.getClass());
          out.println("<br/>");
          out.println("assignableFrom: " + assignableFrom);
          final boolean isAnInstanceOf = (sessionFactoryBean instanceof SessionFactory);
          out.println("<br/>");
          out.println("instanceOf: " + isAnInstanceOf);
          Here's the updated output:
          Code:
          sessionFactoryBean class: class org.hibernate.internal.SessionFactoryImpl 
          assignableFrom: true 
          instanceOf: true

          Comment


            #6
            I get the same error using the latest build of 3.0p,

            16:59:13,907 INFO [STDOUT] === 2012-08-14 16:59:13,907 [main] INFO ISCInit - Isomorphic SmartClient Framework (v8.2p_2012-08-14/Enterprise Deployment 2012-08-14) - Initialization Complete

            ...

            17:00:15,499 INFO [STDOUT] === 2012-08-14 17:00:15,499 [80-2] DEBUG HibernateDataSource - Looking up session factory with lookup style 'spring'
            17:00:15,540 INFO [STDOUT] === 2012-08-14 17:00:15,540 [80-2] WARN HibernateDataSource - Factory bean is not an instance of either org.springframework.orm.hibernate3.LocalSessionFactoryBean or org.springframework.orm.hibernate4.LocalSessionFactoryBean class - is Spring correctly installed and configured?
            17:00:15,543 INFO [STDOUT] === 2012-08-14 17:00:15,541 [80-2] ERROR DataSourceLoader - Exception while attempting to load a DataSource
            java.lang.Exception: Failed to lookup Hibernate sessionFactory via Spring bean &sessionFactory.
            at com.isomorphic.hibernate.HibernateDataSource.initStaticConfigAndSessionFactory(HibernateDataSource.java:524)
            at com.isomorphic.hibernate.HibernateDataSource.getConfigFromMappedClass(HibernateDataSource.java:4841)
            at com.isomorphic.hibernate.HibernateDataSource.fromMappedClass(HibernateDataSource.java:4819)
            at com.isomorphic.hibernate.HibernateDataSource.init(HibernateDataSource.java:172)
            at com.isomorphic.datasource.DataSource.initialize(DataSource.java:374)
            at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:158)
            at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:359)
            at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:110)
            at com.isomorphic.datasource.DataSource.forName(DataSource.java:178)
            at com.isomorphic.datasource.DataSource.forName(DataSource.java:170)
            at com.isomorphic.datasource.DataSource.forName(DataSource.java:165)
            at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:95)
            at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:102)
            at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:82)
            at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:87)
            at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:109)
            at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:83)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
            at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)

            Comment


              #7
              Is there any more information that I can provide to help diagnose the problem?

              Comment


                #8
                Hi Joe,

                We've been looking at this since yesterday - check your email, you've been notified more than once by our staff.

                Comment


                  #9
                  Hi,

                  Warning was incorrect - it worked exactly opposite way. Now it is corrected. Thank you.

                  Anyway it does not solve your Sring configuration problem.
                  You said that acquired bean is instance of org.hibernate.internal.SessionFactoryImpl class.
                  But SessionFactoryImpl is not an instance of LocalSessionFactoryBean.

                  Could you post your Spring config and settings related to Spring form you server.properties?

                  Regards,
                  Alius

                  Comment


                    #10
                    Hi,

                    There was an error in data source generation if methods are annotated. Thanks for info. Now corrected. You will be able to pickup changes with next nightly build.

                    Regards,
                    Alius

                    Comment


                      #11
                      Should this be in the nightly build of 3.1d, or only in the nightly build of 3.0p?

                      I haven't tried 3.0p, but 3.1d gets the following stacktrace:

                      javax.servlet.ServletException: java.lang.Exception: Failed to lookup Hibernate sessionFactory via Spring bean &sessionFactory.
                      at com.isomorphic.hibernate.HibernateDataSource.initStaticConfigAndSessionFactory(HibernateDataSource.java:580)
                      at com.isomorphic.hibernate.HibernateDataSource.getConfigFromMappedClass(HibernateDataSource.java:5025)
                      at com.isomorphic.hibernate.HibernateDataSource.fromMappedClass(HibernateDataSource.java:5003)
                      at com.isomorphic.hibernate.HibernateDataSource.init(HibernateDataSource.java:217)
                      at com.isomorphic.datasource.DataSource.initialize(DataSource.java:400)
                      at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:163)
                      at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:385)
                      at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:110)
                      at com.isomorphic.datasource.DataSource.forName(DataSource.java:204)
                      at com.isomorphic.datasource.DataSource.forName(DataSource.java:195)
                      at com.isomorphic.datasource.DataSource.forName(DataSource.java:184)
                      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.DataSourceLoader.processRequest(DataSourceLoader.java:126)
                      at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:94)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
                      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
                      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
                      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
                      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
                      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                      at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)
                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
                      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
                      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                      at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:127)
                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
                      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
                      at java.lang.Thread.run(Thread.java:662)
                      Caused by: java.lang.NoSuchMethodException: Method getConfiguration not found on class org.springframework.orm.hibernate4.LocalSessionFactoryBean
                      at com.isomorphic.base.Reflection.findMethod(Reflection.java:431)
                      at com.isomorphic.base.Reflection.findMethod(Reflection.java:397)
                      at com.isomorphic.base.Reflection.findMethod(Reflection.java:379)
                      at com.isomorphic.hibernate.HibernateDataSource.initStaticConfigAndSessionFactory(HibernateDataSource.java:575)
                      ... 74 more

                      at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:185)
                      at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:94)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
                      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
                      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
                      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
                      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
                      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
                      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
                      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                      at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)
                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
                      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
                      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                      at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:127)
                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
                      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
                      at java.lang.Thread.run(Thread.java:662)

                      Comment


                        #12
                        Hello Joe,

                        The server logs the actual reason for the failure in the preceding lines in the logs. Can you please show the complete server log for the request, not just this error message.

                        Please be sure to do so in the future as well - truncated or partial logs very often leave off the information we actually need to solve problems.

                        Comment


                          #13
                          Hi,

                          Changes are made in both releases.

                          Which Spring version do you use?
                          As inner exception suggests:
                          Caused by: java.lang.NoSuchMethodException: Method getConfiguration not found on class org.springframework.orm.hibernate4.LocalSessionFactoryBean
                          Looks like you use Spring release candidate which is missing some functionality.
                          Here is a link to Spring 3.1.0.RC1 java doc.
                          Here is a link to Spring 3.1.x release java doc.
                          As you can see method getConfiguration() is missing in 3.1.0.RC1.

                          Please update your Spring and try again.

                          Regards,
                          Alius

                          Comment


                            #14
                            We're using v3.1.0:
                            org.springframework.orm-3.1.0.RELEASE.jar

                            I'll look into a patch release in the 3.1.x line.

                            Comment


                              #15
                              It works, using Spring 3.1.2.

                              So, for future reference (even if it's just me that needs to refer to it), here is the combination that definitely works:

                              Hibernate 4.1.4
                              Spring 3.1.2
                              SmartGWT: SNAPSHOT_v8.3d_2012-08-16/Enterprise Deployment 2012-08-16


                              Thanks!
                              Last edited by joe.parks@hyperproductive.com; 16th Aug 2012, 08:05. Reason: wanted to add a quick thank you

                              Comment

                              Working...
                              X