Matthew,

you are trying to access local interfaces/relationships remotely.
This is not allowed by the spec and implementation.

alex

Monday, January 20, 2003, 10:17:03 PM, you wrote:

HM> Hi--

HM> I'm trying to configure jboss 3.0.4 w/tomcat4.1.12 for CMR for two tables in
HM> our Oracle DB.  I use xdoclet1.1.2 to generate the interface and bean
HM> classes.  I have managed CMP for both tables that I'm using, but am having
HM> some trouble joining the two for CMR.

HM> Apologies in advance for the deluge of xml and code you are about to see...
HM> :)

HM> The bean is deployed just fine, but the following error stack is generated
HM> when I try to use the one bean to get the many bean via a Collection:

HM> eBillClient caught an unexpected exception!
HM> java.lang.reflect.UndeclaredThrowableException
HM>         at $Proxy1.getSubscribers(Unknown Source)
HM>         at client.eBill.eBillClient.main(eBillClient.java:54)
HM> Caused by: java.io.NotSerializableException:
HM> org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet
HM>         at
HM> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
HM>         at
HM> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
HM>         at java.rmi.MarshalledObject.<init>(MarshalledObject.java:92)
HM>         at
HM> org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:387)
HM>         at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
HM>         at
HM> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
HM> .java:25)
HM>         at java.lang.reflect.Method.invoke(Method.java:324)
HM>         at
HM> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
HM>         at sun.rmi.transport.Transport$1.run(Transport.java:148)
HM>         at java.security.AccessController.doPrivileged(Native Method)
HM>         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
HM>         at
HM> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
HM>         at
HM> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
HM> 01)
HM>         at java.lang.Thread.run(Thread.java:536)
HM>         at
HM> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
HM> all.java:247)

HM>         at
HM> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
HM>         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
HM>         at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown
HM> Source)
HM>         at
HM> org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProx
HM> y.java:138)
HM>         at
HM> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
HM>         at
HM> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77
HM> )
HM>         at
HM> org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
HM>         at
HM> org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116)
HM>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
HM>         ... 2 more

HM> Here is the relationship from ejb-jar.xml:
HM>    <!-- Relationships -->
HM>    <relationships >
HM>       <ejb-relation >
HM>          <ejb-relation-name>customer-subscriber</ejb-relation-name>
HM>          <!-- bidirectional -->
HM>          <ejb-relationship-role >
 
HM> <ejb-relationship-role-name>customer-has-subscribers</ejb-relationship-role-
name>>
HM>             <multiplicity>One</multiplicity>
HM>             <relationship-role-source >
HM>                <ejb-name>account/customerBean</ejb-name>
HM>             </relationship-role-source>
HM>             <cmr-field >
HM>                <cmr-field-name>subscribers</cmr-field-name>
HM>                <cmr-field-type>java.util.Collection</cmr-field-type>
HM>             </cmr-field>
HM>          </ejb-relationship-role>
HM>          <ejb-relationship-role >
 
HM> <ejb-relationship-role-name>subscriber-belongs-to-customer</ejb-relationship
-role-name>>
HM>             <multiplicity>Many</multiplicity>
HM>             <relationship-role-source >
HM>                <ejb-name>account/subscriberBean</ejb-name>
HM>             </relationship-role-source>
HM>             <cmr-field >
HM>                <cmr-field-name>customer</cmr-field-name>
HM>             </cmr-field>
HM>          </ejb-relationship-role>
HM>       </ejb-relation>
HM>    </relationships>

HM> Here is the relationship from jbosscmp-jdbc.xml:
HM>   <relationships>
HM>     <ejb-relation>
HM>       <ejb-relation-name>customer-subscriber</ejb-relation-name>
HM>       <foreign-key-mapping/>
HM>       <ejb-relationship-role>
 
HM> <ejb-relationship-role-name>customer-has-subscribers</ejb-relationship-role-
name>>
HM>           <key-fields>
HM>              <key-field>
HM>                <field-name>customerId</field-name>
HM>                <column-name>customer_id</column-name>
HM>              </key-field>
HM>           </key-fields>
HM>       </ejb-relationship-role>
HM>       <ejb-relationship-role>
 
HM> <ejb-relationship-role-name>subscriber-belongs-to-customer</ejb-relationship
-role-name>>
HM>           <key-fields/>
HM>       </ejb-relationship-role>
HM>     </ejb-relation>
HM>   </relationships>

HM> Here is the customer bean w/xdoclet tags:
HM> package com.uscc.account.entity;

HM> // uscc ejb imports
HM> import com.uscc.ejb.entity.defaultEntityBean;

HM> // util imports
HM> import java.util.Collection;

HM> /**
HM> *
HM> *       // begin class level xdoclet attributes
HM> *       @ejb:bean name="account/customerBean"
HM> *               display-name="General customer and BAN information"
HM> *               jndi-name="com/uscc/account/entity/customerBean"
HM> *               view-type="remote"
HM> *               type="CMP"
HM> *               schema="account"
HM> *
HM> *       @ejb:home extends="javax.ejb.EJBHome"
HM> *       @ejb:interface extends="javax.ejb.EJBObject"
HM> *
HM> *       @ejb:pk extends="java.lang.Object"
HM> *
HM> *       @ejb:transaction type="Required"
HM> *
HM> *       // begin jboss xdoclet attributes
HM> *       @jboss:datasource name="OracleDB"
HM> *
HM> *       @jboss:table-name table-name="customer"
HM> */
HM> public abstract class customerBean extends defaultEntityBean
HM> {
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         *       @ejb:persistent-field
HM>         *       @ejb:pk-field
HM>         *
HM>         *       @jboss:column-name name="customer_id"
HM>         */
HM>         public abstract Long getCustomerId();
        
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         *       @ejb:persistent-field
HM>         *
HM>         *       @jboss:column-name name="customer_ssn"
HM>         */
HM>         public abstract Long getSSN();
        
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         *
HM>         *       @ejb:relation name="customer-subscriber"
HM>         *               role-name="customer-has-subscribers"
HM>         */
HM>         public abstract Collection getSubscribers();
        
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         */
HM>         public abstract void setSubscribers(Collection subscribers);
HM> }

HM> Here is the subscriber class:
HM> package com.uscc.account.entity;

HM> // billview ejb imports
HM> import com.uscc.ejb.entity.defaultEntityBean;
HM> import com.uscc.account.interfaces.customerBean;

HM> /**
HM> *
HM> *       // begin class level xdoclet attributes
HM> *       @ejb:bean name="account/subscriberBean"
HM> *               display-name="General BAN information"
HM> *               jndi-name="com/uscc/account/entity/subscriberBean"
HM> *               view-type="remote"
HM> *               type="CMP"
HM> *               schema="subscriber"
HM> *
HM> *       @ejb:home extends="javax.ejb.EJBHome"
HM> *       @ejb:interface extends="javax.ejb.EJBObject"
HM> *
HM> *       @ejb:pk extends="java.lang.Object"
HM> *
HM> *       @ejb:transaction type="Required"
HM> *
HM> *       // begin jboss xdoclet attributes
HM> *       @jboss:datasource name="OracleDB"
HM> *
HM> *       @jboss:table-name table-name="subscriber"
HM> */
HM> public abstract class subscriberBean extends defaultEntityBean
HM> {
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         *       @ejb:persistent-field
HM>         *
HM>         *       @ejb:pk-field
HM>         *
HM>         *       @jboss:column-name name="subscriber_no"
HM>         */
HM>         public abstract String getSubscriberNo();
        
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         *       @ejb:persistent-field
HM>         *
HM>         *       @jboss:column-name name="customer_id"
HM>         */
HM>         public abstract String getCustomerId();
        
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         *       @ejb:persistent-field
HM>         *
HM>         *       @jboss:column-name name="contact_tn"
HM>         */
HM>         public abstract String getContactTN();
        
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         *
HM>         *       @ejb:relation name="customer-subscriber"
HM>         *               role-name="subscriber-belongs-to-customer"
HM>         *
HM>         *       @jboss:relation fk-column="customer_id"
HM>         *               related-pk-field="customerId"
HM>         */
HM>         public abstract customerBean getCustomer();
        
HM>         /**
HM>         *       @ejb:interface-method view="remote"
HM>         */
HM>         public abstract void
HM> setCustomer(com.uscc.account.interfaces.customerBean theCustomer);
HM> }

HM> Can someone eyeball something that is hosed up.  I haven't been able to find
HM> anything on the web regarding this type of exception, so I'm stumped.

HM> Thanks!
HM> Matt Hanson




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to