cancel
Showing results for 
Search instead for 
Did you mean: 

Error in J2EE - JDO

Former Member
0 Kudos

Hi All,

I am trying to implement a tutorial given in help.sap.com. Following is the link:

http://help.sap.com/saphelp_nw2004s/helpdata/en/f8/b87481445e415395940dc20c1c03a8/frameset.htm

I have followed all the steps as explained in the above tutorial. I am getting the following error while running the JDO Enhancer using ANT Build.

“Fatal error while enhancing: JDO ENHANCER: An internal error occurred while enhancing input class; detailed message: nested exception: com.sap.jdo.model.jdo.JDOModelException: Error during reading XML meta data.

[java] NestedException: org.xml.sax.SAXParseException: Relative URI "jdo.dtd"; can not be resolved without a base URI.

[java] aborted with errors. "

Correct Answers will be rewarded.

Thanks for your help.

Regards,

Rashmi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I believe it's something to do with your classpath. Please make sure you have all the right jars/versions under your classpath.

Or find out which jar has jdo.dtd and make sure that jar is in classpath.

Hope that helps,

Rajit

Message was edited by:

Rajit Srinivas

Former Member
0 Kudos

Hi Rajit/David,

Thanks for your reply.

I have added jdo.jar file in my project's build path. This jar contains jdo.dtd file. I am pointing to thecorrect jdo.jar file from my build.xml file also. Still it is giving same problem.

Can you please let me know where else i have to specify path for this jdo.dtd?

Following is my build.xml property part.

<project name="web_book" default="enhance" basedir="..">

<property name="sourceproject.dir" value="_comp"/>

<property name="dictproject.dir" value="jv_emp/_comp"/>

<property name="src.dir" value="${sourceproject.dir}/source"/>

<property name="bin.dir" value="${sourceproject.dir}/bin"/>

<property name="catalog.dir" value="${dictproject.dir}/gen_ddic/dbtables/"/>

<property name="enhancer" value="com.sap.jdo.enhancer.Main"/>

<property name="utility" value="com.sap.jdo.sql.util.JDO"/>

<property name="tssap" value="C:\Program Files\SAP\IDE\IDE70\eclipse\plugins"/>

<property name="jdo" value="$/com.sap.ide.eclipse.ext.libs.jdo_2.0.0/lib/jdo.jar"/> <property name="xml" value="$/com.tssap.sap.libs.xmltoolkit/lib/sapxmltoolkit.jar"/>

<property name="jdoutil" value="$/com.sap.jdo.utils_2.0.0/lib/sapjdoutil.jar"/> <property name="dictionary" value="$/com.sap.dictionary.database/lib/jddi.jar"/>

<property name="logging" value="$/com.tssap.sap.libs.logging_2.0.0/lib/logging.jar"/> <property name="catalogreader" value="$/com.sap.opensql/lib/opensqlapi.jar"/>

<property name="classpath" value="$;$;$;$"/>

<property name="classpath.check" value="$;$;$;${bin.dir}"/>

<target name="enhance">

<antcall target="enhance.Employee"/>

<antcall target="enhance.Department"/>

</target>

Following is my .jdo file.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE jdo SYSTEM "/javax/jdo/jdo.dtd">

<jdo>

<package name="com.sap.jdoexample.employeedept">

<class name="Employee" identity-type="application" objectid-class="Employee$Id">

<field name="empId" persistence-modifier="persistent" primary-key="true"/>

<field name="FirstName" persistence-modifier="persistent"/>

<field name="LastName" persistence-modifier="persistent"/>

<field name="Salary" persistence-modifier="persistent"/>

<field name="department" persistence-modifier="persistent"/>

</class>

</package>

</jdo>

Thanks,

Rashmi

Former Member
0 Kudos

Rashmi. I don't have an answer for you but maybe I can help with some more information. Are you actually modifying the build.xml file yourself? Are you doing this as a local project or as a DC. If doing as DC is it a local DC or one using NWDI?

David.

Former Member
0 Kudos

Although a bit late but I guess your build.xml file missing this line.

[code]<property name="xml" value="$/com.sap.ep.unitTest_7.00/sapxmltoolkit.jar"/>

....

....

....

<property name="classpath" value="$;$;$;$;$"/>[/code]

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi David,

Yes i am modifying the XML file myself and I m using this DC in NWDI. Any suggestions what might be the problem. JDO has never been implemented in this landscape before. I am trying it for the first time.

Regards,

Rashmi

Former Member
0 Kudos

Rashmi.

I'm by no means an expert on this stuff so I can just tell you what my experience has been. Earlier this year we wanted to convert an EJB application from WebSphere that was written using Swing and deployed with WebStart.

It was written a long time ago using EJB 1.0. We decided that it would be easier to just try and rewrite it instead of porting it. We brought in a consultant to help us with Spring and Hibernate.

Well, one of the things we found we'd need to do was to modify the build.xml file. Struggled with it for awhile only to finally get word from SAP support that we should NOT modify that file because our local modifications would be ignored when we started the transport process.

To make a long story short, I'm wondering if your approach (modifying build.xml) is a good idea since you're using NWDI.

Maybe some of the more experienced Netweaver people on here can speak up and either say I'm wrong or maybe suggest some other solution.

Oh, and I followed your link and it just took me to a section of help.sap.com that discusses JDO but I didn't see a tutorial. Do you have a link to the specific tutorial you're doing?

Former Member
0 Kudos

Rashmi. Without knowing more details I can't say for sure that this is the problem but I suggest that you change the reference to the "jdo.dtd" file to the full path where the file is located.

The error message seems to be saying that the specified path is relative and it can't find it.