[GLASSFISH-19475] "Connection closed" despite connection validation Created: 21/Dec/12  Updated: 05/Sep/16

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2_b23
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Heikki Salokanto Assignee: sfelts
Resolution: Unresolved Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 3.1.2 b23 on CentOS 6.2 x86_64
Oracle 10.2.0.5 RAC ia64, 2 nodes


Tags: closed, connection, validation

 Description   

We were having occasional connection problems and therefore switched on connection validation, with a dummy query to DUAL. It validates at most every 60 seconds and will not close all connections on failure.

However, it seems that ConnectionHolder.checkValidity() throws a 'connection closed' which then goes all the way to the application. I was in belief that connection validation was the thing exactly designed to prevent this, is it not? If validation failed, it would automatically reconnect before handing out the connection?

The connection is indeed validated, but there's no effort to fix the connection when the validation fails:

[#|2012-12-21T04:56:03.707+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=45;_ThreadName=Thread-2;|
        at fi.foo.bar.AvepsiKuittausDAO.hae(AvepsiKuittausDAO.java:67)
        at fi.foo.bar.AvepsiSanomaKasittelija.hae(AvepsiSanomaKasittelija.java:56)
        at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
        at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
        at $Proxy244.hae(Unknown Source)
        at fi.foo.bar.__EJB31_Generated__AvepsiSanomaKasittelija__Intf____Bean__.hae(Unknown Source)
        at fi.foo.bar.baz.JmsToXml.<init>(JmsToXml.java:70)
        at fi.foo.bar.baz.PerusvalvontadataKasittelijaMDB.onMessage(PerusvalvontadataKasittelijaMDB.java:87)
        at sun.reflect.GeneratedMethodAccessor676.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4180)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5368)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
        at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1099)
        at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
        at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
        at $Proxy333.onMessage(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: org.hibernate.exception.GenericJDBCException: could not load an entity:
[fi.foo.bar.AvepsiKuittaus#component[sanomaId,kasittelija]{kasittelija=Perusvalvonta, sanomaId=69618960}]
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
        at org.hibernate.loader.Loader.loadEntity(Loader.java:2041)
        at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
        at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
        at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3293)
        at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
        at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
        at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
        at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
        at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
        at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
        at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1005)
        at org.hibernate.impl.SessionImpl.get(SessionImpl.java:998)
        at fi.foo.bar.AvepsiKuittausDAO.hae(AvepsiKuittausDAO.java:59)
        ... 42 more
Caused by: java.sql.SQLException: Connection closed
        at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:730)
        at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:560)
        at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:255)
        at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:52)
        at com.sun.gjc.spi.ManagedConnection.prepareCachedStatement(ManagedConnection.java:993)
        at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareStatement(ConnectionWrapper40.java:173)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
        at org.hibernate.loader.Loader.doQuery(Loader.java:801)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
        at org.hibernate.loader.Loader.loadEntity(Loader.java:2037)
        ... 54 more
|#]


 Comments   
Comment by jifeng [ 01/Mar/13 ]

if you execute the following logic in you application :
step1: connection.close();

step2: connection.prepareStatement();

there will be throw this exception :

Caused by: java.sql.SQLException: Connection closed
at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:730)

because the logic connectin(connectionHolder) is closed
ConnectionHolder.checkValidity() is used to check the connection is closed or not

Comment by Heikki Salokanto [ 01/Mar/13 ]

Quite obviously, yes, but we are never doing a connection.close() in the application. Connections are pooled and the JDBC Connection Pools are managed by GlassFish. It opens new connections as required and closes those that have been idle for some time.

The problem here is that the connections are getting closed suddenly for an unknown reason and GlassFish's connection validator is not capable of handling that. Connections getting closed suddenly also looks like a GlassFish problem since we're not experiencing that with any other (sort of) application.

Comment by sfelts [ 01/Mar/13 ]

This is working as expected. Based on the stack trace, you are not in the process of getting a connection. You are in the process of using a connection that you already reserved to do a prepared statement. Since GF and the driver don't know what other operations have been executed on the connection before this, we can't just give out a new connection and hope that everything is OK.

To do something like that, you would need to run with the Application continuity feature that was announced at Oracle Open World for Oracle 12c. In that case, the driver and database actually do keep track of what has been executed on the connection so it can be replayed on the new connection.

Comment by hrstoyanov [ 09/Mar/13 ]

This is, indeed, a major bug in GlassFish Server Open Source Edition 3.1.2.2 (build 5). The workaround that works for me is to disable statement cache (Statement Cache Size: 0, Advanced Tab) - the behaviour of this mug made me believe that this is some statements cache mess. Note, that I have not configured connection validation as described in the initial bug report, neverthless, the issue is still present.

Here is another manifestation of the same issue as seen in the SmartGWT product:

http://forums.smartclient.com/showthread.php?t=25771

"...Best guess, this is an application server or JDBC driver bug or misconfiguration at the JDBC driver or application server level, hence out of our control.

What's happening is: we successfully execute your SQL ("INSERT INTO batch_job_share...") using PreparedStatement.executeUpdate(). Then, a few lines later, using the same preparedStatement object, we are calling preparedStatement.getConnection().getMetaData().

At this point, your JDBC driver - well actually, some wrapper around it, looks like a manager class from Glassfish? - throws an Exception indicating the connection we just successfully used for an update is now closed. So it seems like it's either configured to auto-close connections right after certain SQL operations are executed, or your JDBC driver has some kind of bug where it get mixed up about which Connection belongs with which Statement, or the wrapper classes in use are not correctly tracking the open/closed state of the wrapped connections."

Comment by sfelts [ 09/Mar/13 ]

The connection close is not caused by the connection validation feature. My point was that turning on the connection validation feature doesn't prevent this from happening.

Here's an example that I ran into this week with the Oracle thin driver. The application configured oracle.jdbc.ReadTimeout. When the database was slow and the read timeout was exceeded, the applcation got a mysterious "SQLRecoverableException: Closed Connection".

I have also found that the expected new JDBC auto-close behavior leads to some surprises (IMO) but I don't think that is the case here.

If the driver has a debug feature to log all SQL operations, that would be the way to check if close is explicitly closed.

Comment by Heikki Salokanto [ 12/Mar/13 ]

Thank you for your ideas.

hrstoyanov: Last time I tried, setting up statement caching on the Advanced tab just completely messed up everything. I found out on some forums that it has to be configured on the Additional properties tab with "ImplicitCachingEnabled=true" and "MaxStatements=nnn". At least it didn't fill up all the logs with errors anymore, but I never benchmarked if it was actually in use then.

sfelts: I wasn't saying that 'Connection closed' was caused by the connection validation, but despite it. I now understand that it cannot solve the problem, in the current design at least.

I am running out of ideas, though. I'm getting the occasional 'Connection closed' on different application servers (physical servers, virtual servers), different Oracle RACs (10.2.0.5 and 11.2.0.3), different Oracle JDBC drivers (10.2.0.5 and 11.2.0.3) as well as with and without statement caching. The only thing common to all the setups is now GlassFish 3.1.2.2 (build 5).

Furthermore, I am not getting my connections closed in a Tomcat webapp using the same databases and drivers.

Comment by hrstoyanov [ 14/Mar/13 ]

sfelts:
1. I am using MS SQL JDBC Type 4 driver
2. It can not be a timing issue (look at the URL I provided and description of events). The SmartGWT comments indicated error in the Wrpper/Caching , which lead me to teh workaround.

Comment by samyomar82 [ 27/Jul/14 ]

Currently I am facing the same issue , (using GF 3.1.2.2 and Oracle 10G)
I am getting my Connection object from GlassFish connection Pool and I get this issue when the result set expected to return around 1/2 million records, but I did not get this exception when the result set contains lower set of records.

My poor workaround is to use a traditional JDBC connection instead of getting the connection object from Data Source It worked fine.

Has anybody a solution or workaround ?
Also we dont know if this bug is going to be fixed or not

Comment by joyli [ 30/Dec/15 ]

We have the same problem,used the prepareStatement database connection to get the getMetaData,
“Initial and Minimum Pool Size:” 、“Maximum Pool Size:” and “Statement Cache Size:” are 1,
code:
DataSource dn = (DataSource) initContext.lookup("DB");
Connection ccon = dn.getConnection();
PrepareStatement pstam = ccon.prepareStatement(sql);
ResultSet rs = pstam.executeQuery();
pstam.getConnection().getMetaData();

the concurrent situation,appear:
java.sql.SQLException: Connection closed
at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:774)
at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:388)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.getMetaData(ConnectionWrapper40.java:114)
at jdbc1.Servese1.serverdd(Servese1.java:122)
at jdbc1.Servese1.doGet(Servese1.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:286)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:336)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:236)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:619)

Comment by joyli [ 04/Jan/16 ]

Glassfish 4.1 has the same problem.

Comment by sahlix [ 19/Aug/16 ]

I had the same problem on GF 4.1.1. After updating the oracle driver to version 11g 2.0.4.0 it vanished away without further interference!





[GLASSFISH-19470] RAR5031:System Exception -> NPE Created: 18/Dec/12  Updated: 13/Jul/16

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2_b23
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Heikki Salokanto Assignee: sfelts
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 3.1.2 build 23
Oracle 10.2.0.5 ia64 2-node RAC


Tags: JDBC, NullPointerException, RAR5031, connection, pool

 Description   

We are getting occasional "RAR5031" System Exceptions followed by a NullPointerException. This looks somewhat similar to GLASSFISH-13390.

It appears to have something to do with the JDBC connections or connection pools but the trace is all but clear. The DB is a 2-node RAC of 10.2.0.5.

2012-12-18T03:55:26.350+0200|SEVERE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource|
_ThreadID=24;_ThreadName=Thread-2;|RAR5031:System Exception
java.lang.NullPointerException

2012-12-18T03:55:26.350+0200|SEVERE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource|
_ThreadID=24;_ThreadName=Thread-2;|RAR5031:System Exception
com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException
        at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:255)
        at com.sun.enterprise.resource.ConnectorXAResource.end(ConnectorXAResource.java:159)
        at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.delistResource(JavaEETransactionManagerSimplified.java:528)
        at com.sun.enterprise.resource.rm.SystemResourceManagerImpl.delistResource(SystemResourceManagerImpl.java:145)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:381)
        at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77)
        at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784)
        at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217)
        at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587)
        at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97)
        at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474)
        at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429)
        at org.hibernate.jdbc.ConnectionManager.afterStatement(ConnectionManager.java:304)
        at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:572)
        at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:291)
        at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:307)
        at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:234)
        at org.hibernate.loader.Loader.doQuery(Loader.java:854)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
        at org.hibernate.loader.Loader.doList(Loader.java:2533)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
        at org.hibernate.loader.Loader.list(Loader.java:2271)
        at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
        at my.own.dao.package.MyOwnDAO.selaa(MyOwnDAO.java:126)
        at my.own.package.MyClass.selaa(MyClass.java:42)
        at sun.reflect.GeneratedMethodAccessor606.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
        at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
        at $Proxy246.selaa(Unknown Source)
        at my.own.package.__EJB31_Generated__MyOwnClass__Intf____Bean__.selaa(Unknown Source)
        at my.another.package.AnotherClass.onMessage(AnotherClass.java:145)
        at sun.reflect.GeneratedMethodAccessor604.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4180)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5368)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
        at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1099)
        at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
        at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
        at $Proxy336.onMessage(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: java.lang.NullPointerException

The method MyOwnDAO.selaa() (=browse) is as follows. Exception is thrown on line 126 which is criteria.list().

    public static List<AGame> selaa(String serialnumber, boolean onlyActive) throws AvepsiDAOException {
        Session session = HibernateUtil.getNMSession();
        Transaction tx = null;
        try {
            tx = session.beginTransaction();
            Criteria criteria = session.createCriteria(AGame.class);
            criteria.add(Restrictions.eq("serialnumber", serialnumber));
            if (onlyActive) {
                criteria.add(Restrictions.eq("active", 1));
            }
            List list = criteria.list();
            tx.commit();
            return list;
        } catch (HibernateException e) {
            rollbackIfActive(tx);
            throw new AvepsiDAOException(e, serialnumber);            
        }
    }

Connection validation is 'on'.



 Comments   
Comment by emailnbw [ 29/May/14 ]

Occasionally seeing the same thing. Glassfish 3.1.2 b23 w/Oracle ojdbc6 driver.

Comment by sekmiller [ 18/Mar/16 ]

We are still seeing this in Glassfish 4.1

Comment by adrienb [ 13/Jul/16 ]

We are still seeing this in Glassfish 3.1.2.12. Could you resolve this bug ?





[GLASSFISH-21541] Duplicate Class Error when Undeploying/Redeploying Web App Created: 11/May/16  Updated: 11/May/16

Status: Open
Project: glassfish
Component/s: admin_gui, jdbc
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: seaunicornislit Assignee: Anissa Lam
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java, Netbeans


Tags: ear, ejb, svnkit

 Description   

When I try to undeploy/redeploy my Web Application in the Glassfish Admin GUI I receive an error: java.lang.LinkageError: loader (instance of org/glassfish/web/loader/WebappClassLoader): attempted duplicate class definition for name: "org/glassfish/web/loader/JdbcLeakPrevention" (I will put the full stack trace at the very bottom). It may have something to do with SVNKit.

Exception while running a command
java.lang.LinkageError: loader (instance of org/glassfish/web/loader/WebappClassLoader): attempted duplicate class definition for name: "org/glassfish/web/loader/JdbcLeakPrevention"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.glassfish.web.loader.WebappClassLoader.clearReferencesJdbc(WebappClassLoader.java:2121)
at org.glassfish.web.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:2056)
at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:1960)
at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:1929)
at org.glassfish.internal.data.ApplicationInfo.clean(ApplicationInfo.java:465)
at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:1071)
at com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:1099)
at org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:412)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.deployment.admin.DeployCommand.handleRedeploy(DeployCommand.java:724)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:365)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:309)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:375)
at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Unknown Source)






[GLASSFISH-21536] NPE at "org.glassfish.api.jdbc.SQLTraceRecord.toString(SQLTraceRecord.java:231)" Created: 15/Apr/16  Updated: 15/Apr/16

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: cistox Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any



 Description   

The following code generates a NPE:
Class: SQLTraceRecord.java
Reason: The "param.toString()" is unsafe because it is quite normal that an SQL UPDATE provides a NULL param to force a NULL value in a given database table column.
As this is a trace the null should be simply printed as string "null".

@Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("ThreadID=" + getThreadID() + " | ");
sb.append("ThreadName=" + getThreadName() + " | ");
sb.append("TimeStamp=" + getTimeStamp() + " | ");
sb.append("ClassName=" + getClassName() + " | ");
sb.append("MethodName=" + getMethodName() + " | ");
if(params != null && params.length > 0) {
int index = 0;
for(Object param : params)

{ sb.append("arg[" + index++ + "]=" + param.toString() + " | "); // ERROR IS HERE }

}
//TODO add poolNames and other fields of this record.
return sb.toString();
}

This is the NPE trace:

Severe: java.lang.NullPointerException
at org.glassfish.api.jdbc.SQLTraceRecord.toString(SQLTraceRecord.java:231)
at com.sun.gjc.util.SQLTraceLogger.sqlTrace(SQLTraceLogger.java:69)
at com.sun.gjc.util.SQLTraceDelegator.sqlTrace(SQLTraceDelegator.java:94)
at com.sun.gjc.spi.JdbcObjectsFactory$1.invoke(JdbcObjectsFactory.java:142)
at com.sun.proxy.$Proxy244.prepareStatement(Unknown Source)






[GLASSFISH-21483] "Connection closed" ConnectionHolder.checkValidity Created: 14/Jan/16  Updated: 14/Jan/16

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2, 3.1.2.2, 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: joyli Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We have problem,used the prepareStatement database connection to get the getMetaData,
“Initial and Minimum Pool Size:” 、“Maximum Pool Size:” and “Statement Cache Size:” are 1,
code:
DataSource dn = (DataSource) initContext.lookup("DB");
Connection ccon = dn.getConnection();
PrepareStatement pstam = ccon.prepareStatement(sql);
ResultSet rs = pstam.executeQuery();
pstam.getConnection().getMetaData();

the concurrent situation,appear:
java.sql.SQLException: Connection closed
at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:774)
at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:388)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.getMetaData(ConnectionWrapper40.java:114)
at jdbc1.Servese1.serverdd(Servese1.java:122)
at jdbc1.Servese1.doGet(Servese1.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:286)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:336)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:236)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:619)






[GLASSFISH-21456] javax.naming.NameNotFoundException: jdbc Created: 30/Oct/15  Updated: 30/Oct/15

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: jroberts66z Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OSX, Java 1.8



 Description   

Hi, I have a web application written in Netbeans that does a JNDI lookup of jdbc/SomeName and it works fine in GF 4.1 when using jvm 1.7.

When I switch GF to use jvm 1.8 I encounter the following stack trace:

2015-10-29 20:29:10,312-ERROR-[RunLevelControllerThread-1446164949966]-[DBAuthenticator.java:56]-com.ge.de.security.authentication.implementation.database.DBAuthenticator.setProperties: javax.naming.NamingException: Lookup failed for 'jdbc/CDBDataSource' in SerialContext[myEnv=

{java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is javax.naming.NameNotFoundException: jdbc]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at com.ge.de.cnms.db.jndi.JNDIDataSourceFactory.getDataSource(JNDIDataSourceFactory.java:159)



 Comments   
Comment by jroberts66z [ 30/Oct/15 ]

Per what I know about JNDI lookups, it should have worked just fine in 1.8, so I am assuming this is a bug in GF. The Web application is using <class-loader delegate="false"/> in glassfish-web.xml and the JARs inside the lib directory are:

WEB-INF/lib/CoverityWS.jar
WEB-INF/lib/activation-1.1.jar
WEB-INF/lib/all-themes-1.0.10.jar
WEB-INF/lib/cnms-dao.jar
WEB-INF/lib/cnms-db.jar
WEB-INF/lib/cnms-entity.jar
WEB-INF/lib/cnms-transaction.jar
WEB-INF/lib/cnms-util.jar
WEB-INF/lib/com.ge.de.authenticator.jar
WEB-INF/lib/com.ge.de.cov.reports.jar
WEB-INF/lib/com.ge.de.email.jar
WEB-INF/lib/com.ge.de.entity.jar
WEB-INF/lib/commons-codec-1.2.jar
WEB-INF/lib/commons-dbcp-1.4.jar
WEB-INF/lib/commons-digester-1.8.jar
WEB-INF/lib/commons-fileupload-1.2.jar
WEB-INF/lib/commons-httpclient-3.1.jar
WEB-INF/lib/commons-io-1.4.jar
WEB-INF/lib/commons-lang-2.3.jar
WEB-INF/lib/commons-logging-1.1.jar
WEB-INF/lib/commons-pool-1.5.5.jar
WEB-INF/lib/esapi-2.1.0.jar
WEB-INF/lib/fscontext.jar
WEB-INF/lib/jcommon-1.0.23.jar
WEB-INF/lib/jfreechart-1.0.19.jar
WEB-INF/lib/jndi.jar
WEB-INF/lib/log4j-1.2.16.jar
WEB-INF/lib/mail-1.4.jar
WEB-INF/lib/omnifaces-1.11.jar
WEB-INF/lib/primefaces-5.2.jar
WEB-INF/lib/providerutil.jar
WEB-INF/lib/quartz-2.2.1.jar
WEB-INF/lib/quartz-jobs-2.2.1.jar
WEB-INF/lib/slf4j-api-1.6.6.jar
WEB-INF/lib/slf4j-log4j12-1.6.6.jar
WEB-INF/lib/xchart-2.4.3.jar

There are also the following JAR files in domains/domain1/lib directory:

rw-rr- 1 carlroberts staff 15032 Oct 29 18:45 ../domains/domain1/lib/DatabaseRealm.jar
rw-rr- 1 carlroberts staff 39945 Oct 29 18:45 ../domains/domain1/lib/cnms-dao.jar
rw-rr- 1 carlroberts staff 44052 Oct 29 18:45 ../domains/domain1/lib/cnms-db.jar
rw-rr- 1 carlroberts staff 4774 Oct 29 18:45 ../domains/domain1/lib/cnms-entity.jar
rw-rr- 1 carlroberts staff 16725 Oct 29 18:45 ../domains/domain1/lib/cnms-transaction.jar
rw-rr- 1 carlroberts staff 61395 Oct 29 18:45 ../domains/domain1/lib/cnms-util.jar
rw-rr- 1 carlroberts staff 54932 Oct 29 18:45 ../domains/domain1/lib/com.ge.de.authenticator.jar
rw-rr- 1 carlroberts staff 138433 Oct 29 18:45 ../domains/domain1/lib/com.ge.de.entity.jar
rw-rr- 1 carlroberts staff 30085 Oct 29 18:45 ../domains/domain1/lib/commons-codec-1.2.jar
rw-rr- 1 carlroberts staff 571259 Oct 29 18:45 ../domains/domain1/lib/commons-collections-3.2.jar
-rwxr-xr-x 1 carlroberts staff 160519 Oct 29 18:45 ../domains/domain1/lib/commons-dbcp-1.4.jar
rw-rr- 1 carlroberts staff 143602 Oct 29 18:45 ../domains/domain1/lib/commons-digester-1.8.jar
rw-rr- 1 carlroberts staff 53082 Oct 29 18:45 ../domains/domain1/lib/commons-fileupload-1.2.jar
rw-rr- 1 carlroberts staff 305001 Oct 29 18:45 ../domains/domain1/lib/commons-httpclient-3.1.jar
rw-rr- 1 carlroberts staff 245274 Oct 29 18:45 ../domains/domain1/lib/commons-lang-2.3.jar
rw-rr- 1 carlroberts staff 52915 Oct 29 18:45 ../domains/domain1/lib/commons-logging-1.1.jar
-rwxr-xr-x 1 carlroberts staff 100193 Oct 29 18:45 ../domains/domain1/lib/commons-pool-1.5.5.jar
rw-rr- 1 carlroberts staff 367021 Oct 29 18:45 ../domains/domain1/lib/esapi-2.1.0.jar
-rwxr-xr-x 1 carlroberts staff 22769 Oct 29 18:45 ../domains/domain1/lib/fscontext.jar
-rwxr-xr-x 1 carlroberts staff 98496 Oct 29 18:45 ../domains/domain1/lib/jndi.jar
rw-rr- 1 carlroberts staff 481534 Oct 29 18:45 ../domains/domain1/lib/log4j-1.2.16.jar
rw-rr- 1 carlroberts staff 968670 Oct 29 18:45 ../domains/domain1/lib/mysql-connector-java-5.1.35-bin.jar
-rwxr-xr-x 1 carlroberts staff 77116 Oct 29 18:45 ../domains/domain1/lib/providerutil.jar





[GLASSFISH-21361] java.util.ConcurrentModificationException is thrown when using JDBC pool with associate-with-thread option turned on (AssocWithThreadResourcePool pool class). Created: 20/May/15  Updated: 20/May/15

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0, 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: jiggster Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

SunOS 5.11 11.2 sun4v sparc sun4v


Tags: jdbc

 Description   

We observe, from time to time, the below stack trace in our application's log file when our system is under heavy load. Our short investigation of the problem lead us to conclusion that its root cause lies in insufficient synchronization of ds field in class AssocWithThreadResourcePool. Below is the snippet from the mentioned class where the problem occurs.

Caused by: java.util.ConcurrentModificationException: null
        at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901) ~[na:1.8.0_40]
        at java.util.ArrayList$Itr.next(ArrayList.java:851) ~[na:1.8.0_40]
        at com.sun.enterprise.resource.pool.AssocWithThreadResourcePool.getUnenlistedResource(AssocWithThreadResourcePool.java:225) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:526) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:354) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:196) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:171) ~[connectors-runtime.jar:na]
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:166) ~[connectors-runtime.jar:na]
        at com.sun.gjc.spi.base.AbstractDataSource.getConnection(AbstractDataSource.java:114) ~[__ds_jdbc_ra.jar:na]
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:309) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:581) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1634) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:321) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:615) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2740) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2677) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:852) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1132) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:442) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1220) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) ~[org.eclipse.persistence.core_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258) ~[org.eclipse.persistence.jpa_2.6.0.v20150309-bf26070.jar:na]
        at org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:521) ~[org.eclipse.persistence.jpa_2.6.0.v20150309-bf26070.jar:na]
        ... 68 common frames omitted
AssocWithThreadResourcePool.java
//DISASSOCIATE
if (result == null) {
  synchronized (this) {

    for (ResourceHandle resource : ds.getAllResources()) {
      synchronized (resource.lock) {
        //though we are checking resources from within the free list,
        //we could have a situation where the resource was free upto
        //this point, put just before we entered the synchronized block,
        //the resource "h" got used by the thread that was associating it
        //so we need to check for isFree also

        if (resource.getResourceState().isUnenlisted() &&
          resource.getResourceState().isFree() &&
          !(((AssocWithThreadResourceHandle) resource).isDirty())) {
          if (!matchConnection(resource, alloc)) {
            continue;
          }

          if (resource.hasConnectionErrorOccurred()) {
            continue;
          }
          result = resource;
          setResourceStateToBusy(result);
          ((AssocWithThreadResourceHandle) result).setAssociated(false);

          break;
        }
      }
    }
  }
}





[GLASSFISH-19120] "Unable to get ClientInfo for connection" logged at INFO level zillions of times with Sybase jConnect v7 Created: 02/Oct/12  Updated: 22/Jan/15

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: hanafey Assignee: sfelts
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by hanafey [ 02/Oct/12 ]

The following is a sample of the logged messages:

