I'm running JBoss 4.0, attempting to run the Duke's Bank j2ee tutorial. I've modified
my hsqldb-ds.xml file as instructed in the jbossj2ee.pdf document (comments removed
for brevity):
| <?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <local-tx-datasource>
| <jndi-name>DefaultDS</jndi-name>
| <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
| <driver-class>org.hsqldb.jdbcDriver</driver-class>
| <user-name>sa</user-name>
| <password/>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <idle-timeout-minutes>0</idle-timeout-minutes>
| <track-statements/>
| <security-domain>HsqlDbRealm</security-domain>
| <depends>jboss:service=Hypersonic,database=localDB</depends>
| </local-tx-datasource>
| <mbean code="org.jboss.jdbc.HypersonicDatabase"
| name="jboss:service=Hypersonic">
| <attribute name="Port">1701</attribute>
| <attribute name="Silent">true</attribute>
| <attribute name="Database">default</attribute>
| <attribute name="Trace">false</attribute>
| <attribute name="No_system_exit">true</attribute>
| </mbean>
| </datasources>
|
I've run all the sql scripts successfully to create and load the tables. I have
verified via the HSQL Database Manager that the tables exist and are populated. When
I run the Customer and Account Administration tool (via
ant -f jboss-build.xml run-client), trying to view customer ID 200, I get the
following stack trace:
13:16:52,670 INFO [STDOUT] Debug: CustomerControllerBean ejbCreate
13:16:52,780 INFO [STDOUT] Debug: CustomerControllerBean leaving
13:16:52,870 INFO [STDOUT] Debug: AccountControllerBean ejbCreate
13:17:02,013 INFO [STDOUT] Debug: CustomerControllerBean getDetails
13:17:02,023 INFO [STDOUT] Debug: CustomerControllerBean customerExists
13:17:02,033 INFO [STDOUT] Debug: CustomerBean setEntityContext
13:17:02,033 INFO [STDOUT] Debug: CustomerBean ejbFindByPrimaryKey
13:17:02,033 INFO [STDOUT] Debug: CustomerBean selectByPrimaryKey
13:17:02,033 INFO [STDOUT] Debug: CustomerBean makeConnection
13:17:02,033 ERROR [LogInterceptor] EJBException:
javax.ejb.EJBException: ejbFindByPrimaryKey: Unable to connect to database. Could not
dereference object
at com.sun.ebank.ejb.customer.CustomerBean.ejbFindByPrimaryKey(Unknown S
ource)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.plugins.BMPPersistenceManager.callFinderMethod(BMPPersi
stenceManager.java:609)
at org.jboss.ejb.plugins.BMPPersistenceManager.findEntity(BMPPersistence
Manager.java:311)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.find
Entity(CachedConnectionInterceptor.java:300)
at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1
053)
at org.jboss.ejb.EntityContainer.find(EntityContainer.java:700)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityC
ontainer.java:1080)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(Ent
itySynchronizationInterceptor.java:194)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
keHome(CachedConnectionInterceptor.java:214)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractIntercep
tor.java:90)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInst
anceInterceptor.java:113)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInte
rceptor.java:61)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCrea
tionInterceptor.java:28)
at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValida
tionInterceptor.java:41)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:109)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:283)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.ja
va:129)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercep
tor.java:110)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:1
20)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyF
actoryFinderInterceptor.java:93)
at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java
:487)
at org.jboss.ejb.Container.invoke(Container.java:832)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:232)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
a:90)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:4
5)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy71.findByPrimaryKey(Unknown Source)
at com.sun.ebank.ejb.customer.CustomerControllerBean.customerExists(Unkn
own 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(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(St
atefulSessionContainer.java:541)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
java:138)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
ke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(State
fulSessionInstanceInterceptor.java:295)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
Interceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:316)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
49)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
ryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:6
03)
at org.jboss.ejb.Container.invoke(Container.java:810)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:232)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:643)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.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:4
60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
at java.lang.Thread.run(Thread.java:534)
When starting JBoss, this message appeared:
MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
ObjectName: jboss:database=localDB,service=Hypersonic
state: NOTYETINSTALLED
I Depend On:
Depends On Me: jboss.jca:name=DefaultDS,service=ManagedConnectionFactory
I suspect this is the cause of the stack trace, but I don't know where to look.
I believe the hsqldb-ds.xml file is correct (based on the documentation).
Can anyone offer some help?
Thanks!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840336#3840336
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840336
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user