7 Replies Latest reply on Jan 8, 2004 3:44 PM by Luke Taylor

    DukeBank tutorial example

    webuser Newbie

       

      "webuser" wrote:
      "webuser" wrote:
      I just stepped into the world of JBoss, obtained and installed the server, documentation and tutorial code. It is amazing how every step is so well documented and works until... I deploy the <JBossDukesBank.ear> application on the server. Even this step is successful. When I access the URL "http://localhost:8080/bank/main", I get the login screen, but the default login of "200" and "j2ee" does not work! The page that comes up in the browser reads:

      Server Error
      Your request cannot be completed. The server got the following error:
      null

      And when I look at the server console window, there are a long list of exceptions that start with:
      java.lang.Thread.run(Thread.java:534)
      and end with:
      java.lang.NullPointerException at org.apache.jsp.links_jsp._jspService(links_jsp.java:71)

      I think I followed all the steps, I checked the users.properties and roles.properties, and they are all there. Obviously I am missing something! Please help... Thanks.

      --AKR


        • 1. Re: DukeBank tutorial example
          Luke Taylor Novice

           

          "luke_t" wrote:
          Hi,

          Can you check that the database is populated? Also could you clarify if this is before you've added a security domain or after (following the stuff in section 4.2). If the database isn't populated the application will likely crash because there is no customer with id 200. As explained in sec. 4.2, if there is no security domain specified then any login will succeed so it may be wrong to assume that the login is failing.

          In general the browser and console information is likely to be less informative than the server log file. If you are having trouble working out what's going on, try boosting the log level for jboss classes as described in section 2.2.1.1. You will then find a lot more info in the server log.

          If you still can't work it out, then please post the stack trace and the contextual log messages. It makes it much easier to take a stab at what the problem might be.

          Luke.


          • 2. Re: DukeBank tutorial example
            Luke Taylor Novice

             

            "luke_t" wrote:
            Forgot to ask - what happens when you run the standalone client?


            • 3. Re: DukeBank tutorial example
              Luke Taylor Novice

               

              "luke_t" wrote:
              OK. I just checked this again and it seems that I already have the security domain element uncommented in jboss-web.xml so ignore what I said about that.

              However, if I run without any data I get exactly the problem you describe and it disappears as soon as I run the database creation/insertion ant tasks (you don't even need to redeploy). So my best guess is that you've missed them out by accident, or that they haven't worked for some reason. If you follow the instructions in sec. 4.1.7 then hopefully that will fix things.

              Luke.


              • 4. Re: DukeBank tutorial example
                webuser Newbie

                 

                "webuser" wrote:
                Luke, thank you for such detailed suggestions. I will try to answer all the questions one by one.
                <ol>
                <li>The HSQLDB service is up, and the DB is populated. I can see this from both running the ant command <i>ant -f jboss-build.xml db-list</i> as well as verifying the data in the actual DatabaseManager instance by executing the SQL queries for each table.</li>
                <li>I tried to log in before setting a security domain policy (according to the manual, I could log in with any password), and after uncommenting the relevant line <b>dd\jboss-web.xml</b> and adding the line in <b>build\jboss.xml</b>. The behavior was the same at both times.</li>
                <li>One of the issues I could not understand is that the GettingStarted guide mentions that <b>jboss.xml</b> is located in the <b>\dd</b> subdirectory along with <b>jboss-web.xml</b>. However, the file was located in the <b>\build</b> subdirectory, and I made a copy into the <b>\dd</b> subdirectory before creating the ear archive.</li>
                <li>When I ran the application client, the error persisted in a different manner; I tried to view Customer and Account information, and when I entered <b>200</b> and <b>5005</b> respectively in the ensuing ID prompt windows, the application reported that it could find neither Customer nor Account with those IDs. The error in the server was different - this time, it reported that the <u>ACCOUNT</u> and <u>CUSTOMER</u> tables could not be found.</li>
                </ol>

                The exception error from logging in via the browser:
                <code STYLE="font-family:arial, sans-serif; font-size:9px">
                2004-01-07 13:53:56,863 ERROR [org.jboss.web.localhost.Engine] ----- Root Cause -----
                java.lang.NullPointerException
                at org.apache.jsp.links_jsp._jspService(links_jsp.java:71)
                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
                at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
                at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
                at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
                at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
                at com.sun.ebank.web.taglib.InsertTag.doEndTag(Unknown Source)
                at org.apache.jsp.template_jsp._jspx_meth_tt_insert_2(template_jsp.java:1178)
                at org.apache.jsp.template_jsp._jspService(template_jsp.java:505)
                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
                at com.sun.ebank.web.Dispatcher.doGet(Unknown Source)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
                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.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
                at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:553)
                at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
                at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
                at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
                at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
                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:2417)
                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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
                at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
                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:197)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
                at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
                at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
                at java.lang.Thread.run(Thread.java:534)
                </CODE>

                The exception error from logging in via the application client:
                <code STYLE="font-family:arial, sans-serif; font-size:9px">
                2004-01-07 14:34:54,957 ERROR [STDERR] Debug: CustomerControllerBean ejbCreate
                2004-01-07 14:34:54,997 ERROR [STDERR] Debug: CustomerControllerBean leaving
                2004-01-07 14:34:55,058 ERROR [STDERR] Debug: AccountControllerBean ejbCreate
                2004-01-07 14:34:59,113 ERROR [STDERR] Debug: CustomerControllerBean getDetails
                2004-01-07 14:34:59,113 ERROR [STDERR] Debug: CustomerControllerBean customerExists
                2004-01-07 14:34:59,123 ERROR [STDERR] Debug: CustomerBean setEntityContext
                2004-01-07 14:34:59,123 ERROR [STDERR] Debug: CustomerBean ejbFindByPrimaryKey
                2004-01-07 14:34:59,123 ERROR [STDERR] Debug: CustomerBean selectByPrimaryKey
                2004-01-07 14:34:59,123 ERROR [STDERR] Debug: CustomerBean makeConnection
                2004-01-07 14:34:59,143 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@a218a5
                java.lang.Exception: STACKTRACE
                at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:282)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:506)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
                at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                at com.sun.ebank.ejb.customer.CustomerBean.makeConnection(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerBean.selectByPrimaryKey(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerBean.ejbFindByPrimaryKey(Unknown Source)
                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:585)
                at org.jboss.ejb.plugins.BMPPersistenceManager.findEntity(BMPPersistenceManager.java:306)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:300)
                at org.jboss.ejb.EntityContainer.find(EntityContainer.java:697)
                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:1043)
                at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
                at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
                at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:89)
                at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
                at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:240)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
                at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
                at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
                at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:483)
                at org.jboss.ejb.Container.invoke(Container.java:720)
                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:546)
                at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
                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:45)
                at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
                at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
                at $Proxy55.findByPrimaryKey(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerControllerBean.customerExists(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerControllerBean.getDetails(Unknown Source)
                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.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:948)
                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
                at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:269)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
                at org.jboss.ejb.Container.invoke(Container.java:700)
                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:546)
                at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367)
                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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                at sun.rmi.transport.Transport$1.run(Transport.java:148)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                at java.lang.Thread.run(Thread.java:534)
                2004-01-07 14:34:59,153 WARN [org.jboss.resource.adapter.jdbc.WrappedConnection] Closing a statement you left open, please do your own housekeeping
                java.lang.Exception: STACK TRACE
                at org.jboss.resource.adapter.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:805)
                at org.jboss.resource.adapter.jdbc.WrappedStatement.<init>(WrappedStatement.java:43)
                at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.<init>(WrappedPreparedStatement.java:51)
                at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:211)
                at com.sun.ebank.ejb.customer.CustomerBean.selectByPrimaryKey(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerBean.ejbFindByPrimaryKey(Unknown Source)
                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:585)
                at org.jboss.ejb.plugins.BMPPersistenceManager.findEntity(BMPPersistenceManager.java:306)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:300)
                at org.jboss.ejb.EntityContainer.find(EntityContainer.java:697)
                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:1043)
                at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
                at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
                at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:89)
                at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
                at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:240)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
                at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
                at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
                at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:483)
                at org.jboss.ejb.Container.invoke(Container.java:720)
                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:546)
                at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
                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:45)
                at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
                at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
                at $Proxy55.findByPrimaryKey(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerControllerBean.customerExists(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerControllerBean.getDetails(Unknown Source)
                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.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:948)
                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
                at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:269)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
                at org.jboss.ejb.Container.invoke(Container.java:700)
                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:546)
                at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367)
                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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                at sun.rmi.transport.Transport$1.run(Transport.java:148)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                at java.lang.Thread.run(Thread.java:534)
                2004-01-07 14:34:59,173 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException:
                javax.ejb.EJBException: ejbFindByPrimaryKey: Table not found: CUSTOMER in statement [select customer_id from customer where customer_id = '200' ]
                at com.sun.ebank.ejb.customer.CustomerBean.ejbFindByPrimaryKey(Unknown Source)
                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:585)
                at org.jboss.ejb.plugins.BMPPersistenceManager.findEntity(BMPPersistenceManager.java:306)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:300)
                at org.jboss.ejb.EntityContainer.find(EntityContainer.java:697)
                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:1043)
                at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
                at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
                at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:89)
                at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
                at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:240)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
                at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
                at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
                at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:483)
                at org.jboss.ejb.Container.invoke(Container.java:720)
                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:546)
                at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
                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:45)
                at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
                at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
                at $Proxy55.findByPrimaryKey(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerControllerBean.customerExists(Unknown Source)
                at com.sun.ebank.ejb.customer.CustomerControllerBean.getDetails(Unknown Source)
                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.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:948)
                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
                at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:269)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
                at org.jboss.ejb.Container.invoke(Container.java:700)
                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:546)
                at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367)
                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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                at sun.rmi.transport.Transport$1.run(Transport.java:148)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                at java.lang.Thread.run(Thread.java:534)
                </code>
                Please let me know if you need any additional details.

                --Ashwin


                • 5. Re: DukeBank tutorial example
                  mtww Newbie

                   

                  "mtww" wrote:
                  I also found similar problem and I noted that a WARN message:
                  WARN [org.jnp.interfaces.NamingContext] Failed to connect to localhost:1099
                  javax.naming.communicationException: Failed to connect to server localhost:1099. Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099. Root exception is java.net.SocketException: No buffer space available (maximum connections reached?): ...

                  Please advise as well, thanks!!

                  --MW


                  • 6. Re: DukeBank tutorial example
                    Luke Taylor Novice

                     

                    "luke_t" wrote:
                    Still looks like the app can't see the data for some reason - but I'm not sure why :-/.

                    Regarding your third point, there are separate jboss.xml files, one for each of the EJB jars - the appropriate one is copied from dd to the build directory when building a particular jar. You shouldn't edit anything in the build directory or take stuff from it and put it elsewhere. It's contents will be overwritten by the build and trashed completely by running the "clean" task.

                    Luke.


                    • 7. Re: DukeBank tutorial example
                      Luke Taylor Novice

                       

                      "luke_t" wrote:
                      OK, I've got a pretty good idea what could be causing this.

                      I think you've enabled the HSQL service at the bottom of the datasource xml file but forgotten to alter the connection-url as mentioned at the top of the file. Make sure it looks like

                      <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>

                      Check the stuff at the start of section 4.1.7.1.

                      If this is the case, the HSQL service will be running on that port and the scripts will run OK, but the default datasource "DefaultDS" which the app uses, will be looking at a different file (localDB) - all the HSQL files are stored in the db directory BTW. It's often useful to look at them as an alternative way of working out what state your DB is in.

                      Let me know if this is the case (hopefully it is :),

                      Luke.