At server:
[BranchBean] java.lang.NullPointerException
[BranchBean] at
org.jboss.ejb.plugins.NoPassivationEntityInstanceCache.remove(NoPassivationEntityInstanceCache.java:1
72)
[BranchBean] at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:93)
[BranchBean] at org.jboss.ejb.plugins.TxInterceptor.invoke(TxInterceptor.java:179)
[BranchBean] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:140)
[BranchBean] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:212)
at
org.jboss.ejb.plugins.NoPassivationEntityInstanceCache.remove(NoPassivationEntityInstanceCache.java:172)
at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:93)
at org.jboss.ejb.plugins.TxInterceptor.invoke(TxInterceptor.java:179)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:140)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:212)
[BranchBean] at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:129)
at org.j
boss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:129)
at java.lang.reflect.Method.invoke(Native Method)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[BranchBean] at java.lang.reflect.Method.invoke(Native Method)
[BranchBean] at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
[BranchBean] at sun.rmi.transport.Transport$1.run(Unknown Source)
[BranchBean] at java.security.AccessController.doPrivileged(Native Method)
[BranchBean] at sun.rmi.transport.Transport.serviceCall(Unknown Source)
[BranchBean] at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
[BranchBean] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Source)
[BranchBean] at java.lang.Thread.run(Unknown Source)
[Default] java.lang.NullPointerException
At client:
Value: branch one
java.lang.NullPointerException
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Un
known Source)
at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.
java:109)
at $Proxy1.setname(Unknown Source)
at com.ulybin.JobBoerse.EJBTest2.main(EJBTest2.java:36)
Client source:
...
public class EJBTest2
{
public static void main(String[] argv)
{
try
{
Context initial = new InitialContext();
Object objref = initial.lookup("BranchBean");
BranchHome home = (BranchHome)PortableRemoteObject.narrow(objref,
BranchHome.class);
Branch branch=home.create(1, "branch one");
//branch.setname("branch two");
System.out.println("Value: "+branch.getname());
BranchPK pk=(BranchPK)branch.getPrimaryKey();
Branch b=home.findByPrimaryKey(pk);
b.setname("branch two");
System.out.println("Primary key: "+pk.branch_id+" Value: "+b.getname());
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
}
I can`t guess what is the problem?
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]