在下的调试结果: -- Return value from findByPrimaryKey(12): SuppliersRemote:12.-- Calling getCompanyName()java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: Internal error getting results for field region; CausedByException is: nulljava.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: Internal error getting results for field region; CausedByException is: null-- Failed: getCompanyName()javax.ejb.EJBException: Internal error getting results for field region; CausedByException is: null at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) 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:108) at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80) at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76) at $Proxy1.getCompanyName(Unknown Source) at boss2.SuppliersTestClient1.getCompanyName(SuppliersTestClient1.java:186) at boss2.SuppliersTestClient1.main(SuppliersTestClient1.java:857)java.lang.NullPointerException <<no stack trace available>>-- Return value from getCompanyName(): .
JB7下测试CLIENT代码如下 SuppliersTestClient1 client = new SuppliersTestClient1(); client.findByPrimaryKey(new Integer(12)); System.out.println(client.getCompanyName());
-- Return value from findByPrimaryKey(12): SuppliersRemote:12.-- Calling getCompanyName()java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: Internal error getting results for field region; CausedByException is:
nulljava.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: Internal error getting results for field region; CausedByException is:
null-- Failed: getCompanyName()javax.ejb.EJBException: Internal error getting results for field region; CausedByException is:
null at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) 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:108) at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80) at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76) at $Proxy1.getCompanyName(Unknown Source) at boss2.SuppliersTestClient1.getCompanyName(SuppliersTestClient1.java:186) at boss2.SuppliersTestClient1.main(SuppliersTestClient1.java:857)java.lang.NullPointerException <<no stack trace available>>-- Return value from getCompanyName(): .
client.findByPrimaryKey(new Integer(12));
System.out.println(client.getCompanyName());