[#|2012-10-02T13:10:16.392-0400|INFO|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=103;_ThreadName=Thread-2;|
RAR7114: Unable to get ClientInfo for connection |#]

[#|2012-10-02T13:10:16.399-0400|INFO|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=103;_ThreadName=Thread-2;|
RAR7115: Unable to set ClientInfo for connection|#]

[#|2012-10-02T13:10:16.402-0400|INFO|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=103;_ThreadName=Thread-2;|
RAR7114: Unable to get ClientInfo for connection |#]

[#|2012-10-02T13:10:16.403-0400|INFO|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=103;_ThreadName=Thread-2;|
RAR7115: Unable to set ClientInfo for connection|#]

The INFO level logging happens with Sybase jConnect 7 because in the method below (in ConnectionHolder40), the "getClientInfoProperties" method throws "com.sybase.jdbc4.utils.UnimplementedOperationException: The method com.sybase.jdbc4.jdbc.SybDatabaseMetaData.public ResultSet getClientInfoProperties() has not been completed and should not be called."

If this statement was moved inside of the try block, then the logging would only happen at level FINEST (but the catch block would need a more general exception since the Sybase exception extends java.lang.UnsupportedOperationException.

    private boolean isSupportClientInfo() throws ResourceException, SQLException {
        Boolean isSupportClientInfo = getManagedConnection().isClientInfoSupported();
        if (isSupportClientInfo != null) {
            return isSupportClientInfo;
        } else {
            ResultSet rs = getManagedConnection().getCachedDatabaseMetaData().getClientInfoProperties();  <<<==============
            try {
                isSupportClientInfo = rs.next();
                getManagedConnection().setClientInfoSupported(isSupportClientInfo);
                return isSupportClientInfo;
            } finally {
                try {
                rs.close();
                } catch(SQLException ex) {
                    if(_logger.isLoggable(Level.FINEST)) {
                        _logger.log(Level.FINEST, "jdbc.unable_to_get_client_info", ex);
                    }
                    return false;
                }
            }
        }
    }
Comment by kithouna [ 05/Apr/13 ]

The H2 Database driver (1.3.170) has the exact same issue. It's rather annoying...

Comment by andykaufmann [ 10/Dec/13 ]

GlassFish 4.0 and h2 version 1.3.172 same warning:

Information: RAR7114: Unable to get ClientInfo for connection
Information: RAR7115: Unable to set ClientInfo for connection

If someone knows how to disable this.. thank you

Comment by jifeng [ 22/Jan/15 ]

Hi
andykaufmann

>If someone knows how to disable this.. thank you
If you are using the JDBC3.0 driver , the messages will not happen.





[GLASSFISH-19489] JDBC connections to Oracle with Wallet fail Created: 02/Jan/13  Updated: 31/Jul/14

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: krzysp Assignee: sfelts
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish Server Open Source Edition 3.1.2.2 (build 4)
Windows 7 64
AIX 6.1
Oracle JDBC 11.2.0.2
Oracle database 11.2.0.2 with configured Wallet (External Password Store)
http://www.oracle.com/technetwork/database/enterprise-edition/wp-oracle-jdbc-thin-ssl-130128.pdf


Tags: JDBC, Oracle, Wallet

 Description   

Oracle JDBC 11.2.0.2
/gf/glassfish/lib\ojdbc6.jar
/gf/glassfish/lib\oraclepki.jar
/gf/glassfish/lib\osdt_cert.jar
/gf/glassfish/lib\osdt_core.jar

/ora/admin/wallet/ewallet.p12
/ora/admin/wallet/cwallet.sso
/ora/admin/tnsnames.ora

-Doracle.net.tns_admin=/ora/admin
-Doracle.net.wallet_location=/ora/admin/wallet

<jdbc-connection-pool res-type="javax.sql.DataSource" datasource-classname="oracle.jdbc.pool.OracleDataSource" name="DBpool" driver-classname="oracle.jdbc.OracleDriver">
<property value="jdbc:oracle:thin:/@DB" name="URL"></property>
</jdbc-connection-pool>
<jdbc-resource pool-name="DBpool" description="" jndi-name="DBRES"></jdbc-resource>

Please take a note that there is no user and password

Simple test is working correctly
OracleDataSource dsOracle = new OracleDataSource();
dsOracle.setURL("jdbc:oracle:thin:/@DB");
conn = dsOracle.getConnection(null,null);
or conn = dsOracle.getConnection();

But using connection pool not

Context initContext = new InitialContext();
DataSource ds = (DataSource)initContext.lookup("DBRES");
ds.getConnection()

We are getting exception
" Connection could not be allocated because: ORA-01017: invalid username/password; logon denied Please check the server.log for more details. "

While debugging I discovered that glassfish is passing to OracleDataSource
empty string "" for "user" instead of null
and empty string "" for password instead of null
This is changing logic inside OracleDriver connected to reading user and password from secret store /ora/admin/wallet/cwallet.sso



 Comments   
Comment by lgacs [ 31/Jul/14 ]

Do you have any solution/workaround for this issue ?

Comment by kazikk [ 31/Jul/14 ]

Not really . We had to disable oracle wallet?





[GLASSFISH-19476] Resources leak in pool resizer with preferValidateOverRecreate Created: 21/Dec/12  Updated: 15/Jul/14

Status: Open
Project: glassfish
Component/s: jca, jdbc
Affects Version/s: 3.1.2, 4.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Arkadiusz Orzechowski Assignee: David Delabassee
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-reviewed, connectors, connectors-runtime, fishcat

 Description   

Hi,

I've been recently tracing a strange jdbc connection leak in our production server (gf 3.1.2), which we first observed quite some time ago, but which increased after some reconfiguration/tuning of our connection pools.

We don't use jdbc directly anywhere in our code - only JPA/eclipselink and Activiti(5.9) which uses iBATIS underneath.

Analysing heap dump I found out that we have lot of ResourceHandles not enlisted in any transaction and having state.busy==false while at the same time having busy flag set to true (ie. not "free" according to RWLockDataStructure)

OQL query used to find the leaked resources:

select c from com.sun.enterprise.resource.ResourceHandle c
where c.busy == true && c.state.busy==false && c.state.enlisted==false
&& /jdbc.POOL_NAME.*/(c.spec.resourceId.toString())

I first suspected transaction manager not closing resources after finishing transaction, but I wasn't able to spot any flaw. And the leak was not very repeatable (not after every transaction).

Playing with pools settings I noticed that the leaks did not occur when I set prefer-validate-over-recreate property to false (default). So the quick workaround was to just disable preferValidateOverRecreate.

Further looking into the code I located probable bug responsible for the leak. In com.sun.enterprise.resource.pool.resizer.Resizer, removeIdleAndInvalidResources method, when the resource is not eligible for removal (!isResourceEligibleForRemoval) we neither remove the resource nor mark it as active(so it's not closed later in the finally block).

In our local glassfish build(3.1.2) I verified that adding activeResources.add(h); in line 200 of: Resizer.java fixes the problem.

I did not build any other gf version to verify, but it seems that in current trunk the issue is still present, so I checked 3.1.2 and 4.0 as affected version.

I chose jdbc and jca as components for this issue - hope jca stands for Connector here, not Cryptography



 Comments   
Comment by gfuser9999 [ 04/Jul/14 ]

Can this be fixed fro 4.0.1 since w/o this it greatly limit
JDBC scalability as this switch cannot be used.
(Due to heavy contention as large JDBC pool will
need to wait for a slow JDBC creation * free connection
==> Not usable .

Would be good to have this fix as it is simple.

Comment by David Delabassee [ 09/Jul/14 ]

Is it possible to quickly test this on 4.0.1 and confirm that you sill have the leak?

Comment by gfuser9999 [ 12/Jul/14 ]

Yes still there. By the way 312p08 fixed this.

Comment by David Delabassee [ 15/Jul/14 ]

Thanks, will be fixed for 4.0.1!
The fix has been integrated, can you confirm it works for you?
--8<-
svn log appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/pool/resizer/Resizer.java
r63492 | kdevaras | 2014-07-15 04:34:42 +0200 (Tue, 15 Jul 2014)





[GLASSFISH-19427] connection leak reclaim does not work Created: 11/Dec/12  Updated: 04/Jun/14

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: jifeng Assignee: Jagadish
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File LeakTimeout.war    
Tags: 4_0_1-reviewed

 Description   

I execute under three commands:

1.resources.jdbc-connection-pool.oracle_pool.pooling=false
2.set resources.jdbc-connection-pool.oracle_pool.connection-leak-timeout-in-seconds=10
3.set resources.jdbc-connection-pool.oracle_pool.connection-leak-reclaim=true

then I get jdbc connection from "oracle_pool" by my application,the connection that is not return back to the pool by my application within the specified period(leak-timeout), after 10 second, the function of connection-leak-reclaim does not work ,it is a pattern or a bug ?



 Comments   
Comment by jifeng [ 11/Dec/12 ]

test guide

1. create jdbc resource

asadmin start-database
asadmin create-jdbc-connection-pool --datasourceclassname org.apache.derby.jdbc.ClientDataSource --restype javax.sql.DataSource --isconnectvalidatereq=false --property User=APP:Password=APP:DatabaseName=EJB:PortNumber=1527:serverName=localhost:connectionAttributes=\\;create\\=true oracle_pool
asadmin set resources.jdbc-connection-pool.oracle_pool.pooling=false
asadmin set resources.jdbc-connection-pool.oracle_pool.connection-leak-timeout-in-seconds=10
asadmin set resources.jdbc-connection-pool.oracle_pool.connection-leak-reclaim=true
asadmin create-jdbc-resource  --target server --connectionpoolid oracle_pool jdbc/oracle

2.please download the attachment and deploy it

 
asadmin deploy --target server ./LeakTimeout.war

3.call:http://localhost:28282/LeakTimeout/UseConnection?sleepTime=20000

Comment by jifeng [ 04/Jan/13 ]

I think it is a bug:

com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure
public void removeResource(ResourceHandle resource) {
    boolean removed = false;
    writeLock.lock();
    try {
        removed = resources.remove(resource); "★"
    } finally {
        writeLock.unlock();
    }
    if(removed) {
       handler.deleteResource(resource);//not execute when the state of pool is unpooling

    }
}

the code which is marked as "★" has problem,because there is no connection in the pool when the state of pool is unpooling, so "handler.deleteResource(resource)" does not execute

I changed the code and it works fine

com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure
public void removeResource(ResourceHandle resource) {
    writeLock.lock();
    try {
        resources.remove(resource); 
    } finally {
        writeLock.unlock();
    }
    handler.deleteResource(resource)  
 }
}
Comment by jifeng [ 01/Aug/13 ]

Hi:
sfelts

This phenomenon also occurs in glassfish v4 .

when i used the way as above, it works fine

could you please confirm it and give me some suggestions?





[GLASSFISH-21051] ConnectionPoolEmitterImpl is not thread safe. Misuse of HashMap (resourceAppAssociationMap) Created: 25/Apr/14  Updated: 03/Jun/14

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: syangjava Assignee: Jagadish
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 3 hours
Time Spent: Not Specified
Original Estimate: 3 hours
Environment:

REDHAT Linux 6


Tags: 4_0_1-reviewed

 Description   

We configured max thread pool size to be 150 in glassfish 3.1.2.2. We noticed most thread were blocked after a while, and there was an exception like this: 'java.util.concurrent.RejectedExecutionException: The thread pool's task queue is full, limit: 4096'. We did thread dump analysis and heapdump analysis. There were a couple of threads in runnable state with stacktrace like this:

(first thread)
"connector-timer-proxy" daemon prio=5 tid=69 RUNNABLE
at java.util.HashMap.removeEntryForKey(HashMap.java:569)
Local Variable: java.util.HashMap$Entry#3068822
Local Variable: java.util.HashMap$Entry#2436928
at java.util.HashMap.remove(HashMap.java:538)
Local Variable: java.util.HashMap#166939
Local Variable: java.lang.Long#267315
at com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl.connectionDestroyed(ConnectionPoolEmitterImpl.java:184)
Local Variable: com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl#1
at com.sun.enterprise.resource.pool.PoolLifeCycleListenerRegistry.connectionDestroyed(PoolLifeCycleListenerRegistry.java:151)
Local Variable: java.util.AbstractList$Itr#106505
at com.sun.enterprise.resource.pool.ConnectionPool.deleteResource(ConnectionPool.java:974)
at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.removeResource(RWLockDataStructure.java:153)
Local Variable: com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure#1
at com.sun.enterprise.resource.pool.ConnectionPool.reclaimConnection(ConnectionPool.java:1643)
Local Variable: java.lang.String#1077104
at com.sun.enterprise.resource.pool.ConnectionLeakDetector.potentialConnectionLeakFound(ConnectionLeakDetector.java:161)
Local Variable: java.lang.StackTraceElement[]#2777
Local Variable: com.sun.enterprise.resource.pool.ConnectionPool#1
at com.sun.enterprise.resource.pool.ConnectionLeakDetector.access$000(ConnectionLeakDetector.java:60)
Local Variable: com.sun.enterprise.resource.ResourceHandle#88
Local Variable: com.sun.enterprise.resource.pool.ConnectionLeakDetector#1
at com.sun.enterprise.resource.pool.ConnectionLeakDetector$ConnectionLeakTask.run(ConnectionLeakDetector.java:222)
Local Variable: com.sun.enterprise.resource.pool.ConnectionLeakDetector$ConnectionLeakTask#1
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

(second thread)
"http-thread-pool-8009(56)" daemon prio=5 tid=296 RUNNABLE
at java.util.HashMap.transfer(HashMap.java:484)
Local Variable: java.util.HashMap$Entry#3402865
at java.util.HashMap.resize(HashMap.java:463)
Local Variable: java.util.HashMap$Entry[]#800390
at java.util.HashMap.addEntry(HashMap.java:755)
at java.util.HashMap.put(HashMap.java:385)
at com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl.getAppName(ConnectionPoolEmitterImpl.java:320)
at com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl.connectionUsed(ConnectionPoolEmitterImpl.java:234)
at com.sun.enterprise.resource.pool.PoolLifeCycleListenerRegistry.connectionUsed(PoolLifeCycleListenerRegistry.java:145)
Local Variable: java.util.AbstractList$Itr#106556
at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:532)
Local Variable: com.sun.enterprise.resource.ResourceHandle#377
at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
Local Variable: com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator#166
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
Local Variable: com.sun.enterprise.resource.ResourceSpec#504
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)

(third thread)
"http-thread-pool-8009(138)" daemon prio=5 tid=378 RUNNABLE
at java.util.HashMap.get(HashMap.java:303)
Local Variable: java.lang.Long#267316
at com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl.getAppName(ConnectionPoolEmitterImpl.java:313)
at com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl.connectionUsed(ConnectionPoolEmitterImpl.java:234)
at com.sun.enterprise.resource.pool.PoolLifeCycleListenerRegistry.connectionUsed(PoolLifeCycleListenerRegistry.java:145)
Local Variable: java.util.AbstractList$Itr#106506
at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:532)
at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
Local Variable: com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator#79
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
Local Variable: com.sun.enterprise.resource.ResourceSpec#96
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)

(fourth thread)
"http-thread-pool-8009(11)" daemon prio=5 tid=251 RUNNABLE
at java.util.HashMap.transfer(HashMap.java:484)
Local Variable: java.util.HashMap$Entry[]#943178
Local Variable: java.util.HashMap$Entry#3075959
at java.util.HashMap.resize(HashMap.java:463)
Local Variable: java.util.HashMap$Entry[]#1092899
at java.util.HashMap.addEntry(HashMap.java:755)
at java.util.HashMap.put(HashMap.java:385)
at com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl.getAppName(ConnectionPoolEmitterImpl.java:320)
Local Variable: java.lang.String#1256767
at com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl.connectionUsed(ConnectionPoolEmitterImpl.java:234)
at com.sun.enterprise.resource.pool.PoolLifeCycleListenerRegistry.connectionUsed(PoolLifeCycleListenerRegistry.java:145)
Local Variable: java.util.AbstractList$Itr#106557
at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:532)
Local Variable: com.sun.enterprise.resource.ResourceHandle#351
at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
Local Variable: com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator#165
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
Local Variable: com.sun.enterprise.resource.ResourceSpec#503
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)

The CPU usage was way higher than normal. And all blocked threads were blocked on the same java lock and the same line of code. The following is an example.

"http-thread-pool-8009(96)" daemon prio=5 tid=336 BLOCKED
at com.sun.enterprise.resource.pool.ConnectionLeakDetector.startConnectionLeakTracing(ConnectionLeakDetector.java:113)
at com.sun.enterprise.resource.pool.ConnectionPool.setResourceStateToBusy(ConnectionPool.java:324)

Basically all 3 threads were running in infinite loop. The cause was the misuse of a HashMap object (resourceAppAssociationMap) in a concurrent environment in ConnectionPoolEmitterImpl. This is a related article.
http://mailinator.blogspot.com/2009/06/beautiful-race-condition.html

The fix actually should be quite easy. Just use ConcurrentHashMap instead of HashMap for resourceAppAssociationMap.

Can we get a patch soon on this?



 Comments   
Comment by reza_rahman [ 25/Apr/14 ]

Note that this is now under review for 4.0.1

Comment by syangjava [ 25/Apr/14 ]

So there is no plan to have a release after 3.1.2.2?

Is there a way we can get a patch?

Comment by reza_rahman [ 25/Apr/14 ]

Not sure if it will be back-ported. The only way to get an individual patch is through GlassFish 3 commercial support if you have purchased it.

Comment by Jagadish [ 26/Apr/14 ]

Same as issue :
https://java.net/jira/browse/GLASSFISH-19190

Comment by syangjava [ 28/Apr/14 ]

So this problem was known in the '3.1.2_b14' release and never fixed? Is there any plan to make another glassfish 3 release soon, for example, 3.1.2.3 with this fix?

Comment by reza_rahman [ 28/Apr/14 ]

As you may be aware, we are currently very focused on GlassFish 4.0.1. Although a further GlassFish 3 release may happen, it's not currently in planning that I know of. If this is a critical production issue that needs to be addressed quickly your best bet is really talking to your Oracle sales rep or perhaps patching it yourself?

Comment by syangjava [ 28/Apr/14 ]

We think it is possible we can patch this ourselves. Is there any legal restrictions on this?

Comment by reza_rahman [ 28/Apr/14 ]

I would just review the CDDL/licensing terms that should be very lightweight and well understood in your case? BTW, the safest bet is probably just contributing the patch back.





[GLASSFISH-21078] Connection pool throws IllegalStateException Created: 30/May/14  Updated: 31/May/14

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2_b23
Fix Version/s: None

Type: Bug Priority: Major
Reporter: emailnbw Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 3.1.2 b23 / Windows Server 2008 R2 x64 / JDK1.7.0_45 x64 / Oracle 11gr2 / Oracle ojdbc6 driver


Tags: connectionpool

 Description   

I am getting the following exception from Glassfish's connection pool code:

Caused by: java.lang.IllegalStateException: state.isBusy() : false
at com.sun.enterprise.resource.pool.ConnectionPool.resourceClosed(ConnectionPool.java:1008)
at com.sun.enterprise.resource.pool.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:428)
at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:382)
at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77)
at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784)
at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217)
at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:473)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:504)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:496)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.decrementCallCount(DatasourceAccessor.java:274)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeStatement(DatabaseAccessor.java:394)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.releaseStatement(DatabaseAccessor.java:1543)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:665)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:207)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:264)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:246)
at org.eclipse.persistence.queries.DataReadQuery.executeNonCursor(DataReadQuery.java:197)
at org.eclipse.persistence.queries.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:152)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:844)
at org.eclipse.persistence.queries.DataReadQuery.execute(DataReadQuery.java:137)
at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2831)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1449)
at org.eclipse.persistence.sequencing.QuerySequence.select(QuerySequence.java:309)
at org.eclipse.persistence.sequencing.QuerySequence.updateAndSelectSequence(QuerySequence.java:254)
at org.eclipse.persistence.sequencing.StandardSequence.getGeneratedVector(StandardSequence.java:71)
at org.eclipse.persistence.sequencing.Sequence.getGeneratedVector(Sequence.java:257)
at org.eclipse.persistence.internal.sequencing.SequencingManager$Preallocation_NoTransaction_State.getNextValue(SequencingManager.java:664)
at org.eclipse.persistence.internal.sequencing.SequencingManager.getNextValue(SequencingManager.java:1067)
at org.eclipse.persistence.internal.sequencing.ClientSessionSequencing.getNextValue(ClientSessionSequencing.java:70)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:349)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:308)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.assignSequenceNumber(UnitOfWorkImpl.java:465)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4231)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:513)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4176)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:440)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)



 Comments   
Comment by emailnbw [ 30/May/14 ]

I don't see where I can upload a file as I'd like to upload my connection pool settings so I'll just paste them in here. Hopefully they are readable.

<jdbc-connection-pool validation-table-name="TABLEVALIDATION" allow-non-component-callers="true" statement-cache-size="200" associate-with-thread="true" statement-timeout-in-seconds="300" idle-timeout-in-seconds="0" lazy-connection-association="true" max-wait-time-in-millis="0" connection-creation-retry-attempts="90" validate-atmost-once-period-in-seconds="120" lazy-connection-enlistment="true" datasource-classname="oracle.jdbc.pool.OracleDataSource" res-type="javax.sql.DataSource" name="FooPool" is-connection-validation-required="true">
<property name="DataSourceName" value="OracleDataSource"></property>
<property name="ImplicitCachingEnabled" value="false"></property>
<property name="NetworkProtocol" value="tcp"></property>
<property name="DatabaseName" value="foo"></property>
<property name="LoginTimeout" value="0"></property>
<property name="Password" value="password"></property>
<property name="URL" value="jdbc:oracle:thin:@host:1521:orcl"></property>
<property name="User" value="bar"></property>
<property name="ExplicitCachingEnabled" value="false"></property>
<property name="PortNumber" value="1521"></property>
<property name="dynamic-reconfiguration-wait-timeout-in-seconds" value="960"></property>
<property name="MaxStatements" value="0"></property>
</jdbc-connection-pool>





[GLASSFISH-18712] SQLTraceListeners do not work Created: 10/May/12  Updated: 18/Apr/14

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ztangm Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOs



 Description   

I define my db pool like

<jdbc-connection-pool validation-table-name="DUAL" datasource-classname="oracle.jdbc.pool.OracleConnectionPoolDataSource" is-isolation-level-guaranteed="false" res-type="javax.sql.ConnectionPoolDataSource" sql-trace-listeners="de.xyz.platform.sqllogger.SQLTraceListenerImpl" name="OraclePool" is-connection-validation-required="true">

and define my sql tracer like

public class SQLTraceListenerImpl implements SQLTraceListener {

private final static Logger logger = Logger.getLogger(SQLTraceListenerImpl.class);

@Override
public void sqlTrace(SQLTraceRecord record)

{ logger.info(record); }

}

and the only thing I get in the server log is

[#|2012-05-10T10:41:31.922+0200|WARNING|glassfish3.1.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.util|_ThreadID=16;_ThreadName=Thread-2;|RAR7096: Exception null while trying to set the value de.xyz.platform.sqllogger.SQLTraceListenerImpl on property SqlTraceListeners |#]

One thing would be to know what I did wrong and the other thing would be to improve this exception.



 Comments   
Comment by shreedhar_ganapathy [ 13/Feb/13 ]

->Jagadish for eval and targeting for a release.





[GLASSFISH-20961] Closed Connection Created: 21/Jan/14  Updated: 15/Apr/14

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: rkatkuri Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Server 2008 R2 Enterprise



 Description   

Application is crashing with out any pattern. Below is the error log

ERROR [JDBCTransaction:begin] JDBC begin failed
java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:147)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:209)
at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(PhysicalConnection.java:1087)
at com.sun.gjc.spi.base.ConnectionHolder.setAutoCommit(ConnectionHolder.java:651)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:558)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy140.getCustomerCredentials(Unknown Source)
at iwas.service.security.UserAuthenticationService.loadUserByUsername(Unknown Source)
at org.springframework.security.providers.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:83)
at org.springframework.security.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:121)
at org.springframework.security.providers.ProviderManager.doAuthentication(ProviderManager.java:195)
at org.springframework.security.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:46)
at org.springframework.security.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:81)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:249)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at iwas.service.security.filter.MalicousRequestFilter.doFilter(Unknown Source)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
at iwas.control.CustomerAuthenticationController.authentiacte(Unknown Source)
at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)
at org.springframework.security.concurrent.ConcurrentSessionFilter.doFilterHttp(ConcurrentSessionFilter.java:97)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:87)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:87)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:268)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at iwas.service.security.filter.MalicousRequestFilter.doFilter(Unknown Source)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
2014-01-21 07:54:23,742 INFO [CustomerAuthenticationController:authentiacte] Authenticating Customer
2014-01-21 07:54:23,742 DEBUG [AbstractProcessingFilter:doFilterHttp] Request is to process authentication
2014-01-21 07:54:23,742 DEBUG [UserAuthenticationService:loadUserByUsername] loadUserByUsername(1054976)
2014-01-21 07:54:23,758 ERROR [JDBCTransaction:begin] JDBC begin failed
java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:147)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:209)
at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(PhysicalConnection.java:1087)
at com.sun.gjc.spi.base.ConnectionHolder.setAutoCommit(ConnectionHolder.java:651)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:558)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy140.getCustomerCredentials(Unknown Source)
at iwas.service.security.UserAuthenticationService.loadUserByUsername(Unknown Source)
at org.springframework.security.providers.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:83)
at org.springframework.security.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:121)
at org.springframework.security.providers.ProviderManager.doAuthentication(ProviderManager.java:195)
at org.springframework.security.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:46)
at org.springframework.security.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:81)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:249)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at iwas.service.security.filter.MalicousRequestFilter.doFilter(Unknown Source)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
at iwas.control.CustomerAuthenticationController.authentiacte(Unknown Source)
at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)
at org.springframework.security.concurrent.ConcurrentSessionFilter.doFilterHttp(ConcurrentSessionFilter.java:97)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:87)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:87)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:268)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at iwas.service.security.filter.MalicousRequestFilter.doFilter(Unknown Source)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)






[GLASSFISH-19451] Allow JDBC driver to be loaded from application archive Created: 15/Dec/12  Updated: 23/Feb/14

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: arjan tijms Assignee: Shalini
Resolution: Unresolved Votes: 7
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: datasource, ear, embedded, jdbc, war

 Description   

As one of the few application servers, GlassFish does not allow a JDBC driver to be loaded from a .war or .ear (see http://henk53.wordpress.com/2012/06/30/the-state-of-datasourcedefinition-in-java-ee). Instead, the driver is required to be stored inside the GlassFish installation directory.

Especially for applications that use an embedded database and an application scoped datasource (specifically those using @DataSourceDefinition), this is not convenient. Those applications can be coded to be almost portable, with the exception that for GlassFish a jar (the JDBC driver) has to be copied from the archive to the AS installation directory.

I would like to ask for the ability to load said JDBC driver directly from an application archive such as .war and .ear.



 Comments   
Comment by Darious3 [ 20/Dec/12 ]

You can now include glassfish-resources.xml in your war, where you can define JDBC resources. These resources have a lifetime scoped to the WAR (created and destroyed when the WAR is deployed/undeployed).

This behavior really should apply to the JDBC driver as well.

Comment by Darious3 [ 04/Apr/13 ]

Has anything happened for this yet?

Comment by arjan tijms [ 16/Dec/13 ]

This seems to have been "silently" fixed in GlassFish 4. The following unit test in the Java EE samples project shows this: https://github.com/javaee-samples/javaee7-samples/blob/master/jpa/datasourcedefinition/src/test/java/org/javaee7/jpa/datasourcedefinition/DataSourceDefinitionTest.java

This test addresses the exact use case this issue is about and puts the JDBC driver into the application archive. The test passes on a stock (embedded) GlassFish 4.

Maybe it should also be tested on a standalone GlassFish 4, but hopefully this shouldn't make any difference.

Comment by martinandersson.com [ 23/Feb/14 ]

The github example you give inject the datasource. I must use a persistence.xml file to declare the persistence unit that relies on my @DataSourceDefinition. With this requirement I can't get my application to work. Another way for me since Java EE 7 is to use the default data source, but then of course, my application still don't deploy deploy and work properly since GlassFish doesn't start his Derby database automatically. For me, I refuse to manually copy-paste jar files to the glassfish installation direction as much as I refuse to manually start the derby database. I can happily do that for a production environment, but until then, as what is my issue now, I'm using Arquillian to do real proper integration tests.

Comment by arjan tijms [ 23/Feb/14 ]

I must use a persistence.xml file to declare the persistence unit that relies on my @DataSourceDefinition. With this requirement I can't get my application to work.

You're most likely being affected by this bug: GLASSFISH-20944

The driver seems to load, but then because of a timing issue of some sorts, or maybe a scoping issue, the JPA boot code can't locate the datasource. Very unfortunate indeed! (please vote for that issue if you think it impacts you). See also JAVAEE_SPEC-30

my applications still don't deploy deploy and work properly since GlassFish doesn't start his Derby database automatically. For me, I refuse to manually copy-paste jar files to the glassfish installation direction as much as I refuse to manually start the derby database.

I agree. This shouldn't be required. I logged issue JAVAEE_SPEC-34 for precisely this a short while ago. There's a corresponding GlassFish specific issue at GLASSFISH-20666

If you care for getting those solved, please vote for them as well

Comment by martinandersson.com [ 23/Feb/14 ]

Thank you Arjan for your feedback, you seem to be a real good spirit. Keep it up! Yeah I did vote for those other issues =)

