免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2093 | 回复: 3
打印 上一主题 下一主题

A CMP field that is a member of the primary key can only be [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-10-21 08:54 |只看该作者 |倒序浏览
我做的是实体bean加sessionbean不知道为什么报这个错误!
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.ServerException: EJBException:; nested exception is:
        javax.ejb.EJBException: null; CausedByException is:
        A CMP field that is a member of the primary key can only be set in ejbCreate [EJB 2.0 Spec. 10.3.5].; CausedByException is:
        A CMP field that is a member of the primary key can only be set in ejbCreate [EJB 2.0 Spec. 10.3.5].

        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)-- Failed: tel()



        at sun.rmi.transport.Transport$1.run(Transport.java:14

        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(StreamRemoteCall.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 Source)

        at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)

        at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:10

        at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)

        at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)

        at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)

        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)

        at $Proxy1.tel(Unknown Source)

        at servlet.Enterprise1TestClient1.tel(Enterprise1TestClient1.java:97)

        at servlet.Enterprise1TestClient1.main(Enterprise1TestClient1.java:13

Caused by: java.rmi.ServerException: EJBException:; nested exception is:
        javax.ejb.EJBException: null; CausedByException is:
        A CMP field that is a member of the primary key can only be set in ejbCreate [EJB 2.0 Spec. 10.3.5].; CausedByException is:
        A CMP field that is a member of the primary key can only be set in ejbCreate [EJB 2.0 Spec. 10.3.5].

        at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:360)

        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:212)

        at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)

        at org.jboss.ejb.Container.invoke(Container.java:73

        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

        at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)

        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:14

        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:
        A CMP field that is a member of the primary key can only be set in ejbCreate [EJB 2.0 Spec. 10.3.5].; CausedByException is:
        A CMP field that is a member of the primary key can only be set in ejbCreate [EJB 2.0 Spec. 10.3.5].

        at servlet.Enterprise1Bean.tel(Enterprise1Bean.java:50)

        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.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)

        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)

        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)

        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)

        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:9

        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)

        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:20

        ... 15 more

-- Return value from tel():

论坛徽章:
0
2 [报告]
发表于 2005-10-21 09:41 |只看该作者

A CMP field that is a member of the primary key can only be

急啊!高手给看看啊!

论坛徽章:
0
3 [报告]
发表于 2005-10-21 12:29 |只看该作者

A CMP field that is a member of the primary key can only be

没用过CMP, 同情中..
最近也陷入EJB的泥潭中了, 郁闷了好几天了.

论坛徽章:
0
4 [报告]
发表于 2005-10-21 14:15 |只看该作者

A CMP field that is a member of the primary key can only be

等。。。。。。。。。。。。。。。。。。。。。。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP