level 1
程程程程程Come
楼主
这个是远程接口package ejb;
import javax.ejb.Remote;
@Remote
public interface IntegralRemote {
public double integral( double a,double b);
}
这个是远程接口的实现package ejb;
import javax.ejb.Remote;
@Remote
public interface IntegralRemote {
public double integral( double a,double b);
}
jsp 中的调用 <%
try{
Context ic=new InitialContext();
Object obj=ic.lookup("Integral/remote"); //Object obj=ic.lookup("ejb/Integral");
//IntegralHome home=(IntegralHome)PortableRemoteObject.narrow(obj,IntegralHome.class);
IntegralRemote h=(IntegralRemote)obj;//Integral h=home.create();
double a=Double.parseDouble(request.getParameter("a"));
double b=Double.parseDouble(request.getParameter("b"));
out.println("<h3>"+h.integral(a,b)+"</h3>");
}catch(Exception ex)
{
ex.printStackTrace(response.getWriter());
}
%>
错误 是在 jsp部署的时候 出现了 *** CONTEXTS IN ERROR: Name -> Error
vfsfile:/F:/myecplise10work/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/server/default/deploy/EJB3.jar/ -> java.lang.RuntimeException: Bean Class ejb.Integral has no local, webservice, or remote interfaces defined and does not implement at least one business interface: Integral
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:863)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:665)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:293)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)这样的错误 怎么搞。
2014年11月14日 15点11分
1
import javax.ejb.Remote;
@Remote
public interface IntegralRemote {
public double integral( double a,double b);
}
这个是远程接口的实现package ejb;
import javax.ejb.Remote;
@Remote
public interface IntegralRemote {
public double integral( double a,double b);
}
jsp 中的调用 <%
try{
Context ic=new InitialContext();
Object obj=ic.lookup("Integral/remote"); //Object obj=ic.lookup("ejb/Integral");
//IntegralHome home=(IntegralHome)PortableRemoteObject.narrow(obj,IntegralHome.class);
IntegralRemote h=(IntegralRemote)obj;//Integral h=home.create();
double a=Double.parseDouble(request.getParameter("a"));
double b=Double.parseDouble(request.getParameter("b"));
out.println("<h3>"+h.integral(a,b)+"</h3>");
}catch(Exception ex)
{
ex.printStackTrace(response.getWriter());
}
%>
错误 是在 jsp部署的时候 出现了 *** CONTEXTS IN ERROR: Name -> Error
vfsfile:/F:/myecplise10work/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/server/default/deploy/EJB3.jar/ -> java.lang.RuntimeException: Bean Class ejb.Integral has no local, webservice, or remote interfaces defined and does not implement at least one business interface: Integral
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:863)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:665)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:293)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)这样的错误 怎么搞。