Just follow the spec. Only local interfaces can be used in CMR. I have done nothing else.

Steven Nakhla wrote:

Can you send me the code you used to do the test? Whenever I run my test code, I get the exception I listed below. Did you have to do anything special to JBoss to get it to work? I've been getting this same exception for weeks now!

*/Alexey Loubyansky <[EMAIL PROTECTED]>/* wrote:

    It worked for me when I used AddressLocal to establish relationships on
    the server side.

Steven Nakhla wrote:

     > Yep. Not that the non-modified sources worked any better. I've
     > remedied the SQLException problem, but now I'm faced with this
    exception:
     >
     >
     > java.rmi.ServerException: RemoteException occurred in server thread;
     > nested exception is:
     >
     > java.rmi.ServerException: EJBException:; nested exception is:
     >
     > javax.ejb.EJBException: null; CausedByException is:
     >
     > null
     >
     > at
    sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
     >
     > at sun.rmi.transport.Transport$1.run(Transport.java:148)
     >
     > at java.security.AccessController.doPrivileged(Native Method)
     >
     > at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
     >
     > at
    sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
     >
     > at
     >
    sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
     >
     > at java.lang.Thread.run(Thread.java:534)
     >
     > at
     >
    sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
     > Source)
     >
     > at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
     >
     > at sun.rmi.server.UnicastRef.invoke(Unknown Source)
     >
     > at
    org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
     >
     > at
     >
    
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
     >
     > at
     >
    org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
     >
     > at
     >
    org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
     >
     > at
    org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
     >
     > at
    org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
     >
     > at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
     >
     > at $Proxy2.create(Unknown Source)
     >
     > at address.ejb.AddressBookClient.testBean(AddressBookClient.java:66)
     >
     > at address.ejb.AddressBookClient.main(AddressBookClient.java:93)
     >
     > Caused by: java.rmi.ServerException: EJBException:; nested
    exception is:
     >
     > javax.ejb.EJBException: null; CausedByException is:
     >
     > null
     >
     > at
     >
    org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:347)
     >
     > at
    org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:124)
     >
     > at
     >
    
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
     >
     > at
     >
    org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:484)
     >
     > at org.jboss.ejb.Container.invoke(Container.java:720)
     >
     > 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
     >
    
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
     >
     > at
    org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
     >
     > at
    org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367)
     >
     > 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
    sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
     >
     > at sun.rmi.transport.Transport$1.run(Transport.java:148)
     >
     > at java.security.AccessController.doPrivileged(Native Method)
     >
     > at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
     >
     > at
    sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
     >
     > at
     >
    sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
     >
     > at java.lang.Thread.run(Thread.java:534)
     >
     > Caused by: javax.ejb.EJBException: null; CausedByException is:
     >
     > null
     >
     > at
     >
    
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceValue(JDBCCMRFieldBridge.java:745)
     >
     > at
     >
    
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JDBCCMRFieldBridge.java:590)
     >
     > at
     >
    
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:121)
     >
     > at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
     >
     > at address.ejb.PersonCMP$Proxy.setAddress()
     >
     > at address.ejb.PersonBean.ejbPostCreate(PersonBean.java:224)
     >
     > 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
     >
    
org.jboss.ejb.plugins.CMPPersistenceManager.postCreateEntity(CMPPersistenceManager.java:240)
     >
     > at
     >
    
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.postCreateEntity(CachedConnectionInterceptor.java:277)
     >
     > at
    org.jboss.ejb.EntityContainer.postCreateHome(EntityContainer.java:724)
     >
     > 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
     >
    
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1083)
     >
     > at
     >
    
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:71)
     >
     > at
     >
    
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:277)
     >
     > at
     >
    
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
     >
     > at
     >
    
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:114)
     >
     > at
     >
    
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163)
     >
     > at
     >
    org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
     >
     > at
     >
    
org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
     >
     > at
     >
    
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
     >
     > at
     >
    
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
     >
     > at
     >
    org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
     >
     > at
     >
    org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
     >
     > at
    org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
     >
     > ... 21 more
     >
     >
     >
     > Can anyone explain why on earth I'm getting this error and how I
    can fix
     > it???
     >
     >
     >
     >
     >
     > */Alexey Loubyansky /* wrote:
     >
     > Be honest ;) Did you modify the generated by Middlegen sources?
     >
     > Steven Nakhla wrote:
     > > First, thanks to all who responded regarding my CMR problems with
     > > XDoclet/JBoss. As advised, I have used Middlegen to automatically
     > > create my entity beans from my database table. These beans
     > represent a
     > > person, and a street address. However, now I'm receiving a
    different
     > > error from what I received before. I have run XDoclet on the
     > > middlegen-generated files and received the appropriate interfaces,
     > > classes, etc. I have a simple test client that creates a street
     > > address, and then attempts to create a person and assign that
     > address to
     > > the person. However, when I try and assign the address I get the
     > > following exception:
     > >
     > >
     > > javax.ejb.CreateException: Could not create
     > > entity:java.sql.SQLException: General error, message from server:
     > > "Column 'address_id' cannot be null"
     > >
     > > I have attached the beans generated by Middlegen, as well as my
    test
     > > client, and would REALLY appreciate if someone could take a look at
     > > them and see if they can figure out what I'm doing wrong. For
     > > reference, I'm using JBoss 3.2.2 and MySQL 4.0 on the backend.
     > Thanks
     > > in advance for any help you can give. I've been racking my
    brain for
     > > the last 3 weeks on this, trying to get it to work. I'm getting
     > so much
     > > closer but there's still the matter of this exception to overcome.
     > >
     > >
     > >
     > > Steve Nakhla
     > >
     > >
     >
    ------------------------------------------------------------------------
     > > Do you Yahoo!?
     > > Protect your identity with Yahoo! Mail AddressGuard
     > >
     >
     >
     >
     >
     > -------------------------------------------------------
     > This SF.Net email sponsored by: ApacheCon 2003,
     > 16-19 November in Las Vegas. Learn firsthand the latest
     > developments in Apache, PHP, Perl, XML, Java, MySQL,
     > WebDAV, and more! http://www.apachecon.com/
     > _______________________________________________
     > JBoss-user mailing list
     > [EMAIL PROTECTED]
     > https://lists.sourceforge.net/lists/listinfo/jboss-user
     >
     >
    ------------------------------------------------------------------------
     > Do you Yahoo!?
     > Protect your identity with Yahoo! Mail AddressGuard
     >




------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

------------------------------------------------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard <http://antispam.yahoo.com/whatsnewfree>




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to