File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes JBossResourceException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Reply locked New topic


anupa oru
Ranch Hand

Joined: Jan 15, 2005
Posts: 118
Hi Folks:

I have kind of weird situation where I am using jboss 3.2.6 and CMP. Once we restart the server and if data base is machine is on but our database instance is n't running, when we call find by primary it's giving javax.ejb.FinderException with SQLException embedded init.I wanted to differentaite real FinderException (where record wasn't there) from FinderException(where Database is down when container is tryting to connect with DB).I would like to come with generic class which can check exception from container and then determine where DB is down or not.
For infor attaching stack trace

Caused by: javax.ejb.FinderException: Find failed: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: The Network Adapter could not establish the connection); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: The Network Adapter could not establish the connection))
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(
at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.execute(
at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(
at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(
at org.jboss.ejb.EntityContainer.findSingleObject(
at org.jboss.ejb.EntityContainer.findLocal(
at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(
at org.jboss.ejb.EntityContainer.internalInvokeHome(
at org.jboss.ejb.Container.invoke(
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(
at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(
at $Proxy62.findByPrimaryKey(Unknown Source)
at com.wdpro.commerce.common.shared.dae.InstantCreditService.updateDVICPromoUsed(Inst

Please let me ASAP,thanks alot
anupa oru
Ranch Hand

Joined: Jan 15, 2005
Posts: 118
Waiting for reply............
narasimha tambareni

Joined: Oct 14, 2009
Posts: 1
were you able to resolve this issue>?

I had same issue, after I increase the number of connections, min and max pool size.

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 9956


Welcome to JavaRanch

Please do not post questions to old threads. This is a 4 year old thread. Please open a new topic in this forum with more details about the issue you are running into.

[My Blog] [JavaRanch Journal]
I agree. Here's the link:
subject: JBossResourceException
Similar Threads
CMP Exception Handling
Cannot deploy EJB application using JBoss and Eclipse
EJB 2.1 Error - Find failed - java.sql.SQLException: Column not found
finder method of CMP thows NULLPOINTER EXCEPTION
Error in LookUP in JBOSS 5.0.0.Beta4 EJB3.0