aspose file tools*
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
JavaRanch » Java Forums » Products » JBoss/WildFly
Reply locked New topic
Author

JBossResourceException

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(JDBCAbstractQueryCommand.java:223)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:128)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.execute(JDBCFindByPrimaryKeyQuery.java:128)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:47)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:589)
at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:271)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:302)
at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1043)
at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:627)
at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
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:1070)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:204)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
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:315)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:85)
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:478)
at org.jboss.ejb.Container.invoke(Container.java:729)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:347)
at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
at $Proxy62.findByPrimaryKey(Unknown Source)
at com.wdpro.commerce.common.shared.dae.InstantCreditService.updateDVICPromoUsed(Inst


Please let me ASAP,thanks alot
Anu
anupa oru
Ranch Hand

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

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
Marshal

Joined: Jul 20, 2005
Posts: 10290
    
168

Narasimha,

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: http://aspose.com/file-tools
 
subject: JBossResourceException