Bug 359395 - NotSerializableException With RMITransportManager on Glassfish
Summary: NotSerializableException With RMITransportManager on Glassfish
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: glassfish
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 06:56 EDT by Reinhard Girstenbrei CLA
Modified: 2022-06-09 10:07 EDT (History)
2 users (show)

See Also:


Attachments
Testcase (81.07 KB, application/zip)
2011-09-29 07:05 EDT, Reinhard Girstenbrei CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reinhard Girstenbrei CLA 2011-09-29 06:56:34 EDT
Build Identifier: 2.3.0.v20110604-r9504

An application configured with EclipseLink Cache Coordination using RMITransportManager runs into following exception when the server session initializes:

Exception [EclipseLink-22102] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.RemoteCommandManagerException
Exception Description: Could not post connection in local naming service under name Service[EclipseLinkCommandChannel, 07b77df4-acf8-40d7-bf94-d48ee78a986c, null]
Internal Exception: java.lang.RuntimeException: Cant copy Serializable object:
        at org.eclipse.persistence.exceptions.RemoteCommandManagerException.errorBindingConnection(RemoteCommandManagerException.java:90)
        at org.eclipse.persistence.sessions.coordination.rmi.RMITransportManager.createLocalConnectionInJNDI(RMITransportManager.java:153)
        at org.eclipse.persistence.sessions.coordination.rmi.RMITransportManager.createLocalConnection(RMITransportManager.java:128)
        at org.eclipse.persistence.sessions.coordination.DiscoveryManager.run(DiscoveryManager.java:197)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Cant copy Serializable object:
        at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:124)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.rebind(LocalSerialContextProviderImpl.java:113)
        at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:707)
        at javax.naming.InitialContext.rebind(InitialContext.java:408)
        at javax.naming.InitialContext.rebind(InitialContext.java:408)
        at org.eclipse.persistence.sessions.coordination.rmi.RMITransportManager.createLocalConnectionInJNDI(RMITransportManager.java:150)
        ... 3 more
Caused by: java.io.NotSerializableException: org.eclipse.persistence.sessions.coordination.RemoteCommandManager
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:104)
        ... 8 more


WORKAROUND:
- Use JMSTransportManager (testcase includes appropriate build file and persistence.xml)


Reproducible: Always

Steps to Reproduce:
Testcase attached:
org.eclipse.persistence.example.jpa.server.cachecoordination.glassfish.zip
according to cache coordination example for WebLogic Server published at
http://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination

1. Configure setEnv.sh/setEnv.cmd and build files (java, ant, database, glassfish)
2. Build cluster with "ant create-cluster"
3. Configure cluster with "ant setup-cluster"
4. Build application with "ant build"
5. Deploy application with "ant deploy"
6. Run application client with "ant example"
-> at $GF_HOME/glassfish/nodes/instance1/logs/server.log the NotSerializableException can be found.
3.
Comment 1 Reinhard Girstenbrei CLA 2011-09-29 07:05:22 EDT
Created attachment 204280 [details]
Testcase
Comment 2 Tom Ware CLA 2011-10-31 13:26:54 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:07:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink