Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

weblogic 9 deployment error

 
raj kiyare
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
raj kiyare
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the console i'm getting this message

unable to load class specified in ejb-jar.xml. class bytes found but defineclass() failed for 'HelloBean'
 
raj kiyare
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It got solved. it was due to java version mismatch. i compiled with jdk 1.6. and deployed. in weblogic 9. which was using jdk1.5.
so i compiled all the classes with jdk1.5 and deployed. it worked. !!!. however when i tried setting my domain to use jdk1.6 it was able to create domain. but the server was not starting. so i again shifted to weblogic default jdk.15
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic