You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by kurt_cobain <tr...@yahoo.com> on 2009/02/24 00:16:42 UTC

How to get beter stacktraces????

I'm having a very difficult time with OpenJPA (via weblogic).

I often get a strack trace that doesn't help me at all, it just looks like
this:

"org.apache.openjpa.util.StoreException: The transaction has been rolled
back.  See the nested exceptions for details on the errors that occurred."

And yet, there ARE no more details on the error.  I've been able to figure
out a couple of the issues by basically feeling around in the dark and
guessing, but is there ANY way to get better error messages than that?

Please advise...

-Stressed and frustrated 
-- 
View this message in context: http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375022.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: How to get beter stacktraces????

Posted by Pid <p...@pidster.com>.
Pid wrote:
> kurt_cobain wrote:
>> I'm having a very difficult time with OpenJPA (via weblogic).
>>
>> I often get a strack trace that doesn't help me at all, it just looks like
>> this:
>>
>> "org.apache.openjpa.util.StoreException: The transaction has been rolled
>> back.  See the nested exceptions for details on the errors that occurred."
>>
>> And yet, there ARE no more details on the error.  I've been able to figure
>> out a couple of the issues by basically feeling around in the dark and
>> guessing, but is there ANY way to get better error messages than that?
>>
>> Please advise...
> 
> You could add debugging messages to the source code & recompile it.
> Of course, you might be better off asking on the OpenJPA list...

Erm, which of course is this one.
It's late, and I was also reading mail from a couple of other lists.
Apologies & please ignore.

p



Re: How to get beter stacktraces????

Posted by kurt_cobain <tr...@yahoo.com>.
Obviously, I've done that; it's on a single line of code, the persist method of the entity manager. The object graph looks good as far as I can tell.




________________________________
From: Pid (via Nabble) <ml...@n2.nabble.com>
To: kurt_cobain <tr...@yahoo.com>
Sent: Monday, February 23, 2009 5:23:40 PM
Subject: Re: How to get beter stacktraces????

kurt_cobain wrote: 

> I'm having a very difficult time with OpenJPA (via weblogic). 
> 
> I often get a strack trace that doesn't help me at all, it just looks like 
> this: 
> 
> "org.apache.openjpa.util.StoreException: The transaction has been rolled 
> back.  See the nested exceptions for details on the errors that occurred." 
> 
> And yet, there ARE no more details on the error.  I've been able to figure 
> out a couple of the issues by basically feeling around in the dark and 
> guessing, but is there ANY way to get better error messages than that? 
> 
> Please advise... 
You could add debugging messages to the source code & recompile it. 
Of course, you might be better off asking on the OpenJPA list... 

p 





________________________________
 
This email is a reply to your post @ http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375045.html
You can reply by email or by visting the link above.


      
-- 
View this message in context: http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375058.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: How to get beter stacktraces????

Posted by kurt_cobain <tr...@yahoo.com>.
I tried the persistence.xml entry, didn't help... I'm just not sure how to
develop in the dark like this with no useful error message... this isn't the
first time I've gotten that generic error either.

This is just terrible.
-- 
View this message in context: http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375635.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: How to get beter stacktraces????

Posted by Craig L Russell <Cr...@Sun.COM>.
I've see in these cases that it's hard to get the details of what went  
wrong since the error is being reported to you at commit time while  
the error actually occurred earlier.

Getting the earlier stack trace is what is needed, and this requires  
some coordination between WebLogic and OpenJPA.

In EJB, there is a separation of concerns (security, blah blah) that  
means that errors that occur while processing a request are not  
reported to the caller of the business method. The earlier OpenJPA  
exception may have been swallowed by WebLogic. [Certain attack models  
might make use of the specific error stack to discover privileged  
information about the implementation of the system.] Of course, this  
doesn't help the current model which is not trying to attack the  
system, but debug it. So to find the underlying error you may have to  
activate some server side debug tracing and/or logging.

The WebLogic folks might be able to help with the logging  
configuration needed to get the info you need.

Craig

On Feb 23, 2009, at 4:04 PM, kurt_cobain wrote:

