-->
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: Can't start a cloned con
PostPosted: Thu Feb 09, 2006 8:51 am 
Beginner
Beginner

Joined: Mon Oct 24, 2005 2:45 am
Posts: 23
Code between sessionFactory.openSession() and session.close():


Could Any one give some info regarding error message.



----------------------------------------------------

COnfigration XML FILE

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<!-- DO NOT EDIT: This is a generated file that is synchronized -->
<!-- by MyEclipse Hibernate tool integration. -->
<hibernate-configuration>

<session-factory>
<!-- properties -->
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://raghuveer:1433;DatabaseName=test</property>
<property name="hibernate.connection.username">test</property>
<property name="hibernate.connection.password">test</property>
<property name="hibernate.dialect">net.sf.hibernate.dialect.SQLServerDialect</property>
<property name="show_sql">true</property>
<!-- mapping files -->
<mapping resource="de/laliluna/library/Book.hbm.xml"/>
<mapping resource="de/laliluna/library/Customer.hbm.xml"/>


</session-factory>

</hibernate-configuration>


-------------------------------------------------
ERROR


6/02/09 18:07:29 BookListAction.....................START
6/02/09 18:07:29 LibraryManager.....getAllBooks................START
6/02/09 18:07:31 Hibernate: select book0_.id as x0_0_ from book book0_ order by book0_.author , boo
0_.title
6/02/09 18:07:32 Hibernate: select book0_.id as id1_, book0_.title as title1_, book0_.author as auth
r1_, book0_.available as available1_, book0_.customer_fk as customer5_1_, customer1_.id as id0_, cus
omer1_.name as name0_, customer1_.lastname as lastname0_, customer1_.age as age0_ from book book0_ l
ft outer join customer customer1_ on book0_.customer_fk=customer1_.id where book0_.id=?
et.sf.hibernate.exception.JDBCConnectionException: could not load: [de.laliluna.library.Book#1]
at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:66)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30)
at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:13
2)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:418)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2130)
at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:2000)
at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1962)
at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:69)
at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:204)
at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:126)
at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:93)
at net.sf.hibernate.impl.IteratorImpl.<init>(IteratorImpl.java:64)
at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:869)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1618)
at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:27)
at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:68)
at de.laliluna.library.struts.action.BookListAction.execute(BookListAction.java:46)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:506)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824

at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
java:330)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledEx
cutor.java:186)
at java.lang.Thread.run(Thread.java:534)
aused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned con
ection while in manual transaction mode.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.setupImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:260)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:235)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:66)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:779)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:265)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:911)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:931)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:59)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:51)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:415)
... 26 more


Top
 Profile  
 
 Post subject: I am having the same problem
PostPosted: Thu Jan 25, 2007 4:07 pm 
Beginner
Beginner

Joined: Mon Apr 24, 2006 9:47 pm
Posts: 33
Location: Kansas City, MO
I am having the same problem, and it started when I changed JDBC drivers from SQL Server 2005 v1.1 to SQL Server 2000 SP3.

I had to change to the 2000 SP3 driver, because we are using Crystal Reports which requires it, and throws NullPointerExceptions when we use the 2005 driver.

If you can, change to the SQL Server 2005 v1.1 driver (compatible with 2000 and 2005 server) located on Microsoft's web site at http://www.microsoft.com/downloads/details.aspx?FamilyID=6d483869-816a-44cb-9787-a866235efc7c&DisplayLang=en

The driver class and url must be changed...

driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://host:port


Top
 Profile  
 
 Post subject: Found a solution that worked for me
PostPosted: Thu Jan 25, 2007 4:28 pm 
Beginner
Beginner

Joined: Mon Apr 24, 2006 9:47 pm
Posts: 33
Location: Kansas City, MO
See http://forum.hibernate.org/viewtopic.php?t=930922&highlight=start+cloned+connection+while+manual


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.