Comment by reza_rahman [ 23/Feb/14 ]

I think this could be a pretty nice community contribution .





[GLASSFISH-20329] RAR7093 : Error while cleaning up ManagedConnection Created: 17/Apr/13  Updated: 16/Sep/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2_b05
Fix Version/s: None

Type: Bug Priority: Major
Reporter: simon_park_java Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Solaris 5.10 on SPARC
JRE: 1.6.0_38 running as 32 bit (-d32 set)
JDBC: Sybase jConnect 7.07
DB: Sybase 15.5.0.0


Tags: connectionpool, glassfish-3-1-2-2, jdbc, sybase

 Description   

I found this issue had previously been raised, yet had been closed due to the fact that it couldn't be reproduced: http://java.net/jira/browse/GLASSFISH-16778. Since there was no further mention of the error code (RAR7093) elsewhere in JIRA I have assumed that the issue may remain.

JDBC Connection Pool config extract from domain.xml:

<jdbc-connection-pool connection-creation-retry-interval-in-seconds="30" datasource-classname="com.sybase.jdbc4.jdbc.SybConnectionPoolDataSource" res-type="javax.sql.ConnectionPoolDataSource" description="connection pool" associate-with-thread="true" statement-cache-size="64" name="jdbc/appPool" non-transactional-connections="true" connection-creation-retry-attempts="100" ping="true">
<property name="DYNAMIC_PREPARE" value="true"></property>
<property name="FAKE_METADATA" value="true"></property>
<property name="user" value="user"></property>
<property name="password" value="password"></property>
<property name="BE_AS_JDBC_COMPLIANT_AS_POSSIBLE" value="true"></property>
<property name="portNumber" value="4000"></property>
<property name="databaseName" value="database"></property>
<property name="serverName" value="server"></property>
</jdbc-connection-pool>
<jdbc-resource pool-name="jdbc/appPool" jndi-name="jdbc/appPoolDataSource"></jdbc-resource>

The above is the configuration for just one of several pools, each backed by a different database.

For this particular pool, each Connection obtained from the pool has AutoCommit explicitly set to true (this is a legacy app that I have severely limited scope to change). Connections are returned to the pool via a call to Connection.close(), within finally blocks. Below are the 3 sequential entries excerpted from the server.log file. The first indicates that something has gone awry and that's a separate problem for me to solve; this entry is incidental to the issue with the failure of the GlassFish JDBC pool implementation to close the Connection cleanly and is provided only for context.

[#|2013-04-17T03:02:41.079-0400|INFO|oracle-glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=26;_ThreadName=Th
read-3;|java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0PA: The query has been cancelled and the response discarded. The
cancel was probably issued by another statement on the connection.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(Unknown Source)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
at com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40.executeQuery(PreparedStatementWrapper40.java:642)
at crisk.server.trades.listeners.ATFeedFXListenerBean.process(ATFeedFXListenerBean.java:55)
at crisk.server.PollingBean.poll(PollingBean.java:21)
at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:149)
at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:4058)
at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1832)
at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:108)
at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2646)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

#]

[#|2013-04-17T03:02:41.108-0400|WARNING|oracle-glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.allocator|_Threa
dID=26;_ThreadName=Thread-3;|RAR7093 : Error while cleaning up ManagedConnection
java.lang.NullPointerException
at com.sun.gjc.spi.ManagedConnection.getActualConnection(ManagedConnection.java:717)
at com.sun.gjc.spi.ManagedConnectionFactory.resetIsolation(ManagedConnectionFactory.java:513)
at com.sun.gjc.spi.ManagedConnection.resetConnectionProperties(ManagedConnection.java:496)
at com.sun.gjc.spi.ManagedConnection.cleanup(ManagedConnection.java:348)
at com.sun.enterprise.resource.allocator.AbstractConnectorAllocator.cleanup(AbstractConnectorAllocator.java:166)
at com.sun.enterprise.resource.pool.ConnectionPool.cleanupResource(ConnectionPool.java:1082)
at com.sun.enterprise.resource.pool.AssocWithThreadResourcePool.freeUnenlistedResource(AssocWithThreadResourcePool.java:262)
at com.sun.enterprise.resource.pool.ConnectionPool.resourceClosed(ConnectionPool.java:1017)
at com.sun.enterprise.resource.pool.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:428)
at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:382)
at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77)
at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784)
at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217)
at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587)
at crisk.utils.jdbc.JdbcResourceUtil.cleanup(JdbcResourceUtil.java:21)
at crisk.server.trades.listeners.ATFeedFXListenerBean.process(ATFeedFXListenerBean.java:151)
at crisk.server.PollingBean.poll(PollingBean.java:21)
at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:149)
at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:4058)
at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1832)
at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:108)
at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:2646)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

#]

[#|2013-04-17T03:02:41.119-0400|WARNING|oracle-glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=2
6;_ThreadName=Thread-3;|RAR8066: Cleanup of a resource from pool [ jdbc/appPool ] failed. Exception : com.sun.appserv.connec
tors.internal.api.PoolingException: java.lang.NullPointerException|#]



 Comments   
Comment by jirout.jak [ 16/Sep/13 ]

I found the same problem on GF 3.1.2.2 b5.

I had this configuration od pool:

<jdbc-connection-pool validation-table-name="dual" steady-pool-size="4" idle-timeout-in-seconds="600" connection-leak-reclaim="true" validate-atmost-once-period-in-seconds="60" is-isolation-level-guaranteed="false" datasource-classname="oracle.jdbc.xa.client.OracleXADataSource" max-pool-size="100" res-type="javax.sql.XADataSource" connection-leak-timeout-in-seconds="120" name="sdp2RwOraPool" is-connection-validation-required="true" transaction-isolation-level="read-committed">
<property name="user" value="sdp2_prod"></property>
<property name="url" value="jdbc:oracle:thin:@zsdpdb01.sdp.local:1521:sdp"></property>
<property name="password" value="sdp2_prod"></property>
<property name="TestConnectionsOnReserve" value="false"></property>
<property name="TestConnectionsOnRelease" value="false"></property>
</jdbc-connection-pool>

Probably it is related to higher load od application server. It seems, that reaised randomly when the load of AS is high. Here is detailed message:

[#|2013-09-09T09:20:51.928+0200|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=33;_ThreadName=Thread-2;|A potential connection leak detected for connection pool sdp2RwOraPool. The stack trace of the thread is provided below :
com.sun.enterprise.resource.pool.ConnectionPool.setResourceStateToBusy(ConnectionPool.java:324)
com.sun.enterprise.resource.pool.ConnectionPool.getResourceFromTransaction(ConnectionPool.java:603)
com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:515)
com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:332)
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
org.hibernate.loader.Loader.doQuery(Loader.java:696)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
org.hibernate.loader.Loader.doList(Loader.java:2228)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
org.hibernate.loader.Loader.list(Loader.java:2120)
org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
cz.i.sdp.papi.ejb.dao.PohledavkaDaoBean.findPohledavkaByAkceTypIds(PohledavkaDaoBean.java:108)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
$Proxy777.findPohledavkaByAkceTypIds(Unknown Source)
cz.i.sdp.papi.action.ejb.ActionExecutorBean.applyActionWhereApplicable(ActionExecutorBean.java:336)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
$Proxy582.applyActionWhereApplicable(Unknown Source)
cz.i.sdp.papi.ejb.batch.helper.LineBatchExportImport.exportData(LineBatchExportImport.java:302)
cz.i.sdp.papi.ejb.batch.fenix.ExportImportFenixEPSBean.exportData(ExportImportFenixEPSBean.java:94)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
$Proxy493.exportData(Unknown Source)
cz.i.sdp.sdp2.async.ejb.PapiExportDataBean.execute(PapiExportDataBean.java:49)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
$Proxy925.execute(Unknown Source)
cz.i.sdp.sdp2.async.generic.TaskProcessorAssistantBean.processRequest(TaskProcessorAssistantBean.java:57)
sun.reflect.GeneratedMethodAccessor1565.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
cz.i.sdp.sdp2.ejb.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:31)
sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
cz.i.sdp.sdp2.ejb.interceptor.PersistenceInterceptor.intercept(PersistenceInterceptor.java:33)
sun.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
cz.i.sdp.sdp2.ejb.interceptor.LoggerInterceptor.intercept(LoggerInterceptor.java:27)
sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
$Proxy702.processRequest(Unknown Source)
cz.i.sdp.sdp2.async.mdb.BaseTaskProcessorBean.process(BaseTaskProcessorBean.java:30)
cz.i.sdp.taskmanager.processor.AbstractTaskProcessor.processPayload(AbstractTaskProcessor.java:79)
cz.i.sdp.taskmanager.processor.AbstractTaskProcessor.onMessage(AbstractTaskProcessor.java:51)
sun.reflect.GeneratedMethodAccessor1508.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4180)
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5368)
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1099)
com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
$Proxy981.onMessage(Unknown Source)
com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)

Monitoring Statistics :

Monitoring Statistics for
sdp2RwOraPool|#]

me time|#]

n,boolean)|#]

wn from bean
at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:5071)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4906)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
at $Proxy777.findPohledavkaByAkceTypIds(Unknown Source)
at cz.i.sdp.papi.action.ejb.ActionExecutorBean.applyActionWhereApplicable(ActionExecutorBean.java:336)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
.....

[#|2013-09-09T09:21:23.442+0200|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=32;_ThreadName=Thread-2;|RAR8066: Cleanup of a resource from pool [ sdp2
RwOraPool ] failed. Exception : com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException|#]





[GLASSFISH-20795] EclipseLink 2.5.0 JPQL Parser breaks column alias handling in ORDER BY clause Created: 04/Sep/13  Updated: 05/Sep/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: dimaki Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 4 (b89), EclipseLink 2.5.0 (included)


Tags: eclipselink, jpa, jpql

 Description   

Column alias (result_variable) handling as defined in JPA Spec 2.1 (JSR-338) "4.9 ORDER BY Clause" is not working with the default EclipseLink 2.5.0 JPQL Parser (Hermes) provided in Glassfish 4.0 (b89). If a basic JPQL query contains two column aliases and there is an ORDER BY clause on the first alias, EclipseLink returns the following exception:

Exception Description: Problem compiling [SELECT c.cuNumber, c.nameLast AS last_name, c.nameFirst AS first_name FROM Customer c ORDER BY last_name].
[70, 79] The identification variable 'last_name' is not defined in the FROM clause.

Example:
========
Create an entity 'Customer' similar to:

@Entity
@Access(AccessType.FIELD)
@Table(name = "CUSTOMER")
public class Customer implements Serializable {

...
@Column(name = "CU_NUMBER")
private String cuNumber;
@Column(name = "HY_NAME_LAST")
private String nameLast;
@Column(name = "HY_NAME_FIRST")
private String nameFirst;
...
}

In a SLSB use:

...
@PersistenceContext(unitName = "TEST_PU")
EntityManager em;
...

Query query = em.createQuery("SELECT c.cuNumber, c.nameLast AS last_name, c.nameFirst AS first_name FROM Customer c ORDER BY last_name");
...

This fails with:
Exception Description: Problem compiling [SELECT c.cuNumber, c.nameLast AS last_name, c.nameFirst AS first_name FROM Customer c ORDER BY last_name].
[70, 79] The identification variable 'last_name' is not defined in the FROM clause.

If you use the second alias in the order by clause the query is executed successfully.
The same query is running without any error in Glassfish 3.1.2.2 using supplied EclipseLink version.

It seems to be a EclipseLink JPQL Parser Bug.
As a workaround you can switch back to the prior EclipseLink 2.4 JPQL Parser by using the following configuration in your persistence.xml:
<property name="eclipselink.jpql.parser" value="org.eclipse.persistence.queries.ANTLRQueryBuilder"/>
But I don't think the old JPQL parser is JEE 7 compliant.



 Comments   
Comment by dimaki [ 04/Sep/13 ]

See also here: http://www.eclipse.org/forums/index.php/t/489531/

Comment by PascalFilion [ 05/Sep/13 ]

The bug has been fixed and will be part of the next patch release (2.4.3 and 2.5.1). A nightly build can be picked up if required.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=410808





[GLASSFISH-20773] <data-source> defintion doesn't parse <url> correctly with Java DB/Derby Created: 20/Aug/13  Updated: 20/Aug/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0_b89_RC5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ian Evans Assignee: sfelts
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b17
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)


Attachments: Zip Archive dataSourceTest.zip    

 Description   

For an application with the following data-source definition in the deployment descriptor:

    <data-source>
        <description>Test data source.</description>
        <name>java:app/TestDataSource</name>
        <class-name>org.apache.derby.jdbc.ClientDataSource</class-name>
        <url>jdbc:derby://localhost:1527/test;create=true</url>
    </data-source>

GlassFish throws the following error on deployment:

INFO:   EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130507-3faac2b
WARNING:   RAR5038:Unexpected exception while creating resource for pool __SYSTEM/pools/__datasource_definition/dataSourceTest/java:app/TestDataSource. Exception : javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: Required Derby DataSource property databaseName not set.
WARNING:   RAR5117 : Failed to obtain/create connection from connection pool [ __SYSTEM/pools/__datasource_definition/dataSourceTest/java:app/TestDataSource ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: Required Derby DataSource property databaseName not set.
WARNING:   RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Connection could not be allocated because: Required Derby DataSource property databaseName not set.]
SEVERE:   Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Required Derby DataSource property databaseName not set.
Error Code: 0
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316)
	at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
	at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:203)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:734)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:239)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:681)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:204)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:182)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getDatabaseSession(EntityManagerFactoryImpl.java:527)
	at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:358)
	at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:199)
	at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
	at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
	at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
	at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
	at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:922)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:431)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:356)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
	at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
	at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
	at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
	at java.lang.Thread.run(Thread.java:724)
...

Replacing <url> with the following works correctly:

    <data-source>
        <description>Test data source.</description>
        <name>java:app/TestDataSource</name>
        <class-name>org.apache.derby.jdbc.ClientDataSource</class-name>
        <server-name>localhost</server-name>
        <port-number>1527</port-number>
        <database-name>test</database-name>
        <user>app</user>
        <password>app</password>
        <property>
            <name>connectionAttributes</name>
            <value>;create=true</value>
        </property>
    </data-source>

The server should be able to correctly parse the JDBC URL, including the attributes, from within the <data-source> definition.



 Comments   
Comment by Ian Evans [ 20/Aug/13 ]

Maven WAR project that demonstrates the error.





[GLASSFISH-19548] The option"allow-non-component-callers"of Jdbc connection pool seems do not work fine Created: 17/Jan/13  Updated: 01/Aug/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: V3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: jifeng Assignee: sfelts
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In glassfish Server 3.1 Application Development Guide,the description of "allow-non-component-callers" are as follows:

 
Connections obtained by non-component callers are not automatically closed at the end of a transaction by the 
container.They must be explicitly closed by the caller. "★"

But we find that the function of " allow-non-component-callers" does not like "★" when looked into the related code.
If the value of "allow-non-component-callers" is false,the connection which get before transaction should be enlisted into the transaction context.
For example:part1

  

con1 = datasource.getConnection;// enlisted into the transaction
ut.begin();
con2 = datasource.getConnection;// enlisted into the transaction
......
ut.commit();

If the value of "allow-non-component-callers" is true,the connection which is got before transaction will not be enlisted into the transaction context.
For example:part2

 
con1 = datasource.getConnection;// will not be enlisted into the transaction
ut.begin();
con2 = datasource.getConnection;// enlisted into the transaction
......
ut.commit();

in part2,if execute con1.close before ut.commit() method.
For example:

con1 = datasource.getConnection()
ut.begin();
con1.close();"★"
ut.commit();

When execute con1.close() method ,the program is throwing exception :

[#|2013-01-17T16:42:20.994+0800|SEVERE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource|_Thread
ID=93;_ThreadName=Thread-2;|RAR5031:System Exception
java.lang.NullPointerException
	at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:246)
	at com.sun.enterprise.resource.ConnectorXAResource.end(ConnectorXAResource.java:159)
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.delistResource(JavaEETransactionManagerSimplified.java:528)
	at com.sun.enterprise.resource.rm.SystemResourceManagerImpl.delistResource(SystemResourceManagerImpl.java:145)
	at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:381)
	at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77)
	at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784)
	at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217)
	at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587)
java.lang.RuntimeException: Got exception during XAResource.end: javax.transaction.xa.XAException: 
com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.delistResource(JavaEETransactionManagerSimplified.java:530)
	at com.sun.enterprise.resource.rm.SystemResourceManagerImpl.delistResource(SystemResourceManagerImpl.java:145)
	at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:381)
	at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77)
	at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784)
	at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217)
	at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587)



 Comments   
Comment by jifeng [ 17/Jan/13 ]

JavaEETransactionManagerSimplified #enlistResourcet():enlisted resource into the transaction context

JavaEETransactionManagerSimplified # delistResource():dissociate resource from the transaction context

if the value of “allow-non-component-callers” is true, when the program get the connection ,JavaEETransactionManagerSimplified #enlistResourcet() method will not be executed.And then the program close the connection,JavaEETransactionManagerSimplified #delistResource () method will still be executed.
Because there is no resource enlisted into the transaction context, so the code which is marked as "★" will throw the NullPointerException:

ConnectorXAResource.java
private ResourceHandle getResourceHandle() throws PoolingException {
        try {
            ResourceHandle h = null;
            JavaEETransaction j2eetran = getCurrentTransaction();
            if (j2eetran == null) {      
                h = localHandle_;        
            } else {
                h = (ResourceHandle)j2eetran.getNonXAResource();//no resource in transaction, h is null
                ......
            }
            if (h.getResourceState().isUnenlisted()) {★
                ManagedConnection mc = (ManagedConnection) h.getResource();
                mc.getLocalTransaction().begin();
            }
            return h;
        } catch (Exception ex) {
            _logger.log(Level.SEVERE, "poolmgr.system_exception", ex);
            throw new PoolingException(ex.toString(), ex);
        }
    }
Comment by jifeng [ 17/Jan/13 ]

I modify the code which is marked as "★" , and it works fine.

com.sun.enterprise.resource.rm.SystemResourceManagerImpl
public void delistResource(ResourceHandle h, int xaresFlag) {
        try {
        JavaEETransactionManager tm = ConnectorRuntime.getRuntime().getTransactionManager();
            Transaction tran = tm.getTransaction();
	    if (tran != null) {
	        if (h.isTransactional() && h.isEnlisted()) {★
	            tm.delistResource(tran, h, xaresFlag);
  	        }
           }		
        } catch (SystemException ex) {
            _logger.log(Level.WARNING,"poolmgr.system_exception",ex);
        } catch (IllegalStateException ex) {
            // ignore
        }            
    }  
Comment by jifeng [ 01/Aug/13 ]

Hi:
sfelts

I find This phenomenon also occurs in glassfish v4 .

when i used the way as above, it works fine

could you please confirm it and give me some suggestions?





[GLASSFISH-20688] missing resource-ref in domain.xml breaks connection pooling Created: 08/Jul/13  Updated: 08/Jul/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.1, 3.1.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: wrschneider99 Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Related to GLASSFISH-18166, but different failure mode

If you are missing resource-ref in domain.xml, then you can still get connections from JNDI but they won't be pooled, and the "Monitor" tab in the admin console won't work - returns all zeros.

Silent failure is bad.






[GLASSFISH-18439] Statement-leak-timeout and statement-leak-reclaim values do not persist in domain.xml when created with asadmin add-resources Created: 01/Mar/12  Updated: 01/Jul/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2_b23
Fix Version/s: None

Type: Bug Priority: Major
Reporter: emailnbw Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64, Glassfish 3.1.2_b23, JDK 1.7.0_u3 x64


Attachments: XML File glassfish-resources.xml     Text File jdbc-rm-statement-leak.patch    
Tags: asadmin

 Description   

This looks like an issue that is very related to GLASSFISH-18026 which was marked as resolved. In this case if I try to create a jdbc-connection-pool using the command 'asadmin add-resources glassfish-resources.xml' and the jdbc-connection-pool element in that XML file have the statement-leak-timeout-in-seconds and statement-leak-reclaim attributes set the resultant JDBC connection pool created will not. I've attached a sample persistence.xml file which demonstrates this.



 Comments   
Comment by ancoron [ 27/Aug/12 ]

Attached a patch jdbc-rm-statement-leak.patch for review and inclusion. it fixes the problem at the source - the resources manager.

Comment by ancoron [ 27/Aug/12 ]

The above patch applies to the 3.1.2 tag but should (with path modification) also apply to trunk.

Comment by emailnbw [ 01/Jul/13 ]

Has this been fixed in GF4 FCS?





[GLASSFISH-20137]  The option"connection-leak-reclaim"of Jdbc connection pool seems do not work fine Created: 03/Apr/13  Updated: 03/Apr/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: jifeng Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hi sfelts

In v3.1.1,when i use the connection-leak-reclaim function, my program is always hung up.
operations are as follows:
---------
[APS]:

1. create two jdbc connection pool:oracle_pool1,oracle_pool2//oracle_pool1,oracle_pool2 use the same database。
2. create two jdbc resource:jdbc/pool1(poolid =oracle_pool1),jdbc/pool2(poolid=oracle_pool2)
3. execute commands as follows:

set resources.jdbc-connection-pool.oracle_pool2.connection-leak-timeout-in-seconds=10
set resources.jdbc-connection-pool.oracle_pool2.connection-leak-reclaim=true

[APP]:
The main thread get con1 and con2 from the different jdbc resource (jdbc/pool1 and jdbc/pool2)

The sub thread use con1 and con2 to execute the following operations:

con1.setAutoCommit(false)
↓
con1.createStatement().execute("select * from test_table where ID = '1' for update");
↓
con2.createStatement().execute("update test_table set NAME='test' where ID = '1'");


The main thread sleep (sleep time > leak-timeout)※
※leakTimeOut happens in con2, ConnectionLeakDetector.potentialConnectionLeakFound methed should be executed
※The lock(connectionLeakLock) would be occupied

the main thread close con2※
ConnectionLeakDetector.stopConnectionLeakTracing methed should be executed ,in this method the lock(connectionLeakLock) can not be obtained★

The main thread close con1

end
---------
the code which is marked as "★" is always hung up

I found that there is some changes about the reclaimed Connection in ConnectionLeakDetector.potentialConnectionLeakFound() between V2.x and V3.x:

the processing logic in v2.x as following.
====
synchronized(connectionLeakLock){
......
}

synchronized(this) {
......
destroyResourceForConnectionLeak(resourceHandle);// reclaim Connection
......
}
====

but in v3.x the processing logic has been changed as following.
====
synchronized (connectionLeakLock){synchronized object has been changed

connLeakListener.reclaimConnection(resourceHandle);// reclaim Connection

}
====

there is some special consideration about the change?






[GLASSFISH-20091] Give us DB-Library automatically Created: 28/Mar/13  Updated: 28/Mar/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0_b81
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: joshie007 Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7, NetBeans 7.3


Tags: database, libraries

 Description   

Hi,

I'm building an EAR project through GlassFish 4.b-81 promoted build. At first, when I'm using EclipseLink JPA 2.1 and Java-EE 7 to access PostgreSQL Database, the log throws NoClassDefFound: PostgreSQL jdbc4 PreparedStatement.

Now I know that to fix the error is put my postgresql library to <GLASSFISH_INSTALLATION>/glassfish/domains/<MY DOMAIN>/lib/

But, what about if GlassFish team has put some popular Database driver, so we don't have to do it like that? It's just an advice though, so it will make the developing enterprise application become easier.






[GLASSFISH-17129] DB Connections are pooled on DAS after automatic schema generation Created: 29/Jul/11  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: ito_m Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Tags: 3_1_2-exclude

 Description   

When deploying JPA apps with createtables/dropandcreatetables options or with including persistence.xml which specifies the corresponding properties, the automatic schema generation is executed. To achieve this, DAS refers to the data source specified in persistence.xml, gets connections to DB and executes DDL. The issue is that DB connections are pooled on DAS after deployment if resources.jdbc-connection-pool.$

{poolName}

.pooling is true.

This affects the following issue.
1. It wastes DB resources.
Even if user choose a non-DAS server for deployment of his app, steady-pool-size connections will be pooled on DAS. Besides, all of them will be reconnected every idle-timeout-in-seconds because they must be idle in this case. If steady-pool-size is 100, the total 200 connections will be acquired by DAS and a non-DAS server.

2. DML execution on DAS can be failed depending on DB.
Some DB don't allow to reuse connections which executed DDL in order to execute DML. In this case, any DML executions by apps on DAS after deployment will be failed.

Although we have the following workarounds, these are inconvenient for users. So I think it's better to use UnPooled connections in order to execute DDL on deployment regardless of JDBC connection pool definition.

  • False is set on pooling definition when deployment. After that, switch it to true.
  • Restart DAS (Because the pooling starts when requiring DB connection at the beginning.)

Here is stacktrace of GFv3.2(r47843) when the JDBC connection pool was initialized on deployment.

ConnectionPool.initPool(ResourceAllocator) line: 224
ConnectionPool.internalGetResource(ResourceSpec, ResourceAllocator, Transaction) line: 511
ConnectionPool.getResource(ResourceSpec, ResourceAllocator, Transaction) line: 381
PoolManagerImpl.getResourceFromPool(ResourceSpec, ResourceAllocator, ClientSecurityInfo, Transaction) line: 242
PoolManagerImpl.getResource(ResourceSpec, ResourceAllocator, ClientSecurityInfo) line: 167
ConnectionManagerImpl.getResource(int, PoolManager, ManagedConnectionFactory, ResourceSpec, Subject, ConnectionRequestInfo, ClientSecurityInfo, ConnectorDescriptor, boolean) line: 338
ConnectionManagerImpl.internalGetConnection(ManagedConnectionFactory, ResourcePrincipal, ConnectionRequestInfo, boolean, String, Object, boolean) line: 301
ConnectionManagerImpl.allocateConnection(ManagedConnectionFactory, ConnectionRequestInfo, String, Object) line: 190
ConnectionManagerImpl.allocateConnection(ManagedConnectionFactory, ConnectionRequestInfo, String) line: 165
ConnectionManagerImpl.allocateConnection(ManagedConnectionFactory, ConnectionRequestInfo) line: 160
DataSource40(DataSource).getConnection() line: 113
JNDIConnector.connect(Properties) line: 126
JNDIConnector.connect(Properties, Session) line: 94
DatabaseLogin(DatasourceLogin).connectToDatasource(Accessor, Session) line: 162
ServerSession(DatabaseSessionImpl).loginAndDetectDatasource() line: 592
EntityManagerFactoryProvider.login(ServerSession, Map) line: 233
EntityManagerSetupImpl.deploy(ClassLoader, Map) line: 394
EntityManagerFactoryImpl.getServerSession() line: 185
EntityManagerFactoryImpl.createEntityManagerImpl(Map) line: 242
EntityManagerFactoryImpl.createEntityManager() line: 230
PersistenceUnitLoader.doJava2DB() line: 373
JPADeployer$2.visitPUD(PersistenceUnitDescriptor, DeploymentContext) line: 435
JPADeployer$2(JPADeployer$PersistenceUnitDescriptorIterator).iteratePUDs(DeploymentContext) line: 483
JPADeployer.iterateInitializedPUsAtApplicationPrepare(DeploymentContext) line: 465
JPADeployer.event(EventListener$Event) line: 389
EventsImpl.send(EventListener$Event, boolean) line: 128



 Comments   
