-
1. can't find default data source
rosonsandy Apr 21, 2005 7:21 AM (in response to gunderson3)anybody can tell me why,i almost lost my confidence on jboss .
-
2. Re: Dukes Bank error can't find default data source
norman.richards Apr 21, 2005 8:23 AM (in response to gunderson3)You didn't describe what the state of the application is, so we can only guess. Some questions:
Does JBoss restart cleanly? Does the application work after restart? I don't know what you could have done that would cause that, but it is something important to check.
Go service=JNDIView in the JMX Console and invoke the list() operation. Do you see DefaultDS in the java: context?
If not, go back and redeploy hsqldb-ds.xml. What does JBoss say on redeployment? Look at server.log if the console log doesn't show enough detail. -
3. Re: Dukes Bank error can't find default data source
rosonsandy Apr 21, 2005 8:36 AM (in response to gunderson3)yes,i do see DefaultDS after i invoked the list() , well , i use ant to run a simple example,InitialContext ctx=new InitialContext();
DataSource ds=(DataSource)ctx.lookup("java:/DefaultDS");
but the result is :
javax.naming.NameNotFoundException: DefaultDS not bound -
4. Re: Dukes Bank error can't find default data source
darranl Apr 21, 2005 8:40 AM (in response to gunderson3)You can not access items bound to the 'java:' namespace from outside JBoss.
-
5. Re: Dukes Bank error can't find default data source
rosonsandy Apr 21, 2005 8:59 AM (in response to gunderson3)i studied jboss-EJB-3.0_Preview_5 and just added
DataSource ds=(DataSource)ctx.lookup("java:/DefaultDS");
in the client.java ,is it inside or outside jboss?
well, with the code above , it runs quite well -
6. Re: Dukes Bank error can't find default data source
rosonsandy Apr 21, 2005 9:02 AM (in response to gunderson3)i studied jboss-EJB-3.0_Preview_5 and just added
DataSource ds=(DataSource)ctx.lookup("java:/DefaultDS");
in the client.java ,is it inside or outside jboss?
well, without the code above , it runs quite well -
7. Re: Dukes Bank error can't find default data source
darranl Apr 21, 2005 9:26 AM (in response to gunderson3)Inside JBoss means that the code is running within the JBoss JVM and the InitialContext has not been configured to connect over the network.
Outside JBoss means that the code is running in a different JVM or the InitialContext has been configured to connect over the network. -
8. Re: Dukes Bank error can't find default data source
rosonsandy Apr 21, 2005 9:46 AM (in response to gunderson3)darranl
thanks very much, i solved my problem . -
9. Re: Dukes Bank error can't find default data source
jonghun95 May 6, 2005 1:29 PM (in response to gunderson3)I also have a similar problem. I am using default HSQL DB and deployed Duke's bank. When I restarted server, I am getting the following error.
11:08:10,963 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=ebankCu
stomer,service=EJB
org.jboss.deployment.DeploymentException: Error: can't find data source: java:/D
efaultDS; - nested throwable: (javax.naming.NameNotFoundException: DefaultDS not
bound)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.init(JDBCEntit
yBridge.java:139)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBC
StoreManager.java:420)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
r.java:353)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
er.java:157)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:144)
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:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:144)
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:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy41.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:394)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
I went JMX console and list the jndi. There was no DefaultDS. Please advise. -
10. Re: Dukes Bank error can't find default data source
janoholm Jul 14, 2005 9:14 AM (in response to gunderson3)I don?t think that gunderson3 and later jonghun95 ever get an answer to their problem ? did they? I am also a newbie and a first-timer on this subject, and I got the exact same error running the installation of Duke?s Bank.
No errors or problem until the last deploy of the application to Jboss, and the errors appear on the Jboss console. Errors still appears each time Jboss is starting. -
11. Re: Dukes Bank error can't find default data source
janoholm Jul 15, 2005 3:48 AM (in response to gunderson3)Hi
Got the Duke Bank up and running okay!
My problem was editing correctly the hsqldb-ds.xml following the guide in section 4.1.7.1. The text is okay, but read it carefully and do what it says. -
12. Re: Dukes Bank error can't find default data source
mortenhaugen Aug 2, 2005 4:17 AM (in response to gunderson3)I experienced the same problem, had to change
jboss:service=Hypersonic,database=localDB
to
jboss:service=Hypersonic
as stated in chapter 4.1.7.1 (in the very last paragraph of the chapter). -
13. Re: Dukes Bank error can't find default data source
mrj Sep 27, 2005 7:00 PM (in response to gunderson3)I have had the SAME Problem.
And I Have solved it. IT IS QUITE SIMPLE.
GO to ...\deploy\hsqldb-ds.xml file.
Look Inside and serach for that:<depends>jboss:service=Hypersonic,database=localDB</depends>
and replace it with :<depends>jboss:service=Hypersonic</depends>
It will work, Beleave me ! :)))
You will probably even now get an Exception that says that DefaultDS ist already existing. DO not pay attention to that. It is because you have already deployed it.
Just re-deploy The Duke's Bank and it will work :)ant -f jboss-build.xml deploy
WOrks Doesn't ?
Regards
Georgi Dimitrov -
14. Re: Dukes Bank error can't find default data source
darojasp Oct 10, 2005 1:35 PM (in response to gunderson3)Hi, I have tried to follow the Getting Started Guide, I'm using JBoss 4.0.2 and everything goeas all right until I make the deploy, where I get the following error:
12:10:01,046 INFO [EARDeployer] Init J2EE application: file:/C:/JBoss/jboss-4.0.2/server/default/deploy/JBossDukesBank.ear 12:10:02,296 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must be defined as public and abstract. 12:10:02,312 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: customerId 12:10:02,312 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: customerId 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: lastName 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: lastName 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: firstName 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: firstName 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: middleInitial 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: middleInitial 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: street 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: street 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: city 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: city 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: state 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: state 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: zip 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: zip 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: phone 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: phone 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: email 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: email 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.2 Warning: CMP entity beans may not define the implementation of a finder. 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 22.2 Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local home interface, if any, in the <local-home> element. Info : Class not found on 'com.sun.ebank.ejb.customer.LocalCustomerHome': No ClassLoaders found for: com.sun.ebank.ejb.customer.LocalCustomerHome 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 22.2 Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local interface, if any, in the <local> element. Info : Class not found on 'com.sun.ebank.ejb.customer.LocalCustomer': No ClassLoaders found for: com.sun.ebank.ejb.customer.LocalCustomer 12:10:02,328 WARN [verifier] EJB spec violation: Bean : CustomerBean Section: 10.6.1 Warning: The Bean Provider must provide a remote interface and a remote home interface or a local interface and a local home interface for the bean. 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must be defined as public and abstract. 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: accountId 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: accountId 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: description 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: description 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: beginBalance 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: beginBalance 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: beginBalanceTimeStamp 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: beginBalanceTimeStamp 12:10:02,343 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.2 Warning: CMP entity beans may not define the implementation of a finder. 12:10:02,359 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 22.2 Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local home interface, if any, in the <local-home> element. Info : Class not found on 'com.sun.ebank.ejb.account.LocalAccountHome': No ClassLoaders found for: com.sun.ebank.ejb.account.LocalAccountHome 12:10:02,359 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 22.2 Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local interface, if any, in the <local> element. Info : Class not found on 'com.sun.ebank.ejb.account.LocalAccount': No ClassLoaders found for: com.sun.ebank.ejb.account.LocalAccount 12:10:02,359 WARN [verifier] EJB spec violation: Bean : AccountBean Section: 10.6.1 Warning: The Bean Provider must provide a remote interface and a remote home interface or a local interface and a local home interface for the bean. 12:10:02,359 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must be defined as public and abstract. 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: txId 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: txId 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: timeStamp 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: timeStamp 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: amount 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: amount 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: balance 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: balance 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a get accessor for each CMP field. Info : Field: description 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: The entity bean class must define a set accessor for each CMP field. Info : Field: description 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.2 Warning: CMP entity beans may not define the implementation of a finder. 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 22.2 Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local home interface, if any, in the <local-home> element. Info : Class not found on 'com.sun.ebank.ejb.tx.LocalTxHome': No ClassLoaders found for: com.sun.ebank.ejb.tx.LocalTxHome 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 22.2 Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local interface, if any, in the <local> element. Info : Class not found on 'com.sun.ebank.ejb.tx.LocalTx': No ClassLoaders found for: com.sun.ebank.ejb.tx.LocalTx 12:10:02,375 WARN [verifier] EJB spec violation: Bean : TxBean Section: 10.6.1 Warning: The Bean Provider must provide a remote interface and a remote home interface or a local interface and a local home interface for the bean. 12:10:02,375 WARN [verifier] EJB spec violation: Bean : NextIdBean Section: 22.2 Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the <ejb-class> element. Info : Class not found on 'com.sun.ebank.ejb.util.NextIdBean': No ClassLoaders found for: com.sun.ebank.ejb.util.NextIdBean