cancel
Showing results for 
Search instead for 
Did you mean: 

Error on using bc.sf.framework_api.jar for accessing the KM content

govardan_raj
Contributor
0 Kudos

Hi ,

Im trying to access the KM content from wdj application im using jar file

but im getting error like

 

[javac] ERROR: bad class file: E:\sap_ep_prog\dc\.dtc\0\DCs\*******\portal_dev\kmjar\_comp\gen\default\public\Compilation_kmjar_pp\lib\java\bc.sf.framework_api.jar(com/sapportals/wcm/service/IServiceTypesConst.class)

[javac] ERROR: class file has wrong version 49.0, should be 48.0

[javac] ERROR: Please remove or make sure it appears in the correct subdirectory of the classpath.

[javac] ERROR: import com.sapportals.wcm.service.IServiceTypesConst;

[javac] ERROR: ^

[javac] 1 error

Regards

Govardan Raj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Govardan,

It happens when your runtime is JDK 1.4 but your classes have been compiled with JDK 1.5. Because you can't change the runtime (Web AS 6.40 requires JDK 1.4).

You have to change the JDK used to build your projects in the IDE (Eclipse).

Try to do the following steps in NWDS

1.Right click on project

2. Build Path -> Configure Build Path

3. Select Java Compiler

4. Check the box: Make Project specific settings

5. Choose your destinated JDK (here 1.4 with both source and class compatibility 1.4 either)

6. Re compile the project

7. Deploy

Check this:

Application failure "class file wrong version" ... | SCN

Thanks ,

Patralekha

govardan_raj
Contributor
0 Kudos

Hi patralekha ,

Thanks for your reply , im using the Development component and i selected jdk1.4 for compiling , when im using rebuild option on my DC it doest not show any error but on selecting build , the DC is  not build, like in General User Output im getting error that dc build fail due to errors.

govardan_raj
Contributor
0 Kudos

[javac] ERROR: bad class file: E:\sap_ep_prog\dc\.dtc\0\DCs\*******\portal_dev\kmjar\_comp\gen\default\public\Compilation_kmjar_pp\lib\java\bc.sf.framework_api.jar(com/sapportals/wcm/service/IServiceTypesConst.class)

[javac] ERROR: class file has wrong version 49.0, should be 48.0

[javac] ERROR: Please remove or make sure it appears in the correct subdirectory of the classpath.

[javac] ERROR: import com.sapportals.wcm.service.IServiceTypesConst;

[javac] ERROR: ^

[javac] 1 error

the above same error is resulting again.

Answers (1)

Answers (1)

Former Member
0 Kudos

You added bc.sf.framework_api.jar compiled with JDK 1.5. At the same time you trying to compile your DC with JDK 1.4. You need to find the bc.sf.framework_api.jar compiled with JDK 1.4. Read the following links also:

Update Knowledge Management using WebDynpro Java Application

How to use KM functionality in WebDynpro DC