aspose file tools*
The moose likes BEA/Weblogic and the fly likes weblogic ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "weblogic ejb" Watch "weblogic ejb" New topic
Author

weblogic ejb

sohan nagula
Greenhorn

Joined: Dec 23, 2007
Posts: 4
Hi,

I am trying to deploy ejb2.0 entity bean in weblogic 9.2. I am getting the following exception. Please if anybody know help me in this regard. Thanks in advance.

Here is the exception stack trace:

Unable to deploy EJB: CustomerBean from classes:

[EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:


There are 1 nested errors:

java.lang.NullPointerException
at weblogic.ejb.container.cmp.rdbms.finders.EjbqlFinder.setMethods(EjbqlFinder.java:286)
at weblogic.ejb.container.cmp.rdbms.Deployer.processFinders(Deployer.java:741)
at weblogic.ejb.container.cmp.rdbms.Deployer.readTypeSpecificData(Deployer.java:443)
at weblogic.ejb.container.persistence.PersistenceType.setTypeSpecificFile(PersistenceType.java:505)
at weblogic.ejb.container.persistence.PersistenceType.setupDeployer(PersistenceType.java:454)
at weblogic.ejb.container.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:117)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1182)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

.


at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1188)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:


Here is my weblogic-cmp-rdbms-jar.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-rdbms-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-rdbms20-persistence.xsd">
<weblogic-rdbms-bean>
<ejb-name>CustomerBean</ejb-name>
<data-source-jndi-name>
JDBCDataSourceDemoTestJNDI
</data-source-jndi-name>
<table-map>
<table-name>CUSTOMER</table-name>
<field-map>
<cmp-field>id</cmp-field>
<dbms-column>ID</dbms-column>
</field-map>
<field-map>
<cmp-field>firstName</cmp-field>
<dbms-column>FIRST_NAME</dbms-column>
</field-map>
<field-map>
<cmp-field>lastName</cmp-field>
<dbms-column>LAST_NAME</dbms-column>
</field-map>
<field-map>
<cmp-field>dateOfBirth</cmp-field>
<dbms-column>DATE_OF_BIRTH</dbms-column>
</field-map>
<field-map>
<cmp-field>placeOfBirth</cmp-field>
<dbms-column>PLACE_OF_BIRTH</dbms-column>
</field-map>
</table-map>
</weblogic-rdbms-bean>
<create-default-dbms-tables>Disabled</create-default-dbms-tables>
</weblogic-rdbms-jar>
Shikhar Madhok
Ranch Hand

Joined: Dec 18, 2006
Posts: 95
Can you either check your java code or post it here as well? I am guessing that one of the setter methods is missing.

HTH
Shikhar


He who asks a question is a fool for five minutes; he who does not ask a question remains a fool forever - Chinese proverb
sohan nagula
Greenhorn

Joined: Dec 23, 2007
Posts: 4
Here I am providing the java code including descriptors content.

Here is the Bean class:

package com.entity.customer;

import java.rmi.RemoteException;
import java.util.Date;

import javax.ejb.EJBException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.RemoveException;

public abstract class CustomerBean implements EntityBean
{

public EntityContext entityContext;

public Integer ejbCreate(String firstName, String lastName)
{
this.setFirstName(firstName);
this.setLastName(lastName);
return null;
}

public void ejbPostCreate(String firstName, String lastName)
{

}

public void ejbActivate() throws EJBException, RemoteException
{
}

public void ejbLoad() throws EJBException, RemoteException
{
}

public void ejbPassivate() throws EJBException, RemoteException
{
}

public void ejbRemove() throws RemoveException, EJBException,
RemoteException
{
}

public void ejbStore() throws EJBException, RemoteException
{
}

public void setEntityContext(EntityContext arg0) throws EJBException,
RemoteException
{
this.entityContext = arg0;
}

public void unsetEntityContext() throws EJBException, RemoteException
{

}

public abstract String getLastName();

public abstract void setFirstName(String firstName);

public abstract String getFirstName();

public abstract void setLastName(String lastName);

public abstract Integer getId();

public abstract void setId(Integer key);

public abstract void setDateOfBirth(Date date);

public abstract void setPlaceOfBirth(String place);

public abstract Date getDateOfBirth();

public abstract String getPlaceOfBirth();

}


This one Remote Component interface
/**
*
*/
package com.entity.customer;

import java.rmi.RemoteException;
import java.util.Date;

import javax.ejb.EJBObject;

/**
* @author Acer
*
*/
public interface Customer extends EJBObject
{

public String getLastName() throws RemoteException;

public String getFirstName() throws RemoteException;

public void setLastName(String lastName) throws RemoteException;

public void setFirstName(String firstName) throws RemoteException;

public Date getDateOfBirth() throws RemoteException;

public void setDateOfBirth(Date date) throws RemoteException;

public void setPlaceOfBirth(String place) throws RemoteException;

public String getPlaceOfBirth() throws RemoteException;

public void setId(Integer id) throws RemoteException;

public Integer getId() throws RemoteException;
}


This is Home interface
/**
*
*/
package com.entity.customer;

import java.rmi.RemoteException;
import java.util.Collection;

