【发布时间】:2017-07-29 19:00:22
【问题描述】:
我正在测试简单的企业应用程序,但是当我调用远程方法时出现以下错误。
输入异常报告
消息内部服务器错误
描述服务器遇到阻止它的内部错误 完成此请求。
异常
org.apache.jasper.JasperException: javax.ejb.EJBException: java.rmi.MarshalException: CORBA MARSHAL 1330446393 也许;嵌套的 例外是:org.omg.CORBA.MARSHAL:警告:00810057:不能 加载类 entitydata.Customer vmcid:OMG 次要代码:57 完成: 也许
根本原因
javax.ejb.EJBException: java.rmi.MarshalException: CORBA MARSHAL 1330446393 也许;嵌套异常是:org.omg.CORBA.MARSHAL: 警告:00810057:无法加载类实体数据。客户 vmcid: OMG 次要代码:57 完成:也许
根本原因
java.rmi.MarshalException: CORBA MARSHAL 1330446393 也许;嵌套的 例外是:org.omg.CORBA.MARSHAL:警告:00810057:不能 加载类 entitydata.Customer vmcid:OMG 次要代码:57 完成: 也许
根本原因
org.omg.CORBA.MARSHAL:警告:00810057:无法加载类 entitydata.Customer vmcid:OMG 次要代码:57 完成:也许
SessionBean
public Object SearchData(Integer id) {
Customer cust = em.find(Customer.class, id);
return cust;
}
远程库
@Remote
public interface CustomerSessionBeansRemote {
Object SearchData(Integer id);
}
JSP
Object o = ic.lookup(CustomerSessionBeansRemote.class.getName());
CustomerSessionBeansRemote custSession = (CustomerSessionBeansRemote) o;
Customer customer = (Customer)custSession.SearchData(1);
if(customer!=null){
out.print(customer.getName());
}
我已将 EJB 和 remoteLibrary 项目添加到我的 WAR 项目中,因此,我的 JSP 可以访问我的 Customer 类。
任何帮助都会被应用。谢谢。
【问题讨论】:
标签: java jakarta-ee corba remoteobject entity-bean