cancel
Showing results for 
Search instead for 
Did you mean: 

JDO applications SAP Netweaver 7.3

Former Member
0 Kudos

Hi all,

I have a application using Java Data Objects (EJB DC migrated 6.40 to 7.3). I have this error when I make build:

 

[jdo.enhance] WARNING: Caused by: com.sap.jdo.enhancer.util.UserException: The byte code of the class file has version 1.6. This is not supported by the JDO enhancer. Please compile with the option -target 1.5.

[jdo.enhance] WARNING: at com.sap.jdo.enhancer.classfile.ClassFile.assertSupportedVersion(ClassFile.java:101)

[jdo.enhance] WARNING: at com.sap.jdo.enhancer.classfile.ClassFile.<init>(ClassFile.java:364)

[jdo.enhance] WARNING: at com.sap.jdo.enhancer.filter.Enhancer.enhanceClassFile1(Enhancer.java:144)

[jdo.enhance] WARNING: at com.sap.jdo.enhancer.filter.Enhancer.enhanceClassFile(Enhancer.java:192)

[jdo.enhance] WARNING: ... 45 more

[jdo.enhance] aborted with errors.

Ant runtime 1.07 seconds

Ant build finished with ERRORS

JDO enhancer failed because of unknown Error: 1

Build stopped due to an error: JDO enhancer failed because of unknown Error: 1

Build plugin finished at 2013-03-14 10:10:49 GMT+01:00 (CET)

Total build plugin runtime: 1.35 seconds

 

Build finished with ERROR

I have read this document (http://help.sap.com/saphelp_nw73/helpdata/en/48/257a6142ac539ae10000000a421937/content.htmhttp://help.sap.com/saphelp_nw73/helpdata/en/48/257a6142ac539ae10000000a421937/content.htm), but I don't know how to do the following and if that will fix my error:

■  JDO applications

Applications using Java Data Objects (JDO) need special attention. Though the applications themselves can be compiled and built with JDK 6, the actual JDO classes need to be compiled with JDK 1.5 or with JDK 6 using the “-target 1.5” option. JDO classes can be easily detected by their accompanying .jdo and .map files.

The requirement to use JDK 1.5-compliant build target results from the fact that the class files of JDO classes need to be post-processed by a tool known as the JDO enhancer. The class file format was significantly changed with JDK 6. However, the JDO enhancer does only support the JDK 1.5 class file format. Therefore, JDO classes must be compiled in such a way that the JDK 1.5 format is used for the class files. This can be achieved by using JDK 1.5 directly or JDK 6 with the option “-target 1.5” in the build.

Can anyboy help me?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hello Jim,

Please let me know if you were able to resolve the issue. We were able to bypass the "The byte code of the class file has version 1.6. This is not supported by the JDO enhancer. Please compile with the option -target 1.5." by compiling the JDO classes with -target 1.5 in eclipse. But have run into other errors with "Persistence manager was closed" issue. Appreciate if you can let me know on your updates from the migration

Regards

PU

Former Member
0 Kudos

Hi Portal User,

you need to configurate your NWDS.

In Windows Preferences, you have to go to:

· Development Infraestructure -> DC Build. Then you have to select:

   JDK for DC Build: blank

   Default Source Compliance: 1.5

   Default Target Compliance: 1.5

· Java -> Installed JREs you need add JDK 1.5.

After you import your Track from NWDI, and create your DC WD project. You will make 'build' alright!

Regards.

Former Member
0 Kudos

Thanks Jim.,We changed the jdkpreference.txt in our workspace to have target as 1.5 and the DC got build. I also wanted to check that in our case we have a SC with 5 DC, and one DC for the JDO part. Wanted to check even in NWDI how do i build 4 DC in this SC with 1.6 and JDO DC with 1.5 since the Build variant can only be adjusted at SC level and not on DC level in CBS

Regards

PU

Former Member
0 Kudos

Hi Portal User,

you have to build with 1.5 in full SC (5 DCs) in NWDI. You will not have problems.

You can read about this configuration in this link:

http://help.sap.com/saphelp_nw73/helpdata/en/4d/c149fa499d48318debe4249d80711c/content.htm?frameset=...

Regards.

Former Member
0 Kudos

thanks, Since we are on AS Java 7.31 , we wanted to build the SC with JDK 1.6.

As the JDO enhancer does not recognize JDO class build with JDK 1.6, in NWDS, we build JDO dc with a -target 1.5  where as all other DC are build with JDK 1.6 in our SC.

So basically even if we are able to build the entire SC in NWDS and deploy, in NWDI we cannot build with 2 different build variants for JDO dc(JDK 1.5) and other 4 DC(JDK 1.6) in a single SC.

Do you mean in this case we have to build the entire SC in JDK 1.5 only ?

In addition, i wanted to check do we need to do any thing else for the JDO classes (to enhance them) post the build in NWDS?

Info : We are upgrading from AS Java 6.40 to As Java 7.31

Thanks for your advice.

Regards

PU

Former Member
0 Kudos

Hi Portal User,

yes, you have to build the entire SC with JDK 1.5 (like in NWDS).

No, you don't have to do any more. I would deploy and test the apps. 🙂

Regards.

Former Member
0 Kudos

Thanks, Let me check and update you on the findings.

Former Member
0 Kudos

Hello Jim,

We redeployed the code build in JDK1.5 . But the error persists "PersistenceManager has been closed"

Regards

PU

Former Member
0 Kudos

Hi Portal User,

try to not close the connection. You can comment the java code line.

Regards.

Answers (0)