0 Replies Latest reply on Feb 10, 2014 9:36 AM by Andy Gowdy

    JBOSS AS 6 (6.1 final) Migration from 3.2 USING EJB2 - Problems

    Andy Gowdy Newbie

      HI

       

      I am having problems migrating jboss 3,2 project to AS6.  I want to use the legacy EJB2 beans.  I am deploying an ear with 4 modules.  I amk having problems with a not bound error message. Is there any configuration settings required so that EJB2 will work. Please see below for the XML's and the error logs.

       

      Thanks Andy

       

      (CXM_Beans.xml)

       

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

      <!--DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd"-->

       

       

      <!--

        -

        -->

      <beans>

        <!--

         -

          -->

       

       

         <bean id="BOMap" class="com.comino.cxm.housingfacade.objects.business.BeanFactoryBOMap">

         <property name="boMap">

            <map>

                <entry key="UHLIVE">

                     <bean class="com.comino.cxm.housingfacade.RequestHandlerBeanFactory">

        <!--constructor-arg value="java:UHLIVE" index="0"/-->

        <constructor-arg value="java:/hibernate/sessionfactoryuhlive" index="0"/>

        <constructor-arg value="HibernateUH.har/com/comino/cxm/hibernateuh/RequestHandlers.xml" index="1"/>

                     </bean>

       

       

      JBOSS_Service.xml

       

       

      <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=HibernateUH2_Live">

      <!--

        <depends>jboss:service=Naming</depends>

        <depends>jboss:service=TransactionManager</depends>

        -->

       

        <attribute name="DatasourceName">java:jboss/UHLIVE</attribute>

        <attribute name="SessionFactoryName">java:/hibernate/sessionfactoryuhlive</attribute>

       

              <attribute name="Dialect">com.comino.cxm.hibernateuh.SQLServerDialect</attribute>

        <attribute name="GetGeneratedKeysEnabled">true</attribute>

        <!-- Logging -->

        <attribute name="ShowSqlEnabled">true</attribute>

        <!--Cache-->

       

       

      cxm_jdts_ds.xml

       

      <datasources>

       

      <local-tx-datasource>

        <jndi-name>UHLIVE</jndi-name>

       

           <connection-url>jdbc:jtds:sqlserver://DEV-TEST2012:1433/w2uhwa</connection-url>     

           <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>

        <user-name>???????</user-name>

        <password>?????</password>

            <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>

           <min-pool-size>1</min-pool-size>

          <max-pool-size>5</max-pool-size>

          <blocking-timeout-millis>30000</blocking-timeout-millis>

          <idle-timeout-minutes>5</idle-timeout-minutes>

      </local-tx-datasource>

       

       

       

      2014-02-10 12:58:02,545 DEBUG [com.comino.cxm.RequestLog.Result] (http-127.0.0.1-8080-1) <ERROR> <DATE>10/02/2014 12:58:02</DATE><MESSAGE>Comino Xml Messaging Error: chkUser</MESSAGE><MESS1>Error creating bean with name 'chkuser' defined in class path resource [com/comino/cxm/hibernateuh/RequestHandlers.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 class path resource [com/comino/cxm/hibernateuh/RequestHandlers.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: hibernate not bound</MESS1><STACK><![CDATA[org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chkuser' defined in class path resource [com/comino/cxm/hibernateuh/RequestHandlers.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 class path resource [com/comino/cxm/hibernateuh/RequestHandlers.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: hibernate not bound

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)

        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:198)

        at com.comino.cxm.housingfacade.objects.business.BeanFactoryBOMap.getBOFRequestHandler(BeanFactoryBOMap.java:56)

        at com.comino.cxm.housingfacade.HousingFacadeBean.setMessage(HousingFacadeBean.java:214)

        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.jboss.invocation.Invocation.performCall(Invocation.java:386)

        at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:233)

        at org.jboss.webservices.integration.invocation.ServiceEndpointInterceptorEJB21.invoke(ServiceEndpointInterceptorEJB21.java:93)

        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)

        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)

        at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)

        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)

        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)

        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)

        at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)

        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)

        at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:100)

        at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:84)

        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)

        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)

        at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)

        at org.jboss.ejb.Container.invoke(Container.java:1072)

        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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271)

        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)

        at org.jboss.webservices.integration.invocation.InvocationHandlerEJB21.invoke(InvocationHandlerEJB21.java:152)

        at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:241)

        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:527)

        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:316)

        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:222)

        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:147)

        at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)

        at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)

        at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)

        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)

        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)

        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.invoke(ActiveRequestResponseCacheValve.java:53)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)

        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)

        at java.lang.Thread.run(Thread.java:744)

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/comino/cxm/hibernateuh/RequestHandlers.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: hibernate not bound

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)

        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)

        ... 68 more

      Caused by: javax.naming.NameNotFoundException: hibernate not bound

        at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)

        at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)

        at org.jnp.server.NamingServer.getObject(NamingServer.java:785)

        at org.jnp.server.NamingServer.lookup(NamingServer.java:396)

        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)

        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

        at javax.naming.InitialContext.lookup(InitialContext.java:411)

        at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)

        at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)

        at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)

        at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)

        at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)

        at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)

        at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201)

        at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)

        ... 75 more

      ]]></STACK></ERROR>