Comment by Shalini [ 14/Nov/11 ]

While using a non DAS server for application deployment, the resource could be disabled, which will solve the issue.

Flush connection pool could be used after executing DDL statements on connections. Hence the subsequent DML executions will not fail.

reducing the priority as there are workarounds to achieve the setup.





[GLASSFISH-12221] connection pool cannot connect to MySQL database server Created: 12/Jun/10  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: v3.0.1
Fix Version/s: not determined

Type: Bug Priority: Minor
Reporter: tgiunipero Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Issuezilla Id: 12,221

 Description   

Using the following connection pool properties, you can successfully create a
working connection to a default installation ('root'/[empty password]) of MySQL
server 5.1. This applies to GF 3.0 (final release) through to 3.0.1 (b-16).
This no longer works in promoted builds (b-19 - b-22).

datasource classname: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
resource type: javax.sql.DataSource (or) javax.sql.ConnectionPoolDataSource

For an example NetBeans project, see:
http://netbeans.org/projects/samples/downloads/download/Samples%252FJava%2520Web%252FIFPWAFCAD.zip

In sun-resources.xml, replace:

<property name="Password" value="nbuser"/>

with:

<property name="Password" value=""/>

SQL script to generate database:
http://netbeans.org/projects/samples/downloads/download/Samples%252FJava%2520Web%252Fifpwafcad.sql



 Comments   
Comment by dochez [ 27/Aug/10 ]

Reassigning to Jagadish for further evaluations.

Comment by Jagadish [ 29/Aug/10 ]

Transferring to Shalini for investigation.

Comment by Shalini [ 29/Aug/10 ]

There is a related issue : Issue 12188 that was fixed in 3.1. Could you try the
same in GF v3.1 latest promoted build? The fix was not put in b22 of 3.0.1.

Please let us know if you still see the issue with GF V3.1.

Comment by Shalini [ 06/Sep/10 ]

Reducing the priority as a similar issue was fixed in v3.1. Requesting the
submitter to evaluate this issue in the latest v3.1 builds and report back.

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-12414] Not able to create an additional postgres connection pool Created: 29/Jun/10  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: v3.0.1
Fix Version/s: not determined

Type: Bug Priority: Minor
Reporter: zentrum Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: Linux


Issuezilla Id: 12,414

 Description   

Hi,

I just tried out to configure an additional postgres connection pool. I followed
the description in the documentation exactly and did not succeed to "Ping" the
pool. I received always an exception in server.log:

WARNING: RAR8054: Exception while creating an unpooled [test] connection for
pool [ jdbc/AccountingDB ], null

see my snippet from the domain.xml:

<jdbc-connection-pool datasource-
classname="org.postgresql.ds.PGSimpleDataSource" res-type="javax.sql.DataSource"
name="jdbc/AccountingDB">
<property name="databaseName" value="postgres" />
<property name="user" value="postgres" />
<property name="password" value="" />
<property name="portNumber" value="5432" />
<property name="serverName" value="172.19.5.15" />
</jdbc-connection-pool>

exactly the same snippet works for GF V3 Prelude! Perhaps, there's a problem
handling the empty password?

rgds,
zentrum



 Comments   
Comment by zentrum [ 29/Jun/10 ]

set wrong prio, for me it's definitely NOT usable to run it without a postgres
connection pool.

rgds,
zentrum

Comment by Shalini [ 29/Jun/10 ]

There was a similar issue fixed :
https://glassfish.dev.java.net/issues/show_bug.cgi?id=12188. There was a
regression from the fix of issue
https://glassfish-svn.dev.java.net/issues/show_bug.cgi?id=6946554 that was
resolved in Issue 12188.

Which build of GF are you using? Could you please try with any latest 3.1 build
or any promoted build after June 15 2010?

Comment by zentrum [ 30/Jun/10 ]

I tested it with the following version:

Installed Version: GlassFish Server Open Source Edition 3.0.1 (build 22)

If I find some time, I will try it with v3.1 b06, too.

rgds,
zentrum

Comment by Shalini [ 30/Jun/10 ]

Yes, please use the b06 of 3.1 in which the fix will be apparent. This was not
fixed in 3.0.1.

Downgrading to p4 till further confirmation.

Comment by Shalini [ 07/Dec/11 ]

Is this still an issue? If not, could we close this.

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-3949] Cluster jdbc resource has to be re-enabled everytime cluster is started. Created: 29/Dec/07  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 9.1peur1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: areplogle Assignee: sfelts
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows XP
Platform: Other


Issuezilla Id: 3,949

 Description   

Using official release of GFv2UR1 on windows with jdk1.5.0_06 in a clustered configuration.

After creating a jdbc resource and assigning to the cluster and marking it enabled I have to disable it and
re-enable it after the cluster starts or it doesn't show up in the jndi tree of the instances.

This is necessary every time you start the cluster regardless of whether the resource is targeted at the
cluster and marked enabled or not.

I have 2 nodes in my cluster, one is on the same physical server as the domain and the other is not.



 Comments   
Comment by Anissa Lam [ 09/Jan/08 ]

gui sets the enable flag correctly.
transfer to jdbc

Comment by harpreet [ 06/Feb/08 ]

reassigning issue to the jdbc team.

Comment by Jagadish [ 13/Feb/08 ]

Transferring to myself

Comment by Jagadish [ 20/Feb/08 ]

transferring this to Shalini for investigation

Comment by harpreet [ 16/Apr/08 ]

Not critical to v2.1 - marking for next release

Comment by chrismith [ 07/Aug/08 ]
      • Issue 3949 has been confirmed by votes. ***
Comment by ijuma [ 19/Oct/08 ]

Adding myself to cc list.

Comment by sanandal [ 11/Jan/09 ]

"Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1
release whose primary release driver is SailFin.
This issue will be scrubbed after this release and will be given the right
priority for the next release."





[GLASSFISH-16069] Glassfish reports a negative connfree Created: 22/Feb/11  Updated: 10/Feb/13

Status: In Progress
Project: glassfish
Component/s: jdbc
Affects Version/s: v3.0.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: vai_jpc Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 5.4 virtualised on VMWare.


Attachments: Text File asadmin-output.txt     XML File domain.xml    

 Description   

We're running an application on Glassfish 3.0.1 with a few issues. The glassfish server often loses its connection to the oracle database and connections are closed and 'lost', never to be usable again. Whether this is glassfish or the applications fault, that things aren't cleaned up and connections aren't freed I don't know and isn't really what I came here for but its a bit of background. The application uses a JDBC Connection Pool, the resource type is javax.sql.XADataSource

The reason I came here is because my graphing of the number of free connections broke and it broke because I didn't anticipate this:

server.resources.NameOfStoredProcPool.numconnfree-current = -19

Why on earth is it reporting a negative number? This shouldn't be possible should it?

Attached is the entire output of asadmin get --monitor server.resources.NameOfStoredProcPool.*



 Comments   
Comment by Shalini [ 22/Feb/11 ]

Could you please try the same with a latest promoted build of glassfish 3.1? There was an issue : http://java.net/jira/browse/GLASSFISH-9990 reported and was fixed in glassfish 3.1 b26.

Comment by vai_jpc [ 23/Feb/11 ]

Aha thanks I'll see what I can do about testing that. Apologies that I didn't find it in my original googling. (A bug tracker itself was hard to find and I definitely wouldn't have found it if I didn't know jira was the software used!)

Comment by Shalini [ 28/Feb/11 ]

Sorry looks like the issue 9990 was fixed in 3.0. Could you please attach the domain.xml configuration for this pool? Please describe more about your test case. A sample application would be helpful to reproduce in my environment and fix this issue.

Comment by vai_jpc [ 01/Mar/11 ]

Have attached a sanitised domain.xml from the server exhibiting the issue.

I'm afraid I don't believe it will be possible to provide the application in question. Whether something stripped down could also provided, I'm unsure but unhopeful.

Comment by Shalini [ 04/Mar/11 ]

Do you see any connection validation exceptions in the server.log? Also, the leak tracing is not enabled. You could turn on leak tracing and observe if there are leaks from the server.log.
I tried to create a jdbc connection pool with the config from your domain.xml. The application gets 40 connections (max pool size is 32) and the idle timeout i set is 30 seconds. The first 32 servlet instances will get connections right away and the remaining 8 wait for 60 seconds before getting a connection. After 60 seconds, the first 32 connections are closed by the app. Since the connections are leaked in the meantime, they are reclaimed (as per the config). When i observe the monitoring statistics for numconfree and numconnused, they are perfect. I used GlassFish 3.1.

Comment by vai_jpc [ 09/Mar/11 ]

Sometimes the connection fails to validate, sometimes we get 'connection closed' exceptions halfway through the job. Leak tracing isn't enabled no, but when it was enabled it didn't help reclaim connections. (Annoyingly, flush-connection-pool also fails to work.) I'm using 3.0.1.

Comment by Shalini [ 09/Mar/11 ]

Please turn on the FINE logging for resource-adapter and post the full exception stack trace when you see the 'connection closed' exceptions. Do you see any connections being leaked (from server.log)?

Comment by Shalini [ 05/Apr/11 ]

Reducing the priority of this issue as it is not reproducible.





[GLASSFISH-6896] Long name of cluster instance cause exception using an XA Datasource Created: 10/Dec/08  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 9.1peur2
Fix Version/s: not determined

Type: Bug Priority: Minor
Reporter: woel Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: Linux


Issuezilla Id: 6,896

 Description   

A name of more than 22 characters of a cluster instance, such as
cluster1-java1-instance, causes an exception on Glassfish v2 ur2 when used
together with a XA Datasource and MySql connector 5.0.8 and 5.1.7.

Hibernate 3.2.6 is used as persistence provider and we are using Sun jdk 1.6 64bit.

We've been using a very similar configuration on v2 ur1 without any problems.
We recently got new servers where I installed the newer version. I've spent two
days trying to figure out what was wrong with our setup.

[#|2008-12-10T11:51:52.800+0000|WARNING|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|JTS5041:
The resource manager is doing work outside a global transaction
com.mysql.jdbc.jdbc2.optional.MysqlXAException: You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near '0x4a5453' at line 1
at
com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:568)
at
com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:547)
at
com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:488)
at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:222)
at com.sun.jts.jta.TransactionState.startAssociation(TransactionState.java:305)
at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:205)
at
com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:562)
at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:372)
at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:144)
at
com.sun.enterprise.resource.SystemResourceManagerImpl.enlistResource(SystemResourceManagerImpl.java:98)
at
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:216)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:337)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
at
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2213)
at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2136)
at org.hibernate.loader.Loader.list(Loader.java:2096)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:81)
at
com.marketclusters.backend.common.SiteHandlerBean.getSiteBean(SiteHandlerBean.java:86)
at
com.marketclusters.backend.common.SiteHandlerBean.getKnowledgeSphere(SiteHandlerBean.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy156.getKnowledgeSphere(Unknown Source)
at
com.marketclusters.backend.webservice.CompanyServiceBean.getCompany(CompanyServiceBean.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
at $Proxy153.getCompany(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

#]

[#|2008-12-10T11:51:52.804+0000|SEVERE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|RAR5027:Unexpected
exception in resource pooling
javax.transaction.SystemException
at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:217)
at
com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:562)
at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:372)
at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:144)
at
com.sun.enterprise.resource.SystemResourceManagerImpl.enlistResource(SystemResourceManagerImpl.java:98)
at
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:216)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:337)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
at
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2213)
at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2136)
at org.hibernate.loader.Loader.list(Loader.java:2096)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:81)
at
com.marketclusters.backend.common.SiteHandlerBean.getSiteBean(SiteHandlerBean.java:86)
at
com.marketclusters.backend.common.SiteHandlerBean.getKnowledgeSphere(SiteHandlerBean.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy156.getKnowledgeSphere(Unknown Source)
at
com.marketclusters.backend.webservice.CompanyServiceBean.getCompany(CompanyServiceBean.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
at $Proxy153.getCompany(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

#]

[#|2008-12-10T11:51:52.807+0000|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|poolmgr.err_enlisting_res_in_getconn|#]

[#|2008-12-10T11:51:52.808+0000|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;MySQLPool;javax.transaction.SystemException;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|RAR5117
: Failed to obtain/create connection from connection pool [ MySQLPool ]. Reason
: javax.transaction.SystemException|#]

[#|2008-12-10T11:51:52.809+0000|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;Error
in allocating a connection. Cause:
javax.transaction.SystemException;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|RAR5114
: Error allocating connection : [Error in allocating a connection. Cause:
javax.transaction.SystemException]|#]

[#|2008-12-10T11:51:52.809+0000|WARNING|sun-appserver9.1|org.hibernate.util.JDBCExceptionReporter|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|SQL
Error: 0, SQLState: null|#]

[#|2008-12-10T11:51:52.810+0000|SEVERE|sun-appserver9.1|org.hibernate.util.JDBCExceptionReporter|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|Error
in allocating a connection. Cause: javax.transaction.SystemException|#]

[#|2008-12-10T11:51:52.810+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;SiteHandlerBean;|EJB5018:
An exception was thrown during an ejb invocation on [SiteHandlerBean]|#]

[#|2008-12-10T11:51:52.811+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;|
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is: javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Cannot open connection
javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Cannot open connection
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:637)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:107)
at
com.marketclusters.backend.common.SiteHandlerBean.getSiteBean(SiteHandlerBean.java:86)
at
com.marketclusters.backend.common.SiteHandlerBean.getKnowledgeSphere(SiteHandlerBean.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy156.getKnowledgeSphere(Unknown Source)
at
com.marketclusters.backend.webservice.CompanyServiceBean.getCompany(CompanyServiceBean.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
at $Proxy153.getCompany(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2213)
at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2136)
at org.hibernate.loader.Loader.list(Loader.java:2096)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:81)
... 86 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause:
javax.transaction.SystemException
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115)
at
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
... 100 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is: javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Cannot open connection
at
com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3728)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3576)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy156.getKnowledgeSphere(Unknown Source)
at
com.marketclusters.backend.webservice.CompanyServiceBean.getCompany(CompanyServiceBean.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
at $Proxy153.getCompany(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

#]

[#|2008-12-10T11:51:52.814+0000|SEVERE|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;org.omg.CORBA.INTERNAL:
vmcid: 0x0 minor code: 0 completed:
Maybe;rollback;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|JTS5031:
Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe]
on Resource [rollback] operation.|#]

[#|2008-12-10T11:51:52.816+0000|SEVERE|sun-appserver9.1|com.sun.xml.ws.server.sei.EndpointMethodHandler|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;_RequestID=227e1d52-7b93-4086-9cd3-0855ffc41a37;|The
log message is null.
java.lang.reflect.UndeclaredThrowableException
at $Proxy153.getCompany(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031:
Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe]
on Resource [rollback] operation. vmcid: 0x0 minor code: 0 completed: No
at com.sun.jts.jta.TransactionManagerImpl.rollback(TransactionManagerImpl.java:350)
at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.rollback(J2EETransactionManagerImpl.java:1151)
at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.rollback(J2EETransactionManagerOpt.java:426)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3767)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
at
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:200)
... 63 more

#]

[#|2008-12-10T11:51:52.878+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;CompanyService;|EJB5018:
An exception was thrown during an ejb invocation on [CompanyService]|#]

[#|2008-12-10T11:51:52.878+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=20;_ThreadName=httpSSLWorkerThread-38081-1;|
javax.ejb.EJBTransactionRolledbackException
at
com.sun.ejb.containers.BaseContainer.mapBusinessInterfaceException(BaseContainer.java:1482)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1396)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy156.getKnowledgeSphere(Unknown Source)
at
com.marketclusters.backend.webservice.CompanyServiceBean.getCompany(CompanyServiceBean.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
at $Proxy153.getCompany(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at
com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from
bean; nested exception is: javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Cannot open connection
at
com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3728)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3576)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
... 77 more



 Comments   
Comment by Jagadish [ 10/Dec/08 ]

transferring to Shalini for investigation

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-6612] Detect Leak Pool JDBC, Clustering Blocked Created: 22/Oct/08  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 9.1peur2
Fix Version/s: not determined

Type: Bug Priority: Minor
Reporter: gcousin Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: other
Platform: PC


Attachments: Text File configPoolJTDS.zip    
Issuezilla Id: 6,612

 Description   

Hi!
We encountered a problem on Glassfish in clustering.
We have two nodes with an instance on each. A DAS on another machine and a
frontal (SJWS).
The problem comes apparently the pool of connection.
It detects leak of connections (Monitoring JDBC )
and then it is the whole of the system which is blocked.
In other words the applications do not respond any request customer.
The memory and the processor do not pose a concern.
The 4 machines (Node1, Node2, DAS, SJWS) are in Windows Server 2003 SP2. The
driver used to reach database SQL Serveur 2005 is JTDS.

I tried several parameter settings different from the pool of connection with in
particular
covering of connection after leak detection. That without success.

I put in copy of this email the log of error (Node1 + Node2)

I have the impression that the launching of a rather greedy request SQL engages
this process of blocking.

Thanks you for your help

Log Error:

[#|2008-10-21T11:14:25.726+0200|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=31;_ThreadName=Timer-4;ConnectionPoolName=microsoft_jtds_pool;_RequestID=8c88eff0-8db8-4e94-835e-ff04137ea8ae;|Détection
d'une fuite de connexion potentielle pour le pool de connexions
microsoft_jtds_pool. Le suivi de pile du thread est indiqué ci-dessous :
com.sun.enterprise.resource.AbstractResourcePool.setResourceStateToBusy(AbstractResourcePool.java:301)
com.sun.enterprise.resource.AbstractResourcePool.getResourceFromPool(AbstractResourcePool.java:778)
com.sun.enterprise.resource.AbstractResourcePool.getUnenlistedResource(AbstractResourcePool.java:652)
com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:594)
com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
LogiOnNet.technique.Requete.lecture(Requete.java:243)
LogiOnNet.metier.cahierDesMessages.Message.compteLigneMessage(Message.java:563)
org.apache.jsp.jsp.Principal_jsp._jspService(Principal_jsp.java from :176)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

Statistiques de contrôle :
PoolCounters:
maxNumConnUsed = 7
minNumConnUsed = 0
currNumConnUsed = -1
maxNumConnFree = = 9
minNumConnFree = 0
currNumConnFree = 9
numConnCreated = 3302
numConnDestroyed = 3294
numConnFailedValidation = 0
numConnTimedOut = 0
numConnAcquired = 200023
numConnReleased = 200018
currConnectionRequestWait = 0
minConnectionRequestWait = 0
maxConnectionRequestWait = 569
totalConnectionRequestWait = 289123
numConnSuccessfullyMatched = 0
numConnNotSuccessfullyMatched = 0
numPotentialConnLeak = 6|#]

[#|2008-10-21T11:14:56.148+0200|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=31;_ThreadName=Timer-4;ConnectionPoolName=microsoft_jtds_pool;_RequestID=8c88eff0-8db8-4e94-835e-ff04137ea8ae;|Détection
d'une fuite de connexion potentielle pour le pool de connexions
microsoft_jtds_pool. Le suivi de pile du thread est indiqué ci-dessous :
com.sun.enterprise.resource.AbstractResourcePool.setResourceStateToBusy(AbstractResourcePool.java:301)
com.sun.enterprise.resource.AbstractResourcePool.getResourceFromPool(AbstractResourcePool.java:778)
com.sun.enterprise.resource.AbstractResourcePool.getUnenlistedResource(AbstractResourcePool.java:652)
com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:594)
com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
LogiOnNet.technique.Requete.ecriture(Requete.java:152)
LogiOnNet.metier.Utilisateur.saveIdSession(Utilisateur.java:663)
LogiOnNet.servlet.ControleIdentificationServlet.doPost(ControleIdentificationServlet.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

Statistiques de contrôle :
PoolCounters:
maxNumConnUsed = 7
minNumConnUsed = 0
currNumConnUsed = -1
maxNumConnFree = = 10
minNumConnFree = 0
currNumConnFree = 9
numConnCreated = 3302
numConnDestroyed = 3294
numConnFailedValidation = 0
numConnTimedOut = 0
numConnAcquired = 200030
numConnReleased = 200024
currConnectionRequestWait = 0
minConnectionRequestWait = 0
maxConnectionRequestWait = 569
totalConnectionRequestWait = 289138
numConnSuccessfullyMatched = 0
numConnNotSuccessfullyMatched = 0
numPotentialConnLeak = 7|#]

[#|2008-10-21T11:14:58.117+0200|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=31;_ThreadName=Timer-4;ConnectionPoolName=microsoft_jtds_pool;_RequestID=8c88eff0-8db8-4e94-835e-ff04137ea8ae;|Détection
d'une fuite de connexion potentielle pour le pool de connexions
microsoft_jtds_pool. Le suivi de pile du thread est indiqué ci-dessous :
com.sun.enterprise.resource.AbstractResourcePool.setResourceStateToBusy(AbstractResourcePool.java:301)
com.sun.enterprise.resource.AbstractResourcePool.getResourceFromPool(AbstractResourcePool.java:778)
com.sun.enterprise.resource.AbstractResourcePool.getUnenlistedResource(AbstractResourcePool.java:652)
com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:594)
com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
LogiOnNet.technique.Requete.lecture(Requete.java:243)
LogiOnNet.metier.ListeDeroulante.lister(ListeDeroulante.java:98)
LogiOnNet.metier.ListeDeroulante.listerParametre(ListeDeroulante.java:154)
LogiOnNet.metier.ListeDeroulante.listerParametreIpso(ListeDeroulante.java:116)
org.apache.jsp.jsp.Contacts.RechercheContact_jsp._jspService(RechercheContact_jsp.java
from :369)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

Statistiques de contrôle :
PoolCounters:
maxNumConnUsed = 7
minNumConnUsed = 0
currNumConnUsed = -2
maxNumConnFree = = 10
minNumConnFree = 0
currNumConnFree = 10
numConnCreated = 3302
numConnDestroyed = 3294
numConnFailedValidation = 0
numConnTimedOut = 0
numConnAcquired = 200030
numConnReleased = 200024
currConnectionRequestWait = 0
minConnectionRequestWait = 0
maxConnectionRequestWait = 569
totalConnectionRequestWait = 289138
numConnSuccessfullyMatched = 0
numConnNotSuccessfullyMatched = 0
numPotentialConnLeak = 8|#]

[#|2008-10-21T11:24:13.377+0200|WARNING|sun-appserver9.1|LogiOnNet|_ThreadID=27;_ThreadName=httpSSLWorkerThread-38080-2;_RequestID=5640b40a-8982-4a64-b2ba-545de2d0fedb;|ecriture:
Erreur générale d'écriture --> java.lang.IllegalStateException: state.isBusy() :
false, UPDATE contact SET creation = '20070308',date_relance = '20070308',email
= '',nom = 'BRILLANT ',prenom = 'Philippe',id_civilite = 13,id_utilisateur =
397,id_type_contact = 1,type_origine = '-1',n_rue = '0007bis',pays = '',remarque
= 'mandat',rue = 'Louis Lemelle (boulevard)',code_insee_lieu = 78498,ville =
'POISSY',code_postal = '78300',date_modif = '21 octobre 2008 11:12:12', societe
= '', prive = 0, annonce_prospect = '', alerte_email = 0, alerte_sms = 0,
quiAmodifie = 'Micheli' WHERE id_contact = 235798|#]

[#|2008-10-21T11:10:40.388+0200|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=33;_ThreadName=Timer-4;ConnectionPoolName=microsoft_jtds_pool;_RequestID=92d6fa8c-ef36-4df6-a10f-08576d1a03e0;|Détection
d'une fuite de connexion potentielle pour le pool de connexions
microsoft_jtds_pool. Le suivi de pile du thread est indiqué ci-dessous :
com.sun.enterprise.resource.AbstractResourcePool.setResourceStateToBusy(AbstractResourcePool.java:301)
com.sun.enterprise.resource.AbstractResourcePool.getResourceFromPool(AbstractResourcePool.java:778)
com.sun.enterprise.resource.AbstractResourcePool.getUnenlistedResource(AbstractResourcePool.java:652)
com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:594)
com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
LogiOnNet.technique.Requete.lecture(Requete.java:243)
LogiOnNet.metier.RechercheContact.listerContact(RechercheContact.java:199)
LogiOnNet.metier.RechercheContact.listerContact(RechercheContact.java:183)
org.apache.jsp.jsp.Contacts.ListeContact_jsp._jspService(ListeContact_jsp.java
from :768)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

Statistiques de contrôle :
PoolCounters:
maxNumConnUsed = 10
minNumConnUsed = 0
currNumConnUsed = 1
maxNumConnFree = = 10
minNumConnFree = 0
currNumConnFree = 7
numConnCreated = 2924
numConnDestroyed = 2916
numConnFailedValidation = 0
numConnTimedOut = 0
numConnAcquired = 277269
numConnReleased = 277249
currConnectionRequestWait = 0
minConnectionRequestWait = 0
maxConnectionRequestWait = 343
totalConnectionRequestWait = 304788
numConnSuccessfullyMatched = 0
numConnNotSuccessfullyMatched = 0
numPotentialConnLeak = 19|#]

[#|2008-10-21T11:24:00.857+0200|INFO|sun-appserver9.1|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=69;_ThreadName=iMQEventHandler-4;|MQJMSRA_RA1101:
onEvent:Connection Event:E201:[E201]: Fermeture de la connexion en raison d'une
demande d'arrêt par l'administrateur : localhost:37676(1755),
com.sun.messaging.jms.notification.ConnectionClosedEvent[source=BrokerAddress=localhost:37676(1755),
ConnectionID=7680639618083499008, ReconnectEnabled: false,
IsConnectedToHABroker: false]|#]



 Comments   
Comment by gcousin [ 22/Oct/08 ]

Created an attachment (id=2000)
Screenshot config Pool connection, domain.xml, log error

Comment by Jagadish [ 22/Oct/08 ]

There are two callers that are either taking long time while
using the connection or leaking the connection.

1)
LogiOnNet.technique.Requete.lecture(Requete.java:243)
LogiOnNet.metier.cahierDesMessages.Message.compteLigneMessage(Message.java:563)

2)
LogiOnNet.technique.Requete.ecriture(Requete.java:152)
LogiOnNet.metier.Utilisateur.saveIdSession(Utilisateur.java:663)

Same as (1)
LogiOnNet.technique.Requete.lecture(Requete.java:243)
LogiOnNet.metier.ListeDeroulante.lister(ListeDeroulante.java:98)
LogiOnNet.metier.ListeDeroulante.listerParametre(ListeDeroulante.java:154)
LogiOnNet.metier.ListeDeroulante.listerParametreIpso(ListeDeroulante.java:116)

Same as (1)
LogiOnNet.technique.Requete.lecture(Requete.java:243)
LogiOnNet.metier.RechercheContact.listerContact(RechercheContact.java:199)
LogiOnNet.metier.RechercheContact.listerContact(RechercheContact.java:183)
org.apache.jsp.jsp.Contacts.ListeContact_jsp._jspService(ListeContact_jsp.java
from :768)

a) Have you tried enabling connection-reclaim ?

b) If the sql requests are taking long time, you can enable
"statement-timeout" feature in the pool. If the jdbc-driver supports statement
timeout, once a value is set, queries will be terminated when the timeout
occurs. Can you try this setting (need appserver restart) ?

c) Also, providing the jstack of appserver process will tell us what
the threads are trying to do.

Transferring to Shalini.

Comment by gcousin [ 24/Oct/08 ]

I executed the request SQL in the Analyser SQL Server.
The time of execution is correct.
Moreover, the request SQL is just a 'insert' about the trace

LogiOnNet.technique.Requete.ecriture(Requete.java:152)
LogiOnNet.metier.Utilisateur.saveIdSession(Utilisateur.java:663)

a) I tried the option "connection-reclaim" but without success.
b) I don't restart the server in this time. It's the production.
I will do it this week end with this option "statement-timeout".

I reseted the parameters JDBC Pool with the option by default.
I deleted the dir of instance on the node of cluster
and restarted. For three days, the application isn't down.
I wait and see. thanks for your response.

Comment by sanandal [ 11/Jan/09 ]

"Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1
release whose primary release driver is SailFin.
This issue will be scrubbed after this release and will be given the right
priority for the next release."

Comment by Shalini [ 21/Jan/10 ]

Does this issue still persist after setting the statement timeout value?

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-8268] In-use connections equal max-pool-size using EJB Timer Created: 08/May/09  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: v2.1.1
Fix Version/s: not determined

Type: Bug Priority: Minor
Reporter: jsantinizer Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows XP
Platform: All


Issuezilla Id: 8,268
Status Whiteboard:

V2.1.1_exclude


 Description   

I use Sun Java System Application Server 9.1_02. In my test enterprise
application I use EJB TimerService with a 10-connections pool on MySQL in witch
I created a database containing the EJB_TIMER_TBL table.
Here are my test classes:

//SessionBean which uses TimerService
@Stateless
public class NewSessionTimerBean implements NewSessionTimerLocal {
@Resource
TimerService timerService;
@Timeout
public void timeout(Timer timer) {
System.out.println((String)timer.getInfo()+": BEGIN Timeout
>>>>>>>>>>");
try

{ Thread.sleep(1000000); }

catch (InterruptedException ex)

{ Logger.getLogger(NewSessionTimerBean.class.getName()).log(Level.SEVERE, null, ex); }

System.out.println((String)timer.getInfo()+": END Timeout<<<<<<<<<<");
}
public void create(String name, long time, long interval)

{ timerService.createTimer(new Date(time), interval, name); }

public Vector getAllTimers(){
Vector<String> ret = new Vector();
Collection c = timerService.getTimers();
Iterator<Timer> it = c.iterator();
while(it.hasNext())

{ ret.add((String)it.next().getInfo()); }

return ret;
}

public void delete(String name) {
Iterator<Timer> it = timerService.getTimers().iterator();
while(it.hasNext()){
Timer tmp = it.next();
String tmpName = (String)tmp.getInfo();
if(name.equals(tmpName))

{ tmp.cancel(); break; }

}
}
}

//My Servlet

....

protected void processRequest(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
if(request.getParameter("create") != null)

{ Date now = new Date(); String name = "timer" + now.getTime(); newSessionTimerBean.create(name, now.getTime()-100000, 10000); out.println("Creato Timer " + name + "\n"); }

if(request.getParameter("delete") != null)

{ Date now = new Date(); String name = request.getParameter("name"); newSessionTimerBean.delete(name); out.println("Deleted Timer " + name + "\n"); }

Vector timers = newSessionTimerBean.getAllTimers();
Iterator it = timers.iterator();
out.println("Timers list: " + "\n");
out.println("<ul>");
while(it.hasNext())

{ out.println("<li>"); String tmp = (String)it.next(); out.println("<a href=\"manage?delete&name="+tmp+"\">" + tmp + "</a>\n"); out.println("</li>"); }

out.println("</ul>");
} finally

{ out.close(); }

}

....

If i call the method timer.cancel(), by calling
newSessionTimerBean.delete(name), on a timer which is running @Timeout-annoted
method the timer raw on MySQL is deleted but the connection is not released. So
if I create 7 timers and delete them before @Timeout-annoted method ends, and
then create 4 new timers an Error is thrown (I have only 4 timers but the
max-pool-size is 10):

Error in allocating a connection. Cause: In-use connections equal max-pool-size
and expired max-wait-time. Cannot allocate more connections.]

In my test application @Timeout-annoted method executes Thread.sleep(1000000) so
I can stop the timer before the method ends.

Logging SQL instructions on MySQL server i noted that when @Timeout-annoted
method starts a transaction is began ('XA START') but if I call timer.cancel()
before the method ends the transaction is NOT ENDED ('XA END'), it may be the
problem?
If I restart Glassfish connections in the pool are released.

I'm sorry for my English! Thanks



 Comments   
Comment by Jagadish [ 08/May/09 ]

transferring to Shalini for investigation

Comment by Ed Bratt [ 15/Oct/09 ]

Will not fix in v2.1.1

Comment by jagadesh [ 15/Oct/09 ]

Will not be fixed for V2.1.1

Comment by jagadesh [ 15/Oct/09 ]

Will not be fixed for V2.1.1

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-18607] JDBC ping fails with aliased password Created: 09/Apr/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: dhcavalcanti Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Tags: JDBC, alias, password, ping

 Description   

The ping function fails for a JDBC connection whose password is aliased as specified here: http://docs.oracle.com/cd/E19798-01/821-1751/ghgqc/index.html.

If I place the actual password instead of the aliased password in the proper format, the ping works correctly.






[GLASSFISH-6807] DataSource is expected to have "username" and "password" properties Created: 18/Nov/08  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 9.1peur2
Fix Version/s: not determined

Type: Bug Priority: Minor
Reporter: mkarg Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 6,807
Status Whiteboard:

V2.1.1_exclude


 Description   

The JDBC driver I am using is getting username and password from the URL, since
it is ODBC based and uses an ODBC connection string in the URL:

URL=jdbc:ianywhere:DSN=MyOdbcDsn;UID=MyUserName;PWD=MyPassword

But when trying to PING that JDBC Connection Pool, it says that "Connection
cannot be null" – while the JDBC driver and DBMS server both log an entry that
the connect was successful! Also the driver works correctly with the same URL
entry when doing a small standalone JDBC test program.

So I enabled FINEST logging for the connectors subsystem in GlassFish and found
the below exception after another PING try. For me it looks like GlassFish
trying to read the property "userName", but the DataSource does not have such a
property. In fact, the JDBC specification just suggests that DataSource
implementations shall implement the "user" and "password" properties, but it
does not make any of them mandatory. But it seems, GlassFish insists on it.

Now here comes the strange thing: I add two additional properties to the pool
configuration, named "username" and "password" and pass a totally fancy default
value of "foobar". NOW THE PING WORKS PRETTY WELL! This seems to support my
thesis that GlassFish MUST have these properties in the JDBC config, even if the
JDBC driver itself is not using it. This is not very smart and should get fixed
(or at least, write a note on the JDBC config dialog that both properties must
be set to "foobar" by default so users will know...).

[#|2008-11-18T11:03:49.610+0100|FINE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;ClassName=com.sun.enterprise.connectors.util.ConnectionPoolObjectsUtils;MethodName=getValueFromMCF;_RequestID=e9fe27d8-1ee7-4ca8-a658-81d4fc7933d5;|com.sun.gjc.spi.DSManagedConnectionFactory.getUserName()
java.lang.NoSuchMethodException:
com.sun.gjc.spi.DSManagedConnectionFactory.getUserName()
at java.lang.Class.getMethod(Class.java:1605)
at
com.sun.enterprise.connectors.util.ConnectionPoolObjectsUtils.getValueFromMCF(ConnectionPoolObjectsUtils.java:250)
at
com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.getDefaultResourcePrincipal(ConnectorConnectionPoolAdminServiceImpl.java:623)
at
com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:1279)
at
com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:551)
at
com.sun.enterprise.connectors.ConnectorRuntime.testConnectionPool(ConnectorRuntime.java:515)
at
com.sun.enterprise.admin.mbeans.ResourcesMBean.pingConnectionPool(ResourcesMBean.java:2387)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at
com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.tools.admingui.util.JMXUtil.invoke(JMXUtil.java:119)
at com.sun.enterprise.tools.admingui.util.JMXUtil.invoke(JMXUtil.java:75)
at
com.sun.enterprise.tools.admingui.handlers.JdbcHandlers.pingJdbcConnectionPool(JdbcHandlers.java:530)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:421)
at
com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:343)
at
com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:317)
at
com.sun.jsftemplating.layout.event.CommandActionListener.invokeCommandHandlers(CommandActionListener.java:133)
at
com.sun.jsftemplating.layout.event.CommandActionListener.processAction(CommandActionListener.java:81)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:746)
at javax.faces.component.UICommand.broadcast(UICommand.java:368)
at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at
com.sun.enterprise.tools.admingui.servlet.DelayedInitFacesServlet.service(DelayedInitFacesServlet.java:89)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)

#]

[#|2008-11-18T11:03:49.641+0100|FINE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;ClassName=com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl;MethodName=getUnpooledConnection;_RequestID=e9fe27d8-1ee7-4ca8-a658-81d4fc7933d5;|using
subject: Betreff:
Principal:
Private Authentisierung: javax.resource.spi.security.PasswordCredential@0

#]

[#|2008-11-18T11:03:49.641+0100|FINE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;_RequestID=e9fe27d8-1ee7-4ca8-a658-81d4fc7933d5;|In
createManagedConnection|#]

[#|2008-11-18T11:03:49.657+0100|FINE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;_RequestID=e9fe27d8-1ee7-4ca8-a658-81d4fc7933d5;|In
equals|#]

[#|2008-11-18T11:03:49.922+0100|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;_RequestID=e9fe27d8-1ee7-4ca8-a658-81d4fc7933d5;|Connection
object cannot be null|#]

[#|2008-11-18T11:03:49.922+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;_RequestID=e9fe27d8-1ee7-4ca8-a658-81d4fc7933d5;|
java.lang.RuntimeException: javax.resource.ResourceException: Connection object
cannot be null
at com.sun.enterprise.tools.admingui.util.JMXUtil.invoke(JMXUtil.java:124)
at com.sun.enterprise.tools.admingui.util.JMXUtil.invoke(JMXUtil.java:75)
at
com.sun.enterprise.tools.admingui.handlers.JdbcHandlers.pingJdbcConnectionPool(JdbcHandlers.java:530)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:421)
at
com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:343)
at
com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:317)
at
com.sun.jsftemplating.layout.event.CommandActionListener.invokeCommandHandlers(CommandActionListener.java:133)
at
com.sun.jsftemplating.layout.event.CommandActionListener.processAction(CommandActionListener.java:81)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:746)
at javax.faces.component.UICommand.broadcast(UICommand.java:368)
at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at
com.sun.enterprise.tools.admingui.servlet.DelayedInitFacesServlet.service(DelayedInitFacesServlet.java:89)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
Caused by: javax.resource.ResourceException: Connection object cannot be null
at
com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:556)
at
com.sun.enterprise.connectors.ConnectorRuntime.testConnectionPool(ConnectorRuntime.java:515)
at
com.sun.enterprise.admin.mbeans.ResourcesMBean.pingConnectionPool(ResourcesMBean.java:2387)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at
com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.tools.admingui.util.JMXUtil.invoke(JMXUtil.java:119)
... 54 more
Caused by: javax.resource.ResourceException: Connection object cannot be null
at com.sun.gjc.spi.ManagedConnection.<init>(ManagedConnection.java:146)
at
com.sun.gjc.spi.ManagedConnectionFactory.constructManagedConnection(ManagedConnectionFactory.java:958)
at
com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:122)
at
com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:1304)
at
com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:551)
... 73 more

#]


 Comments   
Comment by Jagadish [ 18/Nov/08 ]

transferring to shalini for investigation

Comment by sanandal [ 11/Jan/09 ]

"Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1
release whose primary release driver is SailFin.
This issue will be scrubbed after this release and will be given the right
priority for the next release."

Comment by mkarg [ 27/Apr/09 ]

Increased priority to P3 according to
https://glassfish.dev.java.net/public/IssueTrackerPriority.html as this a major
usability issue: The administrator is forced to have passwords printed in clear
text inside of the configuration, what is not acceptable in production environments.

Comment by jagadesh [ 15/Oct/09 ]

Will not be fixed for V2.1.1

Comment by jagadesh [ 15/Oct/09 ]

Will not be fixed for V2.1.1

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

Comment by mkarg [ 10/Jul/12 ]

Seems to be fixed with GFv.3.1.1. At least, I cannot reproduce the problem anymore with 3.1.1.





[GLASSFISH-17573] Pool flush fails Created: 02/Nov/11  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: rkolar02 Assignee: sfelts
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File flushfail.png     PNG File flushlog.png     PNG File pooltarget.png    

 Description   

another bugrep of flush pool failure, which seems to be pretty popular issue.

This one is probably caused by not enabling pool to be flushed on domain controller.



 Comments   
Comment by Shalini [ 07/Dec/11 ]

I see that the pool Rapidshare is not initialized. This means the pool has not been used by any application till this time. Only after the pool is initialized, the flush connection pool functionality will work.

Is this still an issue?

Comment by ljnelson [ 10/Oct/12 ]

I am not the original reporter but I can reproduce this bug at will on an initialized connection pool.

I am assuming that successfully pinging the pool will initialize it.

If you ping the pool, then try to flush it it fails reliably.





[GLASSFISH-18559] DatabaseMetaData.getColumns() returns SCOPE_CATLOG instead of SCOPE_CATALOG Created: 26/Mar/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0_b29
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Dennis MacConnell Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I believe that JDBC 4.1 fixed the typo and there is a CTS test that tests for it.

Here is the output from the test:
03-26-2012 14:09:35: ***************************************
03-26-2012 14:09:35: Calling DatabaseMetaData.getColumns
03-26-2012 14:09:35: Call columnCompare for the exact match of column names
03-26-2012 14:09:35: Minimum Column Count is:24
03-26-2012 14:09:35: Comparing Column Names...
03-26-2012 14:09:35: *** Error Expected Column name:SCOPE_CATALOG, Received column:SCOPE_CATLOG
03-26-2012 14:09:35: ***************************************

I ran the test against glassfish V4 (B29) with the bundled javadb

I think this issue is fixed in a later version of Derby.
There is a reference to the issue at:
https://issues.apache.org/jira/browse/DERBY-5488






[GLASSFISH-19086] problem about enabing jdbc resource on a stopped cluster instance Created: 19/Sep/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: TangYong Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

1 Windows XP
2 gf trunk 2012/09/18



 Description   

On admin console, while enabling JDBC Resource(jdbc/__default) on cluster target, page displayed the following error message:

An error occurred during replication Failure: Command create-resource-ref failed on server instance in1: javax.ws.rs.client.ClientException: java.net.ConnectException: Connection refused: connect Failure: Command create-resource-ref failed on server instance in1: javax.ws.rs.client.ClientException: java.net.ConnectException: Connection refused: connect

However, when openning domain.xml, you will find that the following tag has been added into cluster and cluster instance's configuration.

<resource-ref ref="jdbc/__default"></resource-ref>



 Comments   
Comment by Anissa Lam [ 19/Sep/12 ]

Thats an error from the backend. Transfer to jdbc for initial evaluation.





[GLASSFISH-17260] There is an exclusive multi-threading problem in create jdbc connection pool Created: 31/Aug/11  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: jifeng Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows 32


Tags: 3_1_2-exclude

 Description   

package:appserv-core/src/com/sun/enterprise/resource/PoolManagerImpl.java(#createAndInitPool)

This method is not thread-safe,in multithreading environment ,the pool created by thread 1 will be overwritten by thread 2

Precondition:thread 1 and thread 2 use the same poolName
Steps:

  • thread 1 execute getPool(poolName) ( return null)
  • thread 1 create ResourcePool (execute ResourcePoolFactoryImpl.newInstance method)
  • thread 2 execute getPool(poolName) ( return null,because thread 1 is not execute addPool method)
  • thread 1 execute addPool( pool )( add to poolTable )
  • thread 2 execute addPool( pool ) ( add to poolTalbe and overwrite pool )
private ConcurrentHashMap poolTable;

private ResourcePool createAndInitPool(final String poolName, PoolType pt) 
        throws PoolingException 
    {
        ResourcePool pool = getPool( poolName );
	if ( pool == null ) {
            pool = ResourcePoolFactoryImpl.newInstance( poolName, pt );
	    addPool( pool );
	    try {
	        ConnectorRuntime runtime = ConnectorRuntime.getRuntime();
	        if ( runtime.getEnviron() == ConnectorConstants.SERVER ) {
	    	    if (isJdbcPool( poolName ) ) {
	    	        enableJDBCPoolMonitoring(pool, poolName);
	    	    } else {
	    	        enableConnectorConnectionPoolMonitoring(pool, poolName);
	    	    }
	        }
	    } catch( Exception e) {
	        _logger.log(Level.INFO, "poolmon.cannot_reg");
	        _logger.log(Level.FINE, "Exception while registering " +
	    	    "connection pool", e);
	    }
        if (_logger.isLoggable(Level.FINE)){
            _logger.fine( "Created connection  pool  and added it to PoolManager :" + pool);
        }
    }
	return pool;
    }

if overwrite pool,then in enableJDBCPoolMonitoring(pool, poolName) method, Register monitor MBean there will be problems。






[GLASSFISH-17259] Cannot retrieve monitoring info when the level is LOW Created: 31/Aug/11  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ito_m Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Tags: 3_1_2-exclude

 Description   

We can set the monitoring level to HIGH, LOW or OFF. My understanding is that specified values except for OFF make monitoring functionality available. However, I couldn't acquire any monitoring items for DAS on setting jdbc-connection-pool's monitoring level to LOW.

I tried to get monitoring info on LOW level in the following way. All of them resulted in failure. When switching to HIGH level, I could retrieve monitoring info successfully.

1. Admin Console
Click Server > Monitor > resources and select $

{actual_pool_name}
2. asadmin command
asadmin get --monitor server.resources.${actual_pool_name}

.*
3. REST API
HTTP GET request to http://localhost:4848/monitoring/domain/server/resources/$

{actual_pool_name}

Because the fundamental concept of monitoring levels such as LOW and HIGH should take over GFv2.x although the base implementation was replaced into flashlight framework, I'm wondering this result indicates some bugs.

I tested using GFv3.2(48897).



 Comments   
Comment by Shalini [ 14/Nov/11 ]

Need to provide feature parity with v2.x. Excluding in 3.1.2





[GLASSFISH-17254] Some monitoring values on unpooled connections are invalid Created: 30/Aug/11  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ito_m Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File GF17254.patch     Zip Archive jdbcmonitoring.zip    
Tags: 3_1_2-exclude

 Description   

[Monitoring Issues]
I detected some monitoring items indicated invalid values when using unpooled connection (pooling attribute of jdbc connection pool is false). Note that pooled/unpooled connections in the following description mean connections are pooled by the container or not according to the pooling attribute. So not refer to PooledConnection in JDBC spec.

1. numconncreated is not counted.
This item should increase every DataSource.getConnection().

2. numconnfree decreases regardless of getting/closing connection.
This item should always indicate zero because there is no pooled connection.

3. numconnused doesn't decrease when closing connection.
This item should decrease every Connection.close().

4. numconndestroyed is counted double when closing connection marked as invalid using com.sun.appserv.jdbc.DataSource.markConnectionAsBad(Connection).

5. numconnused and numconndestroyed don't decrease when leak connections are detected and the container kills them according to leak reclaim setting.

[Reasons]
The current com.sun.enterprise.resource.pool.UnpooledResource (A subclass of ConnectionPool) seems to have some issues as follows.
1. UnpooledResource.getUnenlistedResource() doesn't increment numconncreated.
numconncreated should be incremented using similar logic to ConnectionPool.createResource().

2. [When DataSource.getConnection() is called]
UnpooledResource.getUnenlistedResource() doesn't increment numconnfree, however ConnectionPool.internalGetResource() which calls the method decrements numconnfree.

[When Connection.close() is called]
As well, UnpooledResource.freeResource() doesn't increment numconnfree, however
ConnectionPool.deleteResource() which is called by the method decrements numconnfree.
numconnfree should be incremented before calling it's decrement to keep the numconnfree value as zero.

3. UnpooledResource.freeResource() doesn't decrement numconnused.
numconnused should be decremented using similar logic to ConnectionPool.freeResource().

4. When closing an invalid connection, PoolManagerImpl.putbackBadResourceToPool() is called.
Because putbackBadResourceToPool() calls UnpooledResource.freeResource() twice as follows,
ConnectionPool.deleteResource() is also called twice. Therefore numconndestroyed is counted double.
We should fix it so that deleteResource() cannot be called twice.

public void putbackBadResourceToPool(ResourceHandle h) {
...
synchronized (pool)

{ pool.resourceClosed(h);//call UnpooledResource.freeResource() in case a connection is not enlisted. h.setConnectionErrorOccurred(); pool.resourceErrorOccurred(h);//call UnpooledResource.freeResource(). }

...
}

5. ConnectionLeakDetector.poetentialConnectionLeakFound() which is in charge of processing leak connections calls ConnectionPool.reclaimConnection(), and ConnectionPool.reclaimConnection() calls DataStructure.removeResource().
Only if DataStructure detects the corresponding pooled connection successfully, numconnused and numconndestroyeddecrement decrement. However in case of UnpooledResource any pooled resources cannot always be found, these monitor values are not calculated.

[Reproducible Applications]
I attach a reproducible test application.

1. unzip the attached zip file to trunk\v2\appserv-tests\devtests directory
2. cd trunk\v2\appserv-tests\devtests\issues\poolingmonitor
3. asadmin start-domain
4. asadmin start-database
5. ant prepare
6. ant run-pool (In case of executing pooled connection tests)
ant run-unpool (In case of executing unpooled connection tests)

I used GFv3.2(r48897).



 Comments   
Comment by ito_m [ 30/Aug/11 ]

I will attach a patch of this issue later.

Comment by ito_m [ 30/Aug/11 ]

The procedure of reproducing application was insufficient.
Before procedure 6, change monitoring-level of jdbc-connection-pool into HIGH.
>asadmin enable-monitoring --modules jdbc-connection-pool=HIGH

Comment by ito_m [ 05/Sep/11 ]

The attached file is a patch for this issue.

Comment by Shalini [ 14/Nov/11 ]

Excluding this issue for 3.1.2 release as this might need lot of testing.





[GLASSFISH-17528] JDBC connection leak on JSP runtimeException Created: 29/Oct/11  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: rkolar02 Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, FreeBSD


Attachments: PNG File conf1.png     PNG File conf2.png     File connleak.war     Text File server.txt    
Tags: 3_1_2-exclude, hang, jdbc, leak

 Description   

If exception is thrown during JSP page processing then opened database connection is not returned back to pool resulting in connection leak, connection is still marked in pool as used.

This bug will make application to hang after number of exceptions thrown will reach configured pool size.

Because JDBC pool flush do not works also (another bug) then you have to restart instance every now and then to avoid server hang caused by leaked jdbc connections.



 Comments   
Comment by Shalini [ 02/Nov/11 ]

Could you attach the jdbc connection pool/resource configuration? A quick workaround is to set the attribute "connection-leak-timeout-in-seconds" to a positive non zero value and "connection-leak-reclaim" to true to reclaim the leaked connections.

Comment by Shalini [ 11/Nov/11 ]

Ideally, the application should close the connections in the finally block after usage. If not, there could be connection leaks. Please set the Leak timeout value to a non-zero number and observe from the server.log that connections are indeed leaked. To reclaim the connections, set Leak reclaim to true.

Please attach your server.log so we can figure out if there is any other issue apart from the connection leaks.

Comment by Shalini [ 11/Nov/11 ]

Reducing the priority as this is not a blocker. There is a way to detect connection leaks and reclaim them. Also, it is the responsibility of the application to close all the connections in finally block.

Comment by Shalini [ 07/Dec/11 ]

Is this still an issue? If not, could we close this one.

Comment by rkolar02 [ 09/Dec/11 ]

with connection leak detection enabled it runs so-so in day to day operation but if fails during stress testing.





[GLASSFISH-18417] JDBC RA: Inspect JDK 7 getMethods()/getDeclaredMethods() usage Created: 28/Feb/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0_b25
Fix Version/s: None

Type: Task Priority: Major
Reporter: Joe Di Pol Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Recent JDK 7 releases have altered the order of methods returned by the
Class.getMethods() and Class.getDeclaredMethods() calls. The order is
no longer stable and can change from one JVM run to the next.

This caused a number of sporadic bugs to appear during 3.1.2 development
when running with JDK 7. Those have been fixed, but further inspection
of the source has found a number of cases where we use getMethods() and
getDeclaredMethods().

Each of these cases should be visually inspected to see if the code is
making any assumptions on the order of methods returned by get*Methods().
In particular it should handle the case of multiple methods having the
same name.

For more details on what to look for and how to fix it see this document:

https://wikis.oracle.com/display/GlassFish/Method+Ordering+from+Class.getMethods

Please inspect the following files for their use of getMethods() /
getDeclaredMethods() to ensure the code is not making any assumptions
with respect to the order of methods returned. Create bugs for
any issues that need to be fixed and link them to this task. Once you
have completed inspection update this task with status and close it.

Core JDBC Resource Adapter classes
    DataSourceObjectBuilder.java





[GLASSFISH-5266] unwrap() in glassfish Created: 06/Jul/08  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: V3
Fix Version/s: not determined

Type: Task Priority: Major
Reporter: Shalini Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 5,266

 Description   

A description of unwrap() method behavior in GlassFish is needed.

In GlassFish, when unwrap is called by passing "java.sql.Connection"
interface on a connection, we return the same connection (GlassFish's
wrapper connection).
Only when a driver vendor specific interface is passed, we delegate it
to the wrapped (physical) connection.



 Comments   
Comment by Jagadish [ 06/Aug/08 ]

Assigning to Shalini. Need to be addressed for Prelude.

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-18954] Cannot create a truly global JDBC resource except by hand-editing domain.xml Created: 27/Jul/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2, 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ljnelson Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: asadmin, create-jdbc-resource

 Description   

I am using embedded GlassFish for testing. I am trying to set up a global JDBC resource using asadmin create-jdbc-resource (by way of the CommandRunner class).

If I create a resource named jdbc/foo, it is created in the java:comp/env namespace. That is not what I want.

If I try to create a resource named java:global/jdbc/foo, create-jdbc-resource will not let me do it, claiming the colon is not a permitted character. Escaping the colon has no effect.

If I try to add the resource in via the add-resources command, I (eventually) get a runtime exception at deployment:

java.lang.RuntimeException: Invalid resource : java:global/jdbc/H2Test__pm
	at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:540)
	at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:469)
	at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
	at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
	at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
	at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:155)
	at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
	at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
	at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
	at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
	at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)


 Comments   
