I'm migrating a web application from Tomcat 4.1 to Websphere 5.x and
I've had to temporarily remove a call to SetAutoCommit(false) because it
prevents our application from running properly. We get an error about not
being able to connect to the database. Here is the corresponding log entry:
[12/2/03 9:31:49:383 EST] 364ec082 PrivExAction W J2CA0114W: No
container-managed authentication alias found for connection factory or
datasource pemsds.
[12/2/03 9:31:49:414 EST] 364ec082 LocalTransact E WLTC0033E: Resource
jdbc/pemsds rolled back in cleanup of unresolved
LocalTransactionContainment.
[12/2/03 9:31:49:461 EST] 364ec082 LocalTransact E WLTC0032E: One or more
resources rolled back. An unresolved LocalTransactionContainment had an
unresolved action of rollback.
[12/2/03 9:31:49:461 EST] 364ec082 WebAppTransac E SRVE0183E:
LocalTransaction rolled-back due to setRollbackOnly
[12/2/03 9:31:49:477 EST] 364ec082 WebGroup E SRVE0026E: [Servlet
Error]-[LocalTransaction rolled-back due to setRollbackOnly]:
com.ibm.ws.LocalTransaction.RolledbackException
I've seen some other mention of this problem on different websites, but I
haven't seen a real solution provided anywhere. Any help would be greatly
appreciated.
Thanks,
-Rob
Gotta fix that first exception by configuring an authentication alias.
Go to the DataSource page, down at the bottom you click the link to J2C
authentication aliases, create one with your desired username &
password, then go back to the DataSource and select the alias you just
created for your container-managed authentication alias.
Ken
> > [12/2/03 9:31:49:461 EST] 364ec082 WebAppTransac E SRVE0183E:
LocalTransaction rolled-back due to setRollbackOnly
I have seen a couple of hints that I need to configure a default connection
behaviour for my connection pools but I am not sure where to do this. Any
ideas...?
Thanks,
-Rob
"Ken Hygh" <ken...@nc.rr.com> wrote in message
news:brd1jq$6aq4$1...@news.boulder.ibm.com...
17/03/04 14:25:17:078 GMT] 1d43948a LocalTransact E WLTC0033E: Resource jdbc/ds2 rolled back in cleanup of unresolved LocalTransactionContainment.
[17/03/04 14:25:17:078 GMT] 1d43948a LocalTransact E WLTC0032E: One or more resources rolled back. An unresolved LocalTransactionContainment had an unresolved action of rollback.
[17/03/04 14:25:17:109 GMT] 1d43948a TraceNLS u No message text associated with key LocalTransaction.rolled-back.due.to.setRollbackOnly in bundle com.ibm.ejs.resources.seriousMessages
[17/03/04 14:25:17:109 GMT] 1d43948a WebAppTransac E LocalTransaction rolled-back due to setRollbackOnly
[17/03/04 14:25:17:141 GMT] 1d43948a WebGroup E SRVE0026E: [Servlet Error]-[LocalTransaction rolled-back due to setRollbackOnly]: com.ibm.ws.LocalTransaction.RolledbackException
at com.ibm.ws.LocalTransaction.LocalTranCoordImpl.cleanup(LocalTranCoordImpl.java:966)
at com.ibm.ws.webcontainer.webapp.WebAppTransactionCollaborator.postInvoke(WebAppTransactionCollaborator.java:208)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:632)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:187)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
i have read in other posts that this is 'just a warning'..but still i cannot understand where is the problem.. i am doing plain JDBC connection..
anyone can help me out?
thanx in advance and regards
marco
when using datasources avoid calling any api such as
setAutoCommit(), setTransactionIsolationLevel() etc when running in a
local or global transaction context. if you do call these methods, the
container throws a IllegalStateException/IsolationChangeException
which caues the transaction to rollback. if you do need to change
connection attributes do it via the configuration of the datasource as
suggested by a previous post.
pratap.
<mmis...@waersystems.com> wrote in message news:<406717901.1079533728376.JavaMail.wasadmin@swg3ws006>...
What does it mean : you took a connection, did some SQL and didn't
commit or rollbak :
1) You forgot some commit in your code ?
2) Do you have some transaction with only sql SELECT on connection
with autocommit=false? Because you have to do an action
(commit/rollback) before closing connection.
You can try a simple example to verifing this :
-take a connection
-set autocommit to false
-do a SQL select
-close connection without doing a commit before
==> you will have these messages.
In my case, it's was 2 : we have in you framework, a pool connection
class that gives us a connection with autocommit disabled and I added
a rollback on the connection in the method we use to free the
connection when we are doing select.
For information :
You can change de "Local Transactions - Unresolved-action" of each web
component
to "commit" instead of "rollback" and the messages will disappear.
These informations are in the Web Deployment Descriptor.
In WSAD, go to "Servlet", select a Servlet, in the WebSphere
Extensions you have 3 parameters defining the local transaction
behaviours :
- Boundary: BeanMethod/ActivitySession
- Resolver : Application/ContainerAtBoudary
- Unresolved Action : rollback/commit
In WSAD Help, search "Entity bean assembly settings" and "Web
components assembly settings" for more details.
For information :
>try setting autoCommit=false in the datasource's custom property.
This property isn't available for Oracle Datasource. You will have a
DSRA8020E message (see infocenter).
Hope my bad english will help you :-)
Laurent.
hope this can help someone else
regards
marco