Title: RE: [jBoss-User] cmp entity bean deployment bug?

I checked the 1.1 spec and it said inheritance of business methods and container callbacks should be allowed.  It doesn't specifically address inheritance for cmp fields.  It wouldn't make sense allow it for ejbCreate and not for cmp fields, though.

To Rickard (from a separate email in this thread):  I checked that the superclass has a public field "id"

--Jonathan


-----Original Message-----
From: marc fleury [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 26, 2000 12:05 PM
To: jBoss
Subject: RE: [jBoss-User] cmp entity bean deployment bug?


it has to do with the way we map the methods.... pffffffff

we will see, do many people use inheritance in EJB???


marc

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jonathan Meeks
Sent: Wednesday, October 25, 2000 7:49 PM
To: jBoss-User (E-mail)
Subject: [jBoss-User] cmp entity bean deployment bug?




I tried the following and got error when I tried to deploy my cmp entity beans.
EntityBeanImpl implements EntityBean
{
  public ObjectPK id;    //the primary key
}
CartridgeBean extends A_Bean
{
}
I've seen inherited cmp-fields work fine with other EJB servers (including the case where the field happens to be the PK).  The spec does not say whether a bean can inherit its cmp-fields (though it does say it can inherit ejbCreate, business methods, etc.) though I saw an earlier post in the archive where someone said that they wrote a bean that sucessfully inherited non-PK cmp-fields.

Is this behavior intended?  Should it be fixed?
Here is jBoss' output:


D:\jBoss2b3\bin>run
[Console logging] Logging started
[File logging] Logging started
[Info] Java version: 1.3.0,Sun Microsystems Inc.
[Info] Java VM: Java HotSpot(TM) Client VM 1.3.0-C,Sun Microsystems Inc.
[Info] System: Windows NT 4.0,x86
[JDBC] Loaded JDBC-driver:org.hsql.jdbcDriver
[JDBC] Loaded JDBC-driver:jdbc.idbDriver
[Webserver] Initializing
[Webserver] Initialized
[Hypersonic] Initializing
[Hypersonic] Database started
[Hypersonic] Initialized
[Naming] Initializing
[Naming] Naming started on port 1099
[Naming] Initialized
[Transaction manager] Initializing
[Transaction manager] Initialized
[Simple Realm Mapping] Initializing
[Simple Realm Mapping] Initialized
[Security manager] Initializing
[Security manager] Initialized
[XADataSource] Initializing
[XADataSource] Initialized
[XADataSource] Initializing
[XADataSource] Initialized
[Container factory] Initializing
[Container factory] Initialized
[Auto deploy] Watching D:\jBoss2b3\deploy
[Auto deployer] Initializing
[Auto deployer] Initialized
[JMX RMI Adaptor] Initializing
[JMX RMI Adaptor] Initialized
[JMX RMI Connector] Initializing
[JMX RMI Connector] Initialized
[Configuration] Initializing
[Configuration] Initialized
[J2ee deployer] Initializing
[J2ee deployer] no config file found...
[J2ee deployer] Initialized
[Naming] Starting
[Naming] Started
[Transaction manager] Starting
[Transaction manager] Started
[Hypersonic] Starting
[Hypersonic] Started
[XADataSource] Starting
[XADataSource] XA Connection pool Hypersonic bound to Hypersonic
[XADataSource] Started
[XADataSource] Starting
[XADataSource] XA Connection pool InstantDB bound to InstantDB
InstantDB - Version 3.12
[XADataSource] Copyright (c) 1997-1999 Instant Computer Solutions Ltd.
[XADataSource] Started
[Container factory] Starting
[Container factory] Started
[J2ee deployer] Starting
[J2ee deployer] No war deployer found - only EJB deployment available...
[J2ee deployer] trying to redeploy all applications that were running before shutdown...
[J2ee deployer] deployment state recovered.
[J2ee deployer] Started
[Auto deployer] Starting
[Auto deploy] Auto deploy of file:/D:/jBoss2b3/deploy/devl107_e.jar
[Container factory] Deploying:file:/D:/jBoss2b3/deploy/devl107_e.jar
[Verifier] Verifying file:/D:/jBoss2b3/tmp/deploy/tmpejbjar46364.jar
[Verifier]
Class  : repository.devl107.User
Section: 16.2
Warning: The Bean Provider must specify the fully-qualified name of the enterprise bean's home interface in the home element.

[Verifier]
Class  : repository.devl107.User
Section: 9.4.7.1
Warning: The type of the field named in the primkey-field element must match the class in the prim-key-class element.
[Verifier]
Class  : repository.devl107.ContextBranches
Section: 9.2.2
Warning: The entity bean's class must implement, directly or indirectly, the javax.ejb.EntityBean interface.
[Verifier]
Class  : repository.devl107.ContextBranches
Method : public void ejbCreate(String)
Section: 9.2.3
Warning: The return type of an ejbCreate(...) method must be the entity bean's primary key type.
[Verifier]
Class  : repository.devl107.ContextBranches
Method : public void ejbCreate(String)
Section: 9.2.4
Warning: For each ejbCreate(...) method, the entity bean class must define a matching ejbPostCreate(...) method.
[Verifier]
Class  : repository.devl107.ContextBranches
Section: 9.4.7.1
Warning: The primkey-field element must name a public field in the bean implementation class.
[Container factory] Deploying repository.devl107.UsageLink
[Container factory] Deploying repository.devl107.Cartridge
[Container factory] Deploying repository.devl107.DataElementInput
[Container factory] Deploying repository.devl107.SystemColumn
[Container factory] Deploying repository.devl107.CartridgeColumn
[Container factory] Deploying repository.devl107.Usage
[Container factory] Deploying repository.devl107.ApplicationSystem
[Container factory] Deploying repository.devl107.DataElementOutput
[Container factory] Deploying repository.devl107.DataElement
[Container factory] Deploying repository.devl107.User
[Container factory] Deploying repository.devl107.UsageInput
[Container factory] Deploying repository.devl107.UsageOutput
[Container factory] Deploying repository.devl107.ContextBranches
[Container factory] org.jboss.ejb.DeploymentException: cmp-field type is not a field in ejb class com.isix.common.ejb.v1_1.repository.CartridgeBean

[Container factory]     at org.jboss.ejb.plugins.jaws.metadata.CMPFieldMetaData.<init>(CMPFieldMetaData.java:74)
[Container factory]     at org.jboss.ejb.plugins.jaws.metadata.JawsEntityMetaData.<init>(JawsEntityMetaData.java:108)
[Container factory]     at org.jboss.ejb.plugins.jaws.metadata.JawsApplicationMetaData.<init>(JawsApplicationMetaData.java:87)

[Container factory]     at org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader.load(JawsXmlFileLoader.java:51)
[Container factory]     at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.<init>(JDBCCommandFactory.java:78)
[Container factory]     at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.init(JAWSPersistenceManager.java:78)
[Container factory]     at org.jboss.ejb.plugins.CMPPersistenceManager.init(CMPPersistenceManager.java:103)
[Container factory]     at org.jboss.ejb.EntityContainer.init(EntityContainer.java:191)
[Container factory]     at org.jboss.ejb.Application.init(Application.java:158)
[Container factory]     at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:722)
[Container factory]     at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:248)
[Container factory]     at java.lang.reflect.Method.invoke(Native Method)
[Container factory]     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Container factory]     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Container factory]     at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:286)
[Container factory]     at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:222)
[Container factory]     at org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:265)
[Container factory]     at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:90)
[Container factory]     at java.lang.reflect.Method.invoke(Native Method)
[Container factory]     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Container factory]     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Container factory]     at org.jboss.dependencies.DependencyManager.startMBean(DependencyManager.java:284)
[Container factory]     at org.jboss.dependencies.DependencyManager.loadService(DependencyManager.java:261)
[Container factory]     at org.jboss.dependencies.DependencyManager.processService(DependencyManager.java:243)
[Container factory]     at org.jboss.dependencies.DependencyManager.startMBeans(DependencyManager.java:117)
[Container factory]     at org.jboss.Main.<init>(Main.java:166)
[Container factory]     at org.jboss.Main.<init>(Main.java:98)
[Container factory]     at org.jboss.Main$1.run(Main.java:88)
[Container factory]     at java.security.AccessController.doPrivileged(Native Method)
[Container factory]     at org.jboss.Main.main(Main.java:79)
[Auto deploy] Deployment failed:file:/D:/jBoss2b3/deploy/devl107_e.jar
[Auto deploy] java.lang.NullPointerException
[Auto deploy]   at org.jboss.ejb.plugins.EnterpriseInstanceCache.stop(EnterpriseInstanceCache.java:231)
[Auto deploy]   at org.jboss.ejb.EntityContainer.stop(EntityContainer.java:253)
[Auto deploy]   at org.jboss.ejb.Application.stop(Application.java:187)
[Auto deploy]   at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:749)
[Auto deploy]   at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:248)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Auto deploy]   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:286)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:222)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:265)
[Auto deploy]   at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:90)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Auto deploy]   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Auto deploy]   at org.jboss.dependencies.DependencyManager.startMBean(DependencyManager.java:284)
[Auto deploy]   at org.jboss.dependencies.DependencyManager.loadService(DependencyManager.java:261)
[Auto deploy]   at org.jboss.dependencies.DependencyManager.processService(DependencyManager.java:243)
[Auto deploy]   at org.jboss.dependencies.DependencyManager.startMBeans(DependencyManager.java:117)
[Auto deploy]   at org.jboss.Main.<init>(Main.java:166)
[Auto deploy]   at org.jboss.Main.<init>(Main.java:98)
[Auto deploy]   at org.jboss.Main$1.run(Main.java:88)
[Auto deploy]   at java.security.AccessController.doPrivileged(Native Method)
[Auto deploy]   at org.jboss.Main.main(Main.java:79)
[Auto deployer] Started
[Security manager] Starting
[Security manager] Started
[Simple Realm Mapping] Starting
[Simple Realm Mapping] Started
[Webserver] Starting
[Webserver] Codebase set to http://meeks:8083/
[Webserver] Started webserver on port 8083
[Webserver] Started
[JMX RMI Adaptor] Starting
[JMX RMI Adaptor] Started
[JMX RMI Connector] Starting
[JMX RMI Connector] Started
[Default] 22 services and 4 other MBeans started.
[Default] Shutdown hook added
[Default] jBoss 2.0 BETA-PROD-03 Started
[JMX RMI Adaptor] Stopping
[JMX RMI Adaptor] Stopped
[JMX RMI Adaptor] Destroying
[JMX RMI Adaptor] Destroyed
[JMX RMI Connector] Stopping
[JMX RMI Connector] Stopped
[JMX RMI Connector] Destroying
[JMX RMI Connector] Destroyed
[Webserver] Stopping
[Webserver] Stopped
[Webserver] Destroying
[Webserver] Destroyed
[Simple Realm Mapping] Stopping
[Simple Realm Mapping] Stopped
[Simple Realm Mapping] Destroying
[Simple Realm Mapping] Destroyed
[Security manager] Stopping
[Security manager] Stopped
[Security manager] Destroying
[Security manager] Destroyed
[Auto deployer] Stopping
[Auto deployer] Stopped
[Auto deployer] Destroying
[Auto deployer] Destroyed
[J2ee deployer] Stopping
[J2ee deployer] Stopped
[J2ee deployer] Destroying
[J2ee deployer] Destroyed
[Container factory] Stopping
[Container factory] Stopped
[Container factory] Destroying
[Container factory] Destroyed
[XADataSource] Stopping
[XADataSource] XA Connection pool InstantDB removed from JNDI
[XADataSource] XA Connection pool InstantDB shut down
[XADataSource] Stopped
[XADataSource] Destroying
[XADataSource] Destroyed
[XADataSource] Stopping
[XADataSource] XA Connection pool Hypersonic removed from JNDI
[XADataSource] XA Connection pool Hypersonic shut down
[XADataSource] Stopped
[XADataSource] Destroying
[XADataSource] Destroyed
[Hypersonic] Stopping
[Hypersonic] Stopped
[Hypersonic] Destroying
[Hypersonic] Destroyed
[Transaction manager] Stopping
[Transaction manager] Stopped
[Transaction manager] Destroying
[Transaction manager] Destroyed
[Naming] Stopping
[Naming] Stopped
[Naming] Destroying
[Naming] Destroyed
[Default] 22 services and 4 other MBeans stopped.
Press any key to continue . . .

Reply via email to