-->
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: Timestem and jdbc Query Timeout
PostPosted: Mon Jan 29, 2007 4:09 am 
Beginner
Beginner

Joined: Tue Jan 17, 2006 6:16 am
Posts: 31
hi all,
i have install timesten on one computer and configure there Query Timeout like This:

SQLQueryTimeout = 80

and i have JBoss Application Server on another computer and timesten client.
i've timesten-xa-ds.xml configuration file configured like this :

Code:
<set-tx-query-timeout>
<query-timeout>50000</query-timeout>
<set-tx-query-timeout>


and when i tryed to execute sql command i get an error:

Code:
14:19:13,342 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: S1000
14:19:13,344 ERROR [JDBCExceptionReporter] [TimesTen][TimesTen 6.0.4 CLIENT]Query Timeout must be numeric, greater than or equal to 0, and less than the Network Timeout
14:19:13,346 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
14:19:13,346 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:567)
14:19:13,346 ERROR [STDERR] at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:56)
14:19:13,347 ERROR [STDERR] at com.magti.businesslayer.ejb3Fasade.srvprov.MobileServiceFasadeBean.simChange(MobileServiceFasadeBean.java:1381)


can anybody help me ? :(


Top
 Profile  
 
 Post subject: Re: Timestem and jdbc Query Timeout
PostPosted: Wed Jan 31, 2007 1:13 am 
Beginner
Beginner

Joined: Tue Jan 17, 2006 6:16 am
Posts: 31
this is a entity manager bug, when i change my session bean and did look up for connection and try execute sql command by the preparestatement it work, there for this is entity manager bug.
Code:
Query query = timeStenManager      .createNamedQuery("Subscriberserviceparameter.getSubsSrvParameters");
         query = query.setParameter("subsId", new Integer(100000250));
         query = query.setParameter("srvId", new Integer(1));
         query = query.setParameter("pvalue", "8999597280500048477F");
         List<Subscriberserviceparameter> list = query.getResultList();


there was an error but when i change this :
Code:
@Resource(mappedName="java:/TimesTenXAClientDS") DataSource
myTestDB;   
............................................

Connection con = myTestDB.getConnection();
                        PreparedStatement stmt = con.prepareStatement("selects
SERVICEID from RT.SUBSCRIBERSERVICEPARAMETERS  where SERVICEPARAMETERID
= 11111;");
             ResultSet result = stmt.executeQuery();
              System.out.println(" return data");
              while (result.next()) {
                        System.out.println("  ------
"+result.getInt(1));


the problem was fixed.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 5:05 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
and how is configured your persistence provider?

_________________
Emmanuel


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.