Help Needed
While trying to deploy a ejb (as per EJB 1.1 spec) in weblogic (ver 5.1) i
am getting this error:
D:\Sohail\JavaEx\trial1\ejbtemp>java -Dweblogic.home=%WL_HOME% weblogic.ejbc
Customer.jar d:\weblogic\myserver\Customer.jar
ERROR: Error from ejbc: Bean provided to WebLogic RDBMS CMP system is
invalid. Please examine the following exceptions for specific problems:
0: An unknown error occurred while parsing the Weblogic CMP RDBMS
deployment descriptor. Check that the deployment descriptor contains
well-formed and valid XML.
ERROR: ejbc found errors
Can anyone tell me the possible source of error for such an error (other
than a defect in the Weblogic CMP RDBMS DD XML)
( my weblogic-cmp-rdbms-jar.xml file is:
<?xml version="1.0"?>
<!DOCTYPE weblogic-rdbms-bean PUBLIC "-//BEA Systems, Inc.//DTD WebLogic
5.1.0 EJB RDBMS Persistence//EN"
"http://www.beasys.com/weblogic-rdbms-persistence.dtd">
<weblogic-rdbms-bean>
<pool-name>demoPool</pool-name>
<table-name>Customer</table-name>
<attribute-map>
<object-link>
<bean-field>custId</bean-field>
<dbms-column>CustId</dbms-column>
</object-link>
<object-link>
<bean-field>name</bean-field>
<dbms-column>Name</dbms-column>
</object-link>
<object-link>
<bean-field>address</bean-field>
<dbms-column>Address</dbms-column>
</object-link>
<object-link>
<bean-field>telephone</bean-field>
<dbms-column>Telephone</dbms-column>
</object-link>
</attribute-map>
<finder-list>
<finder>
<method-name>findByCustId</method-name>
<method-params><method-param>int</method-param></method-params>
<finder-query><![CDATA[(= custId $0)]]></finder-query>
</finder>
</finder-list>
<options>
<use-quoted-name>false</use-quoted-name>
</options>
</weblogic-rdbms-bean>
ejb-jar.xml file is:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_2.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Customer</ejb-name>
<home>trial.CustomerBeanHome</home>
<remote>trial.Customer</remote>
<ejb-class>trial.CustomerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>trial.CustomerBeanPk</prim-key-class>
<reentrant>False</reentrant>
<cmp-field><field-name>custId</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>address</field-name></cmp-field>
<cmp-field><field-name>telephone</field-name></cmp-field>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Customer</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
and CustomerBean.java file is
package trial;
import javax.ejb.*;
import java.rmi.RemoteException;
import java.sql.Date;
import java.util.*;
public class CustomerBean implements EntityBean {
protected EntityContext entityContext;
public CustomerBean() {}
public int custId;
public String name;
public String address;
public long telephone;
public CustomerBeanPk ejbCreate(int v_custId, String v_name, String
v_address, long v_telephone )
throws EJBException, CreateException {
custId = v_custId;
name = v_name;
address = v_address;
telephone = v_telephone;
return new CustomerBeanPk(custId);
}
public void ejbPostCreate(int v_custId, String v_name, String
v_address, long v_telephone )
throws EJBException {
// do Nothing
}
public void ejbActivate() throws EJBException {
// do nothing
}
public void ejbLoad() throws EJBException {
// do nothing
}
public void ejbPassivate() throws EJBException {
// do nothing
}
public void ejbRemove() throws EJBException {
// do nothing
}
public void ejbStore() throws EJBException {
// do nothing
}
public void setEntityContext(EntityContext ctx) throws EJBException
{
entityContext = ctx;
}
public void unsetEntityContext() {
entityContext = null;
}
public int getCustId() throws EJBException, RemoteException {
return custId;
}
public String getName() throws EJBException, RemoteException {
return name;
}
public String getAddress() throws EJBException, RemoteException {
return address;
}
public long getTelephone() throws EJBException, RemoteException {
return telephone;
}
public void setName(String v_name) throws EJBException,
RemoteException {
name = v_name;
}
public void setAddress(String v_address) throws EJBException,
RemoteException {
address = v_address;
}
public void setTelephone(long v_telephone) throws EJBException,
RemoteException {
telephone = v_telephone;
}
public String htmlToPrint() throws EJBException, RemoteException {
String cust = "<tr>" +
"<td>" + getCustId() + "</td>" +
"<td>" + getName() + "</td>" +
"<td>" + getAddress() + "</td>" +
"<td>" + getTelephone() + "</td></tr>" ;
return cust;
}
}
)
If anyone can help me with this please let me know.
TIA
Sohail
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".