Comment by ljnelson [ 07/Aug/12 ]

Even if this bug is not fixed, could you kindly tell me whether this should be allowed? That is, should I be able to create a JDBC resource with a java:global/ prefix using the asadmin create-jdbc-resource command?

Comment by Shalini [ 08/Aug/12 ]

Its not possible to create-jdbc-resource like "java:global/jdbc/foo" . This is not allowed. However, this functionality could be achieved by means of adding the resource-ref in web.xml and glassfish-web.xml like mentioned below :

asadmin create-jdbc-resource ... jdbc/foo

web.xml :

<resource-ref>
<res-ref-name>java:global/jdbc/foo</res-ref-name>
<res-type>javax.sql.DataSource</res-type>

glassfish-web.xml :

<resource-ref>
<res-ref-name>java:global/jdbc/foo</res-ref-name>
<jndi-name>foo</jndi-name>
</resource-ref>

Hope this helps.

Comment by Shalini [ 08/Aug/12 ]

Please refer https://blogs.oracle.com/JagadishPrasath/entry/applying_scope_for_jdbc_resources for more details.





[GLASSFISH-18700] Connection pool issue with oracle Created: 08/May/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Task Priority: Critical
Reporter: msr Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris


Attachments: Text File domain.xml related to connection pool.txt     Text File Error logs.txt     Text File server.log    

 Description   

Hi Team ,

while creating oracle connection pool in glassfish v2.1.1 getting the below error

sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=23;_ThreadName=httpWorkerThread-8001-4;_RequestID=55bd50e7-6738-4444-a558-7
8b0f9ad0d8b;|
java.lang.RuntimeException: javax.resource.ResourceException: 4
at com.sun.enterprise.tools.admingui.util.JMXUtil.invoke(JMXUtil.java:124)
at com.sun.enterprise.tools.admingui.util.JMXUtil.invoke(JMXUtil.java:75)
at com.sun.enterprise.tools.admingui.handlers.JdbcHandlers.pingJdbcConnectionPool(JdbcHandlers.java:530)
at sun.reflect.GeneratedMethodAccessor2055.invoke(Unknown Source)

Please find the attached logs for more information.

your help is highly appreciated .



 Comments   
Comment by Shalini [ 08/May/12 ]

Could you please attach the domain.xml configuration for this jdbc connection pool? And the full server.log would help as I am unable to see the actual cause of the exception.

Comment by Shalini [ 08/May/12 ]

Could you try specifying something like jdbc:oracle:thin:@DB_HOSTNAME:1521:DATABASE_NAME for the URL? Looks like URL property is erroneous.

Comment by msr [ 08/May/12 ]

i tried the url which mentioned the above , stilll getting same issue

Comment by gtulasidhar [ 28/May/12 ]

Hi Shalini I am also getting same error,if possible escalate to next level.
your help is highly appreciated .

Thanks,
Tulasidhar

Comment by Shalini [ 29/May/12 ]

Please post the exact domain.xml configuration of the jdbc connection pool you are trying to use.

Comment by gtulasidhar [ 07/Sep/12 ]

below is the domain.xml.

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds=
"10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="table" datasource-classname="oracle.jdbc.pool.OracleDataSource" fail-al
l-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="true" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-conne
ction-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="test_ds" non-transactional-connection
s="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" validation-t
able-name="DUAL" wrap-jdbc-objects="false">
<property name="DataSourceName" value="OracleDataSource"/>
<property name="ImplicitCachingEnabled" value="false"/>
<property name="NetworkProtocol" value="tcp"/>
<property name="Password" value="ehelp"/>
<property name="LoginTimeout" value="0"/>
<property name="URL" value="jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)) )(CONNECT_DATA =(SERV
ICE_NAME = test) ) )"/>
<property name="User" value="test"/>
<property name="ExplicitCachingEnabled" value="false"/>
<property name="PortNumber" value="0"/>
<property name="MaxStatements" value="0"/>
</jdbc-connection-pool>





[GLASSFISH-18914] [PERF] Database statement caching parameters no longer honored Created: 17/Jul/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0_b41
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Scott Oaks Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: PSRBUG

 Description   

Sometime after build 39, performance of JDBC calls from our servlets has severely regressed. Looking at the database logs, the issue is with statement caching: in build 39 and prior, statements were effectively cached and the database spent no time parsing statements. In build 41 and following builds, the database spends a huge amount of time parsing the statements. [No data is available from build 40.]

The database configuration in all cases looks like this:
<jdbc-connection-pool datasource-classname="oracle.jdbc.pool.OracleDataSource" max-pool-size="200" steady-pool-size="200" name="tpcw">
<property name="URL" value="jdbc:oracle:thin:@perf-x4600-1:1521:benchdb"></property>
<property name="Password" value="tpcw"></property>
<property name="User" value="tpcw"></property>
<property name="ImplicitCachingEnabled" value="true"></property>
<property name="MaxStatements" value="200"></property>
</jdbc-connection-pool>

So I guess the most likely thing is that the caching properties here are not being passed to the oracle driver correctly, though I guess also some change in the statement wrappers in glassfish could also be affecting this as well. The application use is basic JDBC calls:

con = datasource.getConnection(); // datasource retrieved via JDNI lookup
pstmt = con.prepareStatement(...static final string...);
pstmt.set* calls;
rs = pstmt.executeQuery();
.. process rs ..
pstmt.close();
con.close();

We do not see this change in our JPA-based tests; only with the servlet that uses JDBC.






[GLASSFISH-18442] ClassNotFoundException in GlassFish 3.1.2 Created: 02/Mar/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2, 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: steve_taylor Assignee: sfelts
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64, Java 7u1, Maven 2



 Description   

I have a Java EE 6 (JSF/EJB/JPA/JAX-RS) app that runs in 3.1.1 but fails in 3.1.2. Specifically, it cannot load the JDBC drivers for PostgreSQL. The app is built using Maven 2.

Stack trace:

java.lang.ClassNotFoundException: org.postgresql.jdbc4.Jdbc4PreparedStatement
    at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:782)
    at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

It has been suggested to me that I add the PostgreSQL drivers to the GlassFish installation directory. However, I have definitely not had to do that with 3.1.1. If that is now the case for 3.1.2, then it is a major backward step. (I blow away the GlassFish installation on a regular basis, replacing it with a clean one each time, so I know for sure I'm not adding the PostgreSQL JDBC drivers manually.)



 Comments   
Comment by Mischa81 [ 05/Dec/12 ]

I'm facing exactly the same issue on version 3.1.2.2. (build 5). In my opinion bundling the PostgreSQL-driver with the EAR is common practice. Otherwise updating the driver implies multiple manual update on all the servers used in the project (dev, test, prod...).

Comment by shreedhar_ganapathy [ 13/Dec/12 ]

Reassigning to JDBC component, and to Michael so as to reassign to the right engineer.





[GLASSFISH-19218] Error Creating Oracle data-source on GlassFish 4 Build 59 Created: 23/Oct/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0_b59
Fix Version/s: None

Type: Bug Priority: Major
Reporter: tware Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP - 32 bit. GlassFish installed from zip file. Oracle 11.2.0.2 DB.



 Description   

We are trying to create a datasource that uses Oracle in GlassFish 4 build 59. We put the JDBC driver in <domain>/lib/ext.

Using defaults when setting up the Oracle data-source.

javax.sql.DataSource

oracle.jdbc.pool.OracleDataSource -> is definitely in our jdbc jar

On Build 55 this succeeds.

In Build 59, when I try to ping the DB in this config, I get:

Ping Connection Pool failed for ottvm035. Class name is wrong or classpath is not set for : oracle.jdbc.pool.OracleDataSource Please check the server.log for more details.

The logged exception is:

[#|2012-10-23T14:35:22.869-0400|SEVERE|44.0|javax.enterprise.resource.resourceadapter.com.sun.gjc.util|_ThreadID=16;_ThreadName=admin-listener(3);_TimeMillis=1351017322869;_LevelValue=1000;_MessageID=jdbc.exc_cnfe_ds;|RAR5099 : Wrong class name or classpath for Datasource Object
java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:285)
at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:114)
at com.sun.gjc.spi.ManagedConnectionFactoryImpl.getDataSource(ManagedConnectionFactoryImpl.java:1300)
at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:163)
at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:102)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:696)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:425)
at com.sun.enterprise.connectors.ConnectorRuntime.pingConnectionPool(ConnectorRuntime.java:1143)
at org.glassfish.connectors.admin.cli.PingConnectionPool.execute(PingConnectionPool.java:143)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:549)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:570)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1450)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:118)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1760)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1710)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:260)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:249)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:240)
at org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommand(TemplateExecCommand.java:150)
at org.glassfish.admin.rest.resources.TemplateCommandGetResource.processGet(TemplateCommandGetResource.java:77)
at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.jersey.server.model.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:80)
at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:107)
at org.glassfish.jersey.server.model.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:146)
at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:80)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:304)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:299)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:90)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:198)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:316)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:174)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:761)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:306)
at org.glassfish.admin.rest.adapter.RestAdapter$1.service(RestAdapter.java:327)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:189)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispatch(HK2Dispatcher.java:113)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:236)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:175)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:781)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:578)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:558)
at java.lang.Thread.run(Thread.java:662)

#]


 Comments   
Comment by shreedhar_ganapathy [ 13/Dec/12 ]

-> JDBC
-> Michael for appropriate reassigning





[GLASSFISH-19019] Unable to Create/Edit JDBC Connection Pool Properties Created: 19/Aug/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0_b50_ms4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: dbeltz Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64bit, Mysql 5.5 with GlassFish Server Open Source Edition 4.0 (build 50) C:\glassfish3\glassfish\domains\domain1\lib\ext\mysql-connector-java-5.1.21-bin.jar



 Description   

I have had no problems with glassfish 3.1 and figured I would start working with 4.0 on a new application I am building. Removed Glassfish 3.1 and Installed 4.0 B50 and can not create my database connector. The same connector I had under 3.1. Mysql has not changed nor has my apache.

When I attempt to create a pool I get "An error has occurred"

with a log of

Log Entry Detail

Timestamp
Aug 19, 2012 14:41:23.946 Aug 19, 2012 14:40:47.733 Aug 19, 2012 14:40:31.820 Aug 19, 2012 14:40:31.490 Aug 19, 2012 14:40:24.515 Aug 19, 2012 14:40:24.510 Aug 19, 2012 14:40:24.398 Aug 19, 2012 14:40:10.555 Aug 19, 2012 14:40:08.558 Aug 19, 2012 14:40:08.437 Aug 19, 2012 14:40:06.922 Aug 19, 2012 14:40:06.795 Aug 19, 2012 14:39:59.652 Aug 19, 2012 14:39:59.650 Aug 19, 2012 14:39:59.571 Aug 19, 2012 14:39:26.819 Aug 19, 2012 14:39:26.553 Aug 19, 2012 14:39:18.660 Aug 19, 2012 14:39:18.653 Aug 19, 2012 14:39:18.537 Aug 19, 2012 14:39:05.670 Aug 19, 2012 14:39:03.211 Aug 19, 2012 14:39:03.053 Aug 19, 2012 14:39:00.194 Aug 19, 2012 14:38:55.399 Aug 19, 2012 14:38:55.252 Aug 19, 2012 14:37:24.704 Aug 19, 2012 14:37:24.374 Aug 19, 2012 14:37:05.382 Aug 19, 2012 14:37:05.087 Aug 19, 2012 14:36:52.451 Aug 19, 2012 14:36:52.140 Aug 19, 2012 14:36:39.945 Aug 19, 2012 14:36:39.689 Aug 19, 2012 14:36:27.217 Aug 19, 2012 14:36:26.943 Aug 19, 2012 14:36:19.718 Aug 19, 2012 14:36:19.712 Aug 19, 2012 14:36:19.537 Aug 19, 2012 14:35:58.770
Log Level
WARNING
Logger
javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context org.glassfish.admingui org.glassfish.jersey.server.ApplicationHandler javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context org.glassfish.admingui org.glassfish.jersey.server.ApplicationHandler javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context org.glassfish.admingui org.glassfish.jersey.server.ApplicationHandler javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.system.container.web.com.sun.enterprise.web javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context javax.enterprise.resource.webcontainer.jsf.context
Name-Value Pairs
_ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=70;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=52;_ThreadName=Thread-2; _ThreadID=611;_ThreadName=Thread-2;
Record Number
346 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309 308 307
Message ID
JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091 JSF1091
Complete Message
No mime type could be found for file /common/logViewer/logEntryDetail.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logEntryDetail.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. RestResponse.getResponse() gives FAILURE. endpoint = 'http://localhost:4949/management/domain/resources/jdbc-connection-pool/premiercals/property.json'; attrs = '[

{"description":"","name":"user","value":"premiercals"}

]' Exception obtaining parameters org.glassfish.jersey.internal.ProcessingException: Exception obtaining parameters at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:90) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(AbstractJavaResourceMethodDispatcherProvider.java:145) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(AbstractJavaResourceMethodDispatcherProvider.java:219) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:262) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:82) at org.glassfish.jersey.process.internal.RequestInvoker$AcceptingInvoker.apply(RequestInvoker.java:241) at org.glassfish.jersey.process.internal.AsyncInflectorAdapter.apply(AsyncInflectorAdapter.java:156) at org.glassfish.jersey.process.internal.RequestInvoker$2.run(RequestInvoker.java:188) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:283) at org.glassfish.jersey.process.internal.RequestInvoker$3.run(RequestInvoker.java:201) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:44) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:41) at org.glassfish.jersey.process.internal.RequestInvoker.apply(RequestInvoker.java:197) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:752) at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:298) at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:203) at com.sun.enterprise.v3.server.HK2Dispatcher.dispatch(HK2Dispatcher.java:113) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:236) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:169) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:815) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:567) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:547) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class at org.glassfish.admin.rest.utils.Util.getFirstGenericType(Util.java:527) at org.glassfish.admin.rest.readers.JsonPropertyListReader.isReadable(JsonPropertyListReader.java:72) at org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(MessageBodyFactory.java:466) at org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(MessageBodyFactory.java:442) at org.glassfish.jersey.message.internal.MessageBodyFactory.getMessageBodyReader(MessageBodyFactory.java:404) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:194) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:158) at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:612) at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:901) at org.glassfish.jersey.server.ContainerRequest.readEntity(ContainerRequest.java:231) at org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.get(EntityParamValueFactoryProvider.java:86) at org.glassfish.jersey.server.internal.inject.AbstractHttpContextValueFactory.provide(AbstractHttpContextValueFactory.java:65) at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:80) ... 38 more No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolAdvance.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolAdvance.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. RestResponse.getResponse() gives FAILURE. endpoint = 'http://localhost:4949/management/domain/resources/jdbc-connection-pool/premiercals/property.json'; attrs = '[

{"description":"","name":"user","value":"premiercals"}

]' Exception obtaining parameters org.glassfish.jersey.internal.ProcessingException: Exception obtaining parameters at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:90) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(AbstractJavaResourceMethodDispatcherProvider.java:145) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(AbstractJavaResourceMethodDispatcherProvider.java:219) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:262) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:82) at org.glassfish.jersey.process.internal.RequestInvoker$AcceptingInvoker.apply(RequestInvoker.java:241) at org.glassfish.jersey.process.internal.AsyncInflectorAdapter.apply(AsyncInflectorAdapter.java:156) at org.glassfish.jersey.process.internal.RequestInvoker$2.run(RequestInvoker.java:188) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:283) at org.glassfish.jersey.process.internal.RequestInvoker$3.run(RequestInvoker.java:201) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:44) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:41) at org.glassfish.jersey.process.internal.RequestInvoker.apply(RequestInvoker.java:197) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:752) at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:298) at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:203) at com.sun.enterprise.v3.server.HK2Dispatcher.dispatch(HK2Dispatcher.java:113) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:236) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:169) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:815) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:567) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:547) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class at org.glassfish.admin.rest.utils.Util.getFirstGenericType(Util.java:527) at org.glassfish.admin.rest.readers.JsonPropertyListReader.isReadable(JsonPropertyListReader.java:72) at org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(MessageBodyFactory.java:466) at org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(MessageBodyFactory.java:442) at org.glassfish.jersey.message.internal.MessageBodyFactory.getMessageBodyReader(MessageBodyFactory.java:404) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:194) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:158) at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:612) at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:901) at org.glassfish.jersey.server.ContainerRequest.readEntity(ContainerRequest.java:231) at org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.get(EntityParamValueFactoryProvider.java:86) at org.glassfish.jersey.server.internal.inject.AbstractHttpContextValueFactory.provide(AbstractHttpContextValueFactory.java:65) at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:80) ... 38 more No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. RestResponse.getResponse() gives FAILURE. endpoint = 'http://localhost:4949/management/domain/resources/jdbc-connection-pool/premiercals/property.json'; attrs = '[

{"description":"","name":"user","value":"premiercals"}

]' Exception obtaining parameters org.glassfish.jersey.internal.ProcessingException: Exception obtaining parameters at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:90) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(AbstractJavaResourceMethodDispatcherProvider.java:145) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(AbstractJavaResourceMethodDispatcherProvider.java:219) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:262) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:82) at org.glassfish.jersey.process.internal.RequestInvoker$AcceptingInvoker.apply(RequestInvoker.java:241) at org.glassfish.jersey.process.internal.AsyncInflectorAdapter.apply(AsyncInflectorAdapter.java:156) at org.glassfish.jersey.process.internal.RequestInvoker$2.run(RequestInvoker.java:188) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:283) at org.glassfish.jersey.process.internal.RequestInvoker$3.run(RequestInvoker.java:201) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:44) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:41) at org.glassfish.jersey.process.internal.RequestInvoker.apply(RequestInvoker.java:197) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:752) at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:298) at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:203) at com.sun.enterprise.v3.server.HK2Dispatcher.dispatch(HK2Dispatcher.java:113) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:236) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:169) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:815) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:567) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:547) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class at org.glassfish.admin.rest.utils.Util.getFirstGenericType(Util.java:527) at org.glassfish.admin.rest.readers.JsonPropertyListReader.isReadable(JsonPropertyListReader.java:72) at org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(MessageBodyFactory.java:466) at org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(MessageBodyFactory.java:442) at org.glassfish.jersey.message.internal.MessageBodyFactory.getMessageBodyReader(MessageBodyFactory.java:404) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:194) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:158) at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:612) at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:901) at org.glassfish.jersey.server.ContainerRequest.readEntity(ContainerRequest.java:231) at org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.get(EntityParamValueFactoryProvider.java:86) at org.glassfish.jersey.server.internal.inject.AbstractHttpContextValueFactory.provide(AbstractHttpContextValueFactory.java:65) at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:80) ... 38 more No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolEdit.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolEdit.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /jdbc/jdbcConnectionPoolProperty.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logViewer.jsp. To resolve this, add a mime-type mapping to the applications web.xml. StandardWrapperValve[FacesServlet]: PWC1406: Servlet.service() for servlet FacesServlet threw exception java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:89) at sun.nio.ch.IOUtil.write(IOUtil.java:46) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.flushByteBuffer(TCPNIOTransport.java:1232) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.writeGathered(TCPNIOTransport.java:1177) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.write(TCPNIOTransport.java:1070) at org.glassfish.grizzly.nio.transport.TCPNIOTemporarySelectorWriter.writeNow0(TCPNIOTemporarySelectorWriter.java:65) at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write0(TemporarySelectorWriter.java:167) at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:118) at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:77) at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:58) at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleWrite(TCPNIOTransportFilter.java:130) at org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(TransportFilter.java:191) at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:652) at org.glassfish.grizzly.http.server.io.OutputBuffer.writeContentBuffer0(OutputBuffer.java:867) at org.glassfish.grizzly.http.server.io.OutputBuffer.write(OutputBuffer.java:602) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:352) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:339) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207) at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.flushAttributes(HtmlResponseWriter.java:1168) at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.closeStartIfNecessary(HtmlResponseWriter.java:1083) at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlResponseWriter.java:691) at com.sun.webui.jsf.renderkit.html.StaticTextRenderer.renderEnd(StaticTextRenderer.java:153) at com.sun.webui.jsf.renderkit.html.AbstractRenderer.encodeEnd(AbstractRenderer.java:225) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:558) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:243) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:201) at com.sun.jsftemplating.layout.descriptors.LayoutForEach.encode(LayoutForEach.java:178) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:201) at com.sun.jsftemplating.layout.descriptors.LayoutForEach.encode(LayoutForEach.java:178) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutDefinition.encode(LayoutDefinition.java:250) at com.sun.jsftemplating.renderer.TemplateRenderer.encodeEnd(TemplateRenderer.java:139) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99) at com.sun.webui.jsf.renderkit.html.PropertyRenderer.renderPropertyComponents(PropertyRenderer.java:195) at com.sun.webui.jsf.renderkit.html.PropertyRenderer.encodeEnd(PropertyRenderer.java:156) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99) at com.sun.webui.jsf.renderkit.html.PropertySheetSectionRenderer.renderProperties(PropertySheetSectionRenderer.java:184) at com.sun.webui.jsf.renderkit.html.PropertySheetSectionRenderer.renderPropertySheetSection(PropertySheetSectionRenderer.java:143) at com.sun.webui.jsf.renderkit.html.PropertySheetSectionRenderer.encodeEnd(PropertySheetSectionRenderer.java:86) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99) at com.sun.webui.jsf.renderkit.html.PropertySheetRenderer.renderPropertySheetSections(PropertySheetRenderer.java:164) at com.sun.webui.jsf.renderkit.html.PropertySheetRenderer.encodeEnd(PropertySheetRenderer.java:114) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854) at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) at com.sun.webui.jsf.renderkit.html.ContentPageTitleRenderer.encodeChildren(ContentPageTitleRenderer.java:169) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:551) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:243) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutDefinition.encode(LayoutDefinition.java:246) at com.sun.jsftemplating.layout.LayoutViewHandler.renderView(LayoutViewHandler.java:683) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:202) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:642) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1593) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:339) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:283) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:660) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:600) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:337) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:240) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:230) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:169) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:815) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:567) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:547) at java.lang.Thread.run(Thread.java:722) Exception when handling error trying to reset the response. java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:89) at sun.nio.ch.IOUtil.write(IOUtil.java:46) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.flushByteBuffer(TCPNIOTransport.java:1232) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.writeGathered(TCPNIOTransport.java:1177) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.write(TCPNIOTransport.java:1070) at org.glassfish.grizzly.nio.transport.TCPNIOTemporarySelectorWriter.writeNow0(TCPNIOTemporarySelectorWriter.java:65) at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write0(TemporarySelectorWriter.java:167) at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:118) at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:77) at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter.write(TemporarySelectorWriter.java:58) at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleWrite(TCPNIOTransportFilter.java:130) at org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(TransportFilter.java:191) at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:652) at org.glassfish.grizzly.http.server.io.OutputBuffer.writeContentBuffer0(OutputBuffer.java:867) at org.glassfish.grizzly.http.server.io.OutputBuffer.write(OutputBuffer.java:602) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:352) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:339) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207) at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.flushAttributes(HtmlResponseWriter.java:1168) at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.closeStartIfNecessary(HtmlResponseWriter.java:1083) at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlResponseWriter.java:691) at com.sun.webui.jsf.renderkit.html.StaticTextRenderer.renderEnd(StaticTextRenderer.java:153) at com.sun.webui.jsf.renderkit.html.AbstractRenderer.encodeEnd(AbstractRenderer.java:225) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:558) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:243) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:201) at com.sun.jsftemplating.layout.descriptors.LayoutForEach.encode(LayoutForEach.java:178) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:201) at com.sun.jsftemplating.layout.descriptors.LayoutForEach.encode(LayoutForEach.java:178) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutDefinition.encode(LayoutDefinition.java:250) at com.sun.jsftemplating.renderer.TemplateRenderer.encodeEnd(TemplateRenderer.java:139) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99) at com.sun.webui.jsf.renderkit.html.PropertyRenderer.renderPropertyComponents(PropertyRenderer.java:195) at com.sun.webui.jsf.renderkit.html.PropertyRenderer.encodeEnd(PropertyRenderer.java:156) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99) at com.sun.webui.jsf.renderkit.html.PropertySheetSectionRenderer.renderProperties(PropertySheetSectionRenderer.java:184) at com.sun.webui.jsf.renderkit.html.PropertySheetSectionRenderer.renderPropertySheetSection(PropertySheetSectionRenderer.java:143) at com.sun.webui.jsf.renderkit.html.PropertySheetSectionRenderer.encodeEnd(PropertySheetSectionRenderer.java:86) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99) at com.sun.webui.jsf.renderkit.html.PropertySheetRenderer.renderPropertySheetSections(PropertySheetRenderer.java:164) at com.sun.webui.jsf.renderkit.html.PropertySheetRenderer.encodeEnd(PropertySheetRenderer.java:114) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854) at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) at com.sun.webui.jsf.renderkit.html.ContentPageTitleRenderer.encodeChildren(ContentPageTitleRenderer.java:169) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:551) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:243) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutDefinition.encode(LayoutDefinition.java:246) at com.sun.jsftemplating.layout.LayoutViewHandler.renderView(LayoutViewHandler.java:683) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:202) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:642) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1593) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:339) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:283) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:660) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:600) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:337) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:240) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:230) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:169) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:815) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:567) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:547) at java.lang.Thread.run(Thread.java:722) No mime type could be found for file /common/logViewer/logEntryDetail.jsp. To resolve this, add a mime-type mapping to the applications web.xml. No mime type could be found for file /common/logViewer/logEntryDetail.jsp. To resolve this, add a mime-type mapping to the applications web.xml.






[GLASSFISH-19056] Deadlock with failing connection pool and associate-with-thread="true" Created: 05/Sep/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1, 3.1.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ancoron Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When configuring a JDBC connection pool with attribute associate-with-thread="true" and then failing stopping the DBMS ungracefully the following thread deadlock can appear if the container is under parallel load:

Found one Java-level deadlock:
=============================
"TP-Processor68":
  waiting to lock monitor 0x0000000041dd4f68 (object 0x0000000463c52d60, a java.lang.Object),
  which is held by "TP-Processor42"
"TP-Processor42":
  waiting to lock monitor 0x000000004363e490 (object 0x0000000403ae9318, a java.util.ArrayList),
  which is held by "TP-Processor68"