>
> Yeah I saw those; but in tracing down into the code, I can see that an
> exception actually never gets thrown. What I get is an exception from
> weblogic like this:
>
> Feb 23, 2009 5:00:01 PM CST> <Error> <EJB> <BEA-010026> <Exception  
> occurred
> during commit of transaction Name=[EJB
> com.... 
> (com 
> ...EntityName)],Xid=BEA1-0064C38439F43057A4BD(1453943),Status=Rolled
> back. [Reason=<1.0.0 fatal store error>
> org.apache.openjpa.util.StoreException: The transaction has been  
> rolled
> back.  See the nested exceptions for details on the errors that
> occurred.],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since
> begin=0,seconds
> left 
> = 
> 30 
> ,XAServerResourceInfo 
> [weblogic 
> .jdbc 
> .wrapper 
> .JTSXAResourceImpl 
> ]= 
> (ServerResourceInfo 
> [weblogic 
> .jdbc 
> .wrapper 
> .JTSXAResourceImpl 
> ]= 
> (state 
> = 
> rolledback 
> ,assigned 
> =AdminServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@866d46,re- 
> Registered
> =
> false),SCInfo[base_domain 
> + 
> AdminServer 
> ]=(state=rolledback),properties=({weblogic.transaction.name=[EJB
> com...sessionBean.methodName(package.Class)],
> weblogic 
> .jdbc 
> = 
> t3 
> :// 
> 10.200.10.89 
> : 
> 7001 
> }),OwnerTransactionManager 
> =ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer 
> +10.200.10.89:7001+base_domain+t3+,
> XAResources={TagStore, LEGACYHOSTDS, VPS,
> weblogic.jdbc.wrapper.JTSXAResourceImpl,
> CSCUD1},NonXAResources={})],CoordinatorURL=AdminServer 
> +10.200.10.89:7001+base_domain+t3+):
> weblogic.transaction.RollbackException: The transaction has been  
> rolled
> back.  See the nested exceptions for details on the errors that  
> occurred.
> 	at
> weblogic 
> .transaction 
> .internal 
> .TransactionImpl.throwRollbackException(TransactionImpl.java:1818)
> 	at
> weblogic 
> .transaction 
> .internal 
> .ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:333)
> 	at
> weblogic 
> .transaction 
> .internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
> 	at
> weblogic 
> .ejb 
> .container 
> .internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:607)
> 	at
> weblogic 
> .ejb 
> .container 
> .internal 
> .StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:57)
> 	at
> weblogic 
> .ejb 
> .container 
> .internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java: 
> 427)
>
> -- 
> View this message in context: http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375201.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: How to get beter stacktraces????

Posted by Michael Dick <mi...@gmail.com>.
Hi,

I've never used WebLogic, so I can't help with specifics. I'd guess that
there was a nested SQLException. Turning on OpenJPA SQL trace might help. In
JSE you can do this by adding a property to persistence.xml :
<property name="openjpa.Log" value="SQL=TRACE"/>

WebLogic may have other ways to enable OpenJPA's SQL trace (quick googling
didn't find an obvious hit, sorry).

If the SQL is obviously wrong, (ie inserting a duplicate key) it should give
you a starting point.

hope this helps,
-mike

On Mon, Feb 23, 2009 at 6:04 PM, kurt_cobain <tr...@yahoo.com>wrote:

>
> Yeah I saw those; but in tracing down into the code, I can see that an
> exception actually never gets thrown. What I get is an exception from
> weblogic like this:
>
> Feb 23, 2009 5:00:01 PM CST> <Error> <EJB> <BEA-010026> <Exception occurred
> during commit of transaction Name=[EJB
>
> com....(com...EntityName)],Xid=BEA1-0064C38439F43057A4BD(1453943),Status=Rolled
> back. [Reason=<1.0.0 fatal store error>
> org.apache.openjpa.util.StoreException: The transaction has been rolled
> back.  See the nested exceptions for details on the errors that
> occurred.],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since
> begin=0,seconds
>
> left=30,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=AdminServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@866d46
> ,re-Registered
> =
> false),SCInfo[base_domain+AdminServer]=(state=rolledback),properties=({
> weblogic.transaction.name=[EJB
> com...sessionBean.methodName(package.Class)],
> weblogic.jdbc=t3://10.200.10.89:7001
> }),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+10.200.10.89:7001
> +base_domain+t3+,
> XAResources={TagStore, LEGACYHOSTDS, VPS,
> weblogic.jdbc.wrapper.JTSXAResourceImpl,
> CSCUD1},NonXAResources={})],CoordinatorURL=AdminServer+10.200.10.89:7001
> +base_domain+t3+):
> weblogic.transaction.RollbackException: The transaction has been rolled
> back.  See the nested exceptions for details on the errors that occurred.
>         at
>
> weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1818)
>        at
>
> weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:333)
>        at
>
> weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
>        at
>
> weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:607)
>        at
>
> weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:57)
>        at
>
> weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:427)
>
> --
> View this message in context:
> http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375201.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>

Re: How to get beter stacktraces????

Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
  The stack trace posted here points to no OpenJPAException. A
OpenJPAException often carry the nested throwables. But in a long JEE stack
who knows who is swallowing whose exceptions? 
   Going by the javadoc of the application-visible
weblogic.transaction.RollbackException, there are two methods of interest
      i) Throwable getNested();
and ii) void superPrintStackTrace(PrintStream). 
   If your application invokes these two methods on the caught exception,
what is the result?

   If you can recurse through getNested().getCause() -- does it let you
reach a OpenJPAException?

 


kurt_cobain wrote:
> 
> Yeah I saw those; but in tracing down into the code, I can see that an
> exception actually never gets thrown. What I get is an exception from
> weblogic like this:
> 
> Feb 23, 2009 5:00:01 PM CST> <Error> <EJB> <BEA-010026> <Exception
> occurred during commit of transaction Name=[EJB
> com....(com...EntityName)],Xid=BEA1-0064C38439F43057A4BD(1453943),Status=Rolled
> back. [Reason=<1.0.0 fatal store error>
> org.apache.openjpa.util.StoreException: The transaction has been rolled
> back.  See the nested exceptions for details on the errors that
> occurred.],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since
> begin=0,seconds
> left=30,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=AdminServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@866d46,re-Registered
> =
> false),SCInfo[base_domain+AdminServer]=(state=rolledback),properties=({weblogic.transaction.name=[EJB
> com...sessionBean.methodName(package.Class)],
> weblogic.jdbc=t3://10.200.10.89:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+10.200.10.89:7001+base_domain+t3+,
> XAResources={TagStore, LEGACYHOSTDS, VPS,
> weblogic.jdbc.wrapper.JTSXAResourceImpl,
> CSCUD1},NonXAResources={})],CoordinatorURL=AdminServer+10.200.10.89:7001+base_domain+t3+):
> weblogic.transaction.RollbackException: The transaction has been rolled
> back.  See the nested exceptions for details on the errors that occurred.
> 	at
> weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1818)
> 	at
> weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:333)
> 	at
> weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
> 	at
> weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:607)
> 	at
> weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:57)
> 	at
> weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:427)
> 
> 

-- 
View this message in context: http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375475.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: How to get beter stacktraces????

Posted by kurt_cobain <tr...@yahoo.com>.
Yeah I saw those; but in tracing down into the code, I can see that an
exception actually never gets thrown. What I get is an exception from
weblogic like this:

Feb 23, 2009 5:00:01 PM CST> <Error> <EJB> <BEA-010026> <Exception occurred
during commit of transaction Name=[EJB
com....(com...EntityName)],Xid=BEA1-0064C38439F43057A4BD(1453943),Status=Rolled
back. [Reason=<1.0.0 fatal store error>
org.apache.openjpa.util.StoreException: The transaction has been rolled
back.  See the nested exceptions for details on the errors that
occurred.],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since
begin=0,seconds
left=30,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=AdminServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@866d46,re-Registered
=
false),SCInfo[base_domain+AdminServer]=(state=rolledback),properties=({weblogic.transaction.name=[EJB
com...sessionBean.methodName(package.Class)],
weblogic.jdbc=t3://10.200.10.89:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+10.200.10.89:7001+base_domain+t3+,
XAResources={TagStore, LEGACYHOSTDS, VPS,
weblogic.jdbc.wrapper.JTSXAResourceImpl,
CSCUD1},NonXAResources={})],CoordinatorURL=AdminServer+10.200.10.89:7001+base_domain+t3+):
weblogic.transaction.RollbackException: The transaction has been rolled
back.  See the nested exceptions for details on the errors that occurred.
	at
weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1818)
	at
weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:333)
	at
weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
	at
weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:607)
	at
weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:57)
	at
weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:427)

-- 
View this message in context: http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375201.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: How to get beter stacktraces????

Posted by "Timothy C. Fanelli" <ti...@timfanelli.com>.
The OpenJPA StoreException class has a "type" property that may provide
you additional information. Make sure also that you're printing out the
stack trace of the nested exception.

Check out the JavaDoc for the exception class:
http://openjpa.apache.org/builds/1.2.0/apache-openjpa-1.2.0/docs/javadoc/index.html

-Tim

On Mon, 2009-02-23 at 15:28 -0800, kurt_cobain wrote:
> The problem is that it isn't telling me "why" the transaction has been rolled back; for example the way you do if you try and insert a null value into a non-nullable column etc, you typically get a jdbc error. I'm getting zero...
> 
> 
> 
> 
> ________________________________
> From: Pid (via Nabble) <ml...@n2.nabble.com>
> To: kurt_cobain <tr...@yahoo.com>
> Sent: Monday, February 23, 2009 5:23:40 PM
> Subject: Re: How to get beter stacktraces????
> 
> kurt_cobain wrote: 
> 
> > I'm having a very difficult time with OpenJPA (via weblogic). 
> > 
> > I often get a strack trace that doesn't help me at all, it just looks like 
> > this: 
> > 
> > "org.apache.openjpa.util.StoreException: The transaction has been rolled 
> > back.  See the nested exceptions for details on the errors that occurred." 
> > 
> > And yet, there ARE no more details on the error.  I've been able to figure 
> > out a couple of the issues by basically feeling around in the dark and 
> > guessing, but is there ANY way to get better error messages than that? 
> > 
> > Please advise... 
> You could add debugging messages to the source code & recompile it. 
> Of course, you might be better off asking on the OpenJPA list... 
> 
> p 
> 
> 
> 
> 
> 
> ________________________________
>  
> This email is a reply to your post @ http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375045.html
> You can reply by email or by visting the link above.
> 
> 
>       


Re: How to get beter stacktraces????

Posted by kurt_cobain <tr...@yahoo.com>.
The problem is that it isn't telling me "why" the transaction has been rolled back; for example the way you do if you try and insert a null value into a non-nullable column etc, you typically get a jdbc error. I'm getting zero...




________________________________
From: Pid (via Nabble) <ml...@n2.nabble.com>
To: kurt_cobain <tr...@yahoo.com>
Sent: Monday, February 23, 2009 5:23:40 PM
Subject: Re: How to get beter stacktraces????

kurt_cobain wrote: 

> I'm having a very difficult time with OpenJPA (via weblogic). 
> 
> I often get a strack trace that doesn't help me at all, it just looks like 
> this: 
> 
> "org.apache.openjpa.util.StoreException: The transaction has been rolled 
> back.  See the nested exceptions for details on the errors that occurred." 
> 
> And yet, there ARE no more details on the error.  I've been able to figure 
> out a couple of the issues by basically feeling around in the dark and 
> guessing, but is there ANY way to get better error messages than that? 
> 
> Please advise... 
You could add debugging messages to the source code & recompile it. 
Of course, you might be better off asking on the OpenJPA list... 

p 





________________________________
 
This email is a reply to your post @ http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375045.html
You can reply by email or by visting the link above.


      
-- 
View this message in context: http://n2.nabble.com/How-to-get-beter-stacktraces-----tp2375022p2375063.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: How to get beter stacktraces????

Posted by Pid <p...@pidster.com>.
kurt_cobain wrote:
> I'm having a very difficult time with OpenJPA (via weblogic).
> 
> I often get a strack trace that doesn't help me at all, it just looks like
> this:
> 
> "org.apache.openjpa.util.StoreException: The transaction has been rolled
> back.  See the nested exceptions for details on the errors that occurred."
> 
> And yet, there ARE no more details on the error.  I've been able to figure
> out a couple of the issues by basically feeling around in the dark and
> guessing, but is there ANY way to get better error messages than that?
> 
> Please advise...

You could add debugging messages to the source code & recompile it.
Of course, you might be better off asking on the OpenJPA list...

p