import javax.ejb.CreateException;
import javax.ejb.EJBHome;
import javax.ejb.FinderException;

/**
* @author Acer
*
*/
public interface CustomerHome extends EJBHome
{

public Customer create(String first, String last) throws CreateException,
RemoteException;

public Customer findByPrimaryKey(Integer key) throws FinderException,
RemoteException;

public Collection findByPlaceOfBirth(String placeOfBirth)
throws FinderException, RemoteException;
}

weblogic-ejb-jar.xml file

<?xml version="1.0" encoding="UTF-8"?>
<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>CustomerBean</ejb-name>
<entity-descriptor>
<entity-cache>
<max-beans-in-cache>1000</max-beans-in-cache>
<max-queries-in-cache>0</max-queries-in-cache>
<idle-timeout-seconds>0</idle-timeout-seconds>
<read-timeout-seconds>600</read-timeout-seconds>
<concurrency-strategy>Database</concurrency-strategy>
<cache-between-transactions>
true
</cache-between-transactions>
</entity-cache>
<persistence>
<delay-updates-until-end-of-tx>
true
</delay-updates-until-end-of-tx>
<finders-load-bean>true</finders-load-bean>
<persistence-use>
<type-identifier>
WebLogic_CMP_RDBMS
</type-identifier>
<type-version>7.0</type-version>
<type-storage>
META-INF/weblogic-cmp-rdbms-jar.xml
</type-storage>
</persistence-use>
</persistence>
<enable-dynamic-queries>true</enable-dynamic-queries>
</entity-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>0</trans-timeout-seconds>
</transaction-descriptor>
<jndi-name>CustomerJNDI</jndi-name>
</weblogic-enterprise-bean>

</weblogic-ejb-jar>


ejb-jar.xml file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>

<display-name>EJBProject</display-name>
<enterprise-beans>
<entity>
<description>
It tells about Customer Table and it's bean
</description>
<display-name>CUSTOMER BEAN</display-name>
<ejb-name>CustomerBean</ejb-name>
<home>com.entity.customer.CustomerHome</home>
<remote>com.entity.customer.Customer</remote>
<ejb-class>com.entity.customer.CustomerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>CustomerShcema</abstract-schema-name>
<cmp-field>
<field-name>firstName</field-name>
</cmp-field>
<cmp-field>
<field-name>lastName</field-name>
</cmp-field>
<cmp-field>
<field-name>dateOfBirth</field-name>
</cmp-field>
<cmp-field>
<field-name>placeOfBirth</field-name>
</cmp-field>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<description>
To Find out the customer using key
</description>
<query-method>
<method-name>findByPrimaryKey</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<result-type-mapping>Remote</result-type-mapping>
<ejb-ql>
select OBJECT m FROM CustomerShcema m WHERE m.id =
?1
</ejb-ql>
</query>
<query>
<description>
To Find out the customer using place of birth
</description>
<query-method>
<method-name>findByPlaceOfBirth</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<result-type-mapping>Remote</result-type-mapping>
<ejb-ql>
select OBJECT m FROM CustomerShcema m WHERE
m.placeOfBirth = ?1
</ejb-ql>
</query>
</entity>
</enterprise-beans>
<ejb-client-jar>EJBProjectClient.jar</ejb-client-jar>
</ejb-jar>
Josej Garcia
Greenhorn

Joined: Jul 07, 2009
Posts: 1
Could you finally solve this problem? If so, I would thank you a lot if you could tell me how.

Thanks a lot
sohan nagula
Greenhorn

Joined: Dec 23, 2007
Posts: 4
I left it simply....I just tried it on a trial basis....I didn't remember that really I did solve it or not.....But one thing I remembered....Even I was trying to deploy the wrong folder structure...there were successive bin folders....Without knowing I was deploying parent bin folder...May be this was the reason....
Ahmed Hashem
Greenhorn

Joined: Nov 18, 2010
Posts: 1
I'm getting same error message...any help

Thanks
shakthipanneer selvam
Greenhorn

Joined: Jan 28, 2011
Posts: 2
hi
shakthipanneer selvam
Greenhorn

Joined: Jan 28, 2011
Posts: 2
hi friends i m getting following error while i m deploy my ear file into the weblogic,
can any one solve this?








Exception preparing module: EJBModule(EjbModel-ejb.jar) Unable to deploy EJB: EmployeeEntityBean from EjbModel-ejb.jar: [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: There are 1 nested errors: java.lang.NullPointerException at weblogic.ejb.container.cmp.rdbms.finders.EjbqlFinder.setMethods(EjbqlFinder.java:286) at weblogic.ejb.container.cmp.rdbms.Deployer.processFinders(Deployer.java:740) at weblogic.ejb.container.cmp.rdbms.Deployer.readTypeSpecificData(Deployer.java:442) at weblogic.ejb.container.persistence.PersistenceType.setTypeSpecificFile(PersistenceType.java:505) at weblogic.ejb.container.persistence.PersistenceType.setupDeployer(PersistenceType.java:454) at weblogic.ejb.container.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:117) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1182) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:621) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at



Thanks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: weblogic ejb