The offending thread stacks:

"TP-Processor68":
        at com.sun.enterprise.resource.pool.AssocWithThreadResourcePool.deleteResource(AssocWithThreadResourcePool.java:296)
        - waiting to lock <0x0000000463c52d60> (a java.lang.Object)
        at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.removeAll(ListDataStructure.java:213)
        - locked <0x0000000403ae8d78> (a java.util.ArrayList)
        - locked <0x0000000403ae9318> (a java.util.ArrayList)
        at com.sun.enterprise.resource.pool.ConnectionPool.emptyPool(ConnectionPool.java:1254)
        at com.sun.enterprise.resource.pool.ConnectionPool.doFailAllConnectionsProcessing(ConnectionPool.java:1135)
        at com.sun.enterprise.resource.pool.ConnectionPool.resourceErrorOccurred(ConnectionPool.java:1091)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:417)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceErrorOccurred(PoolManagerImpl.java:389)
        at com.sun.enterprise.resource.allocator.ConnectorAllocator$ConnectionListenerImpl.connectionErrorOccurred(ConnectorAllocator.java:108)
        at com.sun.gjc.spi.ManagedConnection.connectionErrorOccurred(ManagedConnection.java:792)
        at com.sun.gjc.spi.ManagedConnectionFactory.getInvalidConnections(ManagedConnectionFactory.java:280)
        at com.sun.enterprise.resource.allocator.AbstractConnectorAllocator.getInvalidConnections(AbstractConnectorAllocator.java:111)
        at com.sun.enterprise.resource.allocator.AbstractConnectorAllocator.isConnectionValid(AbstractConnectorAllocator.java:122)
        at com.sun.enterprise.resource.pool.ConnectionPool.isConnectionValid(ConnectionPool.java:662)
        at com.sun.enterprise.resource.pool.AssocWithThreadResourcePool.prefetch(AssocWithThreadResourcePool.java:130)
        - locked <0x00000004644b2cc0> (a java.lang.Object)
        at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:520)
        at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:242)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:167)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:335)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:304)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:110)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:73)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:36)
        at org.activiti.engine.impl.db.DbSqlSession.<init>(DbSqlSession.java:86)
        at org.activiti.engine.impl.db.DbSqlSessionFactory.openSession(DbSqlSessionFactory.java:80)
        at org.activiti.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:179)
        at org.activiti.engine.impl.persistence.AbstractManager.getSession(AbstractManager.java:56)
        at org.activiti.engine.impl.persistence.AbstractManager.getDbSqlSession(AbstractManager.java:52)
        at org.activiti.engine.impl.persistence.entity.TaskManager.findTasksByQueryCriteria(TaskManager.java:91)
        at org.activiti.engine.impl.TaskQueryImpl.executeList(TaskQueryImpl.java:368)
        at org.activiti.engine.impl.AbstractQuery.execute(AbstractQuery.java:138)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
        at org.activiti.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:59)
        at org.activiti.engine.impl.interceptor.JtaRetryInterceptor.skipRetry(JtaRetryInterceptor.java:53)
        at org.activiti.engine.impl.interceptor.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:46)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.AbstractQuery.list(AbstractQuery.java:112)
        at com.profitbricks.process.impl.BusinessProcessManagementServiceImpl$1.call(BusinessProcessManagementServiceImpl.java:124)
        at com.profitbricks.process.impl.BusinessProcessManagementServiceImpl$1.call(BusinessProcessManagementServiceImpl.java:120)
        at com.profitbricks.process.impl.BusinessProcessManagementServiceImpl.execute(BusinessProcessManagementServiceImpl.java:361)
        at com.profitbricks.process.impl.BusinessProcessManagementServiceImpl.getUserTasksByTaskVariable(BusinessProcessManagementServiceImpl.java:129)
        at sun.reflect.GeneratedMethodAccessor441.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5367)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
        at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:371)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5339)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5327)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
        at $Proxy262.getUserTasksByTaskVariable(Unknown Source)
        at com.profitbricks.provisioning.impl.ws.ProvisioningServiceWS.waitForProcess(ProvisioningServiceWS.java:114)
        at com.profitbricks.provisioning.impl.ws.ProvisioningServiceWS.addInfo(ProvisioningServiceWS.java:84)
        at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.glassfish.webservices.InstanceResolverImpl$1.invoke(InstanceResolverImpl.java:143)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:150)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:261)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:100)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        - locked <0x0000000463c93748> (a com.sun.xml.ws.api.pipe.Fiber)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:116)
        at org.glassfish.webservices.MonitoringPipe.process(MonitoringPipe.java:142)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        - locked <0x0000000463c93748> (a com.sun.xml.ws.api.pipe.Fiber)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:116)
        at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:212)
        at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:144)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        - locked <0x0000000463c93748> (a com.sun.xml.ws.api.pipe.Fiber)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:314)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:608)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:259)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:162)
        at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:145)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:323)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:232)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:337)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:817)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:746)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:939)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:662)
"TP-Processor42":
        at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.removeAll(ListDataStructure.java:208)
        - waiting to lock <0x0000000403ae9318> (a java.util.ArrayList)
        at com.sun.enterprise.resource.pool.ConnectionPool.emptyPool(ConnectionPool.java:1254)
        at com.sun.enterprise.resource.pool.ConnectionPool.doFailAllConnectionsProcessing(ConnectionPool.java:1135)
        at com.sun.enterprise.resource.pool.ConnectionPool.resourceErrorOccurred(ConnectionPool.java:1091)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:417)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceErrorOccurred(PoolManagerImpl.java:389)
        at com.sun.enterprise.resource.allocator.ConnectorAllocator$ConnectionListenerImpl.connectionErrorOccurred(ConnectorAllocator.java:108)
        at com.sun.gjc.spi.ManagedConnection.connectionErrorOccurred(ManagedConnection.java:792)
        at com.sun.gjc.spi.ManagedConnectionFactory.getInvalidConnections(ManagedConnectionFactory.java:280)
        at com.sun.enterprise.resource.allocator.AbstractConnectorAllocator.getInvalidConnections(AbstractConnectorAllocator.java:111)
        at com.sun.enterprise.resource.allocator.AbstractConnectorAllocator.isConnectionValid(AbstractConnectorAllocator.java:122)
        at com.sun.enterprise.resource.pool.ConnectionPool.isConnectionValid(ConnectionPool.java:662)
        at com.sun.enterprise.resource.pool.AssocWithThreadResourcePool.prefetch(AssocWithThreadResourcePool.java:130)
        - locked <0x0000000463c52d60> (a java.lang.Object)
        at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:520)
        at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:242)
        at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:167)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:335)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:304)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:110)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:73)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:36)
        at org.activiti.engine.impl.db.DbSqlSession.<init>(DbSqlSession.java:86)
        at org.activiti.engine.impl.db.DbSqlSessionFactory.openSession(DbSqlSessionFactory.java:80)
        at org.activiti.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:179)
        at org.activiti.engine.impl.persistence.AbstractManager.getSession(AbstractManager.java:56)
        at org.activiti.engine.impl.persistence.AbstractManager.getDbSqlSession(AbstractManager.java:52)
        at org.activiti.engine.impl.persistence.entity.TaskManager.findTasksByQueryCriteria(TaskManager.java:91)
        at org.activiti.engine.impl.TaskQueryImpl.executeList(TaskQueryImpl.java:368)
        at org.activiti.engine.impl.AbstractQuery.execute(AbstractQuery.java:138)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
        at org.activiti.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:59)
        at org.activiti.engine.impl.interceptor.JtaRetryInterceptor.skipRetry(JtaRetryInterceptor.java:53)
        at org.activiti.engine.impl.interceptor.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:46)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.AbstractQuery.list(AbstractQuery.java:112)
        at com.profitbricks.process.impl.BusinessProcessManagementServiceImpl$1.call(BusinessProcessManagementServiceImpl.java:124)
        at com.profitbricks.process.impl.BusinessProcessManagementServiceImpl$1.call(BusinessProcessManagementServiceImpl.java:120)
        at com.profitbricks.process.impl.BusinessProcessManagementServiceImpl.execute(BusinessProcessManagementServiceImpl.java:361)
        at com.profitbricks.process.impl.BusinessProcessManagementServiceImpl.getUserTasksByTaskVariable(BusinessProcessManagementServiceImpl.java:129)
        at sun.reflect.GeneratedMethodAccessor441.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5367)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
        at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:371)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5339)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5327)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
        at $Proxy262.getUserTasksByTaskVariable(Unknown Source)
        at com.profitbricks.provisioning.impl.ws.ProvisioningServiceWS.waitForProcess(ProvisioningServiceWS.java:114)
        at com.profitbricks.provisioning.impl.ws.ProvisioningServiceWS.addInfo(ProvisioningServiceWS.java:84)
        at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.glassfish.webservices.InstanceResolverImpl$1.invoke(InstanceResolverImpl.java:143)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:150)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:261)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:100)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        - locked <0x000000046439ce68> (a com.sun.xml.ws.api.pipe.Fiber)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:116)
        at org.glassfish.webservices.MonitoringPipe.process(MonitoringPipe.java:142)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        - locked <0x000000046439ce68> (a com.sun.xml.ws.api.pipe.Fiber)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:116)
        at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:212)
        at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:144)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        - locked <0x000000046439ce68> (a com.sun.xml.ws.api.pipe.Fiber)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:314)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:608)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:259)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:162)
        at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:145)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:323)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:232)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:337)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:817)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:746)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:939)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:662)


Although the thread stacks are from a GlassFish 3.1 installation I see the same problem at least in GlassFish 3.1.2.



 Comments   
Comment by shreedhar_ganapathy [ 13/Dec/12 ]

-> Michael Chen for appropriate reassignment and triaging





[GLASSFISH-19615] GlassFish JDBC resource should make it possible to setup Properties attributes. Created: 01/Feb/13  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gfuser9999 Assignee: sfelts
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Config: GlassFish 2.1.x, GlassFish 3.x and possible BG
OS: Any
Database: Oracle RAC and any Database API have setXXXX(Properties p)


Tags: FCF, Fast, JDBC, Oracle, Properties, RAC, UCP, connection, failover, injection, setter

 Comments   
Comment by gfuser9999 [ 01/Feb/13 ]

Configuration: GFv211 and all GFv31x and also BG (currently)
Problem:

  • For Oracle RAC Connection pool, one will need to use Fast Connection
    Failover or UCP Connection pool for Oracle 12c HA.
    However, w/o the possible to do

For FCF
http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/jdbc/pool/OracleDataSource.html
setConnectionCacheProperties(java.util.Properties cp)
[see http://keremerkan.net/posts/supporting-oracle-fcf-in-tomcat/
example for the ConnectionCacheProperties

or for UCP
http://docs.oracle.com/cd/E18283_01/java.112/e12826/oracle/ucp/jdbc/PoolDataSource.html to set the UCP pool
But this is doable in Tomcat for passing ConnectionProperties.

com.sun.gjc.util.MethodExecutor.java (diff)
--- MethodExecutor.java-orig	Fri Feb  1 16:40:54 2013
+++ MethodExecutor.java	Fri Feb  1 17:26:49 2013
@@ -48,6 +48,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Vector;
+import java.util.Properties;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -67,6 +68,8 @@
 
     private boolean debug = false;
 
+    private final String newline = System.getProperty("line.separator");
+
     private static StringManager sm = StringManager.getManager(
             DataSourceObjectBuilder.class);
 
@@ -206,6 +209,11 @@
                 return Boolean.valueOf(parameter);
             }
 
+            if (typeName.equals("java.util.Properties")) {
+                Properties p = stringToProperties(parameter);
+                if (p!= null) return p;
+            }
+
             return parameter;
         } catch (NumberFormatException nfe) {
             _logger.log(Level.SEVERE, "jdbc.exc_nfe", parameter);
@@ -238,6 +246,48 @@
         }
         return returnValue;
     }
+
+    private Properties stringToProperties(String parameter)
+    {
+         if (parameter == null) return null;
+         String s = parameter.trim();
+         if (!((s.startsWith("(") && s.endsWith(")")))) {
+            return null; // not a "( .... )" syntax
+         }
+         s = s.substring(1,s.length()-2);
+         s = s.replaceAll("(?<!\\\\),",newline);
+
+         Properties p = new Properties();
+         Properties prop = new Properties();
+         try {
+            p.load(new java.io.StringBufferInputStream(s));
+         } catch (java.io.IOException ex) {
+            if (_logger.isLoggable(Level.FINEST)) {
+               _logger.log(Level.FINEST,
+                "Parsing string to properties: "+ex.getMessage());
+            }
+            return null;
+         }
+         // cleanup trailing whitespace in value
+         for (java.util.Enumeration propKeys = p.propertyNames();
+               propKeys.hasMoreElements();) {
+             String tmpKey = (String)propKeys.nextElement();
+             String tmpValue = p.getProperty(tmpKey);
+             // Trim spaces
+             tmpValue = tmpValue.trim();
+             // Quoted string.
+             if (tmpValue.length() > 1 && tmpValue.startsWith("\"")
+                 && tmpValue.endsWith("\"")) {
+                tmpValue = tmpValue.substring(1,tmpValue.length()-2);
+             }
+             prop.put(tmpKey, tmpValue);
+         }
+         if (_logger.isLoggable(Level.FINEST)) {
+               _logger.log(Level.FINEST,
+                "Parsing string to properties: "+prop+" size:"+prop.size());
+         }
+         return prop;
+    }
 }  




[GLASSFISH-15733] need to log the @DSD configuration when DSD is created (deployed) Created: 28/Jan/11  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: future release

Type: Bug Priority: Minor
Reporter: Jagadish Assignee: sfelts
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 3_1-exclude, 3_1-next, 3_1_1-scrubbed, 3_1_2-exclude

 Description   

Whenever @DSD is specified in an application, it will be helpful if the actual configuration used is logged in server.log (eg: INFO/FINE)
Whenever @DSD is deployed it could be logged so that it is useful for debugging purposes.



 Comments   
Comment by Shalini [ 24/May/11 ]

Not planning to fix for 3.1.1

Comment by Shalini [ 14/Nov/11 ]

This is an RFE. Excluding for 3.1.2.





[GLASSFISH-19248] Dynamic Proxy generation in GlassFish JDBC connection pool Created: 26/Oct/12  Updated: 26/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: future release
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In GlassFish, as of now, when SQL tracing feature is enabled, a dynamic proxy is created for all java.sql.Statement objects.

This new feature must provide an extension of providing the dynamic proxy for other java.sql.* objects viz., java.sql.ResultSet and java.sql.<ALL_DATA_TYPES>.

A common pre/post/exception handling logic inside the dynamic proxy is implemented in the dynamic proxy for all invocations on every java.sql.* object. This feature should allow for a complete tracing in addition to the calls that are vendor specific, reducing the overhead while debugging and exception handling.

When any java.sql.* object is unwrapped, the dynamic proxy will not be used and hence tracing will be skipped for that object.






[GLASSFISH-19246] Removing Infected connections feature in glassfish jdbc connection pool Created: 26/Oct/12  Updated: 26/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: future release
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Remove infected connections is a feature to configure whether or not unwrapping implies that a connection should be considered infected and not reused. When a connection is unwrapped, this connection is marked for deletion on returning to the connection pool. When an application closes a logical connection, the underlying physical connection is not returned to the connection pool. Instead, the physical connection is closed and recreated.

This parameter must be applicable only if an application gets a connection from the connection pool and does an unwrap() on that object. The unwrap() method returns a vendor specific connection to the caller which might leave the connection pool in an inconsistent state.

The new attribute remove-infected-connections must remove such connections from the connection pool. Default value of this attribute should be false.






[GLASSFISH-19245] FIXED type of statement caching support in glassfish jdbc connection pool Created: 26/Oct/12  Updated: 26/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: future release
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Statement caching feature allows for an application to cache highly-used statements, prepared statements and callable statements during start-up processing.

A new statement cache eviction strategy FIXED maintains the statement cache size based on an existing attribute statement-cache-size unless the cache is manually cleared. The statements executed by applications on the connection are cached until the statement-cache-size is reached. When additional statements are used, they are not cached.

A new attribute statement-cache-type should be introduced which will indicate the type of statement cache type to be used by applications. Default value of this attribute is LRU (Least Recently Used) where the least recently used statement is removed when a new statement is used.






[GLASSFISH-19244] Seconds to trust support in GlassFish jdbc connection pool Created: 26/Oct/12  Updated: 26/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: future release
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Seconds to trust is an enhancement to validate-atmost-once attribute that indicates the number of seconds within a connection usage that the connection is trusted as valid and connection validation test is skipped.

Based on the last validated or last time usage of the connection, if the time interval between two connection acquisitions is less than seconds-to-trust configuration, the connection validation must be skipped.

Seconds to trust feature can be enabled by setting the connection pool configuration attribute validate-atmost-once. Default value of this attribute is zero, indicating that the seconds to trust feature is turned off.






[GLASSFISH-19243] Validation table name enhancement in GlassFish jdbc connection pool Created: 26/Oct/12  Updated: 26/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: future release
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The attribute validation-table-name in glassfish jdbc-connection-pool accepts only a table name as input. This must be enhanced to accept as input, a string "SQL" followed by a space and sql code.

This feature is only applicable when is-connection-validation-required attribute is set to true and connection-validation-method is table.

This feature provides a means of performing connection validation test when there is a sql code specified.






[GLASSFISH-19242] Fatal error code handling Created: 26/Oct/12  Updated: 26/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: future release
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Fatal error codes is a new feature that indicates that the back-end database with which the datasource communicates is no longer accessible on a connection. The connection is marked invalid and is removed from the connection pool. This feature ensures to keep bad connections out of the pool.

Pre-defined error codes for Oracle JDBC driver and Derby should be added. Additionally, a mechanism for adding error codes for other JDBC drivers should be provided.

A new attribute called fatal-error-codes should be introduced for glassfish jdbc-connection-pool that can take in user input of fatal error codes. When any of these error codes occur, the connection is marked as bad.






[GLASSFISH-15732] need to be able to specify GlassFish specific pool attributes in @DataSourceDefinition Created: 28/Jan/11  Updated: 18/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: future release

Type: Improvement Priority: Major
Reporter: Jagadish Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: ee7ri_cleanup_deferred

 Description   

@DataSourceDefinition has specific attributes defined for pool management.
GlassFish's jdbc-connection-pool exposes more pool characteristics/features that can be exposed (supported) by @DataSourceDefinition so that it can be tuned.

eg:
Ability to set lazy-connection-enlistment, association.
Ability to define exact "resource-type" in case of the "className" defined in @DataSourceDefinition implements multiple DataSource types ie., javax.sql.DataSource, javax.sql.ConnectionPoolDataSource, javax.sql.XADataSource
eg: DataDirect's MS SQL datasource-classname is an implementation of all the three types which makes it impossible to specify the type that an user want to use.



 Comments   
Comment by Tom Mueller [ 18/Oct/12 ]

Marking the fix version field as "future-release". This is based on an evaluation by John, Michael, and Tom WRT to the PRD for the Java EE 7 RI/SDK. This issue was deemed to not be a P1 for that release. If this is in error or there are other reasons why this RFE should be targeted for the Java EE 7 RI/SDK release, then change the fix version field back to an appropriate build.





[GLASSFISH-15968] JPA/JPQL - Bitwise support Created: 13/Feb/11  Updated: 10/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: nirzohar Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: JPA, JPQL

 Description   

Support for bitwise type for JPA.
JPA spec not define bitwise operation for JPQL.



 Comments   
Comment by Tom Mueller [ 10/Oct/12 ]

Putting in jdbc component as we don't have a component for JPA.





[GLASSFISH-2092] Deployer cannot bind a persistence-unit to an arbitrary JDBC data source without changing the EAR file Created: 18/Jan/07  Updated: 10/Oct/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 9.1pe
Fix Version/s: future release

Type: Improvement Priority: Major
Reporter: markuskarg Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 2,092

 Description   

ISVs are used to provide .msi files to Windows users. The deployer is using the
Windows Installer Tool (as service that is part of the Windows OS) to configure
properties found in the .msi file (for example, name of the company, etc.).
This information gets processed by the Windows Installer Tool at time of
installation of the programs found inside of the .msi file.

So at least on Windows deployment is separated in stages: (a) Creation of
an .msi archive file including binaries and configurable deployment properties,
(b) Configuring properties using the configuration part of an installation
tool, (c) Copying files and writing configuration values using the installation
engine part of an installation tool. Whether this tools is called RPM,
InstallShield or Windows Installer doesn't make a difference. Nor does it
matter whether the OS is called Windows or Linux. The three stages are the same
always.

On the Java EE platform, JSR88 specifies "The Java EE Way" of these three
stages: (a) Packaging of EJB-JARs and EARs including configurable deployment
properties in the technical form of deployment descriptors and persistence.xml
files, (b) Configuring the actual set of configuration values (including
providing information missing in persistence.xml, like "which JDBC data source
to use for this persistence unit") using a configuration tool (which, in turn
uses a deployment driver in "offline mode"), (c) copying files on the server
and writing configuration values into the server's proprietary configuration
registry, using a deployment tool (which, in turn uses a deployment driver
in "online mode").

That's the way the story should go.

But actually the world seems not to be as perfect, since not all people are
using JSR88 tools to install EJB-JARs and EARs into GlassFish. Some (or: a lot
of) people still are doing steps (b) and (c) using the browser based GUI.

Those people actually are facing the problem that in step (b) they want to
configure which JDBC data source a persistence unit shall be bound to.
Unfortunately, they cannot. They have to live with the fact that each
persistence unit is bound to jdbc/__default. If they want to change it, they
must unpack the EAR and EJB-JAR to be able to change the persistence.xml file
found inside of. Then, they must repack it, to make GF load and deploy it.

This is not very convenient, since least users (1) like to unpack, edit, and
repack their modules, and (2) like to have all of their EARs running on the
same, single data base. Example: A company buys SAP, so they install SAP.ear.
It must be bound to the SAP DB obviously. Then they buy a bug tracking system,
so they install BugTrackSystem.ear. Obviously, BugTrackSystem.ear shall be
bound to the BugTrackSystem DB. Neither does the company want to unpack both
EARs and fiddle around in the persistence.xml files, nor does the company want
to have BugTrackSystem.ear and SAP.ear be bound to jdbc/__default (which, by
default, is bound to a Derby DB).

So what is missing is a way to use the Web Based Admin GUI to say "this
persistence unit had to be bound to that JDBC data source".

As that is an essential link in every GF installation, I think this is a bug
but not just some idea of a good feature.

Also, the JPA specification contains the following:

"6.2.1.5 jta-data-source, non-jta-data-source
In Java EE environments, the jta-data-source and non-jta-data-source elements
are used to specify the global JNDI name of the JTA and/or non-JTA data source
to be used by the persistence provider. If neither is specified, the deployer
must specify a JTA data source at deployment or a JTA data source must be
provided by the container. "

The GlassFish team interpreted "...at deployment time OR ... provided by the
container..." is: "We, the GlassFish team, are free to decide whether we are
providing a data source, or whether the deployer will provide one". Actually,
from the view of an ISV or end user, this is a misinterpretation. In fact, ISVs
and end users both would interprete it that way: "The deployer can tell which
JDBC data source to use. If the deployer does not tell it, the server must use
a default source.".



 Comments   
Comment by tware [ 18/Jan/07 ]

Changing component from entity-persistence to deployment

Comment by tware [ 18/Jan/07 ]

reassigning to component owner

Comment by gfbugbridge [ 19/Jan/07 ]

<BT6515334>

Comment by Hong Zhang [ 30/Jan/07 ]

-> tim

Comment by Hong Zhang [ 30/Jan/07 ]

-> accepted

Comment by Tim Quinn [ 31/Jan/07 ]

Although the description mentions deployment and deployer in several places, at
its heart this issue is requesting a change in the admin GUI.

Reassigning.

Comment by marina vatkina [ 31/Jan/07 ]

I'm not sure which component is responsible for providing the functionality, but
this option should be available via 'asadmin' as well, and the result need to
end up in the PU descriptor. What can complicate the situation, is that a PU is
not a component, and can be part of a library jar that is not exploded.

Comment by Anissa Lam [ 31/Jan/07 ]

GUI cannot provide such a feature without support from backend.
>>> So what is missing is a way to use the Web Based Admin GUI to say "this
>>> persistence unit had to be bound to that JDBC data source".

This requires more than 1 subcomponent to work together. I am assigning this to
Kedar who can decide whats the first step to solve this issue.

Comment by km [ 01/Feb/07 ]

Markus,

This seems to be (what my friend calls) a red ball.

If I am understanding you
correctly, the resource that a persistence unit (PU) needs is implicitly mapped
onto "jdbc/__default", unless <jta-data-source> is provided in the PU's xml.

If that's correct, then what Marina suggests is that we provide a capability
on the admin tools to essentially modify the persistence.xml on deployment.
Well, that is simply not consistent. We don't modify any of the deployment
descriptors during deployment using admin console or admin CLI.

AFAIU, jdbc/__default is a global resource defined out-of-the-box in GlassFish
and it points to an embedded "Java DB" database (Actually, I don't know why
it points to sun-appserv-samples!). All applications can use this datasource.

If you want jta-data-source to actually point to a "database" of your choice,
can't you

  • define a connection pool pointing to that database,
  • change the pool-name on jdbc/__default to point to that pool?

(Both these options are available on the Web Admin Console or admin CLI).

Your application remains portable and you don't have to change persistence.xml
at all.

Will that not work to satisfy the situation you describe?

Another approach would be to use application server vendor specific data-source
mapping. I don't know if that's available for persistence units, though.

Please let me know.

Comment by km [ 25/Feb/07 ]

Is this a must for GlassFish V2? I tend to make this a P4 as I don't think it
is a priority for V2 release.

Comment by km [ 21/Mar/07 ]

Markus, what should be done with this?

Comment by marina vatkina [ 21/Mar/07 ]

Kedar, you are right, but unfortunately the spec says that there should be a way
to specify the datasource at deployment. This can be done either by the user via
specifying some predefined name for the datasource (like jdbc/PU1DS) that is
retargeted to the actual datasource of choice at the necessary points of time.
Another option would be to either modify the existing persistence.xml on the fly
or add something like sun-persistence.xml for overrides (which is even worse).
This second option becomes even more complicated as persistence.xml can be
placed into the EAR's /lib directory, and we won't even unpack it on deployment,
right?
May be we should test and document the 1st solution (I wouldn't advise to change
jdbc/__default).

Comment by Tom Mueller [ 21/Jan/11 ]

This is a deployment issue at its heart. The capability needs to be provided via the asadmin and GUI interfaces, but it is the deployment logic that needs to support this capability.

Comment by Hong Zhang [ 10/Oct/12 ]

Reassign to JDBC team to see if it makes sense to provide this support through deploy command.

And retarget to future release as it's not a must for GlassFish 4.0.





[GLASSFISH-19006] Default values of essential vendor specific properties in domain.xml Created: 16/Aug/12  Updated: 16/Aug/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: evgeniya Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hi,
In particular, I mean, at least:
a) socket timeouts for Oracle clients (sun.net.client.defaultConnectTimeout, Dsun.net.client.defaultReadTimeout);
b) socket timeouts for Oracle JDBC Driver(oracle.jdbc.ReadTimeout).

