Problem Eclipse + Lomboz + JBoss
shmuelg Jan 15, 2005 2:24 PMI got it work at least a little bit further with JBoss-IDE. I end up with a warning:
WARN [verifier] EJB spec violation:
Bean : Fibo
Section: 7.10.3
Warning: A Session bean must define at least one ejbCreate method.
ERROR [MainDeployer] could not create deployment: file:/D:/Programs/.../jboss-4.0.1/server/default/tmp/deploy/tmp14087FiboApp.ear-contents/FiboEJB.jar
ERROR [URLDeploymentScanner] Incomplete Deployment listing:
Incompletely deployed packages:
org.jboss.deployment.DeploymentInfo@53b60021 { url=file:/D:/Programs/Programming/java/JBoss/jboss-4.0.1/server/default/deploy/FiboApp.ear }
deployer: org.jboss.deployment.EARDeployer@1a5fb5a
status: Deployment FAILED reason: Verification of Enterprise Beans failed, see above for error messages.
state: FAILED
watch: file:/D:/Programs/Programming/java/JBoss/jboss-4.0.1/server/default/deploy/FiboApp.ear
altDD: null
lastDeployed: 1105816036609
lastModified: 1105816038000
mbeans:
21:07:18,234 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
21:07:19,265 INFO [ChannelSocket] Port busy 8009 java.net.BindException: Address already in use: JVM_Bind
21:07:19,296 INFO [ChannelSocket] JK2: ajp13 listening on /0.0.0.0:8010
21:07:19,406 INFO [JkMain] Jk running ID=1 time=0/297 config=null
21:07:19,500 INFO [Server] JBoss (MX MicroKernel) [4.0.1 (build: CVSTag=JBoss_4_0_1 date=200412230944)] Started in 54s:797ms
So it couldn't deploy it. Here is the code for the bean. It's from the JBoss Tutorial-1.3.0.pdf:
/*
* Created on 15/01/2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package tutorial.ejb;
import java.rmi.RemoteException;
import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
/**
* @ejb.bean name="Fibo"
* display-name="Name for Fibo"
* description="Description for Fibo"
* jndi-name="ejb/Fibo"
* type="Stateless"
* view-type="remote"
*/
public class FiboBean implements SessionBean {
/**
*
*/
public FiboBean() {
super();
// TODO Auto-generated constructor stub
}
/* (non-Javadoc)
* @see javax.ejb.SessionBean#ejbActivate()
*/
public void ejbActivate() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.SessionBean#ejbPassivate()
*/
public void ejbPassivate() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.SessionBean#ejbRemove()
*/
public void ejbRemove() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
*/
public void setSessionContext(SessionContext ctx)
throws EJBException,
RemoteException {
// TODO Auto-generated method stub
}
/**
* Business method
* @ejb.interface-method view-type = "remote"
*/
public double[] compute(int number) {
if (number < 0) {
throw new EJBException("Argument should be positive");
}
double[] suite = new double[number + 1];
suite[0] = 0;
if (number == 0) {
return suite;
}
suite[1] = 1;
for (int i = 2; i <= number; i++) {
suite = suite[i - 1] + suite[i - 2];
}
return suite;
}
}
One other thing: If I modify the code do I have to re-create the the archives (.ear, .jar, .war) ?
Shmuelg.