aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Entity Bean Verify Error JDO74033 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Entity Bean Verify Error JDO74033" Watch "Entity Bean Verify Error JDO74033" New topic
Author

Entity Bean Verify Error JDO74033

Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
hi
i am trying to deploy a entity bean and i get this verify error... any help?

For [ EntityCMP#ejb-jar-ic1.jar#EmployeeBean ]
Error: Exception [ JDO74033: Cannot deploy application 'EntityCMP' module 'ejb-jar-ic1' with CMP beans: cmp-resource is not defined for this module. The minimum requirement for a cmp-resource is to specify the jndi-name of a jdbc-resource or a persistence-manager-factory-resource to be used with the beans. ] while initializing JDOCodeGenerator. Please check your descriptors and mapping files for consistency

Thanks for any help in advance
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
I am using j2eesdk 1.4 and deploytool platform edition 8 with PointBase...

How do i go and specify the JNDI name for the DB?...
It is getting deployed with this error and iam able to run too.... what does this mean? then y is it giving this error?
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
Is there anyone to answer this?
Or can anyone tell me the steps they followed while creating an Entity Bean(take me thro the wizard)... am i missing something?
Venu Navat
Ranch Hand

Joined: Dec 28, 2004
Posts: 30
how u hv created ur entity bean?..... using cmp or bmp?


-Venu Navat
Venu Navat
Ranch Hand

Joined: Dec 28, 2004
Posts: 30
in which application server u hv deployed??
Damanjit Kaur
Ranch Hand

Joined: Oct 18, 2004
Posts: 346
To specifiy cmp-resource :

in ejb-jar file write down the following tag

<resource-ref>
<res-ref-name>jdbc/DefaultDS</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
</resource-ref>

DefaultDS i.e. the lookup name for your database that you have specified in database xml file in your server directory.
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
hi thanks for all your replies
i have created it as CMP bean and using Pointbase DB and the default server in j2eesdk 1.4

this is how my Application Server Descripton looks like


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
<sun-ejb-jar>
<enterprise-beans>
<name>EmployeeBeanJar</name>
<ejb>
<ejb-name>EmployeeBean</ejb-name>
<jndi-name>EmployeeBean</jndi-name>
</ejb>
<cmp-resource>
<jndi-name>jdbc/PointBase</jndi-name>
<create-tables-at-deploy>true</create-tables-at-deploy>
<drop-tables-at-undeploy>true</drop-tables-at-undeploy>
<database-vendor-name>POINTBASE</database-vendor-name>
<schema-generator-properties>
<property>
<name>use-unique-table-names</name>
<value>true</value>
</property>
<property>
<name>java-to-database</name>
<value>true</value>
</property>
</schema-generator-properties>
</cmp-resource>
</enterprise-beans>
</sun-ejb-jar>

Where do i find my Database xml file? how do i create a ref to the db?

Thanks for all your help
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
ok ... i found how to add the resource ref... but my question still is how to find the lookup name for the database .... where shd i look for that?

I hope this will solve my problem
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
what do i give for the sun specified settings for the coded name i give in Resource Ref Tab? do i have to give a user id and password? if so what i have togive?
Damanjit Kaur
Ranch Hand

Joined: Oct 18, 2004
Posts: 346
I have not used Sun Application server. But I just downloaded it and saw this jndi name,password and username for Pointbase is specified in
C:\Sun\AppServerNew\domains\domain1\config\domain.xml file.
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
Thanks i could locate the JNDI name for pointbase as jdbc/PointBase. do i have to do that for CMP bean too?
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
hi
i could log on to http://localhost:4848/asadmin and see the jdbc resource being defined for jdbc/PointBase. and i defined a Resource Ref for the Entity bean with values

Coded name jdbc/Pointbase
type java.sql.DataSource
Authenticatin Container
Sharable yes
Jndi name jdbc/PointBase.
Is this ok?I am still getting this error.. do I have to do anything else?
Thank you so much for your reply
Chandu Dharmadhikari
Ranch Hand

Joined: Jan 22, 2005
Posts: 35
Hi

You need to configure your server. Follow the given steps in deploytool
Tools->server configuration->(Click on) Data Sources->(Click on) Standard

Here specify driver class, JNDI name, JDBC URL & restart server

It should work.
Damanjit Kaur
Ranch Hand

Joined: Oct 18, 2004
Posts: 346
<resource-ref>
<res-ref-name>jdbc/DefaultDS</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
</resource-ref>


This is specified for BMP bean only.

May be this link should help you, If you have not already went through it. http://docs.sun.com/source/816-7151-10/deassemb.html#66072

I read you have to specify either cmp-resource or pm-descriptor. so your sun-ejb-jar.xml file looks ok as you have specified cmp-resource tag.
Damanjit Kaur
Ranch Hand

Joined: Oct 18, 2004
Posts: 346
Ok. read this from the above site i mentioned. Perhaps you will find the solution.

Configuring the Resource Manager

The resource manager used by the container-managed persistence implementation is PersistenceManagerFactory, which is configured using the Sun ONE Application Server DTD file, sun-server_7_0-0.dtd.

Refer to the Sun ONE Application Server Administrator's Guide for information on creating a new persistence manager.

To deploy an EJB module that contains container-managed persistence beans, you need to add the following information to the sun-ejb-jar.xml deployment descriptor.

1. Specify the Persistence Manager to be used for the deployment:

<pm-descriptors>
<pm-descriptor>
<pm-identifier>SunONE</pm-identifier>
<pm-version>1.0</pm-version>
<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.J DOCodeGenerator
</pm-class-generator>
<pm-mapping-factory>com.iplanet.ias.cmp.
NullFactory</pm-mapping-factory>
</pm-descriptor
<pm-inuse>
<pm-identifier>SunONE</pm-identifier>
<pm-version>1.0</pm-version>
</pm-inuse>
</pm-descriptors>

2. Specify the JNDI name of the Persistence Manager's resource (listed under persistence-manager-factory-resource entry in the server.xml file) and the JNDI name for cmp-resource. This name will be used at run time to manage persistent resources.

For example, if you have the following entry in the server.xml file:

<persistence-manager-factory-resource
factory-class="com.sun.jdo.spi.persistence.support.
sqlstore.impl.PersistenceMan
gerFactoryImpl"
enabled="true"
jndi-name="jdo/pmf"
jdbc-resource-jndi-name="jdo/pmfPM"
</persistence-manager-factory-resource>

Set the CMP resource as:

<cmp-resource>
<jndi-name>jdo/pmf</jndi-name
</cmp-resource>
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
------------------
Hi

You need to configure your server. Follow the given steps in deploytool
Tools->server configuration->(Click on) Data Sources->(Click on) Standard

Here specify driver class, JNDI name, JDBC URL & restart server
----------------

I dont find this option in Application Server DeployTool Platform Edition 8?

Why do i have to go for JDO? cant i do it with JDBC?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity Bean Verify Error JDO74033