cancel
Showing results for 
Search instead for 
Did you mean: 

Build Error in SAP NWDS 7.5 with SAP ME 15.1 & Java 8

Former Member
0 Kudos

Hi All,

Need one urgent help. I am currently trying to develop a custom POD is SAP ME SDK. The NWDI track has been set up with SAP ME 15.1 will all SCA files pointing to the most recent version. I am using JDK 1.8 as the build tool and using SAP NWDS 7.5. I have created a java DC in NWDS and created a java class which is giving build error. I am using the JDK as jdk1.8.0_73. The code is given as follows.

package com.VendorID.common.utils;

import com.sap.me.frame.SystemBase;

import com.sap.tc.logging.Category;

import com.sap.tc.logging.Location;

public class DBUtil {

   

    private static final Location loc = Location.getLocation("com.VendorID.common.utils.DBUtil");

    // Database-state data

    private SystemBase        sysBase;

   

    // Trace-state data

    private String            callerProcName;

   

    public DBUtil(String callerProcName) {

        sysBase = SystemBase.createSystemBase(Constants.DATASOURCE_WIP);

        this.callerProcName = callerProcName;

    }

}


When I am trying to build the project I am getting the error given as follows.


[javac] Compiling 2 source files to C:\ANBAN.jdi\0\t\2F1A10C237344FBD0A7166DF27CD7228\classes

[javac] WARNING: warning: [options] bootstrap class path not set in conjunction with -source 1.6

[javac] ERROR: C:\ANBAN.jdi\0\DCs\VendorID.com\util\srvutil\_comp\src\com\VendorID\common\utils\DBUtil.java:24: error: cannot access Initializable

[javac] ERROR:         sysBase = SystemBase.createSystemBase(Constants.DATASOURCE_WIP);

[javac] ERROR:                             ^

[javac] ERROR:   class file for com.visiprise.frame.service.Initializable not found

[javac] 1 error


I tried to execute this code in my colleague`s workspace which is running on a Java version jdk1.8.0_71 and there the error is on a different line. The error message from my colleague`s workspace is as follows.


[javac] Compiling 1 source file to C:\NWDS75_Workspace.jdi\0\t\2F1A10C237344FBD0A7166DF27CD7228\classes

[javac] Reading options and classpath from file C:\NWDS75_Workspace.jdi\0\t2\2F1A10C237344FBD0A7166DF27CD7228\default\logs\options5074021518816902759.tmp

[javac] Reading list of classes to be compiled from file C:\NWDS75_Workspace.jdi\0\t2\2F1A10C237344FBD0A7166DF27CD7228\default\logs\classes609277815776331262.tmp

[javac] ERROR: C:\NWDS75_Workspace.jdi\0\DCs\VendorID.com\util\srvutil\_comp\src\com\VendorID\common\utils\Constants.java:3: cannot access com.sap.tc.logging.Category

[javac] ERROR: bad class file: com\sap\tc\logging\Category.class(com\sap\tc\logging:Category.class)

[javac] ERROR: class file has wrong version 52.0, should be 50.0

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

[javac] ERROR: import com.sap.tc.logging.Category;

[javac] ERROR:


The project dependency is given as follows

I have the project SAP ME Resources created in the workspace with the service-config.dtd file added to it. This code was working fine in another workspace (NWDS 7.3 running on jdk 1.6) with the NWDI track created for SAP ME 15.0.

Any help will be highly appreciated

Thanks

Anirban

Accepted Solutions (1)

Accepted Solutions (1)

former_member185234
Active Participant
0 Kudos

Hi Anirban,

I also installed NWDS 7.5 for ME 15.1 on NW 7.5 and can use SystemBase class without errors.

JDK configuration in NWDS at screen shot below

Please make sure that you imported SAPMELEGACY 15.1, ENGFACADE 7.5, ENGINEAPI 7.5, FRAMEWORK 7,5 SAP_BUILDT 7.5 , WSRM 7.5 to NWDI track.

What Netweaver version was installed for NWDI server? 7.4 or 7.5?

Regards,

Oksana

Former Member
0 Kudos

Hi,

I have checked in NWDI as per you mentioned and this is the screen shot given below.

I am not being able to identify the correct version from here. Is there any way to get the exact version please do let me know.

Also my NWDS is pointing to Java 1.8

Former Member
0 Kudos

Hi Oksana.

I can now build the project successfully with Java 1.7. I installed the jdk1.7.0_79 and pointed the same as build JRE in NWDS. Now I am able to build the project successfully.

Thanks

Anirban

former_member185234
Active Participant
0 Kudos

Hi Anirban,

Thanks for information!

Probably you also could try to install JDK 1.8 version 74, as I noticed you have JDK version 73, probably the reason for compilation errors in this JDK version.

Thanks,

Oksana

former_member185234
Active Participant
0 Kudos

I also attached eclipse.ini file.

I specified -vm and -vmargs

Regards,

Oksana

former_member329581
Participant
0 Kudos

I'm facing the same issue like the Anirban. I've tested it 1.8.0.66 and 1.8.0.74 both version giving me the same issue =( But JDK 1.7.0.51 is working!

Why we need Java 7 for building?! The issue is even bigger than the Build in NWDS, you need also Java 7 for building in NWDI !

former_member185234
Active Participant
0 Kudos

Hi Kay,

I have local NW 7.4 + NWDS 7.5 + ME 15.1.

Central NWDI installed on NW 7.5 and track was created there.

I can implement customization and deploy them to local NW 7.4 with such settings in NWDS 7.5.

CBS service configured to use Java 1.8 to build customization as our test server is NW 7.5.

NWDS 7.5 settings to deploy to local NW 7.4:

former_member185234
Active Participant
0 Kudos

Hi Kay and Anirban,

I had 'Initializable not found error' when tried to use Domain Services in custom code with Java 1.8.

Work-around is to create external library DC and add service-core.api-internal-1.7.0.jar to this DC as COMPILATION PP and add this DC as dependency to needed DC where you use SystemBase or Domain Services.
You can find this jar in NW cluster folder.


Please let me know if you need more detailed steps how to do it.

Regards,

Oksana

former_member329581
Participant
0 Kudos

Hi Oksana,

I've tested your solution. Yes now I can get a Java8-Build in NWDS and NWDI successfully running. I think as quick workaround its suitable for me. But I've openend a ticket with a link to this thread, to get I solved in not workaround-way.

Thanks so much for the idea with the extlib!!!

former_member185234
Active Participant
0 Kudos

Hi Kay,

Could you please give me ticket number, I will take it to my queue.

Thanks,

Oksana

former_member329581
Participant
0 Kudos

Thanks ... Its ticket 227222/2016

Answers (0)