3 Replies Latest reply on Jun 2, 2003 4:35 PM by kchillar

    Help: Using Microsoft ACESS with JBOSS

    kchillar Newbie

      Hi I am new to JBOSS server. I have JBOSS 3.2.1 and I am trying to make a connection to MS ACCESS Database for EJB ( UserDao). I am able to lookup DataSource using jndi, but I am unable to create connection using that DataSource object. I gives me following Exception. Thanks for any help:

      Kalyan

      7:35:08,500 INFO [STDOUT] Got a NON-NULL Home Object
      7:35:08,515 INFO [STDOUT] The Home Object reference is UserDaoHome
      7:35:08,515 INFO [STDOUT] Creating remote Object
      7:35:08,531 INFO [STDOUT] USER DAO SESSION BEAN CREATED
      7:35:08,531 INFO [STDOUT] isNewUser METHOD INVOKED ON SESSIONBEAN
      7:35:08,531 INFO [STDOUT] ***********GETTING CONEECTION***************
      7:35:08,531 INFO [STDOUT] ******LOOKING UP DATASOURCE*******
      7:35:08,546 INFO [STDOUT] *** :-) UserDao Got NON Null Data Source ****org.jboss.resource.adapter.jdbc.WrapperDataSou
      ce@3ca754
      7:35:09,593 WARN [WrappedConnection] Closing a statement you left open, please do your own housekeeping
      7:35:09,593 INFO [CachedConnectionManager] Successfully closed a connection for you. Please close them yourself: org.
      boss.resource.adapter.jdbc.WrappedConnection@24edc4
      ava.lang.Exception: Stack Trace
      at org.jboss.resource.connectionmanager.CachedConnectionManager.closeAll(CachedConnectionManager.java:376)
      at org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaAwareObject(CachedConnectionManager.java:
      99)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:190)

      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
      at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)

      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322)
      at org.jboss.ejb.Container.invoke(Container.java:674)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:83)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy25.isNewUser(Unknown Source)
      at com.alacriti.servlet.LoginAction.perform(Unknown Source)
      at org.apache.struts.action.Action.execute(Action.java:415)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:479)


        • 1. Re: Help: Using Microsoft ACESS with JBOSS
          Harald Gliebe Novice

          According to the stacktrace this exception doesn't happen when your trying to create the connection (there is no call to DataSource.getConnection), but instead it seems your getting the connection but are not closing it before returning from the method of the stateless session bean.
          Could you check again the result of getConnection ?

          Regards,
          Harald

          • 2. Re: Help: Using Microsoft ACESS with JBOSS
            kchillar Newbie

            I will check what you have suggested. But that means I cannot open a connection to a database in one method and use that connection in other methods to create statements and execute SQL staements.

            What I was trying to do is, in method A() I will handle all database related stuff and return a connection.

            Method B() with use that connection and create staements etc. But if what you said is true, then every method that needs to execute a SQL would have to get a connection and close it.

            I will any way try but these are my thoughts at first glance.

            Kalyan

            • 3. Re: Help: Using Microsoft ACESS with JBOSS
              kchillar Newbie

              I have tried what you suggested and it worked.

              Thank you very much.

              kalyan