1 Reply Latest reply on Jan 4, 2005 4:36 AM by Alex Cheong

    EJB Connection problem.

    Alex Cheong Newbie

      Hi Guru,

      I really spend time to resolve this issue for couple of weeks.
      Can anyone pls help?

      I have deployed an J2EE project developed by using JDeveloper 10g.
      The application run fine in Oracle OC4J AS.

      I having problem in session bean where JBOSS added a prefix in "TO_" in the table name.

      following are the steps I deployed the application to JBOSS.

      1) Install ADF runtime to JBOSS AS.
      2) Copy Oracle JDBC driver to C:\jboss-3.2.7RC1\server\default\lib.
      3) Add a data source oracle-ds.xml to C:\jboss-3.2.7RC1\server\default\deploy.

      oracle-ds.xml:

      <datasources>
       <local-tx-datasource>
       <jndi-name>jdbc/FisicienCoreDS</jndi-name>
       <connection-url>jdbc:oracle:thin:@10.228.212.10:1521:Fisicien</connection-url>
       <!--
      
       Here are a couple of the possible OCI configurations.
       For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm
      
       <connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
       or
       <connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>
      
       Clearly, its better to have TNS set up properly.
       -->
       <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
       <user-name>fisicien</user-name>
       <password>zxcvbnm</password>
       <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
       <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
       <!-- Checks the Oracle error codes and messages for fatal errors -->
       <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
       <!-- sql to call when connection is created
       <new-connection-sql>some arbitrary sql</new-connection-sql>
       -->
      
       <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
       <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
       -->
      
       </local-tx-datasource>
      
      </datasources>
      


      I am using CMP Entity Bean in my project where by the entity bean could not lookup the data source that I have been added - java:/jdbc/FisicienCoreDS.

      Any suggestion?
      Thanks in advance.

      Error Logs:
      16:50:17,843 ERROR [CmsequenceManagerBean] Encountered unexpected exception : javax.ejb.Fi
      nderException: Find failed: java.sql.SQLException: ORA-00904: "T0_CMSEQUENCE"."SEQUENCEID"
      : invalid identifier
      
      16:50:17,843 ERROR [CmsequenceManagerBean] Encountered unexpected exception :
      javax.transaction.SystemException: Encountered unexpected exception
       at com.fsc.model.cm.sequence.ejb.CmsequenceManagerBean.getNextNumber(CmsequenceMan
      agerBean.java:388)
       at com.fsc.model.cm.sequence.ejb.CmsequenceManagerBean.getNextNumber(CmsequenceMan
      agerBean.java:89)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      va:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSe
      ssionContainer.java:683)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedC
      onnectionInterceptor.java:186)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessi
      onInstanceInterceptor.java:72)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.ja
      va:84)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.jav
      a:317)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderIn
      terceptor.java:122)
       at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContaine
      r.java:331)
       at org.jboss.ejb.Container.invoke(Container.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      va:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
       at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
       at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionIntercep
      tor.java:100)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
       at $Proxy706.getNextNumber(Unknown Source)
       at com.fsc.util.sequence.SequenceFactory.getNextNumber(SequenceFactory.java:122)
       at com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerBean.addMedicalAlert(FdAllergyMa
      nagerBean.java:74)
       at com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerBean.addAlert(FdAllergyManagerBe
      an.java:273)
       at com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerBean.addAllergies(FdAllergyManag
      erBean.java:419)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      va:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSe
      ssionContainer.java:683)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedC
      onnectionInterceptor.java:186)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessi
      onInstanceInterceptor.java:72)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.ja
      va:84)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.jav
      a:317)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderIn
      terceptor.java:122)
       at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContaine
      r.java:331)
       at org.jboss.ejb.Container.invoke(Container.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      va:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
       at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
       at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionIntercep
      tor.java:100)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
       at $Proxy721.addAllergies(Unknown Source)
       at com.fsc.controller.fd.fdallergy.FdAllergyMainAction.ConfirmForm(FdAllergyMainAc
      tion.java:1861)
       at com.fsc.controller.fd.fdallergy.FdAllergyMainAction.findForward(FdAllergyMainAc
      tion.java:209)
       at oracle.adf.controller.struts.actions.DataAction.findForward(DataAction.java:575
      )
       at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.jav
      a:152)
       at oracle.adf.controller.struts.actions.StrutsUixLifecycle.handleLifecycle(StrutsU
      ixLifecycle.java:63)
       at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java
      :232)
       at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:163)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor
      .java:484)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
       at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
      terChain.java:237)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
      .java:157)
       at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
      terChain.java:186)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
      .java:157)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
      75)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
      terChain.java:186)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
      .java:157)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
      214)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal
      ve.java:198)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
      152)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:104)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.
      java:66)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:102)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociati
      onValve.java:162)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:104)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10
      9)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
       at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnecti
      on(Http11Protocol.java:705)
       at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:6
      83)
       at java.lang.Thread.run(Thread.java:534)
      16:50:17,843 ERROR [SequenceFactory] Unable to execute remote method
      javax.transaction.SystemException: Encountered unexpected exception
       at com.fsc.model.cm.sequence.ejb.CmsequenceManagerBean.getNextNumber(CmsequenceMan
      agerBean.java:148)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      va:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSe
      ssionContainer.java:683)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedC
      onnectionInterceptor.java:186)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessi
      onInstanceInterceptor.java:72)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.ja
      va:84)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.jav
      a:317)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderIn
      terceptor.java:122)
       at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContaine
      r.java:331)
       at org.jboss.ejb.Container.invoke(Container.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      va:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
       at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
       at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionIntercep
      tor.java:100)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
       at $Proxy706.getNextNumber(Unknown Source)
       at com.fsc.util.sequence.SequenceFactory.getNextNumber(SequenceFactory.java:122)
       at com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerBean.addMedicalAlert(FdAllergyMa
      nagerBean.java:74)
       at com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerBean.addAlert(FdAllergyManagerBe
      an.java:273)
       at com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerBean.addAllergies(FdAllergyManag
      erBean.java:419)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      va:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSe
      ssionContainer.java:683)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedC
      onnectionInterceptor.java:186)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessi
      onInstanceInterceptor.java:72)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.ja
      va:84)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.jav
      a:317)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderIn
      terceptor.java:122)
       at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContaine
      r.java:331)
       at org.jboss.ejb.Container.invoke(Container.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      va:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
       at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
       at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionIntercep
      tor.java:100)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
       at $Proxy721.addAllergies(Unknown Source)
       at com.fsc.controller.fd.fdallergy.FdAllergyMainAction.ConfirmForm(FdAllergyMainAc
      tion.java:1861)
       at com.fsc.controller.fd.fdallergy.FdAllergyMainAction.findForward(FdAllergyMainAc
      tion.java:209)
       at oracle.adf.controller.struts.actions.DataAction.findForward(DataAction.java:575
      )
       at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.jav
      a:152)
       at oracle.adf.controller.struts.actions.StrutsUixLifecycle.handleLifecycle(StrutsU
      ixLifecycle.java:63)
       at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java
      :232)
       at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:163)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor
      .java:484)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
       at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
      terChain.java:237)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
      .java:157)
       at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
      terChain.java:186)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
      .java:157)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
      75)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
      terChain.java:186)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
      .java:157)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
      214)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal
      ve.java:198)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
      152)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:104)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.
      java:66)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:102)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociati
      onValve.java:162)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:104)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10
      9)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j
      ava:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
       at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnecti
      on(Http11Protocol.java:705)
       at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:6
      83)
       at java.lang.Thread.run(Thread.java:534)
      


        • 1. Re: EJB Connection problem.
          Alex Cheong Newbie

          Hi Guru,

          I had tried to put in the data source ref

          <resource-ref>
          jdbc/FisicienCoreDS
          <res-ref-name>java:/jdbc/FisicienCoreDS</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
          <res-sharing-scope>Shareable</res-sharing-scope>
          </resource-ref>

          in ejb-jar.xml but it does't help.

          How the session/entity bean connect to the data source in JBOSS which is java:/jdbc/FisicienCoreDS?

          ejb-jar.xml

          <?xml version = '1.0' encoding = 'windows-1252'?>
          <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
          <ejb-jar>
           <enterprise-beans>
           <session>
           <description>Session Bean ( Stateless )</description>
           <display-name>FdAllergyManager</display-name>
           <ejb-name>FdAllergyManager</ejb-name>
           <home>com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerHome</home>
           <remote>com.fsc.model.fd.fdallergy.ejb.FdAllergyManager</remote>
           <local-home>com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerLocalHome</local-home>
           <local>com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerLocal</local>
           <ejb-class>com.fsc.model.fd.fdallergy.ejb.FdAllergyManagerBean</ejb-class>
           <session-type>Stateless</session-type>
           <transaction-type>Container</transaction-type>
           <ejb-local-ref>
           <ejb-ref-name>ejb/local/Fddrugallergy</ejb-ref-name>
           <ejb-ref-type>Entity</ejb-ref-type>
           <local-home>com.fsc.model.fd.fdallergy.ejb.FddrugallergyLocalHome</local-home>
           <local>com.fsc.model.fd.fdallergy.ejb.FddrugallergyLocal</local>
           <ejb-link>Fddrugallergy</ejb-link>
           </ejb-local-ref>
           <ejb-local-ref>
           <ejb-ref-name>ejb/local/Fdmedicalalert</ejb-ref-name>
           <ejb-ref-type>Entity</ejb-ref-type>
           <local-home>com.fsc.model.fd.fdallergy.ejb.FdmedicalalertLocalHome</local-home>
           <local>com.fsc.model.fd.fdallergy.ejb.FdmedicalalertLocal</local>
           <ejb-link>Fdmedicalalert</ejb-link>
           </ejb-local-ref>
           <ejb-local-ref>
           <ejb-ref-name>ejb/local/Fdnondrugallergy</ejb-ref-name>
           <ejb-ref-type>Entity</ejb-ref-type>
           <local-home>com.fsc.model.fd.fdallergy.ejb.FdnondrugallergyLocalHome</local-home>
           <local>com.fsc.model.fd.fdallergy.ejb.FdnondrugallergyLocal</local>
           <ejb-link>Fdnondrugallergy</ejb-link>
           </ejb-local-ref>
           <resource-ref>
           <description>jdbc/FisicienCoreDS</description>
           <res-ref-name>java:/jdbc/FisicienCoreDS</res-ref-name>
           <res-type>javax.sql.DataSource</res-type>
           <res-auth>Container</res-auth>
           <res-sharing-scope>Shareable</res-sharing-scope>
           </resource-ref>
           </session>
           <entity>
           <description>Entity Bean ( CMP )</description>
           <display-name>Fddrugallergy</display-name>
           <ejb-name>Fddrugallergy</ejb-name>
           <home>com.fsc.model.fd.fdallergy.ejb.FddrugallergyHome</home>
           <remote>com.fsc.model.fd.fdallergy.ejb.Fddrugallergy</remote>
           <local-home>com.fsc.model.fd.fdallergy.ejb.FddrugallergyLocalHome</local-home>
           <local>com.fsc.model.fd.fdallergy.ejb.FddrugallergyLocal</local>
           <ejb-class>com.fsc.model.fd.fdallergy.ejb.FddrugallergyBean</ejb-class>
           <persistence-type>Container</persistence-type>
           <prim-key-class>java.lang.Long</prim-key-class>
           <reentrant>False</reentrant>
           <cmp-version>2.x</cmp-version>
           <abstract-schema-name>Fddrugallergy</abstract-schema-name>
           <cmp-field>
           <field-name>fddrugallergyId</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>fdpersonId</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>gngenericdrugId</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>system</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>route</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>probability</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>reaction</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>activeInd</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>enteredBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>enteredDatetime</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>prevUpdatedBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>prevUpdatedDatetime</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>lastUpdatedBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>lastUpdatedDatetime</field-name>
           </cmp-field>
           <primkey-field>fddrugallergyId</primkey-field>
           <query>
           <query-method>
           <method-name>findAll</method-name>
           <method-params/>
           </query-method>
           <ejb-ql>select object(o) from Fddrugallergy o</ejb-ql>
           </query>
           <resource-ref>
           <description>jdbc/FisicienCoreDS</description>
           <res-ref-name>java:/jdbc/FisicienCoreDS</res-ref-name>
           <res-type>javax.sql.DataSource</res-type>
           <res-auth>Container</res-auth>
           <res-sharing-scope>Shareable</res-sharing-scope>
           </resource-ref>
           </entity>
           <entity>
           <description>Entity Bean ( CMP )</description>
           <display-name>Fdmedicalalert</display-name>
           <ejb-name>Fdmedicalalert</ejb-name>
           <home>com.fsc.model.fd.fdallergy.ejb.FdmedicalalertHome</home>
           <remote>com.fsc.model.fd.fdallergy.ejb.Fdmedicalalert</remote>
           <local-home>com.fsc.model.fd.fdallergy.ejb.FdmedicalalertLocalHome</local-home>
           <local>com.fsc.model.fd.fdallergy.ejb.FdmedicalalertLocal</local>
           <ejb-class>com.fsc.model.fd.fdallergy.ejb.FdmedicalalertBean</ejb-class>
           <persistence-type>Container</persistence-type>
           <prim-key-class>java.lang.Long</prim-key-class>
           <reentrant>False</reentrant>
           <cmp-version>2.x</cmp-version>
           <abstract-schema-name>Fdmedicalalert</abstract-schema-name>
           <cmp-field>
           <field-name>fdmedicalalertId</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>fdpersonId</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>medicalAlert</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>indicator</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>activeInd</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>enteredBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>enteredDatetime</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>prevUpdatedBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>prevUpdatedDatetime</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>lastUpdatedBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>lastUpdatedDatetime</field-name>
           </cmp-field>
           <primkey-field>fdmedicalalertId</primkey-field>
           <query>
           <query-method>
           <method-name>findAll</method-name>
           <method-params/>
           </query-method>
           <ejb-ql>select object(o) from Fdmedicalalert o</ejb-ql>
           </query>
           <resource-ref>
           <description>jdbc/FisicienCoreDS</description>
           <res-ref-name>java:/jdbc/FisicienCoreDS</res-ref-name>
           <res-type>javax.sql.DataSource</res-type>
           <res-auth>Container</res-auth>
           <res-sharing-scope>Shareable</res-sharing-scope>
           </resource-ref>
           </entity>
           <entity>
           <description>Entity Bean ( CMP )</description>
           <display-name>Fdnondrugallergy</display-name>
           <ejb-name>Fdnondrugallergy</ejb-name>
           <home>com.fsc.model.fd.fdallergy.ejb.FdnondrugallergyHome</home>
           <remote>com.fsc.model.fd.fdallergy.ejb.Fdnondrugallergy</remote>
           <local-home>com.fsc.model.fd.fdallergy.ejb.FdnondrugallergyLocalHome</local-home>
           <local>com.fsc.model.fd.fdallergy.ejb.FdnondrugallergyLocal</local>
           <ejb-class>com.fsc.model.fd.fdallergy.ejb.FdnondrugallergyBean</ejb-class>
           <persistence-type>Container</persistence-type>
           <prim-key-class>java.lang.Long</prim-key-class>
           <reentrant>False</reentrant>
           <cmp-version>2.x</cmp-version>
           <abstract-schema-name>Fdnondrugallergy</abstract-schema-name>
           <cmp-field>
           <field-name>fdnondrugallergyId</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>fdpersonId</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>allergyType</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>allergyDescription</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>reaction</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>activeInd</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>enteredBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>enteredDatetime</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>prevUpdatedBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>prevUpdatedDatetime</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>lastUpdatedBy</field-name>
           </cmp-field>
           <cmp-field>
           <field-name>lastUpdatedDatetime</field-name>
           </cmp-field>
           <primkey-field>fdnondrugallergyId</primkey-field>
           <query>
           <query-method>
           <method-name>findAll</method-name>
           <method-params/>
           </query-method>
           <ejb-ql>select object(o) from Fdnondrugallergy o</ejb-ql>
           </query>
           <resource-ref>
           <description>jdbc/FisicienCoreDS</description>
           <res-ref-name>java:/jdbc/FisicienCoreDS</res-ref-name>
           <res-type>javax.sql.DataSource</res-type>
           <res-auth>Container</res-auth>
           <res-sharing-scope>Shareable</res-sharing-scope>
           </resource-ref>
           </entity>
           </enterprise-beans>
           <assembly-descriptor>
           <container-transaction>
           <method>
           <ejb-name>Fddrugallergy</ejb-name>
           <method-name>*</method-name>
           </method>
           <trans-attribute>Supports</trans-attribute>
           </container-transaction>
           <container-transaction>
           <method>
           <ejb-name>Fdmedicalalert</ejb-name>
           <method-name>*</method-name>
           </method>
           <trans-attribute>Supports</trans-attribute>
           </container-transaction>
           <container-transaction>
           <method>
           <ejb-name>Fdnondrugallergy</ejb-name>
           <method-name>*</method-name>
           </method>
           <trans-attribute>Supports</trans-attribute>
           </container-transaction>
           <container-transaction>
           <method>
           <ejb-name>FdAllergyManager</ejb-name>
           <method-name>*</method-name>
           </method>
           <trans-attribute>Required</trans-attribute>
           </container-transaction>
           </assembly-descriptor>
          </ejb-jar>