• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Verify failure Deployment Exception

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the DTD:

As you can see, it is mandatory to supply a prim-key-class element.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
sajeev varghese
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am closing this topic until "fivestar" changes their display name.

Mark
 
What's brown and sticky? ... a stick. Or a tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic