• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Problem Deploying in jboss3.2

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am trying to deploy a jar file in JBoss 3.2 on a windows machine. When I drop the jar file into the deploy directory I get the following error:

11:07:53,781 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss
-3.2.3/server/ejbtest/deploy/machine-ejb.jar
11:07:54,218 WARN [verifier] EJB spec violation:
Bean : Machine
Method : public abstract Machine create(int, String) throws CreateException
Section: 12.2.11
Warning: The return type for a create(...) method must be the entity bean's loca
l interface type.

11:07:54,218 WARN [verifier] EJB spec violation:
Bean : Machine
Method : public abstract Machine findByPrimaryKey(Integer) throws FinderExceptio
n
Section: 12.2.11
Warning: The return type for a find<METHOD> method must be the entity bean's loc
al interface type (single-object finder) or a collection (java.util.Collection S
pec 10.5.6.2) thereof (for a multi-object finder).

11:07:54,218 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-3.
2.3/server/ejbtest/deploy/machine-ejb.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
d, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:458)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:212)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:191)


My ejb-jar.xml file is:
<?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>
<description><![CDATA[Machine]]></description>
<display-name>Machine Entity Bean</display-name>
<enterprise-beans>
<entity>
<ejb-name>Machine</ejb-name>
<home>com.taylor.ejbtest.entities.MachineHome</home>
<remote>com.taylor.ejbtest.entities.Machine</remote>
<local-home>com.taylor.ejbtest.entities.MachineLocalHome</local-home>
<local>com.taylor.ejbtest.entities.MachineLocal</local>
<ejb-class>com.taylor.ejbtest.entities.MachineEJB</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>Machine</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
</entity>
</enterprise-beans>
</ejb-jar>

the jboss-xml file is:
<?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>
<description><![CDATA[Machine]]></description>
<display-name>Machine Entity Bean</display-name>
<enterprise-beans>
<entity>
<ejb-name>Machine</ejb-name>
<home>com.taylor.ejbtest.entities.MachineHome</home>
<remote>com.taylor.ejbtest.entities.Machine</remote>
<local-home>com.taylor.ejbtest.entities.MachineLocalHome</local-home>
<local>com.taylor.ejbtest.entities.MachineLocal</local>
<ejb-class>com.taylor.ejbtest.entities.MachineEJB</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>Machine</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
</entity>
</enterprise-beans>
</ejb-jar>

and the jbosscmp-jdbc.xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 3.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">

<jbosscmp-jdbc>
<defaults>
<datasource>java:/OracleDs</datasource>
<datasource-mapping>Oracle9i</datasource-mapping>
</defaults>

<enterprise-beans>
<entity>
<ejb-name>Machine</ejb-name>
<table-name>MACHINE</table-name>
<cmp-field>
<field-name>id</field-name>
<column-field>MACHINE_ID</column-field>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
<column-field>NAME</column-field>
</cmp-field>
</entity>
</enterprise-beans>
</jbosscmp-jdbc>


Why am I getting these warnings:
11:07:54,218 WARN [verifier] EJB spec violation:
Bean : Machine
Method : public abstract Machine create(int, String) throws CreateException
Section: 12.2.11
Warning: The return type for a create(...) method must be the entity bean's loca
l interface type.

11:07:54,218 WARN [verifier] EJB spec violation:
Bean : Machine
Method : public abstract Machine findByPrimaryKey(Integer) throws FinderException Section: 12.2.11
Warning: The return type for a find<METHOD> method must be the entity bean's local interface type (single-object finder) or a collection (java.util.Collection Spec 10.5.6.2) thereof (for a multi-object finder).


Thanks,

Chris.
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simply put, your EJB application doesn't conform to the EJB specification. You need to read the error messages JBoss provides for you and correct the problems.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic