aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Verify failure Deployment Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Verify failure Deployment Exception" Watch "Verify failure Deployment Exception" New topic
Author

Verify failure Deployment Exception

sajeev varghese
Greenhorn

Joined: Jan 27, 2006
Posts: 14
Hi ,
I am a beginner in J2ee tech.

I made a simple entity bean .
on deploying in Jboss 2.4.4 I am getting Verify failure a Null Pointer Exception.
ejb-jar.xml:-
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Benutzer</ejb-name>
<local-home>de.cc_gmbh.BenutzerLocalHome</local-home>
<local>de.cc_gmbh.BenutzerLocal</local>
<ejb-class>de.cc_gmbh.BenutzerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class></prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Benutzer</abstract-schema-name>
<cmp-field>
<field-name>sachbearbeiter_Nr</field-name>
</cmp-field>
<cmp-field>
<field-name>systemUserName</field-name>
</cmp-field>
<cmp-field>
<field-name>benutzer</field-name>
</cmp-field>
<cmp-field>
<field-name>rolle</field-name>
</cmp-field>
<primkey-field>sachbearbeiter_Nr</primkey-field>
<query>
<description>finds benutzer</description>
<query-method>
<method-name>findBenutzers</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[Select Object(a) From where a.sachbearbeiter_Nr = ?1]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
</ejb-jar>

jar is named authorisation.jar

Log :-

[18:11:58,592,AutoDeployer] Watching directory: D:\JBoss-2.4.4\deploy
[18:11:58,592,AutoDeployer] Watching directory: D:\JBoss-2.4.4\deploy\lib
[18:11:58,608,AutoDeployer] Auto deploy of file:/D:/JBoss-2.4.4/deploy/authorisation.jar
[18:11:58,608,J2eeDeployer] Deploy J2EE application: file:/D:/JBoss-2.4.4/deploy/authorisation.jar
[18:11:58,780,J2eeDeployer] Create application authorisation.jar
[18:11:58,796,J2eeDeployer] install EJB module authorisation.jar
[18:11:58,999,ContainerFactory] Deploying:file:/D:/JBoss-2.4.4/tmp/deploy/Default/authorisation.jar/
[18:11:59,421,ContainerFactory] Verifying file:/D:/JBoss-2.4.4/tmp/deploy/Default/authorisation.jar/ejb1001.jar
[18:11:59,499,ContainerFactory] Verify failure
java.lang.NullPointerException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jboss.verifier.strategy.AbstractVerifier.hasPrimaryKeyReturnType(AbstractVerifier.java:524)
at org.jboss.verifier.strategy.EJBVerifier11.verifyEntityBean(EJBVerifier11.java:1260)
at org.jboss.verifier.strategy.EJBVerifier11.checkEntity(EJBVerifier11.java:120)
at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:132)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:465)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:369)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:487)
at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
at org.jboss.deployment.AutoDeployer.startService(AutoDeployer.java:371)
at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
at $Proxy0.start(Unknown Source)
at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.Main.<init>(Main.java:208)
at org.jboss.Main$1.run(Main.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:106)
[18:11:59,717,ContainerFactory] Deploying Benutzer
[18:11:59,936,EntityInstancePool] config - MaximumSize=100, strictMaximumSize=false, feederPolicy=null
[18:12:00,030,BaseLocalContainerInvoker] Caching methods for localClass: interface de.cc_gmbh.BenutzerLocal
[18:12:00,046,BaseLocalContainerInvoker] Caching methods for localHomeClass: interface de.cc_gmbh.BenutzerLocalHome
[18:12:00,124,EntityContainer] Begin java:comp/env for EJB: Benutzer
[18:12:00,124,EntityContainer] TCL: java.net.URLClassLoader@1c7980c
[18:12:00,124,EntityContainer] End java:comp/env for EJB: Benutzer
[18:12:00,155,JAWSPersistenceManager] Initializing JAWS plugin for Benutzer
[18:12:00,217,ContainerFactory] InternalError
java.lang.NullPointerException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jboss.ejb.plugins.jaws.metadata.JawsEntityMetaData.<init>(JawsEntityMetaData.java:133)
at org.jboss.ejb.plugins.jaws.metadata.JawsApplicationMetaData.<init>(JawsApplicationMetaData.java:96)
at org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader.load(JawsXmlFileLoader.java:54)
at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.<init>(JDBCCommandFactory.java:133)
at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.init(JAWSPersistenceManager.java:83)
at org.jboss.ejb.plugins.CMPPersistenceManager.init(CMPPersistenceManager.java:110)

If any one can help in this regard please tell.

rgds,
fivestar
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Check the DTD:

As you can see, it is mandatory to supply a prim-key-class element.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

"five star"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
sajeev varghese
Greenhorn

Joined: Jan 27, 2006
Posts: 14
Hi ,
Thanks Roger.
Here i made some change w.r.t ejb-jar & i have switched to jboss-4.0.2

ejb-jar.xml:
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Benutzer</ejb-name>
<local-home>de.cc_gmbh.BenutzerLocalHome</local-home>
<local>de.cc_gmbh.BenutzerLocal</local>
<ejb-class>de.cc_gmbh.BenutzerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>de.cc_gmbh.BenutzerPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Benutzer</abstract-schema-name>
<cmp-field>
<field-name>sachbearbeiter_Nr</field-name>
</cmp-field>
<cmp-field>
<field-name>systemUserName</field-name>
</cmp-field>
<cmp-field>
<field-name>benutzer</field-name>
</cmp-field>
<cmp-field>
<field-name>rolle</field-name>
</cmp-field>
<primkey-field>sachbearbeiter_Nr</primkey-field>

<query>
<description>finds benutzer</description>
<query-method>
<method-name>findBenutzers</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[Select Object(a) From where a.sachbearbeiter_Nr = ?1]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
</ejb-jar>

server.log :
-----------
2006-01-29 12:21:46,654 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/D:/jboss-4.0.2/server/default/deploy/authorisation.jar
2006-01-29 12:21:46,654 DEBUG [org.jboss.ejb.EJBDeployer] create, authorisation.jar
2006-01-29 12:21:46,998 DEBUG [org.jboss.ejb.EJBDeployer] Verifying file:/D:/jboss-4.0.2/server/default/deploy/authorisation.jar
2006-01-29 12:21:47,201 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
Bean : Benutzer
Section: 10.8.1
Warning: The type of the primkey-field must match the primary key class.

2006-01-29 12:21:47,248 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
2006-01-29 12:21:47,248 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
2006-01-29 12:21:47,248 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2006-01-29 12:21:47,232 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/D:/jboss-4.0.2/server/default/deploy/authorisation.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

If any one can help in this regard please tell.

rgds,
fivestar
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

I am closing this topic until "fivestar" changes their display name.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Verify failure Deployment Exception