Jboss - "Unable to get Managed Connection for java:/Appds"

Asked

Viewed 6,870 times

4

The following exceptions are occurring in my application:

10:52:34,506 ERROR [br.com.app.dao.NotificacaoDAO] (http--0.0.0.0-8080-77) java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,509 ERROR [br.com.app.dao.UsuarioDAO] (http--0.0.0.0-8080-55) java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,513 ERROR [br.com.app.business.NotificacaoBS] (http--0.0.0.0-8080-77) br.com.app.exceptions.DAOException: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,513 ERROR [br.com.app.dao.MensagemDAO] (http--0.0.0.0-8080-6) java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,520 ERROR [br.com.app.business.MensagemBS] (http--0.0.0.0-8080-6) br.com.app.exceptions.DAOException: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,522 ERROR [br.com.app.controller.serversent.ListarNovasNotificacoesController] (http--0.0.0.0-8080-77) br.com.app.exceptions.BusinessException: br.com.app.exceptions.DAOException: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,512 ERROR [br.com.app.business.UsuarioBS] (http--0.0.0.0-8080-55) br.com.app.exceptions.DAOException: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,530 ERROR [br.com.app.services.UsuarioService] (http--0.0.0.0-8080-55) br.com.app.exceptions.BusinessException: br.com.app.exceptions.DAOException: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,534 ERROR [br.com.app.controller.serversent.ListarNovasMensagensController] (http--0.0.0.0-8080-6) br.com.app.exceptions.BusinessException: br.com.app.exceptions.DAOException: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS
10:52:34,585 ERROR [br.com.app.dao.UsuarioDAO] (http--0.0.0.0-8080-66) java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/AppDS

In one minute she fired several exceptions like that /\

It always happens about 5 days after starting the app and it stays 24 hours online.

I’ve researched about, but didn’t really find the problem, maybe it could be some open connection, but I close all connections.

Does anyone know why?

Obs: I use JBOSS 7.1.1

2 answers

3

The most common cause for this type of error is that the bank no longer has connections to distribute. If you are releasing connections after use, it may be that some other part of your program or component is opening connections.

It may be a load issue as well. You may have to configure the seat to support more open connections at the same time. But as you say that the problem occurs after a certain time, it seems something cumulative.

What you can do to solve the problem is check how many connections are open (and even monitor this if necessary). This can be done by the Jboss CLI or through monitoring tools. They will not solve the problem but will show if there is a leak of connections and give you resources to try to solve the problem.

Here is information on how to get data source statistics through Jboss CLI (command line interface): https://docs.jboss.org/author/display/AS71/CLI+Recipes#CLIRecipes-Readstatisticsofactivedatasources

It will return various properties that you can use to find out what is happening. See the values that are in these:

  1. "Activecount" => "50" - Total available and active connections on timing
  2. "Availablecount" => "50" - Total available connections for use
  3. "Createdcount" => "30" - Total new connections created
  4. "Destroyedcount" => "0" - Total destroyed connections
  5. "Maxusedcount" => "50" - Total connections used

Here are some examples of data monitoring from datasources in Jboss: https://community.jboss.org/thread/175957?tstart=0

0

Friend, as stacktrace itself says... there was an error doing a "java:/Appds" lookup within its Notify class. You probably have something like this: (Oce did not clarify the details very well)

public class NotificacaoDAO {

@Resource(lookup = "java:/AppDS")
private Datasource ds

...
}

The definition of the JNDI address in the case of Jboss I advise the second standard(For Datasources):

java:jboss/datasources/MEU_DS

What also happens is that this DS is not properly registered OR you do not have the driver installed correctly: In the DOCUMENTATION it is quite clear this process.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.