-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: could not inspect JDBC autocommit mode
PostPosted: Tue May 23, 2006 8:31 am 
Newbie

Joined: Tue May 23, 2006 8:13 am
Posts: 1
Hibernate version:
3.0.5

Full stack trace of any exception that occurs:
org.hibernate.exception.GenericJDBCException: could not inspect JDBC autocommit mode
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:338)
at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:398)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:852)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:603)
... 48 more

Name and version of the database you are using:
Oracle JDBC driver, 9.2.0.1.0

Server
Websphere Application Server 5.1

I'm using a .jar file from a third party that wont give their code so I cannot give a lot of information of what is happening. But I get the previous state exception when using the jar. The say it works fine, and it does for some situations, but sometimes I get this exception and I don't know what it means... After searching google, and this forum I still cannot find an explanation.

So can anybody explain what is going on here? And maybe give a solution.


Top
 Profile  
 
 Post subject: could not inspect JDBC autocommit mode due to...
PostPosted: Mon May 29, 2006 12:41 pm 
Newbie

Joined: Mon May 29, 2006 12:24 pm
Posts: 1
closed connection (com.ibm.websphere.ce.cm.StaleConnectionException)

bladibla, too bad you didn't leave a public email address. Did you solve this issue? Did anyone else encounter this issue?

It seems that directly after the actual execution of the query in SessionImpl.list(...), the connection is no longer available in JDBCContext.afterNontransactionalQuery(...).

I've seen similar problems, but not this particular one. Any thoughts, pointers are much appreciated.

I'm using:
- WebSphere 5.1.0.3
- Oracle 9
- Hibernate 3.0.5

Regards,
- Mark


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 20, 2006 3:46 am 
Newbie

Joined: Thu Jun 15, 2006 10:36 am
Posts: 4
Hi,

I am facing a problem which is similar to this

Code:
Caused by: java.sql.SQLException: Connection handle is not currently associated with a ManagedConnection
        at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:539)
        at org.jboss.resource.adapter.jdbc.WrappedConnection.getAutoCommit(WrappedConnection.java:327)
        at org.hibernate.jdbc.ConnectionManager.isAutoCommit(ConnectionManager.java:185)
        at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:232)
        ... 35 more


I am using mysql as backend database with hibernate and done Jndi binding of datasource as well as hibernate session factory and packaged all in har archive file.
Quote:
when i try to run my application i get session is closed error!!!!!


I make temprorarily working of my application by creating new session if i found session closed.

Now i wanted persistent http sessions and my all objects which i want to put in session are serailizable.When i run my application i got above mentioned error....


Code:
12:15:25,343 ERROR [JDBCExceptionReporter] Connection handle is not currently associated with a ManagedConnection
12:15:25,343 ERROR [STDERR] org.hibernate.exception.GenericJDBCException: could not inspect JDBC autocommit mode
        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.JDBCContext.afterNontransactionalQuery(JDBCContext.java:241)
        at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:419)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1119)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)



Code:
12:15:25,218 WARN  [TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1abac1[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@1ddf5ee handles=1 lastUse=1150785668218 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1b9cdfc context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1829097 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@13d0953 txSync=null]
java.lang.NullPointerException
        at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
        at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at com.mysql.jdbc.PreparedStatement.<init>(PreparedStatement.java:147)
        at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1283)
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:349)
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:344)
        at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:187)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:497)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:415)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
        at org.hibernate.loader.Loader.doQuery(Loader.java:661)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
        at org.hibernate.loader.Loader.doList(Loader.java:2145)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
        at org.hibernate.loader.Loader.list(Loader.java:2024)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)



please help


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.