"[EMAIL PROTECTED]" wrote : Guys,
| I need more information. I need a test case I can reproduce. Currently,
we cannot reproduce any of your problems.
|
Now I've found one too in an old app, which I'm currently converting to
4.0.4RC1. Reduced stuff looks like this:
| @Entity
| @Table(name="categories")
| public class A_CatTest implements Serializable {
| private int id;
| private A_CatTest parent;
|
| A_CatTest() { }
|
| @Id @GeneratedValue(strategy=GenerationType.AUTO)
| @Column(name="categories_id", nullable=false)
| public int getId() {
| return this.id;
| }
|
| public void setId(int id) {
| this.id = id;
| }
|
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name="parent_id", referencedColumnName="categories_id",
| nullable=true)
| public A_CatTest getParent() {
| return this.parent;
| }
|
| public void setParent(A_CatTest parent) {
| this.parent = parent;
| }
| }
|
| @Remote
| public interface CatTestDao {
| List<A_CatTest> getRoots();
| }
|
| @Stateless
| @Interceptors(foo.TraceInterceptor.class)
| public class CatTestManager extends Manager
| implements CatTestDao
| {
| @SuppressWarnings("unchecked")
| public List<A_CatTest> getRoots() {
| return manager
| .createQuery("SELECT m FROM A_CatTest m WHERE
m.parent.id=0")
| .getResultList();
| }
| }
|
| public class RichClient() {
| ...
| public void doSomething() {
| List<A_CatTest> lt = null;
| try {
| InitialContext ctx = manager.getContext();
| CatTestDao d = (CatTestDao)
| ctx.lookup("foo/CatTestManager/remote");
| lt = d.getRoots();
| } catch (Exception e) {
| log.warn(e.getLocalizedMessage());
| if (log.isDebugEnabled()) {
| log.debug("doSomething", e);
| }
| }
| for (A_CatTest c : lt) {
| System.out.println(c.getId());
| }
| }
| }
|
03:06:42,958 [AWT-EventQueue-0] ERROR (SocketClientInvoker.java:279) - Got
marshalling exception, exiting
java.lang.ClassCastException: cannot assign instance of
org.hibernate.proxy.SerializableProxy to field foo.A_CatTest.parent of type
foo.A_CatTest in instance of foo.A_CatTest
at
java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1977)
at
java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1157)
...
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at
org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
at
java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
...
at
org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
at
org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:265)
at
org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:136)
at org.jboss.remoting.Client.invoke(Client.java:444)
at org.jboss.remoting.Client.invoke(Client.java:407)
at
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at
org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at
org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
at $Proxy2.getRoots(Unknown Source)
at foo.RichClient.doSomething(RichClient.java:71)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923105#3923105
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3923105
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user