help w/ xdoclet entity definition

  • Thread starter Willian Irving Zumwalt
  • Start date
W

Willian Irving Zumwalt

Can anyone help me w/ the following errors. I'm new at using XDoclet
and dont' know what's wrong w/ my bean definition.

Any help greatly appreciated.

--- my bean ---

/**
* This is the Device entity bean.
*
*
* @ejb.bean
* name="comp/Device"
* type="BMP"
* jndi-name="ejb/comp/Device"
* primkey-field="id"
*
* @ejb.home
* extends="javax.ejb.EJBHome"
* remote-class="com.place.management.ejb.entity.DeviceHome"
*
* @ejb.interface
* extends="javax.ejb.EJBObject"
* remote-class="com.place.management.ejb.entity.Device"
*
*/

public class DeviceBean implements EntityBean
{
private EntityContext context = null;

private transient Connection dbConn = null;
private transient DataSource dataSource = null;

static {
try {
Class.forName("org.postgresql.Driver");
}
catch (ClassNotFoundException cnfe) {
System.out.println("Logger not working");
}
}

public DeviceBean() { }

/**
* Sets the unique serial number of the device. This is used
within
* the initial registration.
*
* @param id the unique 64-bit serial number.
*
* @ejb.interface-method
* view-type="remote"
*/

public void setId(String id) {}

/**
* The unique serial number of the hardware device.
*
* @return the unique serial number of the device.
*
* @ejb.interface-method
* view-type="remote"
*/

public String getId() {
return null;
}

/**
*
* @throws CreateException
*
* @ejb.create-method
*/

public String ejbCreate() throws CreateException {
System.out.println("DeviceBean.ejbCreate()");

return null;
}

/**
* @throws CreateException
*
* @ejb.create-method
*/

public String ejbCreate(DeviceInfo dev)
throws CreateException {
System.out.println("DeviceBean.ejbCreate(Device)");

return null;
}

public void ejbPostCreate() { }

public void setEntityContext(EntityContext ctx) {
context = ctx;
}

public void unsetEntityContext() throws EJBException {
context = null;
}

public void ejbRemove() throws RemoveException { }
public void ejbActivate() { }
public void ejbPassivate() { }
public void ejbLoad() throws EJBException { }
public void ejbStore() throws EJBException { }

public String ejbFindByPrimaryKey(String pk) throws
FinderException {
return null;
}

public Connection getConnection() throws SQLException {
return null;
}
}

--- my server output ---

16:07:47,419 WARN [verifier] EJB spec violation:
Bean : comp/Device
Section: 12.2.10
Warning: Entity bean's local interface must extend the
javax.ejb.EJBLocalObject interface.

16:07:47,450 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract void setId(String) throws RemoteException
Section: 12.2.10
Warning: The methods in the local interface must not include
java.rmi.RemoteException in their throws clause.

16:07:47,482 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract String getId() throws RemoteException
Section: 12.2.10
Warning: The methods in the local interface must not include
java.rmi.RemoteException in their throws clause.

16:07:47,517 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract void remove() throws RemoteException,
RemoveException
Section: 12.2.10
Warning: The methods in the local interface must not include
java.rmi.RemoteException in their throws clause.

16:07:47,550 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract Object getPrimaryKey() throws RemoteException
Section: 12.2.10
Warning: The methods in the local interface must not include
java.rmi.RemoteException in their throws clause.

16:07:47,551 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract EJBHome getEJBHome() throws RemoteException
Section: 12.2.10
Warning: The methods in the local interface must not include
java.rmi.RemoteException in their throws clause.

16:07:47,552 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract Handle getHandle() throws RemoteException
Section: 12.2.10
Warning: The methods in the local interface must not include
java.rmi.RemoteException in their throws clause.

16:07:47,582 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract boolean isIdentical(EJBObject) throws
RemoteException
Section: 12.2.10
Warning: The methods in the local interface must not include
java.rmi.RemoteException in their throws clause.

16:07:47,609 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract void remove() throws RemoteException,
RemoveException
Section: 12.2.10
Warning: For each method defined in the local interface, there must be
a matching method in the entity bean's class that has the same name
and argument types.

16:07:47,611 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract Object getPrimaryKey() throws RemoteException
Section: 12.2.10
Warning: For each method defined in the local interface, there must be
a matching method in the entity bean's class that has the same name
and argument types.

16:07:47,647 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract EJBHome getEJBHome() throws RemoteException
Section: 12.2.10
Warning: For each method defined in the local interface, there must be
a matching method in the entity bean's class that has the same name
and argument types.

16:07:47,648 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract Handle getHandle() throws RemoteException
Section: 12.2.10
Warning: For each method defined in the local interface, there must be
a matching method in the entity bean's class that has the same name
and argument types.

16:07:47,677 WARN [verifier] EJB spec violation:
Bean : comp/Device
Method : public abstract boolean isIdentical(EJBObject) throws
RemoteException
Section: 12.2.10
Warning: For each method defined in the local interface, there must be
a matching method in the entity bean's class that has the same name
and argument types.

16:07:47,740 ERROR [MainDeployer] could not create deployment:
file:/opt/jboss-3.2.5/server/default/deploy/megs-ejb.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise
Beans failed, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:517)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
S

Sudsy

Willian said:
Can anyone help me w/ the following errors. I'm new at using XDoclet
and dont' know what's wrong w/ my bean definition.

Any help greatly appreciated.

--- my bean ---

/**
* This is the Device entity bean.
*
*
* @ejb.bean
* name="comp/Device"
* type="BMP"
* jndi-name="ejb/comp/Device"
* primkey-field="id"

Try adding:
* view-type="remote"

You really need to learn how to read error messages and documentation.
You're the same poster who had two declaration of ejbDelete, right?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top