(they could be set as JVM properties, -D<property name>=<value in millisec, say, 60000>)

These are really essential properties. We have a lot of emergencies because we didn't know them. Actually, we used Glassfish 2.1.1, but I didn't find notes about these options in further versions of Glassfish too.
I would say there should be default values for these options in domain.xml.

These properties are really important, as they could prevent our Glassfish server outage, see for example, here http://perfstories.wordpress.com/2012/08/14/be-aware-of-sun-oracle-networking-properties/.

Thank you,

Evgeniya






[GLASSFISH-19007] Missed query timeout while connection validation by table query Created: 16/Aug/12  Updated: 16/Aug/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: evgeniya Assignee: Shalini
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hi,

See please
http://java.net/projects/glassfish/sources/svn/content/trunk/main/appserver/jdbc/jdbc-ra/jdbc-core/src/main/java/com/sun/gjc/spi/ManagedConnectionFactory.java?rev=53670:

protected void isValidByTableQuery(java.sql.Connection con, String tableName) throws ResourceException {
...
final String statement = "SELECT COUNT FROM " + tableName;
stmt = con.prepareStatement(statement);
rs = stmt.executeQuery();
...
}

It would be great to have query timeout here (with some default value, that can be changed, say, by some JVM option). (http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#setQueryTimeout(int))

Actually, we had server outage in our production because of lack of this timeout (see details here: http://perfstories.wordpress.com/2012/05/15/yet-another-hanging-java-net-socketinputstream-socketread0/)

Thank you,

Evgeniya






[GLASSFISH-4124] Associate with thread Created: 08/Feb/08  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: V3
Fix Version/s: not determined

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 4,124
Status Whiteboard:

v3-prd-item


 Description   

Associate multiple connections with a single thread as against single connection
with a single thread.



 Comments   
Comment by Shalini [ 08/Feb/08 ]

Added as v3-prd-item

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-3205] Need "application aware" pools Created: 15/Jun/07  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: V3
Fix Version/s: not determined

Type: Improvement Priority: Major
Reporter: Alexis MP Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File prioritized-resource-scheduling.txt    
Issue Links:
Dependency
blocks GLASSFISH-4147 Request prioritization in application... Open
Issuezilla Id: 3,205
Status Whiteboard:

v3-prd-item


 Description   

Let's have the following scenario: application A, B and C would like to
use DB pool X. I would like to have a common DB connection pool, with
the following guaranties: A has at least 10, B has at least 5, C has at
least 5 "dedicated" connections, and the overall connection pool size is
below 50 connections. So the remaining 30 "undedicated" connection is
served on-demand for the applications.



 Comments   
Comment by jesper_soderlund [ 16/Nov/07 ]

Created an attachment (id=1260)
Feedback on larger scope than just database con. pools

Comment by Jagadish [ 08/Feb/08 ]

tagging as v3-prd-item

Comment by Jagadish [ 08/Feb/08 ]

targeted for v3

Comment by Jagadish [ 05/Mar/08 ]

removing dependency

Comment by Jagadish [ 28/Dec/09 ]

Transferring to Shalini

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-532] Move javadb driver jars from extensions classloader to an appropriate classloader Created: 03/Apr/06  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 9.0pe
Fix Version/s: not determined

Type: Improvement Priority: Major
Reporter: Sivakumar Thyagarajan Assignee: lancea
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All
URL: https://glassfish.dev.java.net/servlets/ReadMsg?list=dev&msgNo=996


Issuezilla Id: 532

 Description   

Currently the derby/javadb driver jars are placed in java.ext.dirs. JDBC Driver
jars could ideally be scoped under the common classloader or another appropriate
classloader below.

Enhancement proposed by Kedar in a dev@GlassFish thread
https://glassfish.dev.java.net/servlets/ReadMsg?list=dev&msgNo=996



 Comments   
Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-7054] Ability to close all connections in a pool Created: 16/Jan/09  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 9.1peur2
Fix Version/s: not determined

Type: Improvement Priority: Major
Reporter: trondstromme Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Sun


Issuezilla Id: 7,054

 Description   

The ability to close all connections in a JDBC connection pool when disabling
the pool would be great as it frees up any resources the connections hold in the
database.
This should be available both from asadmin, the web interface and exposed as a
method on the MBean of the connection pool.



 Comments   
Comment by trondstromme [ 16/Jan/09 ]

added cc

Comment by Jagadish [ 28/Dec/09 ]

Transferring to Shalini

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-2795] The connections created are method local variables are maintained in bean context Created: 09/Apr/07  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 9.1pe
Fix Version/s: not determined

Type: Bug Priority: Minor
Reporter: kshitiz_saxena Assignee: kshitiz_saxena
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 2,795

 Description   

The connections created as local variables are maintained in bean context. So if
a connection is not closed, it is always maintained in bean context and is in
every transaction. The issue is actually of bad programming practices. However
we should be able to handle such mistakes.



 Comments   
Comment by gfbugbridge [ 09/Apr/07 ]

<BT6543922>

Comment by Mahesh Kannan [ 09/Apr/07 ]

Assigning this to jdbc category

Comment by kshitiz_saxena [ 12/Apr/07 ]

Not a show stopper

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-10879] CLI commands to add/list/delete any jdbc drivers. Created: 07/Nov/09  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1
Fix Version/s: not determined

Type: Improvement Priority: Major
Reporter: felipegaucho Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Linux


Issuezilla Id: 10,879

 Description   

It would be very interesting if I can list the available drivers in a Glassfish
domain. This could allow my installation script to detect in advance if the
driver required by an application is available or not.

It also can be integrated in the Admin GUI, and during the deployment of an
application the GUI can show a Warning to the user about a missed JDBC driver.

In my opinion, the listing of all available resources should be available
through CLI and Admin GUI. The automatic deployment for testing or production is
a common practice and Glassfish should support the automatic build scripts as
best it can. A Hudson server, for example, is blind about the GF resources and
it may deploy application that will not work properly in the absence of a
resource, but today there is nothing Hudson can do to warn the developers about
that - specially when the server is upgraded and someone forget to install the
drivers required by the applications.



 Comments   
Comment by Bill Shannon [ 07/Nov/09 ]

Reassign.

Comment by Jagadish [ 17/Nov/09 ]

transferring to Shalini

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-4127] Import Connection pool config from Tomcat context.xml Created: 08/Feb/08  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: V3
Fix Version/s: not determined

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 4,127
Status Whiteboard:

v3-prd-item


 Description   

Ability to import connection pool configuration from tomcat's context.xml



 Comments   
Comment by Shalini [ 08/Feb/08 ]

added as v3-prd-item

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-14547] Mysql ping fails when additional properties are not deleted Created: 09/Nov/10  Updated: 24/Feb/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: shaline Assignee: Shalini
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: XML File domain.xml    
Issuezilla Id: 14,547
Tags: 3_1-release-note-added, 3_1-release-notes

 Description   

Build used: GFV3.1 nightly dated: 11/7
OS: Windows XP
Browser: IE8

When we keep all the additional properties for the Mysql pool ,and the values
for user, password and url fields, the ping fails. When we delete these
additional properties and keep only the User,Password and url properies, the
ping succeeds.

steps:
Copy mysql-connector-java-5.1.7-bin.jar to domain1/lib/ext and restart.
Create a JDBC connection pool as below:
datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
res-type="javax.sql.DataSource"
name="MyPool">
"url" value="jdbc:mysql://asqe-core2.sfbay.sun.com:3306/dbsmpl1"
"Password" value="dbpassword"
"User" value="dbuser"

Keep all the additional properties intact, and try Ping. it fails. delete them
and try ping again, it succeeds.



 Comments   
Comment by Anissa Lam [ 09/Nov/10 ]

Can you let us know what are the additional props and its value when the ping failed for you ?
If you do the ping through CLI, doees it work for you ?

Comment by shaline [ 09/Nov/10 ]

Created an attachment (id=5387)
domain.xml

Comment by Anissa Lam [ 09/Nov/10 ]

thanks for domain.xml.
Can you ping successfully using CLI ?

Comment by shaline [ 09/Nov/10 ]

ping fails even in CLI since the additional properties are added from admin
console. If we remove the additional properties , then ping succeeds even in
console,and CLI.

Comment by Anissa Lam [ 10/Nov/10 ]

those properties are whats given to us from backend. transferring to 'jdbc' for evaluation.

Comment by sumasri [ 11/Nov/10 ]

Transferring it to backend team.

Comment by Jagadish [ 11/Nov/10 ]

This behavior has been there since Application Server 8.x

Please refer issue 549 , there was a detailed discussion about MySQL driver
exposing all these attributes.
GlassFish will not have a control over these properties.

The only option we had was to make GUI show the standard properties and then in
another tab showing all properties.

StandardProperties =

{ "databaseName", "serverName", "port", "networkProtocol", "user", "password", "roleName", "datasourceName" }

;

Marking this as RFE.

As long as the user follows the documented list of properties (docs of
GlassFish), it works fine.
http://docs.sun.com/app/docs/doc/820-7692/gbsor?l=en&a=view

Anissa, let me know if its possible to change admin console screen to show
standard properties first (atleast for MySQL case alone) and then based on the
request from user, show all other properties, I can work on providing an API
which can be called by console.

Also refer the issue 3475 (enhancement)

Comment by Anissa Lam [ 11/Nov/10 ]

Its too late now to make this kind of UI change.
We can think about this after 3.1
thanks.

Comment by Scott Fordin [ 23/Mar/11 ]

Need more info to add issue to 3.1 Release Notes.

Comment by Shalini [ 23/Mar/11 ]

When a ping is done with all the properties mentioned in the domain.xml(attached) for mysql-pool, the following error message is got.

Ping failed Exception - Access denied to execute this method : setLargeRowSizeThreshold Please check the server.log for more details.

Workaround is to provide only the standard list of properties documented. The standard properties are "databaseName", "serverName", "port", "networkProtocol", "user", "password", "roleName", "datasourceName".

Comment by Scott Fordin [ 15/Apr/11 ]

Added issue to 3.1 Release Notes.

Comment by Shalini [ 25/Apr/11 ]

This is an RFE and could be addressed in 3.2. The solution for this is tricky as in, if only the standard properties are listed for all jdbc drivers, the user would have to look into the jdbc driver vendor documentation for the available properties and set each one of them by typing it manually. Its much easier to delete the properties that cause a failure before trying a ping rather than adding lot of properties manually.

Comment by Nazrul [ 24/Feb/12 ]

Configuring a MySQL pool needs just these 6 properties, may be even a few less.

<property name="URL" value="jdbc:mysql://127.0.0.1:3306/blahr"></property>
<property name="portNumber" value="3306"></property>
<property name="databaseName" value="blah"></property>
<property name="serverName" value="blah.dyndns.org"></property>
<property name="user" value="blah"></property>
<property name="password" value="xxx"></property>

Currently, we show a long list of properties. It would be good if we can show standard properties for all JDBC drivers to make user experience better. We may display the entire set of properties introspected from JDBC driver in advanced tab.





[GLASSFISH-18394] Datasource properties not passed to database connection (Oracle database) Created: 22/Feb/12  Updated: 23/Feb/12

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Thomas Andres Assignee: Shalini
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Archive File ojdbc6.jar     PNG File Screen shot 2012-02-22 at 14.16.27.png    

 Description   

I've recently discovered a jdbc performance issue with Queries that fetch many (thousands to millions) of small records from a oracle database. To solve that, the property "defaultRowPrefech" can be specified to increase the prefetch from 10 to some more reasonable value.

This worked well, when I opened a connection directly and also on a jboss server. When I changed the jdbc resource pool in my glassfish, this property apparently wasn't passed to the database connection.

I debugged the problem and saw that the configuration was available in the datasource. I got a DataSource40 containing a DSManagedConnectionFactory with a DataSourceSpec. There was a map that contained amongst other infos:
19=setURL#jdbc:oracle:thin:@zapf.ergon.ch:1521:ZAPF##setlanguage#english##setdefaultRowPrefetch#1000##
There are exactly the properties specified in the admin console. (apart from the "set" prefixes)

However, the database connection created from this datasource still had defaultRowPrefetch set to 10.

Am I doing something wrong and is there some other way this should be configured or is this a bug, that this attribute isn't passed to the database connection?



 Comments   
Comment by Thomas Andres [ 22/Feb/12 ]

added screenshot of the configuration in the admin console

Comment by Shalini [ 23/Feb/12 ]

Could you attach the jdbc connection pool configuration from your domain.xml file? I am speficifically looking for the datasource classname you set and also the jdbc driver you are using.

Comment by Thomas Andres [ 23/Feb/12 ]

The configuration is:

    <jdbc-connection-pool validation-table-name="CUSTOMER" 
datasource-classname="oracle.jdbc.pool.OracleDataSource" max-pool-size="300" wrap-jdbc-objects="false" 
res-type="javax.sql.DataSource" steady-pool-size="5" allow-non-component-callers="true" 
name="newom_dev3_pool" is-connection-validation-required="true" 
validate-atmost-once-period-in-seconds="300">
      <property name="URL" value="jdbc:oracle:thin:@zapf.ergon.ch:1521:ZAPF"></property>
      <property name="user" value="NEWOM_DEV3"></property>
      <property name="password" value="password"></property>
      <property name="language" value="english"></property>
      <property name="defaultRowPrefetch" value="1000"></property>
    </jdbc-connection-pool>

The jdbc driver is the standard ojdbc6.jar. I'll attach the version I'm using in case there are different versions of this I'm not aware of.

Comment by Thomas Andres [ 23/Feb/12 ]

used oracle driver

Comment by Shalini [ 23/Feb/12 ]

As per http://docs.oracle.com/cd/A97335_02/apps.102/a83724/oraperf2.htm :

"Use the setDefaultRowPrefetch() method of your OracleConnection object
to set the default number of rows to prefetch, passing in an integer that
specifies the desired default. "

The properties user, password are passed in the jdbc connection pool as
properties of the OracleDataSource object, whereas the defaultRowPrefetch
should be set on an OracleConnection object.

Alternatively, while getting the connection in your application, you could
unwrap the connection got, to get the OracleConnection object and then
set this property on the connection object. GlassFish provides an ability to
unwrap a connection object :

http://docs.oracle.com/cd/E19798-01/821-1752/ggrum/index.html

As per the above, this is not an issue.

Comment by Thomas Andres [ 23/Feb/12 ]

I strongly disagree. I'm well aware, that I can set the property from the code on the connection or statement. The point of doing this in the datasource is to make it easily configurable without code changes. Also to make the default apply regardless of who (my code, JPA, ...) opens the connection.
I did the same in a JBoss server that we use for an older version of our application and had no problem setting a property in the datasource to pass it along.

Also from your reference:

Equivalently, instead of calling setDefaultRowPrefetch(), you can set the defaultRowPrefetch Java property if you use a Java Properties object in establishing the connection. See "Specifying a Database URL and Properties Object".

In my opinon, the properties on the data source should also be used as if I use DriverManager.getConnection() with properties. Why do you provide a way to add additional properties for a datasource that are then ignored? There is no reason to treat username, password any different from any other property if all properties are passed on to create the connection. The only thing that is a property here and needs to be treated differently is the URL. I would prefer to see the URL parameter moved to the general configuration tab (don't think there is much chance to get a connection without an URL anyway) and pass all additional properties on to the driver to create the database connection. That is much cleaner and provides flexible, driver independent configuration.

If you don't pass along properties, you should scrap the additional properties entirely and just provide a static UI with fixed fields that you actually support.

Comment by Shalini [ 23/Feb/12 ]

The OracleDataSource.java does not have a method called setDefaultRowPrefetch(). However, the defaultRowPrefetch could be set as a Properties object on a setConnectionProperties() method. In GlassFish currently, we support only key value pairs as additional properties. For example, you could set MaxStatements property directly in additional properties.

We would consider this as an RFE, to parse the Properties object passed thereby reflecting this in database connection.





[GLASSFISH-15811] Parameter associate-with-thread fails when activated for more than one pool Created: 03/Feb/11  Updated: 21/Dec/11

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: marsangr Assignee: skgaju
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 3_1-exclude, 3_1_1-scrubbed, 3_1_x-exclude

 Description   

I can reproduce GLASSFISH-15577 in v2.1.1
Could the same fix be applied to its trunk?



 Comments   
Comment by Jagadish [ 03/Feb/11 ]

yes, this is applicable for 2.x also.
Transferring to sustenance team.
Gajanan, please transfer this to appropriate team/engineer.

Comment by scatari [ 11/Jun/11 ]

Not a required fix to support release drivers of 3.1.1.

Comment by Joe Di Pol [ 21/Dec/11 ]

This appears to have been fixed in 3.x (GLASSFISH-15586). Excluding from 3.1.x releases.





[GLASSFISH-17433] Maximum-pool-size is involved in the behavior of unpooled connections Created: 17/Oct/11  Updated: 08/Dec/11

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: ito_m Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

Maximum-pool-size in pool settings is described on GlassFish Server Administration Console Reference below.

The maximum number of connections in the pool. The default value is 32.

However this functionality always sets an upper limit to the number of connections regardless of the pooling attribute value which is enabled or disabled although almost any other attributes such as initial-and-minimum-pool-size has no effect on unpooled connections.

I think this spec may confuse users and can be a frequent cause of incorrect use. It is because the more likely scenario where unpooled mode will be selected is the case a user would like to use connections pooled by a JDBC driver. In this case, not only a JDBC driver but also an application server redundantly restricts the connection size by default due to the default value of maximum-pool-size(32).

I would like to confirm the reason why maximum-pool-size is effective on even unpooled mode. Besides, I believe we should avoid adopting an option which lets users change maximum-pool-size manually so that they can make sure maximum-pool-size is greater than the upper limit set on the JDBC driver. I think it difficult for users to understand the relationship between maximum-pool-size and unpooled mode.

Therefore I would suggest either one of the following improvements if it is acceptable.
1. Remove the corresponding codes controlling the maximum size of connections when the pooling attribute is specified as disabled.

com.sun.enterprise.resource.pool.UnpooledResource.java
       private synchronized boolean incrementPoolSize(){
        if(poolSize >= maxPoolSize) // These are the condition
            return false;           // for maximum-pool-size.
        poolSize++;
        return true;
    }

2. Prepare a value of maximum-pool-size which allows users to create unlimited connections and switch to this special value automatically when the pooling attribute is specified as disabled. They can also specify another value as maximum-pool-size consciously afterwards if needed.



 Comments   
Comment by Shalini [ 08/Dec/11 ]

Though the names (steady-pool-size/max-pool-size) may sound
inappropriate for the "pooling=false" option, these are used to limit
the concurrent number of connections usage ie., a pool can serve upto
"max-pool-size" number of connections at any point in time. We do not
allow unlimited connections to be acquired as that can potentially bring
down the entire DB/EIS server.

We could come up with a better naming mechanism for steady-pool-size and max-pool-size when connection pooling is turned off.





[GLASSFISH-16472] Monitoring support for @DataSourceDefinition Created: 27/Apr/11  Updated: 02/Dec/11

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Existing implementation of @DataSourceDefinition is realized internally as a jdbc-resource and jdbc-connection-pool. It would be useful to expose monitoring statistics of @DataSourceDefinition (ie., the jdbc-connection-pool monitoring statistics) to users. Following monitoring hierarchy could be used to display the statistics according to the scope in which the @DataSourceDefinition is defined.

server.<application-name>.datasource-definition.java:global/<global-scoped-dsd>
server.<application-name>.datasource-definition.java:app/<app-scoped-dsd>
server.<application-name>.datasource-definition.<module-name>.java:module/<module-scoped-dsd>
server.<application-name>.datasource-definition.<module-name>.<component-name>.java:comp/<component-scoped-dsd>

Note :
1) For component scoped @DSD in web bundle descriptors, following convention will be used
server.<application-name>.<module-name>.datasource-definition.java:comp/<component-scoped-dsd>

2) For applications that are not .ear, <module-name> will not be applicable.






[GLASSFISH-16471] Granular SQL tracing Created: 27/Apr/11  Updated: 02/Dec/11

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Shalini Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Need to add functionality to provide a more granular tracing of SQL queries. All Connection related SQL traces should be logged as INFO messages.

When "javax.enterprise.resource.sqltrace" log level is set to INFO, only operations related to Connection will be traced in the server.log. The default value FINE should continue to support tracing of Connection, Statement, PreparedStatement and CallableStatement.






[GLASSFISH-16956] A statement timeout is not set on executing SQL statements in connection validation and init SQL Created: 05/Jul/11  Updated: 02/Dec/11

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: ito_m Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

The Statement timeout is provided to guarantee that abnormally long running queries will time out explicitly.
However the current implementation seems not to support timeout for connection validation SQLs (in case of table and custom validations) or init SQLs executed automatically when acquiring connections from pool.

Connection validation implementation corresponds to ManagedConnectionFactory#isValid(ManagedConnection) of jdbcra.
Init SQL implementation corresponds to ManagedConnection#executeInitSql(String) of jdbcra.
Each method creates a statement using a physical connection of a jdbc driver directly and executes SQLs without calling setQueryTimeout().

I think it desirable to support timeout for SQLs of these functionalities although I assume a hanging state rarely occurs as a result of executing them, especially because select statements for validation are simple and light.






[GLASSFISH-16723] provide better error message for missing JDBC resources Created: 24/May/11  Updated: 24/May/11

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Nazrul Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Based on the following forum thread: http://forums.java.net/node/805271

We are not providing clear error message when a JDBC resource is missing during web application loading.

Since this is a common mistake where users forgets to create the necessary resources before deploying the application, lets try to provide clear error message.






[GLASSFISH-5699] list the pools in a sorted fashion Created: 27/Aug/08  Updated: 19/Jan/11

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: V3
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: sankarpn Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 5,699

 Description   

v3-prelude 8/27

bash-3.00# asadmin list-jdbc-connection-pools -u admin --passwordfile /password.txt
oracle_type4_pool
microsoft_dd_pool
sybase_dd_pool
sybase_inet_pool
__TimerPool
microsoft_inet_pool
mysql-pool
postgresql_type4_pool
microsoft_jtds_pool
db2_dd_pool
microsoft_sqlserver2000_pool
microsoft_sqlserver2005_pool
DerbyPool
oracle_inet_pool
javadb_type4_pool
sybase_jconn_pool
db2_jcc_pool
oracle_dd_pool

Command list-jdbc-connection-pools executed successfully.

In the above list-jdbc-connection-pools output the order of the pools are
scattered. Instead if the pools are listed in alphabetical order that would be a
good list to look for the desired pool name.



 Comments   
Comment by Tom Mueller [ 19/Jan/11 ]

Please evaluate this RFE for inclusion in 3.2, a future release, or close it.





[GLASSFISH-12568] JDBC resource need to allow system property for pool name Created: 07/Jul/10  Updated: 13/Dec/10

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1
Fix Version/s: None

Type: Improvement Priority: Critical
Reporter: Anissa Lam Assignee: Shalini
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 12,568

 Description   

In the JDBC resource screen, the connection pool is a drop down list.
This means user cannot use system properties ie, token to specify a pool name. eg $

{PoolName}

To support such use case, the dropdown needs to be a 'combo box', allowing user to select from
dropdown or enter the pool name. Client side validation should ensure that it starts with "${"

Currently, CLI allows that.
This will be JDBC enhancement.



 Comments   
Comment by Shalini [ 08/Jul/10 ]

This needs to be done for Connector Connection pools also.

Comment by sumasri [ 06/Oct/10 ]

Added the target milestone.

Comment by sumasri [ 22/Oct/10 ]

-> MS7

Comment by sumasri [ 29/Nov/10 ]

In V2.1 also, There is no way to add a system property as pool name through GUI.
Steps to do it in CLI is,
1)Create a node agent na.
2)Create a cluster(c1).
3)Create an instance(i1) under cluster c1 with the node agent na.
4)start the node agent(na).
5)Create a system property(Ex: poolname=DerbyPool) with the target as c1.
6)Create a jdbc resource using the target c1 and pool name as "$

{poolname}".
command : asadmin create-jdbc-resource --connectionpoolid "\${poolname}

" --target c1 jdbc1.

But, In v3.1, there is no support for start-node-agent. Through CLI, it is not supporting system property for jdbc resource creation.
Steps to reproduce the issue.
1)Create a cluster
2)Create an instance(i1) under cluster c1 with the node agent localhost.
3)Start the cluster
4)Create a system property(Ex: poolname=DerbyPool) with the target as c1.
5)./bin/asadmin create-jdbc-resource --connectionpoolid "\$

{poolname}" --target c1 j1
org.glassfish.api.admin.CommandException: remote failure: Attribute value (pool-name = ${poolname}

) is not found in list of jdbc connection pools.
Command create-jdbc-resource failed.

Transferring it to the backend team to look into the issue. Please transfer it to me for GUI support once you are done with the backend changes.





[GLASSFISH-11821] poor error message from create-jdbc-connection-pool Created: 24/Apr/10  Updated: 02/Nov/10

Status: Reopened
Project: glassfish
Component/s: jdbc
Affects Version/s: v3.0.1
Fix Version/s: 3.1_ms07

Type: Bug Priority: Minor
Reporter: vince kraemer Assignee: Jagadish
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 11,821

 Description   

Here is the output that I get from 3.0.1 b12

vkraemer$ ../../GlassFish3.0.1.b12/glassfish/bin/asadmin create-jdbc-connection-pool foobar
com.sun.enterprise.admin.cli.CommandException: remote failure: JDBC connection pool foobar creation
failed. Constraints for this bean violated.
Message = Must specify a datasource/driver classname. DatasourceClassname is mandatory when
resType is javax.sql.DataSource/javax.sql.ConnectionPoolDataSource/javax.sql.XADataSource.
DriverClassname is mandatorywhen resType is java.sql.Driver.

Command create-jdbc-connection-pool failed.

Here is the output that I expected....

vkraemer$ ../../GlassFish3.0.1.b12/glassfish/bin/asadmin create-jdbc-connection-pool foobar
com.sun.enterprise.admin.cli.CommandException: remote failure: JDBC connection pool foobar creation
failed. Constraints for this bean violated.
Message = Must specify a datasource/driver classname. DatasourceClassname is mandatory when
resType is javax.sql.DataSource/javax.sql.ConnectionPoolDataSource/javax.sql.XADataSource.
DriverClassname is mandatorywhen resType is java.sql.Driver.
Usage: asadmin [asadmin-utility-options] create-jdbc-connection-pool
[--datasourceclassname <datasourceclassname>] [--restype <restype>]
[--steadypoolsize <steadypoolsize>] [--maxpoolsize <maxpoolsize>]
[--maxwait <maxwait>] [--poolresize <poolresize>]
[--idletimeout <idletimeout>] [--initsql <initsql>]
[--isolationlevel <isolationlevel>]
[--isisolationguaranteed[=<isisolationguaranteed(default:true)>]]
[--isconnectvalidatereq[=<isconnectvalidatereq(default:false)>]]
[--validationmethod <validationmethod>]
[--validationtable <validationtable>]