-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate JPA Connection reset ERROR
PostPosted: Tue Sep 03, 2013 1:43 pm 
Newbie

Joined: Tue Sep 03, 2013 1:37 pm
Posts: 3
Hello All,

I am using hibernate with jpa and have depolyed application on tomcat, tomcat is managing the connection pool.
Sometimes when i log into the application below error is thrown:

03 Sep 2013 07:45:14,410 [ajp-bio-8009-exec-19] WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 17002, SQLState: 08006
03 Sep 2013 07:45:14,410 [ajp-bio-8009-exec-19] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Io exception: Connection reset
03 Sep 2013 07:45:14,410 [ajp-bio-8009-exec-19] ERROR com.abcxyz.efgh.dao.impl.UserDAOImpl - Exception occured in UserDAOImpl:authenticate method while authenticatin user:mohitGarg and the exception is : org.hibernate.exception.JDBCConnectionException: could not extract ResultSet
03 Sep 2013 07:45:14,410 [ajp-bio-8009-exec-19] WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: null
03 Sep 2013 07:45:14,410 [ajp-bio-8009-exec-19] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Already closed.

Before throwing this exception query is printed in logs.

And when I log in again then this error never appears(this error only appears when user log's in for the first time).

Someone please help.


Top
 Profile  
 
 Post subject: Re: Hibernate JPA Connection reset ERROR
PostPosted: Wed Sep 04, 2013 6:36 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
I think we need a bit more details about the configuration of your project.
If you could create a test case it would be even better.


Top
 Profile  
 
 Post subject: Re: Hibernate JPA Connection reset ERROR
PostPosted: Wed Sep 04, 2013 9:33 am 
Newbie

Joined: Tue Sep 03, 2013 1:37 pm
Posts: 3
Here is the connection pooling configuration in server.xml:

<Resource name="jdbc/abc" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="10" maxWait="10000"
username="abcv" password="abc" driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@abcdef:1521:ebcde"
removeAbandoned="true" removeAbandonedTimeout="10" logAbandoned="true"/>

Change in context.xml:

<ResourceLink global="jdbc/abc" name="jdbc/abcd" type="javax.sql.DataSource"/>


And persistence.xml is :

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

<persistence-unit name="persistenceUnit">

<provider>org.hibernate.ejb.HibernatePersistence</provider>

<!-- classes mapping is kept here--- >

<properties>
<property name="hibernate.connection.datasource" value="java:comp/env/jdbc/abcd" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
</properties>
</persistence-unit>
</persistence>


Please help.


Top
 Profile  
 
 Post subject: Re: Hibernate JPA Connection reset ERROR
PostPosted: Wed Sep 04, 2013 9:35 am 
Newbie

Joined: Tue Sep 03, 2013 1:37 pm
Posts: 3
This error is not reproducible and it appears once in a while.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.