cancel
Showing results for 
Search instead for 
Did you mean: 

Bad magic number Exception on deployment

Former Member
0 Kudos

Hi Experts,

I am doing the migration of a J2EE application built in JBoss into SAP WAS 7.1(Evaluation Version)

I have imported all the contents(except java sources) from the existing into a webmodule project in NWDS and then I had created Enterprise Application project to add this web module. I have modified all the deployment descriptor files. After the project build, I deployed the .ear file in the WAS, but it was throwing the following error:

An error occurred while deploying the deployment item 'sap.com_XXXX'.; nested exception is:

com.sap.engine.services.dc.gd.DeliveryException.

Description:

1. ERROR CODE DPL.DC.3298 An error occurred during deployment of sap.com_XXXX. Cannot deploy it.

-> Bad magic number, found 0x0000000E, expected 0xCAFEBABE.

When I did the same in NW 7.0 WAS it was successfully deployed. I read some threads for the Bad magic error it is all saying about the class file format is wrong. For NW 7.0, jdk version 1.4.2 is used, but for the NW CE7.1 the version of jdk is 1.5. will it be the cause for the above exception?

and today I have got the java sources from class files using some Java Decompilers and I placed them in the source folder. After successful build I tried to deploy, but the same error occured while deploying.

Any Suggestions??

Regards

Karthik

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

0xCAFEBABE is by JVM spec (http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html) the first 4 bytes in a class file. If it is missing from a file this can only mean that this is not a java classfile.

BTW I would not assume that the deployment infrastructure of CE is doing checks for 0xCAFEBABE in the classfiles - it should rather come from the JVM.

May it be the case that you have some .class file that's just with wrong extension in your archive? The other possibility would be that there really is something corrupt.

Best regards, dido

Former Member
0 Kudos

Hi,

Problem is solved.

After removing some unwanted jar files from the classpath of the Web Module, the .ear file is getting deployed without that error.

Thanx for you all,

Karthik

Answers (0)