请问,为什么我的JB7编译EJB的RemoteHome出现“Don't have a path for java2iiop”错误?

frankie1st 2003-06-25 12:00:07
"myes.jpx": Don't have a path for java2iiop. Check your VisiBroker configuration using the Tools | Enterprise Setup | CORBA page, and make sure VisiBroker is selected on the Project | Project Properties | Build | IDL page.

每次编译ejb的两个home接口时,就出现这个错误。而实际上我并没有使用CORBA,在Enterprise Setup里是没有选择的。而且,我一直用的好好的,但突然后来就出现这样的错误了,请教!

...全文
70 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
JamBoL 2003-07-04
  • 打赏
  • 举报
回复
在调用HOME接口时会用到IIOP,例如
enterprise1Home = (Enterprise1Home) PortableRemoteObject.narrow(ref, Enterprise1Home.class);
其中PortableRemoteObject.narrow()是iiop的一个应用,把OBJECT对象造型成真正的HOME对象
michaelxu727 2003-07-02
  • 打赏
  • 举报
回复
我想是你的ejbCreate方法不能与接口中的方法想对应,所以JBoss会报错。你可以先把你的remote/lcoal接口改为remote或着local试一试。这样查找问题就比较容易了。
frankie1st 2003-06-25
  • 打赏
  • 举报
回复
没错,单独编译就有这问题,整个包编译没有问题了。我可以把整个包deploy到JBoss3。2。1上,但是JBoss老报出错误:
18:20:18,938 WARN [verifier] EJB spec violation:
Bean : WordGroup
Method : public abstract WordGroupRemote create(int, boolean, ArrayList, String)
throws RemoteException, CreateException
Section: 12.2.9
Warning: Each create(...) method in the entity bean's home interface must have a
matching ejbCreate(...) method in the entity bean's class.

但是我的ejb的ejbCreate接口已经改为:
public WordGroupRemote create(int partOfSpeech, boolean orderSensitive, String word, ArrayList words) throws CreateException, RemoteException;
而且编译也通过了,整个ear我都rebuilder过多次了。
代码如下:
WordGroupBean:
===========================================================================
......
public WordGroupPK ejbCreate(int partOfSpeech, boolean orderSensitive, java.lang.String word, java.util.ArrayList words) throws CreateException {
setPartOfSpeech(partOfSpeech);
setOrderSensitive(orderSensitive);
setWord(word);
setWord(word);
setWords(words);
return null;
}
public void ejbPostCreate(int partOfSpeech, boolean orderSensitive, java.lang.String word, java.util.ArrayList words) throws CreateException {
/**@todo Complete this method*/
}
......
===============================================================================

RemoteHome:
===============================================================================
......
public WordGroupRemote create(int partOfSpeech, boolean orderSensitive, String word, ArrayList words) throws CreateException, RemoteException;
......
===============================================================================

LocalHome:
===============================================================================
......
public WordGroup create(int partOfSpeech, boolean orderSensitive, String word, ArrayList words) throws CreateException;
......
===============================================================================
michaelxu727 2003-06-25
  • 打赏
  • 举报
回复
你是单独编译接口还是对项目包进行Make,我都是使用Project->Make Project...,没有任何问题。你把你的ejb源码贴上来看看,估计你的ejb写的有问题

51,407

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