我在这里遇到了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)
请帮忙!
谢谢,
山姆
最佳答案
问题仅在于jar文件。因此,请删除您所投影的所有jar文件格式,然后从jboss-6.0.0.Final \ client文件夹中获取jar文件,这是您正在运行的服务器,并将其作为类路径放置,那么它将正常运行