11 Replies Latest reply on May 5, 2003 7:00 PM by Steven Cen

    JBoss Unknown Error

    Steven Cen Newbie

      Hi Jbossian,

      JBoss307-Tomcat4.1.24 bundle.
      MySQL JDBC 2.0.14

      When I started the JBoss, I got this error and have no idea what is all about.

      10:20:52,277 INFO [EmbeddedCatalinaService41] deploy, ctxPath=, warUrl=file:/usr/local/jboss-3.0.7_jakarta-tomcat-4.1.24/server/default/tmp/deploy/server/default/deploy/www.ear/21.www.ear-contents/all.war
      10:20:52,721 INFO [Engine] WebappLoader[]: Deploying class repositories to work directory /usr/local/jboss-3.0.7_jakarta-tomcat-4.1.24/tomcat-4.1.x/work/MainEngine/localhost/_
      10:20:54,644 INFO [Engine] ContextConfig[]: Added certificates -> request attribute Valve
      10:20:54,874 INFO [EmbeddedCatalinaService41] Using Java2 parent classloader delegation: true
      10:20:54,882 INFO [Engine] StandardManager[]: Seeding random number generator class java.security.SecureRandom
      10:20:54,893 INFO [Engine] StandardManager[]: Seeding of random number generator has been completed
      10:20:57,505 INFO [Engine] contextInitialized()
      10:20:57,575 ERROR [LogInterceptor] RuntimeException:
      java.lang.NullPointerException
      at com.logic.setup.setting.ejb.StatusBean.closeConnection(StatusBean.java:107)
      at com.logic.setup.setting.ejb.StatusBean.findOrderStatus(StatusBean.java:62)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy233.findOrderStatus(Unknown Source)
      at interfaces.util.setup.BeanManager.(BeanManager.java:127)
      at interfaces.util.setup.ContextListener.contextInitialized(ContextListener.java:24)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3269)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3598)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:432)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:306)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:301)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:266)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:413)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy2.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:232)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:148)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:536)
      10:20:57,609 INFO [STDOUT] Couldn't refer status session bean.RuntimeException; nested exception is:
      java.lang.NullPointerException
      10:20:57,604 INFO [Engine] contextInitialized()
      10:20:57,687 INFO [Engine] contextInitialized()
      10:20:57,774 INFO [Engine] contextInitialized()
      10:20:57,823 INFO [Engine] contextInitialized()
      10:20:57,867 INFO [Engine] contextInitialized()
      10:20:58,007 INFO [Engine] contextInitialized()
      10:20:58,166 INFO [Engine] contextInitialized()
      10:21:04,851 INFO [Engine] StandardWrapper[:default]: Loading container servlet default
      10:21:04,858 INFO [Engine] StandardWrapper[:invoker]: Loading container servlet invoker
      10:21:04,885 INFO [MainDeployer] Deployed package: file:/usr/local/jboss-3.0.7_jakarta-tomcat-4.1.24/server/default/deploy/www.ear
      10:21:04,911 INFO [URLDeploymentScanner] Started
      10:21:04,922 INFO [MainDeployer] Deployed package: file:/usr/local/jboss-3.0.7_jakarta-tomcat-4.1.24/server/default/conf/jboss-service.xml
      10:21:04,930 INFO [Server] JBoss (MX MicroKernel) [3.0.7 (CVSTag=JBoss_3_0_7 Date=200304081816)] Started in 1m:50s:242ms

      Then, I tried to go to my application and login and I got this error in console :

      10:30:38,073 INFO [RequestProcessor] Processing a 'POST' for path '/corporateLogon'
      10:30:38,439 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
      java.lang.NullPointerException
      at com.logic.login.user.ejb.UserBean.closeConnection(UserBean.java:446)
      at com.logic.login.user.ejb.UserBean.ejbFindByPrimaryKey(UserBean.java:342)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.plugins.BMPPersistenceManager.callFinderMethod(BMPPersistenceManager.java:638)
      at org.jboss.ejb.plugins.BMPPersistenceManager.findEntity(BMPPersistenceManager.java:330)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:301)
      at org.jboss.ejb.EntityContainer.find(EntityContainer.java:690)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:68)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:133)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.Container.invoke(Container.java:756)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy400.findByPrimaryKey(Unknown Source)
      at com.logic.login.user.ejb.UserCtlrBean.getUserDetail(UserCtlrBean.java:136)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy402.getUserDetail(Unknown Source)
      at interfaces.action.login.logon.CorporateLogonAction.logon(CorporateLogonAction.java:156)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:209)
      at org.apache.struts.actions.LookupDispatchAction.perform(LookupDispatchAction.java:230)
      at org.apache.struts.action.Action.execute(Action.java:369)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:437)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
      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:536)

      And my application always said Login/Password incorrect.

      This is my 'server/default/deploy/mysql-service.xml' :

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      LOGINDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/LOGIN</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">sqladmin</config-property>
      <config-property name="Password" type="java.lang.String">sql4dm1n2003</config-property>




      <!--Below here are advanced properties -->
      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper



      What's wrong? Is it Tomcat , JBoss, MySQL error?

      Any help would be greatly appreciated.

      Regards,
      Cuang Lim

        • 1. Re: JBoss Unknown Error
          Adrian Brock Master

          java.lang.NullPointerException
          at com.logic.login.user.ejb.UserBean.closeConnection(UserBean.java:446)

          You have a NullPointerException in your application

          Regards,
          Adrian

          • 2. Re: JBoss Unknown Error
            Steven Cen Newbie

            Hi Adrian,

            The application is build base on Jboss 2.4.4, is there any compatibility issues on it?

            I still can't figure it out, why I can't login since the application running well. My application call 8 database at one time and all I define in single mysql-service.xml file. Must I use 8 files for Database connection if I need to call 8 DB?

            Please Help.

            Thanks.

            Regards,
            Han Lin

            • 3. Re: JBoss Unknown Error
              Adrian Brock Master

              I don't understand your question.

              What do you mena by 8 DB?
              8 database instances or 8 tables?

              The problem you reported was a NullPointerException,
              what does that have to do with databases?

              Regards,
              Adrian

              • 4. Re: JBoss Unknown Error
                Steven Cen Newbie

                Hi Adrian,

                8 DB mean I'm calling 8 Databases. I tried to use 8 xml file for MySQL connection and the problem still exist.

                Here is the contain of the .xml file, please correct if I written it wrong :

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

                <!-- ===================================================================== -->
                <!-- -->
                <!-- JBoss Server Configuration -->
                <!-- -->
                <!-- ===================================================================== -->



                <!-- ==================================================================== -->
                <!-- New ConnectionManager setup for mysql using 2.0.11 driver -->
                <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
                <!-- ==================================================================== -->


                <depends optional-attribute-name="ManagedConnectionFactoryName">
                <!--embedded mbean-->

                CATALOGDS



                <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/CATALOG</config-property>
                <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
                <!--set these only if you want only default logins, not through JAAS -->
                <config-property name="UserName" type="java.lang.String">sqladmin</config-property>
                <config-property name="Password" type="java.lang.String">password</config-property>


                <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper


                <depends optional-attribute-name="ManagedConnectionPool">
                <!--embedded mbean-->

                0
                50
                5000
                15
                <!--criteria indicates if Subject (from security domain) or app supplied
                parameters (such as from getConnection(user, pw)) are used to distinguish
                connections in the pool. Choices are
                ByContainerAndApplication (use both),
                ByContainer (use Subject),
                ByApplication (use app supplied params only),
                ByNothing (all connections are equivalent, usually if adapter supports
                reauthentication)-->
                ByContainer


                <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
                <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager
                java:/TransactionManager
                <!--make the rar deploy! hack till better deployment-->
                jboss.jca:service=RARDeployer



                The same for another 7 .xml files, only the DS and database name was different.

                I'm not sure whether those error got things to do with database or not, I said it because I can call my application from web, but I can't login, it always give me username or password error which is not true.

                Here is the error shown in console when I tried to login to my application :

                2003-04-29 09:32:00,685 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.0.7 (CVSTag=JBoss_3_0_7 Date=200304081816)] Started in 1m:46s:269ms
                2003-04-29 09:32:40,574 INFO [org.apache.struts.action.RequestProcessor] Processing a 'POST' for path '/corporateLogon'
                2003-04-29 09:32:40,690 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:
                java.lang.NullPointerException
                at com.logic.login.user.ejb.UserBean.closeConnection(UserBean.java:446)
                at com.logic.login.user.ejb.UserBean.ejbFindByPrimaryKey(UserBean.java:342)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.ejb.plugins.BMPPersistenceManager.callFinderMethod(BMPPersistenceManager.java:638)
                at org.jboss.ejb.plugins.BMPPersistenceManager.findEntity(BMPPersistenceManager.java:330)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:301)
                at org.jboss.ejb.EntityContainer.find(EntityContainer.java:690)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
                at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
                at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
                at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91)
                at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
                at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:68)
                at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
                at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:133)
                at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
                at org.jboss.ejb.Container.invoke(Container.java:756)
                at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
                at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
                at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
                at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
                at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
                at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
                at $Proxy405.findByPrimaryKey(Unknown Source)
                at com.logic.login.user.ejb.UserCtlrBean.getUserDetail(UserCtlrBean.java:136)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
                at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
                at org.jboss.ejb.Container.invoke(Container.java:738)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
                at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
                at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
                at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
                at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
                at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
                at $Proxy407.getUserDetail(Unknown Source)
                at interfaces.action.login.logon.CorporateLogonAction.logon(CorporateLogonAction.java:156)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:209)
                at org.apache.struts.actions.LookupDispatchAction.perform(LookupDispatchAction.java:230)
                at org.apache.struts.action.Action.execute(Action.java:369)
                at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:437)
                at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264)
                at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
                at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
                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:536)

                Please Advise.

                Regards,
                Han Lin

                • 5. Re: JBoss Unknown Error
                  Adrian Brock Master

                  You haven't explained the NullPointerException,
                  perhaps you can post the code for UserBean
                  around line 446?

                  Regards,
                  Adrian

                  • 6. Re: JBoss Unknown Error
                    Steven Cen Newbie

                    Hi Adrian,

                    Here is the UserBean.java around line 446 :

                    /*********************** Database Routines *************************/
                    private void makeConnection() throws NamingException, SQLException {

                    try {
                    con = DBConnection.makeConnection(dbName);
                    }
                    catch (Exception ex) {
                    throw new EJBException("Unable to connect to database. " + ex.getMessage());
                    }
                    }
                    private void closeConnection() throws EJBException {
                    try {
                    con.close(); <------- LINE 446
                    }catch (SQLException ex) {
                    throw new EJBException("ejbCreate close connection: " + ex.getMessage());
                    }
                    }

                    FYI, All the code are written and running well on JBoss 2.4.4+Tomcat 4.0.1. And this error came when I throw the ear file into JBoss 3.0.7+Tomcat 4.1.24.

                    Please Advise.

                    Regards,
                    Han Lin

                    • 7. Re: JBoss Unknown Error
                      Adrian Brock Master

                      So is "con" null?

                      Is DBConnection.makeConnection returning null?

                      Regards,
                      Adrian

                      • 8. Re: JBoss Unknown Error
                        Steven Cen Newbie

                        Hi Adrian,

                        Yes, its returning null. What is mean?

                        Regards,
                        Han Lin

                        • 9. Re: JBoss Unknown Error
                          Adrian Brock Master

                          I don't know, what is DBConnection?

                          Regards,
                          Adrian

                          • 10. Re: JBoss Unknown Error
                            Steven Cen Newbie

                            Hi Adrian,

                            DBConnection is database connection, it's a function that connect to database.

                            Do you have any idea what is the problem and how to fix it?

                            Thanks.

                            Regards,
                            Han Lim

                            • 11. Re: JBoss Unknown Error
                              Steven Cen Newbie

                              Hi Adrian,

                              DBConnection is a function to connect to Database.

                              Do you have any idea what is the problem lies and how to fix it.

                              Thanks.

                              Regards,
                              Han Lim