我在 EJB3 遇到了一个奇怪的问题。已部署和 EJB3,并且正在尝试从已部署的实例访问业务方法。执行查找时出现以下错误:
- UserAuthenticationRemote 是远程 i/face
- UserAuthenticationBean 是 Bean
代码(失败):
UserAuthenticationRemote remoteInterface = (UserAuthenticationRemote) context.lookup("UserAuthenticationBean/remote");
错误日志:
java.lang.ClassCastException: javax.naming.Reference cannot be cast to eds.enhancedqc.authentication.UserAuthenticationRemote
at eds.enhancedqc.client.application.LoginDialog$3.doInBackground(LoginDialog.java:220)
at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
Exception "java.lang.ClassNotFoundException: org.openide.loaders.DataObject"while constructing DataFlavor for: application/x-java-openide-dataobjectdnd; mask=1; class=org.openide.loaders.DataObject
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
Exception "java.lang.ClassNotFoundException: org.openide.loaders.DataObject"while constructing DataFlavor for: application/x-java-openide-dataobjectdnd; mask=1; class=org.openide.loaders.DataObject
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
请帮忙!
谢谢,山姆