NotSerializableException during passivation.
Hi there,
I have a stateful session bean which has only one field. This field
has no problem being serialized (I tested it). Everything works fine
until the session bean in passivated, then I get the exception below.
After looking inside all fields in the wrapping EJB object, there is
one reference ( __WL_bmtx ) of type
weblogic.transaction.internal.ServerTransactionImpl. The value of its
toString() method suggests that it is a transaction that was already
committed and finished (after looking at my log), even before other
transactions took place before passivation.
To explain it better, before the session bean is passivated, it goes
under three or four transactions (during different calls), and the one
that is being referenced is the second one. So, my question: Does
anyone know, why would WebLogic keep a reference to a committed,
closed, unused transaction? What am I doing wrong?
I have logged everything during the processing and have confirmed that
ALL database connections are being closed and de-referenced; all
transactions are committed.
Any suggestions? any place to look at?
I am using Weblogic 7.0 SP1, Tamino XML database, all on Windows 2000.
(Exception:)
<Error during passivation: java.io.NotSerializableException:
weblogic.transaction.internal.ServerTransactionImpl
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1822)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:475)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at weblogic.ejb20.swap.PassivationUtils.write(PassivationUtils.java:93)
at weblogic.ejb20.swap.DiskSwap.write(DiskSwap.java:176)
at weblogic.ejb20.manager.StatefulSessionManager.swapOut(StatefulSessionManager.java:898)
at weblogic.ejb20.cache.NRUCache.moveInActiveToFree(NRUCache.java:472)
at weblogic.ejb20.cache.NRUCache.reclaimNodes(NRUCache.java:500)
at weblogic.ejb20.cache.NRUCache.getFreeNode(NRUCache.java:239)
at weblogic.ejb20.cache.NRUCache.put(NRUCache.java:319)
at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:710)
at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:745)
at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:164)
at com.aker.beans.webdispatcherEJB_qu7z0l_HomeImpl.create(webdispatcherEJB_qu7z0l_HomeImpl.java:96)
at jsp_servlet._jsp.__componentsmain._jspService(__componentsmain.java:154)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5360)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2468)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
Thanks in advance,
-- Juan
Are you spanning one transaction across multiple methods of SFSB?
This is one case, I can assume, the container stores the tx reference in the
bean.
Are you sure by the time the SFSB method call is finished, tx status in not
active
(committed or rolled back whatever but not Status.STATUS_ACTIVE). This is
a case
container stores tx in the bean.
Hope this may provide some pointers. If can reproduce it, please open a
support case otherwise.
Cheers,
..maruthi
"JUAN F. ARJONA" <[email protected]> wrote in message
news:[email protected]...
Hi there,
I have a stateful session bean which has only one field. This field
has no problem being serialized (I tested it). Everything works fine
until the session bean in passivated, then I get the exception below.
After looking inside all fields in the wrapping EJB object, there is
one reference ( __WL_bmtx ) of type
weblogic.transaction.internal.ServerTransactionImpl. The value of its
toString() method suggests that it is a transaction that was already
committed and finished (after looking at my log), even before other
transactions took place before passivation.
To explain it better, before the session bean is passivated, it goes
under three or four transactions (during different calls), and the one
that is being referenced is the second one. So, my question: Does
anyone know, why would WebLogic keep a reference to a committed,
closed, unused transaction? What am I doing wrong?
I have logged everything during the processing and have confirmed that
ALL database connections are being closed and de-referenced; all
transactions are committed.
Any suggestions? any place to look at?
I am using Weblogic 7.0 SP1, Tamino XML database, all on Windows 2000.
(Exception:)
<Error during passivation: java.io.NotSerializableException:
weblogic.transaction.internal.ServerTransactionImpl
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
atjava.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1822)
atjava.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:475)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at weblogic.ejb20.swap.PassivationUtils.write(PassivationUtils.java:93)
at weblogic.ejb20.swap.DiskSwap.write(DiskSwap.java:176)
atweblogic.ejb20.manager.StatefulSessionManager.swapOut(StatefulSessionManager
.java:898)
at weblogic.ejb20.cache.NRUCache.moveInActiveToFree(NRUCache.java:472)
at weblogic.ejb20.cache.NRUCache.reclaimNodes(NRUCache.java:500)
at weblogic.ejb20.cache.NRUCache.getFreeNode(NRUCache.java:239)
at weblogic.ejb20.cache.NRUCache.put(NRUCache.java:319)
atweblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.
java:710)
atweblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionMa
nager.java:745)
atweblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:164)
atcom.aker.beans.webdispatcherEJB_qu7z0l_HomeImpl.create(webdispatcherEJB_qu7z
0l_HomeImpl.java:96)
atjsp_servlet._jsp.__componentsmain._jspService(__componentsmain.java:154)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:945)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:332)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:242)
atweblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5360)
atweblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3043)
atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2468)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
Thanks in advance,
-- Juan
Similar Messages
-
Hello!
I have a problem during passivation process on JDeveloper 11.1.1.6.0. In AM pooling config I define maximum size = 2, minimum = 1, referenced = 1 (JDBC Datasourse). If working 3 user when error coming and i cant understand, how to find where I wrong:
<ApplicationModuleImpl> <doPoolMessage>
oracle.jbo.JboException: JBO-29000: Выявлено непредвиденное исключение: java.lang.ArrayIndexOutOfBoundsException, сообщ.=0
at oracle.jbo.server.Serializer.passivate(Serializer.java:251)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:290)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:267)
at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:6007)
at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5877)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:386)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9084)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4607)
at oracle.jbo.common.ampool.ApplicationPoolImpl.manageReferencingState(ApplicationPoolImpl.java:1493)
at oracle.jbo.common.ampool.ApplicationPoolImpl.recycleReferencedInstance(ApplicationPoolImpl.java:2623)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2444)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2347)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3246)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:572)
at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:505)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:500)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:523)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:869)
at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1640)
at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2472)
at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2416)
at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4363)
at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:341)
at oracle.adf.model.binding.DCIteratorBinding.internalGetCurrentRowInBinding(DCIteratorBinding.java:2216)
at oracle.jbo.uicli.binding.JUIteratorBinding.internalGetCurrentRowInBinding(JUIteratorBinding.java:500)
at oracle.adf.model.binding.DCIteratorBinding.getCurrentRow(DCIteratorBinding.java:2203)
at oracle.adf.model.binding.DCControlBinding.getCurrentRow(DCControlBinding.java:387)
at oracle.jbo.uicli.binding.JUControlBinding.getCurrentRow(JUControlBinding.java:98)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGetRow(JUCtrlValueBinding.java:1314)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValue(JUCtrlValueBinding.java:2740)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValue(JUCtrlValueBinding.java:2729)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.getInputValue(FacesCtrlAttrsBinding.java:185)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2314)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:277)
at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
at javax.el.MapELResolver.getValue(MapELResolver.java:164)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
at com.sun.el.parser.AstValue.getValue(Unknown Source)
at com.sun.el.parser.AstEqual.getValue(Unknown Source)
at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
at org.apache.myfaces.trinidad.component.UIXComponentBase.getBooleanProperty(UIXComponentBase.java:1204)
at org.apache.myfaces.trinidad.component.UIXComponentBase.isRendered(UIXComponentBase.java:423)
at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:793)
at oracle.adf.view.rich.component.rich.layout.RichPanelBox.processDecodes(RichPanelBox.java:211)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.access$001(ContextSwitchingComponent.java:41)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$2.run(ContextSwitchingComponent.java:111)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.processDecodes(ContextSwitchingComponent.java:114)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.access$001(ContextSwitchingComponent.java:41)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$2.run(ContextSwitchingComponent.java:111)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.processDecodes(ContextSwitchingComponent.java:114)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
at org.apache.myfaces.trinidad.component.UIXForm.processDecodes(UIXForm.java:75)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1029)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:540)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1394)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:397)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at org.inec.auth.AuthFilter.doFilter(AuthFilter.java:83)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3315)
at oracle.sql.NUMBER.toString(NUMBER.java:786)
at oracle.sql.NUMBER.stringValue(NUMBER.java:2206)
at oracle.jbo.domain.Number.toString(Number.java:410)
at oracle.jbo.domain.DomainAttributeDef.getXMLContentNode(DomainAttributeDef.java:310)
at oracle.jbo.server.ViewRowImpl.renderAttributeValueInXMLElement(ViewRowImpl.java:4534)
at oracle.jbo.server.ViewRowImpl.renderAttributeInXMLElement(ViewRowImpl.java:4528)
at oracle.jbo.server.ViewObjectImpl.passivateTransients(ViewObjectImpl.java:18424)
at oracle.jbo.server.ViewObjectImpl.passivateTransients(ViewObjectImpl.java:18347)
at oracle.jbo.server.ViewObjectImpl.passivateState(ViewObjectImpl.java:18085)
at oracle.jbo.server.ViewObjectImpl.passivateState(ViewObjectImpl.java:18024)
at oracle.jbo.server.ViewObjectImpl.doPassivateSettings(ViewObjectImpl.java:20125)
at oracle.jbo.server.ApplicationModuleImpl.passivateVOs(ApplicationModuleImpl.java:7818)
at oracle.jbo.server.ApplicationModuleImpl.doPassivateState(ApplicationModuleImpl.java:7625)
at oracle.jbo.server.ApplicationModuleImpl.doPassivateAMState(ApplicationModuleImpl.java:7612)
at oracle.jbo.server.Serializer.passivate(Serializer.java:222)
... 122 more
Edited by: VitalyCoder on 27.04.2012 12:42Thank you for answer, Timo!
Yes, I use one int variable in AM, but it save/load in overrided methods activateState/passivateState (in session`s userData).
I think my troubles in using dinamically hiding viewcriteria field: for users with role1 this fiels showing, for users with role2 it hiding. For hiding and shoing I use method in ViewObjectImpl like:
@Override
public AttributeHints getCriteriaItemAttributeHints(ViewCriteriaItem vci) {
if (vci != null && vci.getViewCriteria().getName().equals("RegionsViewCriteria")) {
if (vci.getAttributeDef().getName().equals("CountriesView")) {
oracle.jbo.domain.Number nID = (oracle.jbo.domain.Number) this.getNamedWhereClauseParam("nID");
if (nID != null && nID.intValue() == 1) {
vci.setProperty(ViewCriteriaItem.RENDERED_MODE, ViewCriteriaItem.CRITERIA_RENDERED_MODE_BOTH);
System.out.println(" criteria field 'Country Name' rendered: true");
else {
vci.setProperty(ViewCriteriaItem.RENDERED_MODE, ViewCriteriaItem.CRITERIA_RENDERED_MODE_NEVER);
System.out.println(" criteria field 'Country Name' rendered: false");
return super.getCriteriaItemAttributeHints(vci);
} So during passivation/activation AM for users with different users this error coming. You could prompt any features of passivation in my case where I could be mistaken? -
Frequent Full GC during Passivation
During frequent Passivation the WLS does frequent Full GCs . Why this is so ?
What versino of WLS? WLS does not ever trigger or call System.gc(), you
should make sure that your app is not doing so either.
cheers
mbg
"Vishal" <[email protected]> wrote in message
news:3fa0f26b$[email protected]..
During frequent Passivation the WLS does frequent Full GCs . Why this isso ? -
Java.io.NotSerializableException: javax.naming.InitialContext
I am using Workshop to create a Stateful session bean and i just have a simple member variable in the bean of type string. I didnt override the ejbCreate and setSessionContext methods and i get the following error when it is trying to passivate the bean.
Passivate Called
<Nov 17, 2004 2:51:06 PM PST> <Error> <EJB> <BEA-010024> <Error occurred during
passivation: java.io.NotSerializableException: javax.naming.InitialContext
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
:1330)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:13
02)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
a:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at weblogic.ejb20.swap.PassivationUtils.write(PassivationUtils.java:94)
at weblogic.ejb20.swap.DiskSwap.write(DiskSwap.java:214)
at weblogic.ejb20.manager.StatefulSessionManager.swapOut(StatefulSession
Manager.java:1051)
at weblogic.ejb20.cache.NRUCache.moveInActiveToFree(NRUCache.java:550)
at weblogic.ejb20.cache.NRUCache.reclaimNodes(NRUCache.java:578)
at weblogic.ejb20.cache.NRUCache.getFreeNode(NRUCache.java:238)
at weblogic.ejb20.cache.NRUCache.put(NRUCache.java:318)
at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionM
anager.java:844)
at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSe
ssionManager.java:880)
at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:1
33)
at filenet.wfqa.tests.ejb.beans.StatefulSession_us0wxs_HomeImpl.create(S
tatefulSession_us0wxs_HomeImpl.java:75)
at filenet.wfqa.tests.ejb.beans.StatefulSession_us0wxs_HomeImpl_WLSkel.i
nvoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
ef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
The stack trace sesms to tell me that it is something internal to the workshop generated EJBHome class since i do not see any reference to InitialContext in my bean class.
Is it some bug with workshop. Or is it something wrong i am doing.
Thanks
sriramPage 325 (paragraph 5) of O”Reilly Enterprise Java Beans (4th Edition) states:
“During the lifetime of a stateful session bean, there may be periods of inactivity when the bean instance is not servcing mentod from the client. To conseve resources, the container can passivate the bean instance by preserving its conversation state and evicitin the bean instance from memory. A ben’s convesatin stat may consist of primitive values, object that are serializable, and the following special types:
javax.ejb.SessionContext
javax.ejb EJBHome
javax.ejb EJNObject
javax.ejb Jta.UserTRansaction
javax.ejb Naming.Context(only when it references the JNDI ENC)
…” -
Passivation EJB statefull with PersistenceContextType.EXTENDED in WLS 12c
Hi guys,
I have one web app with some EJB stateful working under Weblogic 12c.
A snippet of code:
public abstract class CommonHibernateDao<T extends AbstractModel, K extends Serializable> {
private static final Logger LOGGER = LoggerFactory.getLogger(GenericHibernateDao.class);
@PersistenceContext(type = PersistenceContextType.EXTENDED)
protected transient EntityManager em;
protected transient Session session;
@SuppressWarnings("unused")
private Class<T> persistentClass;
// common method like save delete...
@Stateful(name = "myDao")
public class MyDaoImpl extends CommonHibernateDao<Pojo, Serializable> implements MyDao, Serializable {
// methods with specific querys
In Glassfish 3.1.2 works fine, but in Weblogic 12c not.
What is happened?
When in Weblogic 12c the passivation the EJB throw one exception:
Message: <BEA-010024> <Error occurred during passivation: java.io.NotSerializableException: weblogic.persistence.ExtendedPersistenceContextWrapper
Stack: at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at java.util.HashSet.writeObject(HashSet.java:267)
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:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at weblogic.ejb.container.swap.PassivationUtils.write(PassivationUtils.java:101)
at weblogic.ejb.container.swap.DiskSwap.write(DiskSwap.java:173)
at weblogic.ejb.container.manager.StatefulSessionManager.swapOut(StatefulSessionManager.java:1582)
at weblogic.ejb.container.cache.LRUCache.put(LRUCache.java:149)
at weblogic.ejb.container.manager.StatefulSessionManager.create(StatefulSessionManager.java:1246)
at weblogic.ejb.container.manager.StatefulSessionManager.createBean(StatefulSessionManager.java:1313)
at weblogic.ejb.container.internal.StatefulEJBLocalHomeImpl.createBeanAndReturnPK(StatefulEJBLocalHomeImpl.java:112)
at weblogic.ejb.container.internal.StatefulSessionBeanReferenceImpl.getBusinessObject(StatefulSessionBeanReferenceImpl.java:39)
at com.oracle.injection.integration.EjbDescriptorAdapter$EjbInstanceManagerAdapter.getEjbInstance(EjbDescriptorAdapter.java:236)
at com.oracle.injection.provider.weld.WeldEjbServicesAdapter.resolveEjb(WeldEjbServicesAdapter.java:45)
at org.jboss.weld.bean.SessionBean.createReference(SessionBean.java:406)
at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.<init>(EnterpriseBeanProxyMethodHandler.java:69)
at org.jboss.weld.bean.SessionBean.create(SessionBean.java:293)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:61)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:630)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:691)
at org.jboss.weld.injection.ParameterInjectionPoint.getValueToInject(ParameterInjectionPoint.java:120)
at org.jboss.weld.injection.MethodInjectionPoint.getParameterValues(MethodInjectionPoint.java:217)
at org.jboss.weld.injection.MethodInjectionPoint.invoke(MethodInjectionPoint.java:111)
at org.jboss.weld.util.Beans.callInitializers(Beans.java:712)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:701)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:156)
at com.oracle.injection.provider.weld.WeldInjectionServicesAdapter.aroundInject(WeldInjectionServicesAdapter.java:88)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:45)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:152)
at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:126)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:148)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:285)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:61)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:630)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:657)I got exactly the same issue with Weblogic 11g (10.3.6)
Could anybody take a look ? -
Passivation errors on Weblogic clustered setup.
Hi,
I have a Weblogic 6.0 SP2 clustered setup. If I change the deployment descriptor
and set the
max-beans-in-cache to 2 and create 3 instances of a stateful ejb, it gets passivated
without any exceptions, but if the application runs for a long time, passivation
errors occur.
I get the following exceptions:
####<Aug 4, 2003 4:04:36 PM GMT> <Info> <Cluster> <HQBUSA55> <enrolem2> <ExecuteThread:
'1' for queue: 'Replication'> <> <> <000118> <Lost 647 replication updates of
object -7971217480608673154. Re-fetching secondary.>
####<Aug 4, 2003 4:04:36 PM GMT> <Info> <Cluster> <HQBUSA55> <enrolem2> <ExecuteThread:
'1' for queue: 'Replication'> <> <> <000118> <Lost 648 replication updates of
object -7971217480608673154. Re-fetching secondary.>
####<Aug 5, 2003 7:06:11 AM GMT> <Warning> <NT Performance Pack> <HQBUSA55> <enrolem2>
<ExecuteThread: '1' for queue: 'default'> <> <> <000000> <Already cleaned up fd:
'-1', socket: 'Socket[addr=hq3105.nestle.com/141.122.142.71,port=1534,localport=7778]'>
####<Aug 5, 2003 7:51:26 AM GMT> <Error> <EJB> <HQBUSA55> <enrolem2> <ExecuteThread:
'5' for queue: 'default'> <> <> <010024> <Error during passivation: java.io.NotSerializableException:
com.sun.jndi.ldap.LdapCtx
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1822)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:475)
Is this a known issue? Is there any service pack or fix pack for the same?
Please give me your suggestions.
Thanks,
Bhumika
There are known issues with SFSBs not being serializble in 6.1. see if you can
upgrade or increase cache size.
S
"Bhumika Nagarsekar" <[email protected]> wrote:
>
>Hi,
>
>I have a Weblogic 6.0 SP2 clustered setup. If I change the deployment
>descriptor
>and set the
>max-beans-in-cache to 2 and create 3 instances of a stateful ejb, it
>gets passivated
>without any exceptions, but if the application runs for a long time,
>passivation
>errors occur.
>
>I get the following exceptions:
>####<Aug 4, 2003 4:04:36 PM GMT> <Info> <Cluster> <HQBUSA55> <enrolem2>
><ExecuteThread:
>'1' for queue: 'Replication'> <> <> <000118> <Lost 647 replication updates
>of
>object -7971217480608673154. Re-fetching secondary.>
>####<Aug 4, 2003 4:04:36 PM GMT> <Info> <Cluster> <HQBUSA55> <enrolem2>
><ExecuteThread:
>'1' for queue: 'Replication'> <> <> <000118> <Lost 648 replication updates
>of
>object -7971217480608673154. Re-fetching secondary.>
>####<Aug 5, 2003 7:06:11 AM GMT> <Warning> <NT Performance Pack> <HQBUSA55>
><enrolem2>
><ExecuteThread: '1' for queue: 'default'> <> <> <000000> <Already cleaned
>up fd:
>'-1', socket: 'Socket[addr=hq3105.nestle.com/141.122.142.71,port=1534,localport=7778]'>
>
>####<Aug 5, 2003 7:51:26 AM GMT> <Error> <EJB> <HQBUSA55> <enrolem2>
><ExecuteThread:
>'5' for queue: 'default'> <> <> <010024> <Error during passivation: java.io.NotSerializableException:
>com.sun.jndi.ldap.LdapCtx
> at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
> at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1822)
> at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:475)
>
>Is this a known issue? Is there any service pack or fix pack for the
>same?
>Please give me your suggestions.
>
>Thanks,
>Bhumika
-
ADF activation/Passivation - Nested App Modules
Hi All,
I have a question related to application module pooling in ADF.
We are developing a application using adf 11.1.1.7. When we initially designed the application we have created multiple application modules around 14 app modules.
Then we realized that database connection usage is very high as number of app modules are more.
To reduce the database connection usage, we have combined all the application modules under one root application module now.
The connection usage is reduced now, but I have a question on memory foot print.
1) When multiple application modules are placed under a root, during passivation, will all the state of all nested app modules under the root is written to the PS_TXN table?
2) If for certain child modules passivation is not required as we don't need to preserve the state of the app modules across user requests,
can we configure that at child app module level??In regards to question 2, the VOs have a tuning option "Passivate State" which is set on by default which you can turn off. Please read the associated documentation around this option.
It's highly recommended you test your application after making this change for any impacts it may have, by doing a round of regression testing with jbo.ampool.doampooling=false. Note however that option is not supported in production, so ensure to set it back to true.
CM. -
Activation/ Passivation in a Sateteful Bean
I have one Stateful Bean in wich all fields are some of the following:
- primitive types
- Objects Serializable
- EJBHome Ref to an entiy bean
and when occurs one activation the following error is generated:
BEA-010024 17/Ago/2005 22H00m WEST Error EJB Error occurred during passivation: java.io.NotSerializableEx
ception: javax.naming.InitialContex
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278
at weblogic.ejb20.swap.PassivationUtils.write(PassivationUtils.java:94
at weblogic.ejb20.swap.DiskSwap.write(DiskSwap.java:214
at weblogic.ejb20.manager.StatefulSessionManager.swapOut(StatefulSessionManager.java:1051
at weblogic.ejb20.cache.NRUCache.moveInActiveToFree(NRUCache.java:550
at weblogic.ejb20.cache.NRUCache.reclaimNodes(NRUCache.java:578
at weblogic.ejb20.cache.NRUCache.getFreeNode(NRUCache.java:238
at weblogic.ejb20.cache.NRUCache.put(NRUCache.java:318
at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:844
at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:880
at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:133
at com.tmn.portal.lojavirtual.carrinho.ejb.CarrinhoFacade_3wxcmw_HomeImpl.create(CarrinhoFacade_3wxcmw_HomeImpl.java:153
at com.tmn.portal.lojavirtual.carrinho.ejb.CarrinhoFacade_3wxcmw_HomeImpl_WLSkel.invoke(Unknown Source
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170
Why is this error generated?
I've already put all bean field with transient and the error still occurs.I'd suggest debugging this by commenting out all the data fields in your bean and running something that will force passivation.
This should work. Then you can do a binary search by adding in half of your fields and seeing if passivation still fails etc.
This should help you narrow down the problem. If you're still having problems, please let us know.
-- Rob
WLS Blog http://dev2dev.bea.com/blog/rwoollen/ -
Passivation - how to preserve VO sortBy & queryMode?
Hello,
I'm working on an app to award scholarships to students... using JDeveloper 11.1.1.2 in an XP environment. I have three main EO-based view objects: one for students and two for awards (student vo is master, award vo's are detail). On my page, I use a dynamic region in a popup to create new rows in the two awarding VO's, then return to the main page which displays a table bound to the student VO so the user can review the data before committing.
When the dynamic region popup closes, a Java method is called to programmatically add a new sortBy clause to the student VO, and change the queryMode to scan entity rows. This works fine under normal conditions, but in testing performance during passivation I noticed that after returning from the dynamic region popup the new awards aren't shown, and my table isn't being sorted. If I commit the controlling AM, the temporary rows show up - so they must still exist in the EO cache.
I'm assuming that in passivation I'm losing the reference to the query mode and sortBy clause because they've been set programmatically.. is there a way to ensure these options are persisted through passivation?
Thanks!Correct - the VO's Tuning -> Passivate State option is still set (Including All Transient Values is set too, as I do have a transient attribute which can be set in the UI, and I'm sure it's being passivated and restored correctly).
My popup dynamic region is implemented based on the pattern: http://www.oracle.com/technology/products/adf/patterns/11.1.1.0.2/popupregionpattern.pdf. Specifically, I'm setting my query mode and sortBy clause in the regionNavigated method which is called. The code in PopupDynamicRegion.java is currently:
DCIteratorBinding finalistIter = this.getIterBinding("FinalistsBySchlrAppAyForOrg1Iterator");
FinalistsBySchlrAppAyForOrgImpl finalistsVo = (FinalistsBySchlrAppAyForOrgImpl)finalistIter.getViewObject();
finalistsVo.setQueryMode(finalistsVo.QUERY_MODE_SCAN_ENTITY_ROWS);
finalistsVo.executeQuery();
for(Number num : setOfIds) {
finalistsVo.getRow(new Key(new Object[]{num})).setAttribute("Selected", true);
finalistsVo.setSortBy("Selected desc");
finalistsVo.setQueryMode(finalistsVo.QUERY_MODE_SCAN_VIEW_ROWS);
finalistsVo.executeQuery();
I'm currently executing twice because when I do the first entity_row query I'm losing reference to my transient attribute (Selected, which I need to sort by and thus preserve). I've tried using vo.addQueryMode to OR the entity and view modes together but I still was losing that transient attribute. Now that I'm thinking about it though, when I did test the addQueryMode method I didn't re-select my students with that for : each loop... maybe they're being lost when I'm in the dynamic region popup...?
Also, I was doing some optimization work and noticed that my query is being executed again after this method ends.. because my table has a partial trigger on the popup, I assume. The student VO seems to be correct while within the regionNavigated method, after executing the queries programmatically.. so maybe it's that later query that's blowing it away, and I just need to set up the query modes in the regionNavigated method, without executing them, and let the component refreshing take care of re-querying..? Maybe I'll take off the partial trigger on the table and just manually refresh it with an addPartialTarget call.. hmm
I did notice, however, in the Fusion guide that sortBy is NOT mentioned as a passivated component. SortBy is an in-memory sort according to the API, vs. the actual database query's order by clause, so maybe it just can't be passivated? I'm using sortBy instead of Order By because I was getting errors when I tried to use setOrderBy... but maybe I'll just have to resolve those issues..
Anyway, you've given me some ideas on new directions to try... thank you for your support! -
Stateful Session Bean with BMT: JDBCpmf or EEpmf?
Quote:
For the record: when using BMT as David described, you should use a JDBCPersistenceManagerFactory
instead of an EEPersistenceManagerFactory. EEPersistenceManagerFactory is only appropriate when
transaction synchronization is desired.
-Patrick
Hi Patrick,
I wanted to follow up on this. In the case of Kodo, the JDBCpmf does not turn on the
UserTransaction in a managed environment, while the EEpmf does. My question: isn't is necessary to
turn on the UserTransaction in a stateful session bean with BMT? If this doesn't happen, isn't
there a danger, if the bean allows transactions to span business method invocations, that the
container will passivate the bean while a transaction is active? Since the PM can't be saved during
passivation, the tx would be interrupted by passivation -- something that would not happen if the
container were aware that a tx was active.
David EzzioDavid,
My interpretation of your initial post was that you were using fully
unmanaged transactions in your bean. That is, that you were not using the
UserTransaction, but were just using the javax.jdo.Transaction for
transactional data store access.
In the situation I just described, using the EEPMF would result in changes
to the UserTransaction. If your goal was to manage the UserTransaction in
the bean, then yes, you'd still want to use the EEPMF.
-Patrick
On 7/25/02 7:17 PM, "David Ezzio" <[email protected]> wrote:
Quote:
For the record: when using BMT as David described, you should use a
JDBCPersistenceManagerFactory
instead of an EEPersistenceManagerFactory. EEPersistenceManagerFactory is only
appropriate when
transaction synchronization is desired.
-Patrick
Hi Patrick,
I wanted to follow up on this. In the case of Kodo, the JDBCpmf does not turn
on the
UserTransaction in a managed environment, while the EEpmf does. My question:
isn't is necessary to
turn on the UserTransaction in a stateful session bean with BMT? If this
doesn't happen, isn't
there a danger, if the bean allows transactions to span business method
invocations, that the
container will passivate the bean while a transaction is active? Since the PM
can't be saved during
passivation, the tx would be interrupted by passivation -- something that
would not happen if the
container were aware that a tx was active.
David Ezzio--
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Changing Runtime View Object Settings Before and After Using Them
Hi,
I'm doing some VO coding at the moment and reading around the subject to get an idea of best practices.
I stumbled across 2 blogs that are slightly contradictory:
https://blogs.oracle.com/vijaymohan/entry/applyviewcriteria_design_timerun_time_view_criteria
http://radio-weblogs.com/0118231/stories/2007/05/23/avoidActivationErrorsByChangingRuntimeViewObjectSettingsBeforeUsingThemNotAfter.html
What is the best practice when programmatically using VOs? Should I do cleanup before/after when using them.
Thanks
KevinJohn,
I read it in an unofficial blog somewhere yesterday and I cannot locate it now!
I'm reading some official documentation on this today:
http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#autoId37
The example steps given in 40.8.2 seems to contradict the latter paragraph:
Because many of the view object's instance settings are saved in the passivation state snapshot and restored on activation (as described in Section 40.5.1, "State Information Saved During Passivation"), it is not advisable to change any of these settings just after executing the view object+ if you won't be re-executing the view object again during the same block of code (and so, during the same HTTP request). Instead, change the view object instance settings the next time you need them to be different before executing the query.
Steps 5 and 6 seems to be changing the settings after executing the view object.+
Bottom line is I'm looking for best practice.
Should I do this in a VOImpl method:
//save original VO settings
String originalWhereClause = this.getWhereClause();
String originalOptimizerHint = this.getQueryOptimizerHint();
String originalOrderByClause = this.getOrderByClause();
String[] originalViewCriterias = this.getApplyViewCriteriaNames();
//change VO where settings and execute query
//restore original VO settings
this.setWhereClause(originalWhereClause);
this.setApplyViewCriteriaNames(originalViewCriterias);
this.setQueryOptimizerHint(originalOptimizerHint);
this.setOrderByClause(originalOrderByClause);
Or is that all unnecessary? -
How to Uninstall SQL instance on active-passive SQL server , which failed during Cluster Setup (Error-Failed at Validate Active Directory Configuration)
active-passive SQL server cluster setup failed due to some steps missed in initial cluster setup,
now i have unistall sql instance from nodes,
Your help will higly appriciated.
Regards,
Anish
AsandeenHello,
Please refer to the following link about remove a node of SQL Server Failover Cluster Instance:
http://msdn.microsoft.com/en-us/library/ms191545.aspx#Remove
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
JBO-25017 Sporadic error during AM passivation/activation
As I said in the other thread, I have found one nasty error that happens sporadically and cannot be reproduced in production environment.
But with disabling AM pooling during the stress test I can see this error:
JBO-29000: Unexpected exception caught: oracle.jbo.RowCreateException, msg=JBO-25017: Error while creating a new entity row for MailOut.
JBO-25017: Error while creating a new entity row for MailOut.
java.lang.NullPointerException
Here is how I create the new record. Say on a page A there is a link "NEW" which takes user to data entry page B.
before the page B renders, it calls AM exposed method
<invokeAction id="prepareSentMail" Binds="prepareToCreateNewSentMail"
Refresh="prepareModel"
RefreshCondition="${adfFacesContext.postback == false}"/>
<methodAction id="prepareToCreateNewSentMail"
InstanceName="TrackingService.dataProvider"
DataControl="TrackingService"
MethodName="prepareToCreateNewSentMail"
RequiresUpdateModel="true" Action="999">
<NamedData NDName="studyId" NDValue="${sessionScope.studyId}"
NDType="java.lang.String"/>
<NamedData NDName="individualId" NDValue="${sessionScope.individualId}"
NDType="java.lang.String"/>
</methodAction>So page calls prepareToCreateNewSentMail AM method:
public void prepareToCreateNewSentMail(String studyId, String individualId) {
ViewObject vo = getSentMail();
vo.clearCache();
//removeAnyInvalidNewSentMail();
//vo.setMaxFetchSize(0);
//vo.executeQuery();
//vo.setWhereClause(null);
//vo.setWhereClauseParams(null);
Row newRow = vo.createRow(); //<-- CRASHES HERE!!!
vo.insertRow(newRow);
newRow.setNewRowState(Row.STATUS_INITIALIZED);
vo.setCurrentRow(newRow);
String studyPhaseId = JSFUtils.getFromSession("studyPhaseId").toString();
newRow.setAttribute("StudyPhaseId", studyPhaseId);
String studyPhaseOrder = JSFUtils.getFromSession("studyPhaseOrder").toString();
this.getStudyPhasesUntilCurrent().prepareStudyPhasesDropDownList(studyId,studyPhaseOrder);
newRow.setAttribute("StudyId",studyId);
newRow.setAttribute("IndividualId",individualId);
newRow.setAttribute("HowSentId","REG");
newRow.setAttribute("DateSent",new Date(Date.getCurrentDate()));
}And so the error shows @ Row newRow = vo.createRow(); line
I will post later when(if) I make progressI have modified the code as:
public void prepareToCreateNewSentMail(String studyId, String individualId) {
//..... code from above goes here
try {
Row newRow = vo.createRow(); // THIS IS LINE 424
vo.insertRow(newRow);
newRow.setNewRowState(Row.STATUS_INITIALIZED);
vo.setCurrentRow(newRow);
//the rest of the code goes here
catch (Exception e){
e.printStackTrace();
}and here is the printout:
oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for MailOut.
at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:903)
at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:340)
at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:357)
at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:2794)
at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1304)
at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:1869)
at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1910)
at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1891)
at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6580)
at tracking.model.services.TrackingServiceImpl.prepareToCreateNewSentMail(TrackingServiceImpl.java:424)
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 oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:507)
at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:1795)
at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:1982)
at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:219)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:1802)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:627)
at oracle.adf.model.binding.DCInvokeActionDef$DCInvokeAction.refresh(DCInvokeActionDef.java:140)
at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2521)
at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2260)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:99)
at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareModel(FacesPageLifecycle.java:73)
at oracle.adf.controller.v2.lifecycle.Lifecycle$8.execute(Lifecycle.java:210)
at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:29)
at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$1.before(ADFPhaseListener.java:412)
at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:77)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:228)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
## Detail 0 ##
java.lang.NullPointerException
at tracking.model.businessobjects.MailOutImpl.create(MailOutImpl.java:41)
at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:442)
at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:890)
at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:340)
at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:357)
at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:2794)
at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1304)
at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:1869)
at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1910)
at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1891)
at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6580)
at tracking.model.services.TrackingServiceImpl.prepareToCreateNewSentMail(TrackingServiceImpl.java:424)
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 oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:507)
at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:1795)
at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:1982)
at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:219)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:1802)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:627)
at oracle.adf.model.binding.DCInvokeActionDef$DCInvokeAction.refresh(DCInvokeActionDef.java:140)
at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2521)
at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2260)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:99)
at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareModel(FacesPageLifecycle.java:73)
at oracle.adf.controller.v2.lifecycle.Lifecycle$8.execute(Lifecycle.java:210)
at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:29)
at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$1.before(ADFPhaseListener.java:412)
at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:77)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:228)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595) -
Error with concurrent users- Activation Passivation Bind variable ?
I have a programmatic view object based on procedure call that returns a ref cursor.
Application Module has a function that exposes get Method for this View object using client interface.
Everything works good until many users call the same Method ,for many concurrent users i got the below error intermittently :
JBO-27122: SQL error during statement preparation.
Attempt to set a parameter name that does not occur in the SQL: bussId
For 1 or 2 users this works perfectly fine.
bussId is a bind variable defined at View object of type Array.
I understand this should be because of activation/passivation as many users calling same function comes to picture.
To solve this I overloaded activateState/passivateState in View implementation for the bind var.
But i don't see those methods getting invoked ever.
I also enabled connection pool/AM pool and kept the default pool values high enough for concurrent users.
Nothing works .
Appreciate any help in this regard.
-SamHi,
See
http://antonis-antoniou.blogspot.com/2012/02/ensuring-that-your-adf-application-is.html -
'FND_SESSION_MGMT.ATTACH_SESSION' must be on enabling Passivation
The issue is related to Activation/Passivation. We have a AM which is based out of BI RTD Schema, which does not have supporting fusion state management schema like FND_SESSION_MGMT, FND_GLOBAL and PX_TXN related packages/procedures.
But during application module state management, framework is looking for FND_SESSION_MGMT tables in BI RTD schema. Do we have a property in AM which can help us point whether the framework can look for state managment schema (just like jbo.server.internal_connection).
To store passivation xml we had configured AM's jbo.server.internal_connection to point to ApplicationDB (Fusion DB) and the passivation XML is getting stored in PS_TXN table.
It gives below error as it uses BI RTD schema connection of AM (JDBCDatasource).
[35258] **PCollManager.resolveName** tabName=PS_TXN [35259] **retrieve** id=1, collid=680921, keyonly=falseGetting a connection for internal use...
[35260] Creating internal connection...
[35261] Trying connection:
DataSource='weblogic.jdbc.common.internal.RmiDataSource@11db4'...
oracle.jbo.JboException: JBO-29000: Unexpected exception caught:
java.sql.SQLException, msg=ORA-06550: line 1, column 170:
PLS-00201: identifier 'FND_SESSION_MGMT.GET_SESSION_ID_FROM_COOKIE' must be declared
ORA-06550: line 1, column 154:
PL/SQL: Statement ignored
ORA-06550: line 1, column 241:
PLS-00201: identifier 'FND_SESSION_MGMT.ATTACH_SESSION' must be declared
ORA-06550: line 1, column 241:
PL/SQL: Statement ignored
ORA-06550: line 1, column 316:
PLS-00201: identifier 'FND_GLOBAL.SESSION_COOKIE' must beattachSession declared
ORA-06550: line 1, column 310:
PL/SQL: Statement ignored
at
oracle.apps.fnd.applcore.common.ApplSession.attachSession(ApplSession.java:1695)
at
oracle.apps.fnd.applcore.common.ApplSession.attachSession(ApplSession.java:1518)
*These are OAF objects, aren't they ?
You should raise the question to the [OAF forum|http://forums.oracle.com/forums/forum.jspa?forumID=210] .
Regards,
Didier.
Maybe you are looking for
-
SQL Plus command to print a report in Landscape format
Hi, what is the SQL Plus command to print a report in Landscape format?
-
Credit Card Transaction details
Hi, Can somebody tell me where can I can all the credit card transactions? through PRCC we will upload the transaction details. Where will those be saved? I want to fetch the transactions in a program. How can that be done? Thanks a lot!1
-
For Cisco 2921, which module is the correct one if I have 2x E1 handoff from provider for data-only MLPPP? If I don't need voice, would I still need to buy a uc license to use the VWIC3? VWIC3-2MFT-T1/E1 HWIC-2CE1T1-PRI Thanks.
-
Hyperion Workforce Planning - Rules migrated in LCM not showing in Calc Mgr
1-Having trouble with workforce rules (as well as capex and rulesets) that are not showing up in calc manager (in system view) in our QA environment after I migrate them from Dev. New rules were created by a consultant we had in dev and on migrating
-
Cutover from manual document type to automatic document type
Hi, has anyone ever cut over from manual to automatic document type? (I have seen the opposite, where an automatic document type becomes manual. It was successful) Eg in a data migration, to populate some interunit elimination history data (but avoid