-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Issue with Hibernate on remote WebSphere App Server 6.1
PostPosted: Thu Oct 09, 2008 2:30 pm 
Newbie

Joined: Thu Oct 09, 2008 2:13 pm
Posts: 1
Hi I have an issue with trying to run an application with Hibernate 3.2.5 with Spring 2.5. This works in my eclipse envirorment. On the remote system however it has stopped working. I say stopped working because before the latest build it was working fine. Now the change I have made has nothing to do with Spring or Hibernate.

Below is the stack trace from the logs.



Code:
09 Oct 2008 14:05:42,077 ERROR SoapConnectorThreadPool : 2 (org.springframework.web.struts.ContextLoaderPlugIn) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'productHibernateDAO' while setting bean property 'productHibernateDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productHibernateDAO' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:274)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1230)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:998)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:519)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:404)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:245)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188)
   at org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:81)
   at javax.servlet.GenericServlet.init(GenericServlet.java:256)
   at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:190)
   at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:317)
   at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1142)
   at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:150)
   at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:99)
   at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:528)
   at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:307)
   at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:289)
   at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:90)
   at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
   at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:665)
   at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:618)
   at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)
   at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
   at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1301)
   at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1138)
   at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
   at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:817)
   at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:950)
   at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1484)
   at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:3997)
   at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4094)
   at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
   at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1489)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
   at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
   at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
   at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
   at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
   at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
   at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1080)
   at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
   at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:973)
   at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
   at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:351)
   at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:207)
   at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:55)
   at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:680)
   at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:484)
   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productHibernateDAO' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:274)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1230)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:998)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:519)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:268)
   ... 67 more
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1318)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:268)
   ... 76 more
Caused by:
org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:508)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:595)
   at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1346)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1315)
   ... 82 more
Caused by:
org.dom4j.DocumentException: Connection timed out:could be due to invalid address Nested exception: Connection timed out:could be due to invalid address
   at org.dom4j.io.SAXReader.read(SAXReader.java:484)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:499)
   ... 86 more


Here is the applicationContext.xml We are using this to take the place of the hibernamte.cfg.xml



Code:
<bean id="productManager" class="com.icipaints.wce.n.us.dlx.model.manager.impl.ProductManagerImpl">
      <property name="productHibernateDAO">
         <ref bean="productHibernateDAO"/>
      </property>
   </bean>

<bean id="productHibernateDAO"
      class="com.icipaints.wce.n.us.dlx.model.daoimpl.ProductHibernateDAOImpl">
      <property name="sessionFactory">
         <ref bean="sessionFactory" />
      </property>
   </bean>

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
      <property name="mappingResources">
         <list>
            <value>com/icipaints/wce/n/us/dlx/model/product/impl/ProductImpl.hbm.xml</value>
            <value>com/icipaints/wce/n/us/dlx/model/product/impl/AttributeImpl.hbm.xml</value>
            <value>com/icipaints/wce/n/us/dlx/model/product/impl/CatalogImpl.hbm.xml</value>
            <value>com/icipaints/wce/n/us/dlx/model/product/impl/BulletImpl.hbm.xml</value>
            <value>com/icipaints/wce/n/us/dlx/model/representatives/impl/ArchitectureRepImpl.hbm.xml</value>
            <value>com/icipaints/wce/n/us/dlx/glIntegration/impl/PremiumShippingImpl.hbm.xml</value>
            <!-- usermanager -->
            <value>com/icipaints/wce/n/sh/usermanager/users/impl/UserImpl.hbm.xml</value>
            <value>com/icipaints/wce/n/sh/usermanager/users/impl/BookmarkImpl.hbm.xml</value>
            <value>com/icipaints/wce/n/sh/usermanager/users/impl/GroupImpl.hbm.xml</value>
            <value>com/icipaints/wce/n/sh/usermanager/users/impl/StoreImpl.hbm.xml</value>
         </list>
      </property>
      <property name="hibernateProperties">
         <props>
            <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
            <prop key="hibernate.show_sql">true</prop>
            <prop key="hibernate.cache.use_query_cache">false</prop>
         </props>
      </property>
      <property name="dataSource">
         <ref bean="n_userDataSource" />
      </property>
   </bean>

<bean id="n_userDataSource"
      class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName">
         <value>jdbc/N_WCE_XA</value>
      </property>
   </bean>


Thank you in advance for any advice. This is driving me up a wall trying to figure this out.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.