-->
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.  [ 5 posts ] 
Author Message
 Post subject: exception to use the temporary table
PostPosted: Mon Nov 20, 2006 5:08 am 
Newbie

Joined: Fri Nov 17, 2006 8:20 am
Posts: 6
Hello i newbie in Hibernate and my english is not very good.

Ok, the next problem i sent it to the wrong forum,"TOOLS", now i send it to this forum.

I have an application CRUD, created from AndroMDA, with several classes that inherit of others, for example:

camera ---> item
host ---> item

and other tables are associate as well to these:

cameraassignment --associations--> camera

The error happens when i delete a camera, for example.

Hibernate version: 3.1.3

Full stack trace of any exception that occurs:
12:40:55,679 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 42P01
12:40:55,679 ERROR [JDBCExceptionReporter] ERROR: relation "ht_item" does not exist
12:40:55,695 WARN [MultiTableDeleteExecutor] unable to drop temporary id table after use
org.postgresql.util.PSQLException: ERROR: table "ht_item" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:340)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:286)
at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:184)
at org.hibernate.hql.ast.exec.AbstractStatementExecutor$2.doWork(AbstractStatementExecutor.java:149)
at org.hibernate.hql.ast.exec.AbstractStatementExecutor.dropTemporaryTableIfNecessary(AbstractStatementExecutor.java:1
at org.hibernate.hql.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:136)
at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:334)
at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:209)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1126)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
at es.indra.vipet.appcrud.domain.crud.CameraManageableDaoBase.delete(CameraManageableDaoBase.java:380)
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:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy189.delete(Unknown Source)
at es.indra.vipet.appcrud.domain.crud.CameraManageableServiceBase.delete(CameraManageableServiceBase.java:88)
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:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy190.delete(Unknown Source)
at es.indra.vipet.appcrud.domain.crud.ManageCamera.delete(ManageCamera.java:147)
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:585)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at es.indra.vipet.appcrud.domain.crud.ManageCamera.execute(ManageCamera.java:22)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at org.andromda.presentation.bpm4struts.ActionServlet.doPost(ActionServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)

Name and version of the database you are using:PostgreSQL 8.1

The generated SQL (show_sql=true):

12:40:55,679 INFO [STDOUT] Hibernate: insert into HT_item select itemimpl0_.item_id as item_id from public.item itemimpl0_ wh


this same one I have proven it with mysql and works correctly

In the Tools forum commented to me that it could be of driver jdbc, somebody me could confirm.

somebody knows what it is happening? I am becoming crazy

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 20, 2006 9:05 am 
Senior
Senior

Joined: Fri May 14, 2004 9:37 am
Posts: 122
Location: Cologne, Germany
As I already posted before make sure that this isn't the well known bug of postgres with TempTables, even if they say it'll happen only on Linux Machines but I encountered it on Linux and Windows.

unable to drop temporary id table after use
org.postgresql.util.PSQLException: ERROR: table "ht_item" does not exist

This part of the exception sounds to me like you use a temporay table which is a problem in Postgres as far as I know. I had trouble with temp tables inside of Procedures. May be you can test the Beta 8.2 of Postgres and see if the bug is fixed there.

_________________
regards

Olaf

vote if it helped


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 20, 2006 12:05 pm 
Newbie

Joined: Fri Nov 17, 2006 8:20 am
Posts: 6
In the trace of the server postrgresql, I have found that the temporary table is created with “on commit drop”, and when the sentence finishes executing itself, the table is destroyed.

How I can solve this?

Is configuration of hibernate or postgresql?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 5:01 am 
Senior
Senior

Joined: Fri May 14, 2004 9:37 am
Posts: 122
Location: Cologne, Germany
That's a postgres problem as I already mentioned before.

_________________
regards

Olaf

vote if it helped


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 8:15 am 
Newbie

Joined: Fri Nov 17, 2006 8:20 am
Posts: 6
thanks very much to everybody that help me, but I resolve the problem.


there is a thing that I forget to me to say on the application which I am doing and is that also I use spring.

Well, the problem was in the configuration. There is a property in andromda in the namespace of spring, this is localTransactionManager set a org.springframework.orm.hibernate3.HibernateTransactionManager. I don't know why, but this towards which commit was executed after every sentence.

I was reading but about the configuration of spring and i found the properties transactionManager and userTransactionName. Theses properties serve to establish the transaction manager.

I have settled down these properties to:

<property name="transactionManager"> org.springframework.transaction.jta.JtaTransactionManager</property>
<property name="userTransactionName">java:comp/UserTransaction</property>

Now it works ok


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