Java.io.NotSerializableException: engine.MyMetaData
the exception....
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: engine.MyMetaData
java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: engine.MyMetaData
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.inputClassFields(Unknown Source)
at java.io.ObjectInputStream.defaultReadObject(Unknown Source)
at java.io.ObjectInputStream.inputObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at engine.ComputeEngine1_Stub.executeTask(ComputeEngine1_Stub.java:38)
at client.ComputeClientVisual.init(ComputeClientVisual.java:410)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
the class..
I send this class via RMI
public class MyTableModel extends AbstractTableModel {
public String[] columnNames = {};
public Vector rows = new Vector();
public MyMetaData metaData;//here is the class
that is my class that returns the exception
public class MyMetaData {
private Integer [] typeOfColumn;
private Boolean [] isWritable;
private Integer numberOfColumns;
private String tableName[];
I dont know why this exception
does anybody cant help me whit this?
I'll apreciate your help
Don't you see "java.io.NotSerializableException" in the output !!. RMI uses serialization protcol to transfer objects from one address space to another, so all parameters/return values of a remote method must be serializable.
Just make sure all prameters/return values of a remote method implements "Serializable" marker interface. MyMetaData class must implement "Serializable" interface in order to be transported as a return value of a RMI method.
-- Srinath Mandalapu
Similar Messages
-
Java.io.NotSerializableException - while retriving "one to many" objects
i am getting java.rmi.MarshalException java.io.NotSerializableException
while i try to retrive one to many objects
i have recently migrated from kodo 2.5.x to kodo 3.0.1, and i have parent
object reference in child objects (reverse mapping reference according to
kodo 2.5.x) as shown below
public class BankStatementEntry implements BankStatement {
private Set accountSummary = new HashSet();
public interface BankStatement extends Serializable {
* Returns the accountSummary.
* @return Map
public Set getAccountSummary();
* Returns the accountSummary.
* @return Map
public void setAccountSummary(Set accountSummary);
public class AccountSummaryRecord implements AccountSummary {
private BankStatementEntry bankStatementEntry;
public interface AccountSummary extends Serializable {
* Returns the transactionDetails.
* @return Collection
public Set getTransactionDetails();
the problem is, when i try to retrive BankStatementEntry object, i have to
iterate through each child (AccountSummaryRecord) object and manualy
remove parent object reference (BankStatementEntry) by setting null.
Otherwise EJB throws java.io.NotSerializableException
Is this bug ?
Thanks
karup.Thread [Servlet.Engine.Transports : 1] (Suspended)
java.io.NotSerializableException.<init>() line: 50 [local variables
unavailable]
com.ibm.CORBA.iiop.UtilDelegateImpl.copyObjectByProxy(java.lang.Object,
org.omg.CORBA.ORB, java.lang.ClassLoader, java.lang.Class,
org.omg.CORBA.portable.Streamable) line: 1316 [local variables unavailable]
com.ibm.ws.orb.WSUtilDelegateImpl(com.ibm.CORBA.iiop.UtilDelegateImpl).copyObject(java.lang.Object,
org.omg.CORBA.ORB) line: 771 [local variables unavailable]
javax.rmi.CORBA.Util.copyObject(java.lang.Object, org.omg.CORBA.ORB)
line: 327 [local variables unavailable]
au.com.aig.aiaa.paymentdishonor.process.ejb._BankStatementProcessor_Stub.fetchBankStatement(java.util.Date,
java.util.Date) line: 366
au.com.aig.aiaa.business.process.ejb.CommonFacadeBean.fetchBankStatement(java.util.Date,
java.util.Date) line: 102
au.com.aig.aiaa.business.process.ejb.EJSRemoteStatelessCommonFacade_aa40cc36.fetchBankStatement(java.util.Date,
java.util.Date) line: 61
au.com.aig.aiaa.business.process.ejb._CommonFacade_Stub.fetchBankStatement(java.util.Date,
java.util.Date) line: 266
au.com.aig.aiaa.paymentdishonor.web.ReportsAction.execute(org.apache.struts.action.ActionMapping,
org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) line: 67
org.apache.struts.action.RequestProcessor.processActionPerform(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, org.apache.struts.action.Action,
org.apache.struts.action.ActionForm,
org.apache.struts.action.ActionMapping) line: 446
org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) line: 266
org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) line: 1292
org.apache.struts.action.ActionServlet.doGet(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) line: 492
org.apache.struts.action.ActionServlet(javax.servlet.http.HttpServlet).service(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) line: 740
org.apache.struts.action.ActionServlet(javax.servlet.http.HttpServlet).service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse) line: 853
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(javax.servlet.ServletRequest,
javax.servlet.ServletResponse) line: 110 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.StrictServletInstance(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet)._service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse) line: 174 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.IdleServletState.service(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet,
javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 313
[local variables unavailable]
com.ibm.ws.webcontainer.servlet.StrictServletInstance(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet).service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse) line: 116 [local variables unavailable]
com.ibm.ws.webcontainer.servlet.ServletInstance.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse,
com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 258
[local variables unavailable]
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(com.ibm.ws.webcontainer.servlet.ServletInstanceReference,
javax.servlet.ServletRequest, javax.servlet.ServletResponse,
com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 42
[local variables unavailable]
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(javax.servlet.ServletRequest,
javax.servlet.ServletResponse,
com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 40
[local variables unavailable]
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(com.ibm.ws.webcontainer.webapp.WebAppRequest,
javax.servlet.http.HttpServletResponse) line: 872 [local variables
unavailable]
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(javax.servlet.ServletRequest,
javax.servlet.ServletResponse, boolean) line: 491 [local variables
unavailable]
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(javax.servlet.ServletRequest,
javax.servlet.ServletResponse) line: 173 [local variables unavailable]
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) line: 79 [local variables
unavailable]
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(java.lang.Object)
line: 199 [local variables unavailable]
com.ibm.ws.webcontainer.srt.WebAppInvoker(com.ibm.ws.webcontainer.cache.invocation.CachedInvocation).handleInvocation(java.lang.Object)
line: 71 [local variables unavailable]
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(java.lang.Object)
line: 114 [local variables unavailable]
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(java.lang.String,
com.ibm.ws.webcontainer.srp.ISRPConnection) line: 187 [local variables
unavailable]
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(com.ibm.ws.webcontainer.oselistener.api.IOSEConnection)
line: 331 [local variables unavailable]
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest() line: 56
[local variables unavailable]
com.ibm.ws.webcontainer.http.HttpConnection(com.ibm.ws.http.HttpConnection).readAndHandleRequest()
line: 432 [local variables unavailable]
com.ibm.ws.webcontainer.http.HttpConnection(com.ibm.ws.http.HttpConnection).run()
line: 343 [local variables unavailable]
com.ibm.ws.util.ThreadPool$Worker.run() line: 592 [local variables
unavailable] -
Java.io.NotSerializableException exception in session beans
Hey experts,
I have written the following code to call a session bean method from a portal application.
Object obj1 = context.lookup("applications/knet");
UserInfoHome userInfoHome =
(UserInfoHome) javax.rmi.PortableRemoteObject.narrow(
obj1,
UserInfoHome.class);
UserInfo userInfo = userInfoHome.create();
Collection col =
userInfo.getAllrooms();
out.println("The size is " + col.size() + "<br>");
The following is the implementation of the getAllrooms() method in the session bean
public Collection getAllrooms() {
Collection col = null;
try {
InitialContext ctx = new InitialContext();
roomsHome = (RoomsLocalHome) ctx.lookup("java:comp/env/ejb/RoomsBean");
col = roomsHome.findAllRooms();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FinderException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return col;
In the entity bean the following EJB QL has been used
<EJB QL>
select object(r) from Rooms r
</<EJB QL>>
I get the following error
com.sap.engine.services.rmi_p4.exception.P4BaseRuntimeException: I/O operation failed : java.io.NotSerializableException: com.sap.engine.services.ejb.entity.finder.EJBLocalCollection :
at com.sap.engine.services.rmi_p4.server.P4ObjectBrokerServerImpl.getException(P4ObjectBrokerServerImpl.java:926)
at com.sap.engine.services.rmi_p4.reflect.LocalInvocationHandler.replicateReturnValue(LocalInvocationHandler.java:115)
at com.sap.engine.services.rmi_p4.reflect.LocalInvocationHandler.invokeInternal(LocalInvocationHandler.java:90)
at com.sap.engine.services.rmi_p4.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:50)
at $Proxy180.getAllrooms(Unknown Source)
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:324)
at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
at $Proxy181.getAllrooms(Unknown Source)
at com.watercorp.BMS.test.EJBTest.doContent(EJBTest.java:120)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
... 29 more
Caused by: java.io.NotSerializableException: com.sap.engine.services.ejb.entity.finder.EJBLocalCollection
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at com.sap.engine.services.rmi_p4.reflect.LocalInvocationHandler.replicateReturnValue(LocalInvocationHandler.java:110)
... 42 more
Please helpHi Sabbir,
You are trying to expose a Collection of Entity local interfaces (RoomsLocal) that is the result of RoomsLocalHome.findAllRooms(), through the Session bean's remote interface method getAllrooms(). This is forbidden by the EJB specification and of course cannot work. You have to use remote interfaces of Entity beans when you want to expose them to remote clients - although this is not a good practice either since Entity beans are fine-grained components. Data transfer objects (<a href="http://en.wikipedia.org/wiki/Data_Transfer_Object">DTO</a>) with Session facades should be used for this purpose (you already have a Session facade - the UserInfo bean).
Hope this clarifies it!
-Vladimir
Message was edited by:
Vladimir Pavlov -
Java.io.NotSerializableException in Query
All,
I am encountering a strange java.io.NotSerializable error on certain
queries. I am using Kodo Std 2.2.6 (trial version) on RH7.1 with Postgres
7.1 (inside a Struts 1.1 servlet running inside Tomcat 4.1).
The error is the following: I am attempting to find "Resources" that have
associated "File"s, where those files have "FileRole" == a particular
FileRole object.
The objects (simplified) are:
public class Resource {
File file;
String driver;
String driverId;
public class File {
FileRole fileRole;
public class FileRole {
String name;
The query is:
public List findByDriver(String driver, String driverId, FileRole fileRole)
List li = null;
try {
String filter = "driver == driverString && driverId ==
driverIdString && file.fileRole == theFileRole";
Extent beanExtent =
JDOManager.getInstance().getPersistenceManager().getExtent(Resource.class,
false);
Query q =
JDOManager.getInstance().getPersistenceManager().newQuery(Resource.class,
beanExtent, filter);
q.declareImports("import lepton.core.file.File;" + "import
lepton.core.file.FileRole");
q.declareParameters("String driverString, String driverIdString,
FileRole theFileRole);
ArrayList queryArray = new ArrayList();
queryArray.add(driver);
queryArray.add(driverId);
queryArray.add(fileRole);
Collection results = (Collection) q.execute(queryArray);
li = new ArrayList(results);
} catch (Exception e) {
throw new LeptonException(e);
return li;
The error is:
javax.jdo.JDOException: lepton.core.file.FileRole
NestedThrowables:
java.io.NotSerializableException: lepton.core.file.FileRole
at
com.solarmetric.kodo.impl.jdbc.schema.dict.GenericDictionary.toSQL(GenericDi
ctionary.java:169)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory$Constant.(JDBCE
xpressionFactory.java:465)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory.getConstant(JDB
CExpressionFactory.java:229)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory.getParameter(JD
BCExpressionFactory.java:249)
at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:563)
at com.solarmetric.kodo.query.FilterParser.getValue(FilterParser.java:669)
at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:582)
at
com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:678)
at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:653)
at
com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:678)
at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:653)
at
com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:678)
at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:653)
at
com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:678)
at com.solarmetric.kodo.query.FilterParser.evaluate(FilterParser.java:530)
at com.solarmetric.kodo.query.QueryImpl.getExpression(QueryImpl.java:502)
at com.solarmetric.kodo.query.QueryImpl.getExpression(QueryImpl.java:468)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.getExpression(JDBCQuery.jav
a:190)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:342)
at
com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:529)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:314)
at lepton.knowledgebase.ResourceHome.findByDriver(ResourceHome.java:91)
My jdo mappings (simplified) are:
Resource:
<jdo>
<package name="lepton.knowledgebase">
<class name="Resource" >
<field name="driver">
</field>
<field name="driverId">
</field>
<field name="file">
</field>
</class>
</package>
</jdo>
File:
<jdo>
<package name="lepton.core.file">
<class name="File" >
<field name="fileRole">
</field>
</class>
</package>
</jdo>
FileRole:
<jdo>
<package name="lepton.core.file">
<class name="FileRole" >
<field name="name">
<extension vendor-name="kodo"
key="column-index"
value="true" />
</field>
</class>
</package>
</jdo>
Any help/suggestions would be greatly appreciated. I am seeing this error
in one other query, with a similar (but slightly more involved) syntax.
(The point of commonality is querying a somewhat distant--but
related--portion of the object graph, in the form xx.xx.xx == yy).
Thanks,
David
David Sachs
Redpoint Ventures
[email protected]Abe,
Thanks again for your help. I discovered (much to my embarassment) that
this was a case of a massively silly error on my part, and a somewhat
misleading error message.
The cause of the problem was my query--Kodo is working great.
I had:
public List findByDriver(String driver, String driverId, FileRole fileRole)
q.declareParameters("String driverString, String driverIdString,
FileRole theFileRole);
ArrayList queryArray = new ArrayList();
queryArray.add(driver);
queryArray.add(driverId);
queryArray.add(fileRole);
Collection results = (Collection) q.execute(queryArray);
This should be:
q.declareParameters("String driverString, String driverIdString,
FileRole theFileRole);
Map queryMap = new HashMap();
queryMap.add(driver);
queryMap.add(driverId);
queryMap.add(fileRole);
Collection results = (Collection) q.executeWithMap(queryMap);
It works perfectly, as does the other case in which I saw a
java.io.NotSerializable error.
Anyway, sorry to have wasted your time on this, but maybe there is some way
to make the reported error slightly more specific. As an aside, I did try
to track down whether a superfluous jdo/kodo.jar was lurking anywhere in
Kodo's classpath, but I didn't find anything. Clearly (since this now
works), the properly enhanced FileRole class is present, but the error
message was didn't indicate that I was wildly misusing the q.executeXXX
facility.
Anyway, thanks very much for your assistance, and sorry to have led you
astray chasing down a user error.
David
"Abe White" <[email protected]> wrote in message
news:[email protected]...
I wasn't able to find a class called"javax.jdo.spi.PersistenceCapable"--did
you mean just "javax.jdo.PersistenceCapable?"Yeah, sorry. In JDO 1.0 they moved PersistenceCapable to the 'spi'subpackage;
Kodo 2.2.6 (unlike 2.3, which is out now), uses an older version of the spec.
>
Assuming that you meant javax.jdo.PersistenceCapable, my class reportsthat
it IS persistence capable.Well I've checked our code (the version that you're using), and itcouldn't
really be more clear. It's basically:
if (obj instanceof PersistenceCapable)
... 1 ...
else
... 2 ...
And your stack trace ends up in position 2. That means that to Kodo, that
object is not persistence capable. This has to be a class loader issue.
I assume your install script is run outside of the servlet? Or in a
different web app? Tomcat does some funky things with class loaders; ifyou
have multiple JDO jars floating around there might also technically be
multiple PersistenceCapable classes, and the one Kodo sees is differentthan
the one your application sees. Make sure both the kodo jars and the jdojars
are only in a single location.
This makes sense, since I have been able to create and make persistent
instances of the FileRole class. (I can successfully create a bunch of
FileRoles and persist them to my database as part of my install script,
which would alos fail were FileRole not enhanced).
Any ideas?
Thanks very much,
David
"Abe White" <[email protected]> wrote in message
news:[email protected]...
David --
Before you execute the query, can you please check to see that
(fileRole instanceof javax.jdo.spi.PersistenceCapable) ?
If a parameter isn't persistence-capable, we try to convert it to SQL;
for complex types, this means serializing it. I have a feeling there
is
a class loader issue or something where an unenhanced version of your
class is sneaking in. Let us know what you find out. -
Java.io.NotSerializableException error when starting 8.1 app server
I am running JES 054Q with uwc deployed on the app server 8.1 (along with am, portal, and da). I am getting a java.io.NotSerializableException for com.sun.uwc.common.util.UWCPreferences when the application server starts. Any access to get attributes from UWCPreferences results more java.io.NotSerializableException errors. How do I get the app server to not load com.sun.uwc.common.util.UWCPreferences as Serializable?
Following is what is showing up the log file with finest level:
# grep -n UWCPreferences *
server.log:2:java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log:44:java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-08-05:10373:[#|2006-08-28T03:07:59.991-0600|FINE|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;|loadClass(com.sun.uwc.common.util.UWCPreferences, false)|#]
server.log_2006-08-28T03-08-05:10383:[#|2006-08-28T03:07:59.994-0600|FINE|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;| findClass(com.sun.uwc.common.util.UWCPreferences)|#]
server.log_2006-08-28T03-08-05:10385:[#|2006-08-28T03:07:59.995-0600|FINEST|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;| findClassInternal(com.sun.uwc.common.util.UWCPreferences)|#]
server.log_2006-08-28T03-08-05:10397:[#|2006-08-28T03:08:00.001-0600|FINE|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;| Returning class class com.sun.uwc.common.util.UWCPreferences|#]
server.log_2006-08-28T03-08-05:10781:[#|2006-08-28T03:08:00.154-0600|SEVERE|sun-appserver-ee8.1_02|org.apache.catalina.session.ManagerBase|_ThreadID=10;|IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-08-05:10782:java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-08-05:10807:Caused by: java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-08-05:10849:java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-08-05:10874:Caused by: java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-08-05:11313:[#|2006-08-28T03:08:00.286-0600|FINE|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;|loadClass(com.sun.uwc.common.util.UWCPreferencesFactory, false)|#]
server.log_2006-08-28T03-08-05:11323:[#|2006-08-28T03:08:00.289-0600|FINE|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;| findClass(com.sun.uwc.common.util.UWCPreferencesFactory)|#]
server.log_2006-08-28T03-08-05:11325:[#|2006-08-28T03:08:00.290-0600|FINEST|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;| findClassInternal(com.sun.uwc.common.util.UWCPreferencesFactory)|#]
server.log_2006-08-28T03-08-05:11327:[#|2006-08-28T03:08:00.292-0600|FINE|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;| Returning class class com.sun.uwc.common.util.UWCPreferencesFactory|#]
server.log_2006-08-28T03-15-11:22429:[#|2006-08-28T03:09:45.991-0600|FINE|sun-appserver-ee8.1_02|org.apache.catalina.loader.WebappClassLoader|_ThreadID=23;|loadClass(com.sun.uwc.common.util.UWCPreferences, false)|#]
server.log_2006-08-28T03-15-11:29542:java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-15-11:29584:java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-15-11:29626:java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
server.log_2006-08-28T03-15-11:29668:java.io.NotSerializableException: com.sun.uwc.common.util.UWCPreferences
ThanksI think this might occur if you don't have the patch for SunAlert 46042 installed. There's more information on this critical Solaris security vulnerability, which was reported back in 2002, at http://sunsolve.central.sun.com/search/document.do?assetkey=1-26-46042-1
Can you run the following command to check if you have patch 109326-09 installed and let us know the result?showrev -p | grep 109326If you don't have 109326-09 or higher installed, you should install it as soon as possible. You can follow the link from the SunAlert. Better yet, install the latest Solaris 8 recommended patch cluster from http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access to make sure your system is fully patched and up to date. -
hi to all,
i am using a session less bean A to querry a Entity Bean B , which inturns calls another EntityBean C ,
finally a ' find' method is invoked on the EntityBean C, In this a vector is created which holds 3 different vectors at different indexes, now the problem i am facing is that when Enity Bean B is returning the final vector to the A , it's firing out a errors that :-
TRANSACTION COULD NOT BE COMPLETED: RemoteException occurred in server thread;
ested exception is:
java.rmi.RemoteException: null; nested exception is:
java.rmi.ServerException: RemoteException occurred in server thread; ne
ted exception is:
java.rmi.RemoteException: null; nested exception is:
java.io.NotSerializableException: java.util.Vector$1
java.rmi.ServerException: RemoteException occurred in server thread; nested exc
ption is:
java.rmi.RemoteException: null; nested exception is:
java.rmi.ServerException: RemoteException occurred in server thread; ne
ted exception is:
java.rmi.RemoteException: null; nested exception is:
java.io.NotSerializableException: java.util.Vector$1
java.rmi.RemoteException: null; nested exception is:
java.rmi.ServerException: RemoteException occurred in server thread; ne
ted exception is:
java.rmi.RemoteException: null; nested exception is:
java.io.NotSerializableException: java.util.Vector$1
java.rmi.ServerException: RemoteException occurred in server thread; nested exc
ption is:
java.rmi.RemoteException: null; nested exception is:
java.io.NotSerializableException: java.util.Vector$1
java.rmi.RemoteException: null; nested exception is:
java.io.NotSerializableException: java.util.Vector$1
java.io.NotSerializableException: java.util.Vector$1
<<no stack trace available>>
ur any help would be highly appricated to solve out this prob.
If i try to iterate through this vector it's gives IOR:0232003x343242344asdsd................................................blabla....................
thanxs in adavance
DeepakHi I think you are using the method elements() in a remote method.
This method can't be Serializable!! Because it returns an Interface. Interfaces are never Serializable.
Regards,
Peter -
Java.io.NotSerializableException when using POF over Extend
I changed a class to use POF and it seems to work fine among TCMP cluster members but when apps connect with Extend I get an exception indicating that maybe either the extend proxy or client app is not correctly configured to use POF.
(Wrapped) java.io.NotSerializableException: dj_quotes.DJ_Quote
at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:22)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
at com.tangosol.coherence.component.net.extend.Channel.send(Channel.CDB:6)
at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:55)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.NotSerializableException: dj_quotes.DJ_Quote
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at com.tangosol.util.ExternalizableHelper.writeSerializable(ExternalizableHelper.java:2252)
at com.tangosol.util.ExternalizableHelper.writeObjectInternal(ExternalizableHelper.java:2696)
at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2600)
at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:210)
at com.tangosol.coherence.component.net.extend.proxy.serviceProxy.CacheServiceProxy$ConverterToBinary.convert(CacheServiceProxy.CDB:3)
at com.tangosol.util.ConverterCollections$AbstractConverterEntry.getValue(ConverterCollections.java:3547)
at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1977)
at com.tangosol.coherence.component.net.extend.message.Response.writeExternal(Response.CDB:23)
at com.tangosol.coherence.component.net.extend.message.response.PartialResponse.writeExternal(PartialResponse.CDB:1)
at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor.encodeMessage(TcpAcceptor.CDB:8)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
... 9 moreLooks like it failed while attempting default serialization, right?
My extend proxy servers start with
-Dtangosol.coherence.cacheconfig=cache-config-extend-proxy.xml
here:
<?xml version="1.0"?>
<!DOCTYPE cache-config SYSTEM "cache-config.dtd">
<cache-config>
<!-- *********** SCHEME MAPPINGS *********** -->
<caching-scheme-mapping>
<cache-mapping>
<cache-name>quotes.*</cache-name>
<scheme-name>quotes-scheme</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<!-- ******************************** -->
<caching-schemes>
<proxy-scheme>
<service-name>ExtendTcpProxyService</service-name>
<thread-count>8</thread-count>
<acceptor-config>
<tcp-acceptor>
<local-address>
<address system-property="tangosol.coherence.proxy.address">localhost</address>
<port system-property="tangosol.coherence.proxy.port">9090</port>
</local-address>
</tcp-acceptor>
</acceptor-config>
<proxy-config>
<cache-service-proxy>
<lock-enabled>true</lock-enabled>
</cache-service-proxy>
</proxy-config>
<autostart>true</autostart>
</proxy-scheme>
<distributed-scheme>
<scheme-name>quotes-scheme</scheme-name>
<service-name>DistributedQuotesCacheService</service-name>
<serializer>
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<init-params>
<init-param>
<param-type>string</param-type>
<param-value system-property="pof.config">z:/coherence/pof-config.xml</param-value>
</init-param>
</init-params>
</serializer>
<backing-map-scheme>
<local-scheme/>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
</caching-schemes>
</cache-config>extend client apps start with
-Dtangosol.coherence.cacheconfig=z:/coherence/cache-config-extend-client.xml
here:
<?xml version="1.0"?>
<!DOCTYPE cache-config SYSTEM "cache-config.dtd">
<cache-config>
<!-- *********** SCHEME MAPPINGS *********** -->
<caching-scheme-mapping>
<cache-mapping>
<cache-name>quotes.*</cache-name>
<scheme-name>extend-scheme</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<!-- ******************************** -->
<caching-schemes>
<remote-cache-scheme>
<scheme-name>extend-scheme</scheme-name>
<service-name>ExtendTcpCacheService</service-name>
<initiator-config>
<tcp-initiator>
<remote-addresses>
<socket-address>
<address>192.168.3.6</address>
<port>9090</port>
</socket-address>
</remote-addresses>
<connect-timeout>12s</connect-timeout>
</tcp-initiator>
<outgoing-message-handler>
<request-timeout>6s</request-timeout>
</outgoing-message-handler>
</initiator-config>
</remote-cache-scheme>
<!-- ALSO TRIED THIS IN PLACE OF extend-scheme -->
<remote-cache-scheme>
<scheme-name>extend-scheme-pof</scheme-name>
<service-name>ExtendPofTcpCacheService</service-name>
<serializer>
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<init-params>
<init-param>
<param-type>string</param-type>
<param-value system-property="pof.config">z:/coherence/pof-config.xml</param-value>
</init-param>
</init-params>
</serializer>
<initiator-config>
<tcp-initiator>
<remote-addresses>
<!-- mothra -->
<socket-address>
<address>192.168.3.6</address>
<port>9090</port>
</socket-address>
</remote-addresses>
<connect-timeout>12s</connect-timeout>
</tcp-initiator>
<outgoing-message-handler>
<request-timeout>6s</request-timeout>
</outgoing-message-handler>
</initiator-config>
</remote-cache-scheme>
</caching-schemes>
</cache-config>pof-config.xml should be fine...
<!DOCTYPE pof-config SYSTEM "pof-config.dtd">
<pof-config>
<user-type-list>
<include>coherence-pof-config.xml</include>
<user-type>
<type-id>10001</type-id>
<class-name>dj_quotes.DJ_Quote</class-name>
</user-type>
</user-type-list>
</pof-config>Any ideas what I missed?
Thanks,
AndrewLooks like I spoke too soon. Moving the <serializer> to the correct location in the Extend client XML config did fix the problem I was seeing but it created a new problem. It appears the Extend client wants to use POF for everything including non-POF services like the one handling the Serializable (non-POF) object oms.Order. That's what I gather from this exception
Exception in thread "AWT-EventQueue-0" (Wrapped) java.io.IOException: unknown user type: oms.Order
at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:22)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:18)
at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
at com.tangosol.coherence.component.net.extend.RemoteNamedCache$BinaryCache.putAll(RemoteNamedCache.CDB:10)
at com.tangosol.util.ConverterCollections$ConverterMap.putAll(ConverterCollections.java:1702)
at com.tangosol.coherence.component.net.extend.RemoteNamedCache.putAll(RemoteNamedCache.CDB:1)
at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
at oms.Order.sendMultiple(Order.java:357)
at order_entry_window.OrderEntryPanel$SubmitListener.sendOrder(OrderEntryPanel.java:1307)
at order_entry_window.OrderEntryPanel$SubmitListener.actionPerformed(OrderEntryPanel.java:1321)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6504)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6269)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4860)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4686)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2713)
at java.awt.Component.dispatchEvent(Component.java:4686)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:680)
at java.awt.EventQueue$4.run(EventQueue.java:678)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.io.IOException: unknown user type: oms.Order
at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:341)
at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2596)
at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:210)
at com.tangosol.coherence.component.net.extend.RemoteNamedCache$ConverterToBinary.convert(RemoteNamedCache.CDB:4)
at com.tangosol.util.ConverterCollections$AbstractConverterEntry.getValue(ConverterCollections.java:3547)
at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1977)
at com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$PutAllRequest.writeExternal(NamedCacheFactory.CDB:3)
at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
... 47 more
Caused by: java.lang.IllegalArgumentException: unknown user type: oms.Order
at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:420)
at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:409)
at com.tangosol.io.pof.PofBufferWriter.writeUserType(PofBufferWriter.java:1660)
at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1622)
at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:335)
... 56 moreSo I posted a follow-up question here:
Can an extend client use both POF and java.io.Serializable?
Thanks,
Andrew -
Hi,
I’m using coherence(V3.6.1) with POF serialization in ADF web application. I have setup local coherence server node and Jdev integrated webcenter server in my local system(windows 7 OS), the application works perfectly when I run in local Jdeveloper integrated server. But when I deploy the application on dev environment ( standalone webcenter spaces server v11G on Unix OS) we are getting exception “(Wrapped) java.io.NotSerializableException: com.enbridge.co.ux.coherence.pojos.CommodityPojo”
It seems that POF is not configured properly on the standalone webcenter (spaces) server, please help finding out the solution for this issue. On standalone webcenter spaces server is there any extra configurations we have to do?
The error logs and configuration filess I have used:
1. Exception logs:
<14-Jun-2013 3:43:04 o'clock AM MDT> <Error> <HTTP> <BEA-101216> <Servlet: "MMFBootStrapServlet" failed to preload on startup in Web application: "MMFUIPortal-Portal-context-root".
(Wrapped) java.io.NotSerializableException: com.enbridge.co.ux.coherence.pojos.CommodityPojo
at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:215)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ConverterValueToBinary.convert(PartitionedCache.CDB:3)
at com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1578)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.put(PartitionedCache.CDB:1)
at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
Truncated. see log file for complete stacktrace
Caused By: java.io.NotSerializableException: com.enbridge.co.ux.coherence.pojos.CommodityPojo
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.GeneratedMethodAccessor983.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Truncated. see log file for complete stacktrace
2. 2. tangosol-coherence-override.xml:
<?xml version='1.0'?>
<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
xsi:schemaLocation="http://xmlns.oracle.com/coherence/ coherence-operational-config coherence-operational-config.xsd">
<cluster-config>
<member-identity>
<cluster-name>mmf_Coh_Cluster</cluster-name>
</member-identity>
<multicast-listener>
<address>224.3.6.0</address>
<port>60001</port>
<time-to-live>0</time-to-live>
</multicast-listener>
<serializers>
<serializer>
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
<param-value system-property="pof.config">mmfui-pof-config.xml</param-value>
</init-param>
</init-params>
</serializer>
</serializers>
</cluster-config>
<configurable-cache-fact0ry-config>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
<param-value system-property="tangosol.coherence.cacheconfig">mmfui-cache-config.xml</param-value>
</init-param>
</init-params>
</configurable-cache-fact0ry-config>
</coherence>
3. mmfui-cache-config.xml
<?xml version="1.0"?>
<!DOCTYPE cache-config SYSTEM "cache-config.dtd">
<cache-config>
<defaults>
<serializer>pof</serializer>
</defaults>
<caching-scheme-mapping>
<cache-mapping>
<cache-name>mmfcache</cache-name>
<scheme-name>ExamplesPartitionedPofScheme</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<distributed-scheme>
<scheme-name>ExamplesPartitionedPofScheme</scheme-name>
<service-name>PartitionedPofCache</service-name>
<serializer>
<instance>
<class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
<init-params>
<init-param>
<param-type>String</param-type>
<param-value system-property="pof.config">mmfui-pof-config.xml</param-value>
</init-param>
</init-params>
</instance>
</serializer>
<backing-map-scheme>
<local-scheme>
<!-- each node will be limited to 250MB -->
<high-units>250M</high-units>
<unit-calculator>binary</unit-calculator>
</local-scheme>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
</caching-schemes>
</cache-config>
4. mmfui-pof-config.xml
<?xml version="1.0"?>
<!DOCTYPE pof-config SYSTEM "pof-config.dtd">
<pof-config>
<user-type-list>
<!-- coherence POF user types -->
<include>coherence-pof-config.xml</include>
<!-- com.tangosol.examples package -->
<user-type>
<type-id>1001</type-id>
<class-name>com.enbridge.co.ux.coherence.pojos.CommodityPojo</class-name>
</user-type>
</user-type-list>
</pof-config>
5. ~-cache-server.sh file on coherence distribution
COHERENCE_HOME=/u01/app/oracle/product/fmw11g/coherence_3.6
JAVA_HOME=/usr/java/jdk1.6.0_24
PATH=$PATH:$JAVA_HOME/bin
CONFIG_HOME=/u01/app/oracle/product/fmw11g/coherence_3.6/mmfconfig
# specify the JVM heap size
MEMORY=512m
if [ ! -f ${COHERENCE_HOME}/bin/cache-server.sh ]; then
echo "coherence.sh: must be run from the Coherence installation directory."
exit
fi
if [ -f $JAVA_HOME/bin/java ]; then
JAVAEXEC=$JAVA_HOME/bin/java
else
JAVAEXEC=java
Fi
COH_OPTS=$COH_OPTS -Dtangosol.coherence.distributed.localstorage=true -Dtangosol.coherence.cluster=mmf_Coh_Cluster -Dtangosol.coherence.clusterport=60001 -Dtangosol.coherence.clusteraddress=224.3.6.0 -Dtangosol.coherence.cacheconfig=~/mmfui-cache-config.xml
JAVA_OPTS="-Xms$MEMORY -Xmx$MEMORY -Dtangosol.pof.enabled=true -Dtangosol.pof.config=~/mmfui-pof-config.xml"
$JAVAEXEC $COH_OPTS -server -showversion $JAVA_OPTS -cp "$COHERENCE_VAR:$CONFIG_HOME:$COHERENCE_HOME/lib/coherence.jar:$COHERENCE_HOME/lib/coherence-common-1.5.0.jar:pojoClasses.jar" com.tangosol.net.DefaultCacheServer $1
6.COHERENCE_PROPERTIES variable added in setDomainEnv.sh file:
COHERENCE_PROPERTIES=-Dtangosol.coherence.distributed.localstorage=false -Dtangosol.coherence.clusteraddress=224.3.6.0 -Dtangosol.coherence.clusterport=60001 -Dtangosol.coherence.cluster=mmf_Coh_Cluster -Dtangosol.coherence.override=~/tangosol-coherence-override.xml -Dtangosol.coherence.cacheconfig=~/mmfui-cache-config.xml -Dpof.config=~/ mmfui-pof-config.xml
JAVA_PROPERTIES=-Dplatform.home=${WL_HOME} -Dwls.home=${WLS_HOME} -Dweblogic.home=${WLS_HOME} ${COHERENCE_PROPERTIES}does the below class implement java.io.Serializable
com.enbridge.co.ux.coherence.pojos.CommodityPojo
if not implement serializable -
Drag and Drop and java.io.NotSerializableException
I have been implementing some code to essentially allow me to drag and drop from one JTree to another. The requirement was to be able to drag multiple nodes at one time and drop them on the other JTree in the order selected.
I was getting a java.io.NotSerializableException when I was in the drop code in the destination jTree and could not figure out what was going on. Basically, I was wrapping all the objects that i wanted to transfer in a custom ArrayList subclass that implemented transferable. The NotSerializableException was was indicating that the object in the JList was not serializable.
If you are getting a NotSerializableException and you have defined a custom DataFlavor like so:
public static DataFlavor DATATYPE_TRANSFER =
new DataFlavor(
TransferableImplementor.class, // make sure that this is the class that implements transferable
"Datatype Information");make sure that the .class is indeed the class that implements the transferable interface (and not some other random .class). You can be led down a wild goose chase on trying to make sure every object in your Transferable implementor class is serializable, when the problem lays in the DataFlavor instantiation.
NikIf you haven't already read these, here are a couple of good sources for DND tree implementation details.
http://www.javaworld.com/javaworld/javatips/jw-javatip97.html
http://www.javaworld.com/javaworld/javatips/jw-javatip114.html -
Need help in solving java.io.NotSerializableException
Hi,
Weblogic 9.2
I need help in solving the java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
I dont know why ApplicationNamingNode has to be serialized.
Full stack trace will be provided if needed.
thank youHere is the stack trace
Remote service [com.gfs.corp.component.price.customerbid.PCBMaint] threw exception
weblogic.rjvm.PeerGoneException: ; nested exception is:
java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:211)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at com.gfs.corp.component.price.maint.customerbid.ejb.PCBMaint_q9igfc_EOImpl_922_WLStub.createBid(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:107)
at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor.java:75)
at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.invoke(AbstractRemoteSlsbInvokerInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy47.createBid(Unknown Source)
at com.gfs.corp.bid.price.controller.DefaultBidPriceUpdater.awardBid(DefaultBidPriceUpdater.java:83)
at com.gfs.corp.bid.price.ejb.AwardQueueMessageHandler.onMessage(AwardQueueMessageHandler.java:98)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:3962)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:441)
at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:378)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.transaction.internal.PropagationContext.readRollbackReason(PropagationContext.java:804)
at weblogic.transaction.internal.PropagationContext.readExternal(PropagationContext.java:376)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.rmi.provider.BasicServiceContext.readExternal(BasicServiceContext.java:56)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
at weblogic.rjvm.MsgAbbrevInputStream.readExtendedContexts(MsgAbbrevInputStream.java:224)
at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:188)
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:435)
... 7 more
Caused by: java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at weblogic.jndi.internal.WLContextImpl.writeExternal(WLContextImpl.java:453)
at weblogic.jndi.internal.WLEventContextImpl.writeExternal(WLEventContextImpl.java:422)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at weblogic.transaction.internal.PropagationContext.convertRollbackReasonToBytes(PropagationContext.java:735)
at weblogic.transaction.internal.PropagationContext.writeRollbackReason(PropagationContext.java:819)
at weblogic.transaction.internal.PropagationContext.writeExternal(PropagationContext.java:183)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at weblogic.rmi.provider.BasicServiceContext.writeExternal(BasicServiceContext.java:48)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:614)
at weblogic.rjvm.MsgAbbrevOutputStream.marshalCustomCallData(MsgAbbrevOutputStream.java:319)
at weblogic.rjvm.MsgAbbrevOutputStream.transferThreadLocalContext(MsgAbbrevOutputStream.java:149)
at weblogic.rmi.internal.BasicServerRef.postInvoke(BasicServerRef.java:606)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:455)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:58)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:975)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
2007-10-18 08:38:04,931 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean - Could not invoke 'remove' on remote EJB proxy
weblogic.rjvm.PeerGoneException: ; nested exception is:
java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:211)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at com.gfs.corp.component.price.maint.customerbid.ejb.PCBMaint_q9igfc_EOImpl_922_WLStub.remove(Unknown Source)
at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.removeSessionBeanInstance(AbstractRemoteSlsbInvokerInterceptor.java:227)
at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.releaseSessionBeanInstance(SimpleRemoteSlsbInvokerInterceptor.java:118)
at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor.java:95)
at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.invoke(AbstractRemoteSlsbInvokerInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy47.createBid(Unknown Source)
at com.gfs.corp.bid.price.controller.DefaultBidPriceUpdater.awardBid(DefaultBidPriceUpdater.java:83)
at com.gfs.corp.bid.price.ejb.AwardQueueMessageHandler.onMessage(AwardQueueMessageHandler.java:98)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:3962)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:441)
at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:378)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.transaction.internal.PropagationContext.readRollbackReason(PropagationContext.java:804)
at weblogic.transaction.internal.PropagationContext.readExternal(PropagationContext.java:376)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.rmi.provider.BasicServiceContext.readExternal(BasicServiceContext.java:56)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
at weblogic.rjvm.MsgAbbrevInputStream.readExtendedContexts(MsgAbbrevInputStream.java:224)
at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:188)
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:435)
... 7 more
Caused by: java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at weblogic.jndi.internal.WLContextImpl.writeExternal(WLContextImpl.java:453)
at weblogic.jndi.internal.WLEventContextImpl.writeExternal(WLEventContextImpl.java:422)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at weblogic.transaction.internal.PropagationContext.convertRollbackReasonToBytes(PropagationContext.java:735)
at weblogic.transaction.internal.PropagationContext.writeRollbackReason(PropagationContext.java:819)
at weblogic.transaction.internal.PropagationContext.writeExternal(PropagationContext.java:183)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at weblogic.rmi.provider.BasicServiceContext.writeExternal(BasicServiceContext.java:48)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:614)
at weblogic.rjvm.MsgAbbrevOutputStream.marshalCustomCallData(MsgAbbrevOutputStream.java:319)
at weblogic.rjvm.MsgAbbrevOutputStream.transferThreadLocalContext(MsgAbbrevOutputStream.java:149)
at weblogic.rmi.internal.ReplyOnError.run(ReplyOnError.java:54)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
2007-10-18 08:38:05,244 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean - Could not connect to remote EJB [com.gfs.corp.component.price.customerbid.PCBMaint] - retrying
org.springframework.remoting.RemoteConnectFailureException: Could not connect to remote service [com.gfs.corp.component.price.customerbid.PCBMaint]; nested exception is weblogic.rjvm.PeerGoneException: ; nested exception is:
java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
thank you -
Hi,
While trying to get JVM Memory pool information of a remote computer ,am getting java.io.NotSerializableException. I used following method
ManagementFactory.getMemoryPollMXBean().
Please help me to solve these exception.
java.io.NotSerializableException: sun.management.MemoryPoolImpl
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
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:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at com.path.systemmanager.tunnelGate.TunnelServlet.doPost(TunnelServlet.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Thanks,
SreejithI agree, it looks frustrating. Obviously the serialization process has found the non-serializable object during the traversal of the object graph, but its difficult to know where this is.
Your class looks a bit "serialization-heavy", if you don't mind me saying. I avoid serializing anything to do with swing components and stick to collections and my own classes. Do you need to serialize these? If not, mark them transient. You can do this for all of them and then reintroduce into the serialized form one at a time to see which one causes the problem (just for curiosity).
When the object is deserialized you will have to make the necessary arrangements to set up any members that you marked transient, as these will be null. You can do this is readObject, but on this subject, why are you writing out the points member explicitly? It will be written out anyway since there is nothing special about it.
I don't know how familiar you are with the serialization package but its a sharp instrument that needs respect. I would advise reading the specification, if you haven't already done so. -
Java.io.NotSerializableException
I am running iplanet ias 6.0 sp3 with web server 6.0 sp1. I
successfully deployed an ear file that contains the war and the jar to
the APPS dir. The session ejbs and the entity ejbs are packed into the
jar file which are deployed with the ear.
I have two piece of testing code. One is a standalone java program.
The other one is a jsp page together with the jsp bean which are packed
into the war file in the ear. The jsp bean code and the standalone
program are doing the same thing. They call a session ejb which calls an
entity bean.
I have made 2 experiments
1> Start server, run the standalone test, got the correct result.
Then run the jsp from the browser, got the correct result.
2> Start server, run the jsp from the browser, fail to get the
result. run the standalone test, fail to get the result
The paten is very consistent. The code and the error msg for test 2 are
attached. Could any one tell me what might cause the problem in the
second test and how to resolve the it ?
Thank in advance
Xiao
When the test fails, I got the following error msg from the console.
[10/Nov/2001 12:08:08:3] info: --------------------------------------
[10/Nov/2001 12:08:11:0] error: EBFP-serialize: error during
serialization of me
thod, exception = java.io.NotSerializableException: java.util.Vector$1
java.io.NotSerializableException: java.util.Vector$1
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:845)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
at
java.io.ObjectOutputStream.outputArray(ObjectOutputStream.java:811)
at
java.io.ObjectOutputStream.checkSubstitutableSpecialClasses(ObjectOut
putStream.java:432)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:337)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
1567)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
:453)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:911)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
at com.kivasoft.ebfp.FPSerializable.serialize(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
[10/Nov/2001 12:08:11:0] warning: EB-invalidate_delegate: instance
com.plateausy
[email protected] threw
an unche
cked or system exception, ex = ElmsUncheckedException:
getHolidayProfileHolidays()
Nested stack traces:
java.rmi.ServerException: RemoteException occurred in server thread;
nested exce
ption is:
java.rmi.ConnectIOException: <mapped>
java.rmi.ConnectIOException: <mapped>
<<no stack trace available>>
[10/Nov/2001 12:08:11:0] error: Exception Stack Trace:
ElmsUncheckedException:
getHolidayProfileHolidays()
Nested stack traces:
java.rmi.ServerException: RemoteException occurred in server thread;
nested exce
ption is:
java.rmi.ConnectIOException: <mapped>
java.rmi.ConnectIOException: <mapped>
<<no stack trace available>>
at
com.plateausystems.elms.bo.holidayprofile.ejb.HolidayProfileManagerBe
an.getHolidayProfileHolidays(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at
com.plateausystems.elms.bo.holidayprofile.ejb.ejb_skel_com_plateausys
tems_elms_bo_holidayprofile_ejb_HolidayProfileManagerBean.getHolidayProfileHolid
ays(ejb_skel_com_plateausystems_elms_bo_holidayprofile_ejb_HolidayProfileManager
Bean.java:207)
at
com.plateausystems.elms.bo.holidayprofile.ejb.ejb_kcp_skel_HolidayPro
fileManager.getHolidayProfileHolidays__seq_com_plateausystems_elms_bo_holidaypro
__13918743(ejb_kcp_skel_HolidayProfileManager.java:326)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
ERROR [Thread-37] (?:?) - <HolidayProfileManagerJB:getHolidayVOs>Can't
get Holid
ayVOs by holiday profile id.java.rmi.ServerException: RemoteException
occurred i
n server thread; nested exception is:
javax.transaction.TransactionRolledbackException
*************************************************************end of
error msg
The attached is session and entity bean code segment.
In the entity bean:
public Enumeration ejbFindByHolidayProfileID(String id) {
Vector list = new Vector();
try {
Connection connection = DBUtil.getConnection();
try {
PreparedStatement s =
connection.prepareStatement(sqlFindByHolidayProfileID);
try {
s.setString(1, id);
ResultSet rs = s.executeQuery();
try {
while (rs.next()) {
HolidayProfileHolidayPK pk = new
HolidayProfileHolidayPK();
pk.holidayProfileID = rs.getString("hol_prfl_id");
pk.holidayID = rs.getString("hol_id");
list.add(pk);
} finally {
rs.close();
} finally {
s.close();
} finally {
connection.close();
} catch (Exception e) {
throw new EJBException(e);
return list.elements();
In the session bean:
public HolidayProfileHolidayVO[] getHolidayProfileHolidays(String
holidayProfileID) throws ElmsFinderException
HolidayProfileHolidayVO[] vos = null;
ArrayList alst = new ArrayList();
HolidayProfileHolidayHome hphHome =
this.getHolidayProfileHolidayHome();
try {
java.util.Enumeration enum =
hphHome.findByHolidayProfileID(holidayProfileID);
while (enum.hasMoreElements()) {
Object obj = enum.nextElement();
HolidayProfileHoliday bean =
(HolidayProfileHoliday)javax.rmi.PortableRemoteObject.narrow(obj,
HolidayProfileHoliday.class);
alst.add(bean.getVO());
} catch (FinderException e) {
// throw as new ElmsCheckedException subclass
throw new ElmsFinderException("getHolidayProfileHolidays(id):
Could not find HolidayProfileHolidays.", e);
} catch (RemoteException e) {
// throw as new ElmsUncheckedException
throw new ElmsUncheckedException(
"getHolidayProfileHolidays()", e);
} catch (RuntimeException e) {
throw new ElmsUncheckedException(e);
if (alst.size()>0) vos =
(HolidayProfileHolidayVO[])alst.toArray(new HolidayProfileHolidayVO[1]);
return vos;
}Xiao,
We have the same problem.
The reason why your stand alone works, but your browser based doesn't,
is because the iPlanet Application server requires that all EJBs, all
objects held in any EJB, all objects held in attributes in an
HttpSession, and all objects held in those objects MUST implement
java.io.Serializable.
The unfortunate reason why iPlanet does this is because iPlanet does not
preserve the state of objects in memory across hits to the server.
iPlanet serializes each and every object mentioned above when the HTML
is returned to the client, and then un-serializes all the objects again
when it receives another hit from the client. This is true even in the
case of no-dsync sticky load balancing.
This is ridiculous. We use sticky load balancing and we have many
objects stored in HttpSession attributes which we do not want to be
serialized every hit to the server, in the interest of speed. It takes
too long to serialize all the objects, and it would take way too long to
save them in a database every hit.
David Shade
xluo888 wrote:
>
I am running iplanet ias 6.0 sp3 with web server 6.0 sp1. I
successfully deployed an ear file that contains the war and the jar to
the APPS dir. The session ejbs and the entity ejbs are packed into the
jar file which are deployed with the ear.
I have two piece of testing code. One is a standalone java program.
The other one is a jsp page together with the jsp bean which are packed
into the war file in the ear. The jsp bean code and the standalone
program are doing the same thing. They call a session ejb which calls an
entity bean.
I have made 2 experiments
1> Start server, run the standalone test, got the correct result.
Then run the jsp from the browser, got the correct result.
2> Start server, run the jsp from the browser, fail to get the
result. run the standalone test, fail to get the result
The paten is very consistent. The code and the error msg for test 2 are
attached. Could any one tell me what might cause the problem in the
second test and how to resolve the it ?
Thank in advance
Xiao
When the test fails, I got the following error msg from the console.
[10/Nov/2001 12:08:08:3] info: --------------------------------------
[10/Nov/2001 12:08:11:0] error: EBFP-serialize: error during
serialization of me
thod, exception = java.io.NotSerializableException: java.util.Vector$1
java.io.NotSerializableException: java.util.Vector$1
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:845)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
at
java.io.ObjectOutputStream.outputArray(ObjectOutputStream.java:811)
at
java.io.ObjectOutputStream.checkSubstitutableSpecialClasses(ObjectOut
putStream.java:432)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:337)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
1567)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
:453)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:911)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
at com.kivasoft.ebfp.FPSerializable.serialize(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
[10/Nov/2001 12:08:11:0] warning: EB-invalidate_delegate: instance
com.plateausy
[email protected] threw
an unche
cked or system exception, ex = ElmsUncheckedException:
getHolidayProfileHolidays()
Nested stack traces:
java.rmi.ServerException: RemoteException occurred in server thread;
nested exce
ption is:
java.rmi.ConnectIOException: <mapped>
java.rmi.ConnectIOException: <mapped>
<<no stack trace available>>
[10/Nov/2001 12:08:11:0] error: Exception Stack Trace:
ElmsUncheckedException:
getHolidayProfileHolidays()
Nested stack traces:
java.rmi.ServerException: RemoteException occurred in server thread;
nested exce
ption is:
java.rmi.ConnectIOException: <mapped>
java.rmi.ConnectIOException: <mapped>
<<no stack trace available>>
at
com.plateausystems.elms.bo.holidayprofile.ejb.HolidayProfileManagerBe
an.getHolidayProfileHolidays(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at
com.plateausystems.elms.bo.holidayprofile.ejb.ejb_skel_com_plateausys
tems_elms_bo_holidayprofile_ejb_HolidayProfileManagerBean.getHolidayProfileHolid
ays(ejb_skel_com_plateausystems_elms_bo_holidayprofile_ejb_HolidayProfileManager
Bean.java:207)
at
com.plateausystems.elms.bo.holidayprofile.ejb.ejb_kcp_skel_HolidayPro
fileManager.getHolidayProfileHolidays__seq_com_plateausystems_elms_bo_holidaypro
__13918743(ejb_kcp_skel_HolidayProfileManager.java:326)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
ERROR [Thread-37] (?:?) - <HolidayProfileManagerJB:getHolidayVOs>Can't
get Holid
ayVOs by holiday profile id.java.rmi.ServerException: RemoteException
occurred i
n server thread; nested exception is:
javax.transaction.TransactionRolledbackException
*************************************************************end of
error msg
The attached is session and entity bean code segment.
In the entity bean:
public Enumeration ejbFindByHolidayProfileID(String id) {
Vector list = new Vector();
try {
Connection connection = DBUtil.getConnection();
try {
PreparedStatement s =
connection.prepareStatement(sqlFindByHolidayProfileID);
try {
s.setString(1, id);
ResultSet rs = s.executeQuery();
try {
while (rs.next()) {
HolidayProfileHolidayPK pk = new
HolidayProfileHolidayPK();
pk.holidayProfileID = rs.getString("hol_prfl_id");
pk.holidayID = rs.getString("hol_id");
list.add(pk);
} finally {
rs.close();
} finally {
s.close();
} finally {
connection.close();
} catch (Exception e) {
throw new EJBException(e);
return list.elements();
In the session bean:
public HolidayProfileHolidayVO[] getHolidayProfileHolidays(String
holidayProfileID) throws ElmsFinderException
HolidayProfileHolidayVO[] vos = null;
ArrayList alst = new ArrayList();
HolidayProfileHolidayHome hphHome =
this.getHolidayProfileHolidayHome();
try {
java.util.Enumeration enum =
hphHome.findByHolidayProfileID(holidayProfileID);
while (enum.hasMoreElements()) {
Object obj = enum.nextElement();
HolidayProfileHoliday bean =
(HolidayProfileHoliday)javax.rmi.PortableRemoteObject.narrow(obj,
HolidayProfileHoliday.class);
alst.add(bean.getVO());
} catch (FinderException e) {
// throw as new ElmsCheckedException subclass
throw new ElmsFinderException("getHolidayProfileHolidays(id):
Could not find HolidayProfileHolidays.", e);
} catch (RemoteException e) {
// throw as new ElmsUncheckedException
throw new ElmsUncheckedException(
"getHolidayProfileHolidays()", e);
} catch (RuntimeException e) {
throw new ElmsUncheckedException(e);
if (alst.size()>0) vos =
(HolidayProfileHolidayVO[])alst.toArray(new HolidayProfileHolidayVO[1]);
return vos; -
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)
…” -
Java.io.NotSerializableException: java.util.RandomAccessSubList
Hi,
I'm testing a software but I receive this error message:
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.util.RandomAccessSubList
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
at $Proxy7.getDataPackage(Unknown Source)
at gaia.dpct.cu3.avu.gsr.server.GsrSourceIdServerRmiImpl.getDataPackage(GsrSourceIdServerRmiImpl.java:73)
at gaia.dpct.cu3.avu.gsr.reader.GsrSystemRowReaderStrategy.loadData(GsrSystemRowReaderStrategy.java:52)
at gaia.dpct.pfs.infraimpl.PFSGenericPersistenceManager.loadData(PFSGenericPersistenceManager.java:455)
at gaia.dpct.pfs.infraimpl.PFSPersistenceManagerAdpaterImpl.loadData(PFSPersistenceManagerAdpaterImpl.java:318)
at gaia.cu1.tools.infraimpl.GenericDataTrain.run(GenericDataTrain.java:546)
at gaia.dpct.pfs.infraimpl.PFSDataTrainAdapterImpl.run(PFSDataTrainAdapterImpl.java:166)
at gaia.dpct.pfs.nodes.TrainManager$TrainExecution.run(TrainManager.java:735)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.util.RandomAccessSubList
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)
... 16 more
Caused by: java.io.NotSerializableException: java.util.RandomAccessSubList
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:315)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
... 3 moreI checked all the code but the objects I use are instantiated from Serializable classes.
I read something about "java.util.RandomAccessSubList" but what is this? I use List and Map.
Are there problem with the List and the Map I use?
Could someone help me?
Thanks, bye bye.You have a List member whose value is derived from List.subList(), which is implemented by the class named in the exception, which isn't serializable. Change it to
subList = new LinkedList<T>(list.subList());where T is whatever it should be.
You should do this anyway, as the subList is merely a view of the original list, so if it was serializable it would take the entire original list with it. -
Java.io.NotSerializableException: java.awt.AWTEventMulticaster
I have an Applet. When I try to use the "print" feature on IE to print out the applet. I'm getting this Exception. java.io.NotSerializableException: java.awt.AWTEventMulticaster
What should I do?
Andyplease help!!
Maybe you are looking for
-
Runtime environment error when starting MaxDB
Hi, I downloaded SAPNetWeaver04SneakPreviewSlimSP11.zip edition from the SDN. I followed the preinstallation directions very closely and believe I have the correct environment set up. However, during the installation process I ran into the following
-
Due to lack of funds, I think i'm going to go with a firebox instead of a firepod. I'm sure I will want more inputs in the future...would I be able to pick up another firebox and chain the together? Also, anyone have any suggestions for mics (to reco
-
Speed up operation of write to file VI
I have a daq situation where an analog input is wired to my PC. I have a labview circuit which has the daq assistant connected to the "Enable" input of the "write to file" VI. The "elapsed time" vi is connected to the signal input. When the input sig
-
Full screen issue after upgrade to Snow Leopard
Can't seem to play back movie in full screen as before. Picture stays black from start or freezes if played within project (audio ok) View settings are the same - Video Playback>Digital Cinema Desktop Preview - Main.
-
The itunes store will not let me log in, it says that the request has timed out even though my internet is connected and my username and password are correct