I have a problem with detection of unidirectional
relationship many-to-one by means of xdoclet
there are 2 tables

beanATbl
beanA_id <- primary key
beanB_id <- foreign key

beanBTbl
beanB_id <- primary key

my BeanA entity bean:


...abstract class BeanA... {
..

/**
* @ejb.interface-method
* view-type="remote"
*/
public void method() {
getBeanB();
}


/**
* @ejb.interface-method
* view-type="local"
*
* @ejb.relation
* name="beanA-beanB"
* role-name="beanA-beanB"
* target-role-name="beanB-beanA"
* target-ejb="BeanB"
* target-multiple="yes"
*
* @jboss.relation
* fk-column="beanB_id"
* related-pk-field="beanB_id"
*/
public abstract BeanBHome getBeanB();

/**
* @ejb.interface-method
* view-type="local"
*/
public abstract void setBeanB(BeanBHome beanBHome);
} 

while deploy there are no mistakes but just sa i refer to applied method
method() through remote interface i get an exeption

> java.rmi.ServerException: RemoteException occurred in server thread; 
> nested11:46
> ption is:
> java.rmi.ServerException: RuntimeException; nested exception is:
> java.lang.ClassCastException: $Proxy310
> at 
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
> RemoteCall.java:247)
> at 
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
> 223)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
> at 
> org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Sour
> ce)
> at 
> org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvo
> kerProxy.java:135)
> at 
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
> a:96)
> at 
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
> java:46)
> at 
> org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:4
> 5)
> at 
> org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:9
> 7)
> at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
> at $Proxy3.printOptions(Unknown Source)
> at TestClient.main(TestClient.java:29)
> Caused by: java.rmi.ServerException: RuntimeException; nested exception 
> is:
> java.lang.ClassCastException: $Proxy310
> Caused by: java.lang.ClassCastException: $Proxy310

Where could be a mistake?


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840590#3840590

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840590


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to