IllegalStateException (MDB)
Configuration:
OC4J 9.0.2...
Description:
* My web application ceases to function after a while and throws a "Transaction expired (Committed)" exception
* The following exception is logged (application.log):
Error rolling back transaction
java.lang.IllegalStateException: Not active or marked for rollback
at com.evermind.server.ApplicationServerTransaction.rollback(ApplicationServerTransaction.java:524)
at com.evermind.server.ApplicationServerTransaction.rollback(ApplicationServerTransaction.java:486)
at com.evermind.server.ThreadState.reset(ThreadState.java:330)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:852)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
* The application contains a couple of MDBs. They use CMT with "Required" as the attribute setting.
* I'm not sure why the transaction is getting rolled back.
Any help is greatly appreciated.
Thanks,
Ranga
Hi,
We also have a MDB running and we get the same exception in our web app.
It happens only sometimes.
here is the stack trace:
javax.transaction.TransactionRolledbackException: java.lang.IllegalStateException: Transaction expired (Committed) java.lang.Exception com.evermind.server.ejb.EJBUtils.getUserException(java.lang.Throwable, boolean) EJBUtils.java:185 java.lang.String Sso_StatelessSessionBeanWrapper0.createSession(java.lang.String, java.lang.String) Sso_StatelessSessionBeanWrapper0.java:518 java.lang.String swf.common.prj.sso.ejb.SsoBD.createSession(java.lang.String, java.lang.String)
what is the problem here?
Thanks
Guenther
Similar Messages
-
Using MDBs for long running transactions
Although MDBs are not the best vehicles for running long transactions, I am
forced to use them for one such scenario (let's say for lack of a better
pattern). In order to let my long running MDB (with Container Managed Tx)
do it's chores I increased the time-out value to a higher number rather than
using the default of 30 secs. Strangely, I was seeing
IllegalStateExceptions in stdout. So I created a brand new test MDB with a
Thread.sleep for 60 seconds, increased my MDBs timeout value to 120 secs,
made sure there was only one MDB in the pool and ran the test again. I
still see the below error after 30 seconds.
I guess I should probably open a support case, but I thought I'll post here
as well in case there's something I am missing.
<May 27, 2003 5:26:31 PM PDT> <Notice> <EJB> <Error marking transaction for
rollback: java.lang.IllegalStateException: Cannot m
ark the transaction for rollback. xid=64:bea55f200db2c786, status=Rolled
back. [Reason=weblogic.transaction.internal.TimedOutEx
ception: Transaction timed out after 34 seconds
Xid=64:bea55f200db2c786(-33600248),Status=Active,numRepliesOwedMe=0,numRepli
esOwedOthers=0,seconds since begin=34,seconds left=
30,activeThread=Thread[ExecuteThread: '9' for queue: 'default',5,Thread
Group for Queue: 'default'],ServerResourceInfo[JMS_hmJD
BCStore]=(state=started,assigned=none),SCInfo[wlcsDomain+wlcsServer]=(state=
active),OwnerTransactionManager=ServerTM[ServerCoor
dinatorDescriptor=(CoordinatorURL=wlcsServer+155.14.3.140:7501+wlcsDomain+,
Resources={})],CoordinatorURL=wlcsServer+155.14.3.1
40:7501+wlcsDomain+)]
java.lang.IllegalStateException: Cannot mark the transaction for rollback.
xid=64:bea55f200db2c786, status=Rolled back. [Reason
=weblogic.transaction.internal.TimedOutException: Transaction timed out
after 34 seconds
Xid=64:bea55f200db2c786(-33600248),Status=Active,numRepliesOwedMe=0,numRepli
esOwedOthers=0,seconds since begin=34,seconds left=
30,activeThread=Thread[ExecuteThread: '9' for queue: 'default',5,Thread
Group for Queue: 'default'],ServerResourceInfo[JMS_hmJD
BCStore]=(state=started,assigned=none),SCInfo[wlcsDomain+wlcsServer]=(state=
active),OwnerTransactionManager=ServerTM[ServerCoor
dinatorDescriptor=(CoordinatorURL=wlcsServer+155.14.3.140:7501+wlcsDomain+,
Resources={})],CoordinatorURL=wlcsServer+155.14.3.1
40:7501+wlcsDomain+)]
at
weblogic.transaction.internal.TransactionImpl.throwIllegalStateException(Tra
nsactionImpl.java:1486)
at
weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImp
l.java:466)
at
weblogic.ejb20.manager.BaseEJBManager.handleSystemException(BaseEJBManager.j
ava:255)
at
weblogic.ejb20.manager.BaseEJBManager.setupTxListener(BaseEJBManager.java:21
5)
at
weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.java:153)
at
weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:117)
at
weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObject.java
:63)
at
com.xoriant.hm.ejb.session.HierarchyManagerBean_fzysig_EOImpl.getHierarchyId
(HierarchyManagerBean_fzysig_EOImpl.java
:1477)
at
com.ebiz.application.customerprofile.hm.CPXHMController.SynchronizeMHTH(Unkn
own Source)
at
com.ebiz.application.customerprofile.hm.CPHMOrgGroupMsgBean.onMessage(Unknow
n Source)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:254)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Hi Adarsh,
It may be that the transaction time-out setting in the descriptor
is not taking effect. The tx is still timing out after
the default 30 seconds, so the later attempt to call
"setRollbackOnly" fails as the transaction has already
rolled back The ignored descriptor setting is a known issue
in some earlier SPs, but I'm not sure when and where it
was fixed - so yes, contact customer support. The work-around
is to set the default transaction time-out for the entire server to a
higher value. (I'm not sure where to set this on the console,
but the relevant JTA MBean field is "TimeoutSeconds".)
Tom
Adarsh Dattani wrote:
> Although MDBs are not the best vehicles for running long transactions, I am
> forced to use them for one such scenario (let's say for lack of a better
> pattern). In order to let my long running MDB (with Container Managed Tx)
> do it's chores I increased the time-out value to a higher number rather than
> using the default of 30 secs. Strangely, I was seeing
> IllegalStateExceptions in stdout. So I created a brand new test MDB with a
> Thread.sleep for 60 seconds, increased my MDBs timeout value to 120 secs,
> made sure there was only one MDB in the pool and ran the test again. I
> still see the below error after 30 seconds.
> I guess I should probably open a support case, but I thought I'll post here
> as well in case there's something I am missing.
>
> <May 27, 2003 5:26:31 PM PDT> <Notice> <EJB> <Error marking transaction for
> rollback: java.lang.IllegalStateException: Cannot m
>
> ark the transaction for rollback. xid=64:bea55f200db2c786, status=Rolled
> back. [Reason=weblogic.transaction.internal.TimedOutEx
>
> ception: Transaction timed out after 34 seconds
>
> Xid=64:bea55f200db2c786(-33600248),Status=Active,numRepliesOwedMe=0,numRepli
> esOwedOthers=0,seconds since begin=34,seconds left=
>
> 30,activeThread=Thread[ExecuteThread: '9' for queue: 'default',5,Thread
> Group for Queue: 'default'],ServerResourceInfo[JMS_hmJD
>
> BCStore]=(state=started,assigned=none),SCInfo[wlcsDomain+wlcsServer]=(state=
> active),OwnerTransactionManager=ServerTM[ServerCoor
>
> dinatorDescriptor=(CoordinatorURL=wlcsServer+155.14.3.140:7501+wlcsDomain+,
> Resources={})],CoordinatorURL=wlcsServer+155.14.3.1
>
> 40:7501+wlcsDomain+)]
>
> java.lang.IllegalStateException: Cannot mark the transaction for rollback.
> xid=64:bea55f200db2c786, status=Rolled back. [Reason
>
> =weblogic.transaction.internal.TimedOutException: Transaction timed out
> after 34 seconds
>
> Xid=64:bea55f200db2c786(-33600248),Status=Active,numRepliesOwedMe=0,numRepli
> esOwedOthers=0,seconds since begin=34,seconds left=
>
> 30,activeThread=Thread[ExecuteThread: '9' for queue: 'default',5,Thread
> Group for Queue: 'default'],ServerResourceInfo[JMS_hmJD
>
> BCStore]=(state=started,assigned=none),SCInfo[wlcsDomain+wlcsServer]=(state=
> active),OwnerTransactionManager=ServerTM[ServerCoor
>
> dinatorDescriptor=(CoordinatorURL=wlcsServer+155.14.3.140:7501+wlcsDomain+,
> Resources={})],CoordinatorURL=wlcsServer+155.14.3.1
>
> 40:7501+wlcsDomain+)]
>
> at
> weblogic.transaction.internal.TransactionImpl.throwIllegalStateException(Tra
> nsactionImpl.java:1486)
>
> at
> weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImp
> l.java:466)
>
> at
> weblogic.ejb20.manager.BaseEJBManager.handleSystemException(BaseEJBManager.j
> ava:255)
>
> at
> weblogic.ejb20.manager.BaseEJBManager.setupTxListener(BaseEJBManager.java:21
> 5)
>
> at
> weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.java:153)
>
> at
> weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:117)
>
> at
> weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObject.java
> :63)
>
> at
> com.xoriant.hm.ejb.session.HierarchyManagerBean_fzysig_EOImpl.getHierarchyId
> (HierarchyManagerBean_fzysig_EOImpl.java
>
> :1477)
>
> at
> com.ebiz.application.customerprofile.hm.CPXHMController.SynchronizeMHTH(Unkn
> own Source)
>
> at
> com.ebiz.application.customerprofile.hm.CPHMOrgGroupMsgBean.onMessage(Unknow
> n Source)
>
> at weblogic.ejb20.internal.MDListener.execute(MDListener.java:254)
>
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
>
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
>
>
-
Trying to call stateless session bean from MDB
Folks,
Am working on RAD and WAS 8.
I have an MDB. And a stateless session bean (AOBean under EJB project).
While the listener listens to the messages from queue, it also tries to persist to db. I want to achieve this via a method of AOBean (through instantiating session bean or by injection).
I have been sucessful by invoking a method from AOBean class - that method just returns a string (without any objects being passed)
Problem:
I am getting IllegalStateException when I try to invoke a method of AOBean class, that has an object as a parameter
For eg:
MDB
@EJB(name="ejb/TransactionMgrAOBean", mappedName="ejb/TransactionMgrAOBean")
ITransactionMgrAO tranAO;
public void onMessage(Message message) {
TextMessage textMessage = (TextMessage) message;
boolean status = false;
try {
TransactionVO tranVO = getTransactionVO();//Here building the object to be passed to session bean
String status1 = tranAO.getVersion(tranVO);
}catch(Exception e){
AOBean
@Stateless
@Remote({ ITransactionMgrAO.class })
@WebService
public class TransactionMgrAOBean {
public String getVersion(TransactionVO tranVO) throws Exception{
try{
//business logic
} catch(Exception e){
throw e;
return true;
TransactionVO implements Serializable has also inner static classes that are not Serializable.
EXCEPTION: At runtime we are getting exception saying that the inner classes are not serialized.
REASON why we are invoking session bean from MDB? We found that if we invoke any service from AOBean the transaction management was successful. We are using sessionContext.setRollBackonly when an exception occurs. Tranasactions are not rolled back when any db exception occurs if we invoke business logic methods from Model layer of another NON-EJB package.
Hope I have provided enough information!My concret problem is that I want to call an ejb session contained in an ejb project from a session bean in a different web project. When I include the code in my web session bean I get the error adjunted:
- Code:
@EJB
private UserRemote userSessionBean;
- Error:
Exception Details: javax.naming.NameNotFoundException
pac.UserRemote#pac.UserRemote not found
Possible Source of Error:
Class Name: com.sun.enterprise.naming.TransientContext
File Name: TransientContext.java
Method Name: doLookup
Line Number: 216
Any suggestion? -
IllegalStateException - SSB loosing transaction context
I have a following scenario
1. MDB1(txn not supported) calls SSB1 (txn att = required)
2. SSB1 calls some other SSBs and Enity beans with txn attt = required.
3. SSB1 catches checked exception and calls rollback
catch ( MyCheckedException e){
this.getSessionContext().setRollbackOnly();
throw e;
Note that setRollbackOnly() is called from SSB1 which is in transaction but still
I get following error on weblogic console that setRollbackOnly() is called from
a bean which is not participating in transaction. This behavior is not consistent
it happens some time. I re-started the server and weblogic started executing txns
properly.
My question is when a pair of MDB and SSB is used does SSB LOOSES it's transaction
CONTEXT in some situation?
I would really appreciate and early help as it is critical for the project
thanks
========== weblogic log ===============
<Jul 31, 2003 12:57:34 PM PDT> <Info> <EJB> <EJB Exception during invocation from
home: com.cobaltgroup.products.lc.queue.ejb.EmailMessageTaskBean_tatdyp_HomeImpl@7
f44f3 threw exception: java.lang.IllegalStateException: Illegal attempt to call
EJ
BContext.setRollbackOnly() from an EJB that was not participating in a transactionDeyan,
I assumed that Saurabh's statement that SSB1 has Required attribute is true.
The Spec says:
"17.6.2.8 Handling of setRollbackOnly() method
The Container must handle the EJBContext.setRollbackOnly() method
invoked from a business method executing with the Required, RequiresNew,
or Mandatory transaction attribute as follows:
- The Container must ensure that the transaction will never commit.
Typically, the Container instructs the transaction manager to mark the
transaction for rollback.
I'd guess that TX gets rolled back as soon as control returned
to the container from dispatched method called setRollbackOnly().
As you can see, the Spec allows it and it does make sence
taking in account cost of holding TX.
Slava
"Deyan D. Bektchiev" <[email protected]> wrote in message
news:[email protected]...
Slava,
According to the EJB spec the transaction should not end just because at
some point it was marked for rollback, only that it should never commit.
The EJB should still be able to call setRollbackOnly without any problems.
It look more like the transaction context is either never created or
lost somehow.
And if there is no transactional context
SessionContext.getRollbackOnly() will throw the same exception (EJB 2.0
Section 7.6.1 for stateful and Section 7.8.2 for stateless session EJBs).
So I'd start by making sure that the EJB is not marked with BMT and
"Required" TX attribute -- in that case the EJB will use BMT and the TX
attribute is ignored.
Another way to see that there is a transaction is to use
System.out.println(weblogic.transaction.TxHelper.getTransaction); to
print the current transaction and verify that there is actually one.
Regards,
Dejan
Slava Imeshev wrote:
Hi Saurabh,
It could happen because by the time SSB1 received the exception the TX
has
been rolled back already.
The code in the catch block should look like the following:
catch ( MyCheckedException e){
if (!this.getSessionContext().getRollbackOnly()) {
this.getSessionContext().setRollbackOnly();
throw e;
Regards,
Slava Imeshev
"Saurabh Kumar" <[email protected]> wrote in message
news:[email protected]...
I have a following scenario
1. MDB1(txn not supported) calls SSB1 (txn att = required)
2. SSB1 calls some other SSBs and Enity beans with txn attt = required.
3. SSB1 catches checked exception and calls rollback
catch ( MyCheckedException e){
this.getSessionContext().setRollbackOnly();
throw e;
Note that setRollbackOnly() is called from SSB1 which is in transaction
but still
I get following error on weblogic console that setRollbackOnly() is
called
>>>
>>>
from
a bean which is not participating in transaction. This behavior is not
consistent
it happens some time. I re-started the server and weblogic started
executing txns
properly.
My question is when a pair of MDB and SSB is used does SSB LOOSES it's
transaction
CONTEXT in some situation?
I would really appreciate and early help as it is critical for the
project
>>>
thanks
========== weblogic log ===============
<Jul 31, 2003 12:57:34 PM PDT> <Info> <EJB> <EJB Exception during
invocation from
home:
com.cobaltgroup.products.lc.queue.ejb.EmailMessageTaskBean_tatdyp_HomeImpl@7
>>
>>
f44f3 threw exception: java.lang.IllegalStateException: Illegal attemptto
>>>
>>>
call
EJ
BContext.setRollbackOnly() from an EJB that was not participating in a
transaction -
MDB Timeouts and transaction behavior
Hi, thanks in advance for any help with this.
We have a MDB where we have set the timeout to five minutes. In a particular case this timeout is being reached but even though the MDB times out the transaction and sends the message for redelivery the original transaction that was processing the message continues until something happens from an application standpoint to cause that original transaction to complete. This means that we have the same message processed twice under these circumstances.
I would have expected that if a transaction timed out that the transaction would have been terminated and therefore our processing would have stopped. Is there a way to force this behavior or do we have to put an alarm in our code and kill ourselves such that we never encounter the transaction time out?
Thanks,
Sue ShanabrookI should have mentioned that we are using container managed transactions.
-
IllegalStateException when changing display mode of JFrame
My application has an information console inside a JFrame. The console is continually updating and repainting.
I let the user drag this window wherever they want, resize it how they want, etc. I also give them the ability to select one of three display modes:
- "Decorated Window"
- "Undecorated Maximized Window"
- "Undecorated Fullscreen Exclusive Window"
The toggling between modes normally works well, but occasionally an "IllegalStateException: Buffers have not yet been created" is thrown by (from what I can tell), a component on the console that's trying to be repainted.
Seems obvious to me that something doesn't like the fact that the JFrame has been disposed for an instant and can't deal with it appropriately. Question is, what the hell can I do about it?
I believe everything continues fine despite the exception (although I have a hard time reproducing on my system), but still, it's a wart and I'd like to chop it off.
Here's my code for changing the window mode.
public void setDisplayMode(Component parent,
ConsoleDisplayMode newDisplayMode) {
GraphicsDevice device = this.getGraphicsConfiguration().getDevice();
int state;
switch (newDisplayMode) {
case DisplayAsDecoratedWindow:
// Add the decorations
this.dispose();
this.setUndecorated(false);
this.setVisible(true);
device.setFullScreenWindow(null);
// De-iconify
state = this.getExtendedState();
state &= ~JFrame.ICONIFIED;
this.setExtendedState(state);
// Minimize
state = this.getExtendedState();
state &= ~JFrame.MAXIMIZED_BOTH;
this.setExtendedState(state);
break;
case DisplayAsUndecoratedWindow:
// Remove the decorations
this.dispose();
this.setUndecorated(true);
this.setVisible(true);
device.setFullScreenWindow(null);
// Make sure it is de-iconified
state = this.getExtendedState();
state &= ~JFrame.ICONIFIED;
this.setExtendedState(state);
// Maximize
state = this.getExtendedState();
state |= JFrame.MAXIMIZED_BOTH;
this.setExtendedState(state);
break;
case DisplayFullScreenExclusive:
if (device.isFullScreenSupported()) {
int choice = JOptionPane
.showConfirmDialog(
parent,
"Warning:\n\n"
+ "This mode is meant for users with a multiple-monitor configuration.\n"
+ "In this mode, the console controls the graphics device exclusively\n"
+ "and other windows (such as the other TM windows and dialogs) cannot\n"
+ "be displayed over the console.\n\n"
+ "If you have a single monitor, use the mode called\n"
+ "\""
+ ConsoleDisplayMode.DisplayAsUndecoratedWindow
.toString() + "\".\n\n"
+ "Continue with this mode?",
"Confirm full-screen mode",
JOptionPane.YES_NO_OPTION,
JOptionPane.WARNING_MESSAGE, ChipIconFactory
.getWarningChipIcon());
if (choice == JOptionPane.YES_OPTION) {
this.dispose();
this.setUndecorated(true);
this.setVisible(true);
state = this.getExtendedState();
state &= ~JFrame.ICONIFIED;
this.setExtendedState(state);
device.setFullScreenWindow(this);
} else {
JOptionPane
.showMessageDialog(
null,
"Your graphics device does not support full-screen mode",
"Unable to display in full-screen mode",
JOptionPane.ERROR_MESSAGE, ChipIconFactory
.getErrorChipIcon());
break;
}jneau wrote:
My application has an information console inside a JFrame. The console is continually updating and repainting.
The toggling between modes normally works well, but occasionally an "IllegalStateException: Buffers have not yet been created" is thrown by (from what I can tell), a component on the console that's trying to be repainted.Are you certain all your interaction with the GUI happens on the EDT? -
How to read .mdb file from shared folder
Hi All,
In one of my local computer I have a shared folder and within the folder I have a .mdb file. Now I am trying to read that file from MII. I have tried with Get_File_List action block. I am providing the following information to Get_File_List
Folder :
<Computer Name>\<Shared Folder Name>
Mask: .mdb
But in return of Get_File_List, I am not getting any file related information. It is only providing like below
<Rowsets>
<Rowset>
<Columns>
<Column Description="Name" MaxRange="0" MinRange="0" Name="Name" SQLDataType="1" SourceColumn="Name"/>
<Column Description="Date" MaxRange="0" MinRange="0" Name="Date" SQLDataType="93" SourceColumn="Date"/>
<Column Description="Size" MaxRange="100" MinRange="0" Name="Size" SQLDataType="4" SourceColumn="Size"/>
<Column Description="LastWriteDate" MaxRange="0" MinRange="0" Name="LastWriteDate" SQLDataType="93" SourceColumn="LastWriteDate"/>
<Column Description="ReadOnly" MaxRange="1" MinRange="0" Name="ReadOnly" SQLDataType="4" SourceColumn="ReadOnly"/>
<Column Description="FullPath" MaxRange="0" MinRange="0" Name="FullPath" SQLDataType="1" SourceColumn="FullPath"/>
</Columns>
</Rowset>
</Rowsets>
Can anybody suggest me how to achieve it.
Thanks in advance
ChandanHi Chandan,
Specify the mask as *.mdb and try.
Thanks,
Dipankar -
I have a web service that I am trying to use an MDB with.
I have a web service where I request using soapUI, and the the response from the soapUI that I get is correct. However, in addition to this "regular" program flow, I am sending data to a queue where 2 things should happen:
1. my message should get put in that queue....(not a problem I think, it's says it can connect and send to this one)
2. a MDB should get triggered, but isn't, and the MDB should start it's own program flow after this.
this is the basics as to what is happening in my program, and I get this error below on the end of the output. so would anyone have any theories as to what might be wrong?
ApplicationDispatcher[] Servlet.service() for servlet HandlePrecompiledJsp threw exception
com.sun.enterprise.tools.guiframework.exception.FrameworkException: Unabled to handle pre-compiled JSP '/jsp/LogDetail.jsp'. Expected pre-compiled classname: 'org.apache.jsp.jsp.LogDetail_jsp'.
at com.sun.enterprise.tools.admingui.servlet.HandlePrecompiledJsp.doPost(HandlePrecompiledJsp.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
at com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:340)
at com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
at com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.execute(DescriptorViewHelper.java:316)
at com.sun.enterprise.tools.guiframework.view.DescriptorViewBeanBase.execute(DescriptorViewBeanBase.java:192)
at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
Caused by: javax.servlet.ServletException: com.sun.enterprise.tools.guiframework.exception.FrameworkException: java.lang.reflect.InvocationTargetException while attempting to process a 'beginDisplay' event for 'LogDetail'.
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
at org.apache.jsp.jsp.LogDetail_jsp._jspService(LogDetail_jsp.java:126)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at com.sun.enterprise.tools.admingui.servlet.HandlePrecompiledJsp.doPost(HandlePrecompiledJsp.java:57)
... 67 more
LavanyaYou cannot gift to another country at all.
-
MDB(Message Driven Bean) is not working in MDM2.0.1
Hi,
I am trying to use MDB for importing files.I followed the Weblogic_jms_Integration(1308181.1) document and i created all the xml files CM_config.xmCM_ejb-jar.xml.wls.jms_1.includel.win.exit_4.include,CM_config.xml.win.jms.include,CM_ejb-jar.xml.wls.mdb.include,CM_weblogic-ejb-jar.xml.jms.include and put these files in respective directory as mentioned in the document.I have created one XAI inbound service ,XAI JNDI Servers,JMS Connection,Jms Queue and i am putting my msgs in queue in web logic server.But it is nt picking files from queues.It is showing some errors like:
Error:
Table CI_XAI_JNDI_SVR has a maintenance program entry CIPXJSVR that is not found in the program components table
I think here MDB is nt enabling thats why it is not picking the files from queue.
But we are able to pick that files from queue by MPL.
Please help me in this regards.
Thanks.
SUNILHi,
I am trying to use MDB for importing files.I followed the Weblogic_jms_Integration(1308181.1) document and i created all the xml files CM_config.xmCM_ejb-jar.xml.wls.jms_1.includel.win.exit_4.include,CM_config.xml.win.jms.include,CM_ejb-jar.xml.wls.mdb.include,CM_weblogic-ejb-jar.xml.jms.include and put these files in respective directory as mentioned in the document.I have created one XAI inbound service ,XAI JNDI Servers,JMS Connection,Jms Queue and i am putting my msgs in queue in web logic server.But it is nt picking files from queues.It is showing some errors like:
Error:
Table CI_XAI_JNDI_SVR has a maintenance program entry CIPXJSVR that is not found in the program components table
I think here MDB is nt enabling thats why it is not picking the files from queue.
But we are able to pick that files from queue by MPL.
Please help me in this regards.
Thanks.
SUNIL -
How to read accdb and mdb files using JDBC or File Adapter
Hi,
How to read and extract the .accdb and .mdb files from FTP server and parsing into xml by using FTP or JDBC Adapter in SAP PI7.11 With linx Os.
Regards
UpendraHi,
As per SAP note:1681420 i have to install the below driver from Microsoft
Our SAP PI installed under Unxi OS ,how to install the driver (.exe file) .
Driver name :AccessDatabaseEngine_x64.exe
Url:Download Microsoft Access Database Engine 2010 Redistributable from Official Microsoft Download Center
1681420 - PI : Where to locate the JDBC Driver for Microsoft Access
Regards
Upendra -
Access Database (.mdb) on Windows Server 2012 R2 Essentials
Hi guys, thanks for your time!
SCENARIO:
- Windows Server 2012 R2 Essentials
- Windows 7 Ultimate Clients (3 clients)
- VB6 application on clients using a MS Database (.mdb) hosted on the server.
- Clients access the database (.mdb) via a mapped network drive (K:).
PROBLEM:
- Microsoft Database (.mdb) on server gets corrupted frequently.
- Clients don't "flush their changes" back to the database: database was not updated.
WORKAROUND:
- Database was moved from the server to one of the Windows 7 clients.
- Application is running OK.
CONFIGURATION:
- Permissions are correct: network and NTFS.
- No faulty network hardware: switch, cabling, NICs.
- Computers and Server hardware is new.
- UPS are used everywhere.
SOME LINKS:
SMB 3.0
- Opportunistic Locking and Read Caching on Microsoft Windows Networks.
- Windows 7 cannot
open the shared MS Access database if it's opened by another user
- Initializing the
Microsoft Jet 4.0 Database Engine Driver
- Moved to
Server 2012 getting Access Database Corruption
Oplocks
- Configuring
opportunistic locking in Windows
- Understanding
offline files
- How to
enable and disable SMBv1, SMBv2, and SMBv3
- Is it possible to
monitor and log actual queries against an Access MDB?
Now, server is useless if it is not hosting our database. Any ideas, please? Do I need to diagnose using Wireshark? Or using Sysinternals Process Monitor? I think that is a waste of time.
Thank you!Thanks for your reply.
Software is from a 3rd party provider. It currently supports concurrency. It was deployed on Windows XP. SQL Server would be a nice upgrade, however that is
not an option.
Something has changed with newer versions of Windows. That is what I am going to study in a lab I prepared with a real server and some clients.
File-sharing databases (Microsoft JET databases) are very old technology even before I was a college student. However, I have been very busy researching this technology.
It was made for multi-user environments. It is highly tied to file sharing services from Windows: SMB protocol.
Windows XP, Vista, 7 and 8 use different versions of this protocol. I think that is the root of the problem. With old technology, application was running fine.
With new technology, application is troublesome. I will check several things: JET drivers vs. ACE drivers, SMB tweaks, etc.
UPDATE:
Basically, there are 4 general answers to this issue:
1) Migrate your Access Database to SQL Server Express (or another RDBMS engine).
2) @Server: disable SMB 2.0/3.0 protocol stack by powershell command. Network speed decreases.
3) @Clients: disable client redirector caches by using regedit.
4) @Server: disable the leasing on the file server.
5) @Server: tuning Broadcom NIC parameters.
References:
- https://technet.microsoft.com/en-us/library/ff686200(WS.10).aspx
- https://msdn.microsoft.com/en-us/library/windows/desktop/aa365433(v=vs.85).aspx
- http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Q_28482197.html
- http://tipsntricks.sherr.co.uk/stop-smb-corrupting-files/
- http://www.dataaccess.com/whitepapers/opportunlockingreadcaching.html
- https://social.technet.microsoft.com/forums/windowsserver/en-US/67baa9fd-5eaf-438e-9cc4-dc1a531b9e19/disabling-oplocksmb2-vs-fileinfocachelifetime
- https://social.technet.microsoft.com/Forums/windowsserver/en-US/7336d31b-6c24-468a-9c47-750244ae3a8c/moved-to-server-2012-getting-access-database-corruption
- https://social.technet.microsoft.com/Forums/en-US/e9567167-22db-4b8c-9f96-a08b97d507f9/server-2012-r2-file-server-stops-responding-to-smb-connections
- http://support2.microsoft.com/kb/2957623
- http://support2.microsoft.com/kb/2899011
- http://support2.microsoft.com/kb/2955164
- https://social.technet.microsoft.com/Forums/en-US/7bd0aa5b-eb95-40a8-a56d-c6013273665c/extremely-slow-smb-network-speed-server-2012-r2?forum=winserver8gen -
MS SQL Server problem with MDB's: javax.transaction.xa.XAException
I am programming agents in j2ee and using MDB to implement the asynchronicity of
the agents.
Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
the agent's ID and the action that the agent has to perform. The MDB creates a
SFSB, and calls the appropriate action from this session bean. Those actions require
to read and write from my MS SQL Server 2000 XA database. But when running my
program, I often get this error, which doesn't seem to affect the action, because
when I check my database data, everything is updated correctly. So the program
still completes, but the errors slow down the execution (the program hangs for
about 3 seconds, each time the error occurs).
Does anybody has an explanation or solution for this?
Thank you...
This is the error output:
onMessage()
Reading MapMessage: 1
<26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
[Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0)returns -4
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
Pool
[BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
exception:
[javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
I am programming agents in j2ee and using MDB to implement the asynchronicity of
the agents.
Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
the agent's ID and the action that the agent has to perform. The MDB creates a
SFSB, and calls the appropriate action from this session bean. Those actions require
to read and write from my MS SQL Server 2000 XA database. But when running my
program, I often get this error, which doesn't seem to affect the action, because
when I check my database data, everything is updated correctly. So the program
still completes, but the errors slow down the execution (the program hangs for
about 3 seconds, each time the error occurs).
Does anybody has an explanation or solution for this?
Thank you...
This is the error output:
onMessage()
Reading MapMessage: 1
<26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
[Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0)returns -4
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
Pool
[BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
exception:
[javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
-
MDB (2-phase commit) behavior during abnormal JMS termination
Hello to everyone!
I plan to test the following scenario tomorrow (sort of a bug replication in our system).
Anyway, wanted to know in advance the expected behavior (just in case one of you already know
or have an experience related to this test). Thank you in advance.
Scenario:
I want to test/know the behavior of a 2-phase commit (2PC) MDB when JMS server abnormally exits
(say the process was killed).
Test flow:
start app server --> deploy 2pc-mdb --> send dummy data --> kill jms process --> restart jms process
1. will the connection be closed properly?
2. when jms server restarts, will the value of active consumer(count) doubled?
note: i think after mdb deployment, corresponding destination consumer count is 1.
the problem that occurred in our system was that the consumer count doubled after server restarted.
it seem like the previous connection was not closed when the jms server abnormally terminated.
any inputs will be greatly appreciated.
thanks and best regards.You have to use TxDataSource for container managed tx or if you are using JTA (in
addition to ofcourse doing 2PC).
S
"Dale Olzer" <[email protected]> wrote:
>
Using weblogic 6.1 SP 4
I have a simple container managed Message Driven Bean. Using a destination
type
javax.jms.Queue.
When the onMessage method finishes the Message is still Pending on the
queue.
see the ejb-jar.xml below
<ejb-jar>
<enterprise-beans>
<message-driven>
<display-name>IvrMessageBean</display-name>
<ejb-name>IvrMsgBean</ejb-name>
<ejb-class>com.edocs.ps.ivr.IvrMsgBean</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
</ejb-jar>
I noticed when I set a JDBC TX DataSource to 2 Phase Commit, the JMS
transaction
started commitig and nothing was left pending in the Queue.
Does 2PC have to be set in a DataSource for Container Managed MDB's to
work? -
MDB container managed transaction demarcation not working in wls 6.1 beta
I have an MDB which sends the messages it receives onto another JMS
destination within the onMessage method. These messages are not sent to
the JMS destination unless I explicitly use a transacted session for the
destination and subsequently commit the session. If I set the transacted
parameter to Session as false the messages are sent. If I set the
transacted parameter to true the messages will only be output if the
session is committed. This is the standard behaviour for a JMS session
but this is not the correct behaviour for an MDB running with
container-managed transaction demarcation.
For a start the transacted parameter to session should be ignored when
run in the context of a container transaction and the commit method
should thrown an exception as it is not allowed within the context of a
container transaction.
This is the MDB code and the deployment descriptor: -
public class MessageBean implements MessageDrivenBean, MessageListener
private String topicName = null;
private TopicConnectionFactory topicConnectionFactory = null;
private TopicConnection topicConnection = null;
private TopicSession topicSession = null;
private Topic topic = null;
private TopicPublisher topicPublisher = null;
private TextMessage textMessage=null;
private transient MessageDrivenContext messageDrivenContext = null;
private Context jndiContext;
public final static String
JMS_FACTORY="weblogic.examples.jms.TopicConnectionFactory";
public final static String
TOPIC="weblogic.examples.jms.exampleTopic";
public MessageBean()
public void setMessageDrivenContext(MessageDrivenContext
messageDrivenContext)
this.messageDrivenContext = messageDrivenContext;
public void ejbCreate()
public void onMessage(Message inMessage)
try
jndiContext = new InitialContext();
topicConnectionFactory =
(TopicConnectionFactory)jndiContext.lookup(JMS_FACTORY);
topic = (Topic) jndiContext.lookup(TOPIC);
topicConnection =
topicConnectionFactory.createTopicConnection();
topicConnection.start();
// The transacted parameter should be ignored in the context of a
container tx
topicSession = topicConnection.createTopicSession(true,
Session.AUTO_ACKNOWLEDGE);
topicPublisher = topicSession.createPublisher(topic);
textMessage = (TextMessage)inMessage;
topicPublisher.publish(inMessage);
// this is illegal in a container transaction
topicSession.commit();
topicConnection.close();
catch (JMSException je)
throw new EJBException(je);
catch (NamingException ne)
throw new EJBException(ne);
public void ejbRemove()
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<message-driven>
<display-name>MessageBean</display-name>
<ejb-name>MessageBean</ejb-name>
<ejb-class>MessageBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<security-identity>
<description></description>
<run-as>
<description></description>
<role-name></role-name>
</run-as>
</security-identity>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MessageBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Please see the response in the EJB newsgroup.
Also, could you kindly only post to a single newsgroup?
Thanks.
"Jimmy Johns" <[email protected]> wrote in message
news:[email protected]...
> I have an MDB which sends the messages it receives onto another JMS
> destination within the onMessage method. These messages are not sent to
> the JMS destination unless I explicitly use a transacted session for the
>
> destination and subsequently commit the session. If I set the transacted
>
> parameter to Session as false the messages are sent. If I set the
> transacted parameter to true the messages will only be output if the
> session is committed. This is the standard behaviour for a JMS session
> but this is not the correct behaviour for an MDB running with
> container-managed transaction demarcation.
>
> For a start the transacted parameter to session should be ignored when
> run in the context of a container transaction and the commit method
> should thrown an exception as it is not allowed within the context of a
> container transaction.
>
> This is the MDB code and the deployment descriptor: -
>
> public class MessageBean implements MessageDrivenBean, MessageListener
> {
> private String topicName = null;
> private TopicConnectionFactory topicConnectionFactory = null;
> private TopicConnection topicConnection = null;
> private TopicSession topicSession = null;
> private Topic topic = null;
> private TopicPublisher topicPublisher = null;
> private TextMessage textMessage=null;
> private transient MessageDrivenContext messageDrivenContext = null;
>
> private Context jndiContext;
>
> public final static String
> JMS_FACTORY="weblogic.examples.jms.TopicConnectionFactory";
> public final static String
> TOPIC="weblogic.examples.jms.exampleTopic";
>
> public MessageBean()
> {
> }
>
> public void setMessageDrivenContext(MessageDrivenContext
> messageDrivenContext)
> {
> this.messageDrivenContext = messageDrivenContext;
> }
>
> public void ejbCreate()
> {
> }
>
> public void onMessage(Message inMessage)
> {
> try
> {
> jndiContext = new InitialContext();
> topicConnectionFactory =
> (TopicConnectionFactory)jndiContext.lookup(JMS_FACTORY);
> topic = (Topic) jndiContext.lookup(TOPIC);
> topicConnection =
> topicConnectionFactory.createTopicConnection();
> topicConnection.start();
> // The transacted parameter should be ignored in the context of a
> container tx
> topicSession = topicConnection.createTopicSession(true,
> Session.AUTO_ACKNOWLEDGE);
> topicPublisher = topicSession.createPublisher(topic);
> textMessage = (TextMessage)inMessage;
> topicPublisher.publish(inMessage);
> // this is illegal in a container transaction
> topicSession.commit();
> topicConnection.close();
> }
> catch (JMSException je)
> {
> throw new EJBException(je);
> }
> catch (NamingException ne)
> {
> throw new EJBException(ne);
> }
> }
>
> public void ejbRemove()
> {
> }
> }
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
> JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
>
> <ejb-jar>
> <enterprise-beans>
> <message-driven>
> <display-name>MessageBean</display-name>
> <ejb-name>MessageBean</ejb-name>
> <ejb-class>MessageBean</ejb-class>
> <transaction-type>Container</transaction-type>
> <message-driven-destination>
> <destination-type>javax.jms.Queue</destination-type>
> </message-driven-destination>
> <security-identity>
> <description></description>
> <run-as>
> <description></description>
> <role-name></role-name>
> </run-as>
> </security-identity>
> </message-driven>
> </enterprise-beans>
> <assembly-descriptor>
> <container-transaction>
> <method>
> <ejb-name>MessageBean</ejb-name>
> <method-name>*</method-name>
> </method>
> <trans-attribute>Required</trans-attribute>
> </container-transaction>
> </assembly-descriptor>
> </ejb-jar>
>
>
>
>
>
>
>
>
-
MDB rollbacks and stops the listener port with error code 2072
Hi
We have a MDB listening on QUEUE1. This MDB processes the message and puts another message in QUEUE2. Transaction is "required" for this MDB.
The processing could somtime take more than 2 min. We used to get EJB timeout error in this scenario. We changed EJB timeout to 5 min (default was 2 min). This resolved the timeout error. But it started throwing following exception. Note that if the processing takes less than 2 min, MDB never rollbacks.
After this rollack, listener port can not pick up the next message and it throws error (MQJMS2002: failed to get message from MQ queue. MQ Error Code 2072) . It stops as a result and restarts after 60 sec. Even after restart it can not process the messages till we restart the JVM.
Regarding error handling, Backout threshold is 3. If the message is redelivered, we discard this message.
We are using 2 Phase commit for 2 resources MQ (5.3) and MS SQL.
Websphere version is 5.1.
Two issues here
1. Why is MDB rolling back if processing takes more than 2 min.
2. After the rollback, why is listener port not picking up the messages. Why do we need to recycle the JVM.
Any pointers to resolve this issue?
EXCEPTION
[11/29/05 15:03:37:752 EST] 1b9bccc XATransaction E J2CA0027E: An exception occurred while invoking end on an XA Resource Adapter from dataSource JMS$postprocessor$JMSManagedConnection@25078403, within transaction ID {XID: formatId(57415344), gtrid_length(51), bqual_length(2, data(00000000000000950000000113238145f813eccfef12249c6aab206666f96901636c5f6170703130355f73656e7431715f716113238145f813eccfef12249c6aab206666f969010000000100000000)}: javax.transaction.xa.XAException: XA operation failed, see errorCode
at com.ibm.mq.MQXAResource.end(MQXAResource.java:520)
at com.ibm.ejs.jms.JMSManagedSession$JMSXAResource.end(JMSManagedSession.java:1557)
at com.ibm.ejs.j2c.XATransactionWrapper.end(XATransactionWrapper.java:525)
at com.ibm.ws.Transaction.JTA.JTAResourceBase.end(JTAResourceBase.java:253)
at com.ibm.ws.Transaction.JTA.RegisteredResources.distributeEnd(RegisteredResources.java:629)
at com.ibm.ws.Transaction.JTA.TransactionImpl.internalPrepare(TransactionImpl.java:1241)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:981)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:150)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:177)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:712)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:570)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3068)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
[11/29/05 15:03:38:089 EST] 1b9bccc ServerSession W WMSG0031E: Exception processing JMS Message for MDB BatchProcessorMDB, JMSDestination jms/PostprocessorQ : javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
com.ibm.ws.exception.WsEJBException
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:159)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3159)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSIException(LocalExceptionMappingStrategy.java:96)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:165)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3159)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
[11/29/05 15:03:38:124 EST] 1e9aa18 JMSExceptionL E WMSG0018E: Error on JMSConnection for MDB BatchProcessorMDB , JMSDestination jms/PostprocessorQ : javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:553)
at com.ibm.mq.jms.MQSession.consume(MQSession.java:3144)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
---- Begin backtrace for Nested Throwables
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2072
at com.ibm.mq.jms.MQSession.consume(MQSession.java:3118)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
[11/29/05 15:03:38:149 EST] 1e9aa18 JMSExceptionL E WMSG0057E: Error on JMSConnection for MDB BatchProcessorMDB , JMSDestination jms/PostprocessorQ , JMS Linked Exception : com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2072
at com.ibm.mq.jms.MQSession.consume(MQSession.java:3118)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
[11/29/05 15:03:38:190 EST] 1e9aa18 MDBListenerIm I WMSG0043I: MDB Listener ProcessorLP stopped for JMSDestination jms/PostprocessorQ
[11/29/05 15:03:38:192 EST] 1e9aa18 MDBListenerIm I WMSG0058I: Listener Port ProcessorLP will attempt to restart in 60 seconds
[11/29/05 15:03:38:194 EST] 1e9aa18 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource jms/PostprocessorQF. The exception which was received is javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue
[11/29/05 15:04:38:230 EST] 1436f66 MDBListenerIm I WMSG0042I: MDB Listener ProcessorLP started successfully for JMSDestination jms/PostprocessorQHave been able to solve this problem? The same occurs in our environment. I have a nagging feelin git has something to do with a known bug that is solved in some fixpack or something. We're on Websphere 5.1.1.4.
Any feedback would be appreciated.
Thanks,
Jaap
Maybe you are looking for
-
Clicking Finder dock icon opens wrong user home
I have a computer with multiple users. When one user on the machine logs in and clicks on the Finder icon, a different users' home folder is opened with all locked folder icons and the wrong username at the top of the window. How do I change the defa
-
Dual Screen ThinkPad W520 with docking station
I'm trying to use an external monitor with my docking station to extend my desktop but I can't get it to work. I'm using the intel HD video card and I already followed thoses guide https://wiki.archlinux.org/index.php/Intel https://wiki.archlinux.org
-
Since I got OS10.8.2 Safari won't display online PDF files?
Since I got OS10.8.2 Safari won't display online PDF files? Can anyone tell me what the problem is?
-
PDF quality problems exporting from InDesign and Photoshop
Hi There. I'm having big problems exporting my InDesign files to PDFs and retaining the res. And it's not just the images (I understand about the dpi) it's the type on there too. I have been exporting as the preset High Quality Print - is this wrong.
-
Target node/queue unavailable
Hi Friends, Just Now I have completed my 2 node 11.5.10.2 installation on Linux...... (a) Database node on one machine ( Purely Database) (b) Application Tier on one Machine ( Forms,web, admin and Concurrent Manager) I have completed installation suc