Hi,
I'm trying to deploy HelloComp.jar in weblogic 9(console deployment) but it is giving the following error. This is my first ejb deployment. I'm learning JSP and ejb.
error:
An error occurred during activation of changes, please see the log for details.
Unable to find constructor for the Exception class weblogic.ejb20.deployer.DeploymentDescriptorException
weblogic.ejb20.deployer.DeploymentDescriptorException.<init>(java.lang.String)
I'm giving my files below.
Hello.java
import javax.ejb.*;
import java.rmi.*;
public interface Hello extends EJBObject
{
public String sayHello() throws RemoteException;
}
HelloHome.java
import javax.ejb.*;
import java.rmi.*;
public interface HelloHome extends EJBHome
{
public Hello create() throws RemoteException, CreateException;
}
HelloBean.java
import java.rmi.*;
import javax.ejb.*;
public class HelloBean implements SessionBean
{
public void ejbActivate()
{
System.out.println(" \n In ejbActivate() \n");
}
public void ejbPassivate()
{
System.out.println(" \n In ejbPassivate() \n");
}
public void setSessionContext(SessionContext ctx)
{
System.out.println(" \n In setSessionContext() \n");
}
public void ejbCreate()
{
System.out.println(" \n In ejbCreate() \n");
}
public void ejbRemove()
{
System.out.println(" \n In ejbRemove() \n");
}
public String sayHello()
{
System.out.println(" \n Hello \n");
return "Hello !!!";
}
}
ejb-jar.xml
<ejb-jar
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
version="2.1">
<enterprise-beans>
<session>
<ejb-name>ABC</ejb-name>
<home>HelloHome</home>
<remote>Hello</remote>
<ejb-class>HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
weblogic-ejb-jar.xml
<weblogic-ejb-jar
xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>ABC</ejb-name>
<jndi-name>HelloJndi</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Someone please tell me why i'm getting error.
Also i tried hard deployment i.e i tried keeping hellocomp.jar in in autodeploy folder. but when i opened my admin console. it is not showing i deployed any component?