cancel
Showing results for 
Search instead for 
Did you mean: 

Java build path errors when Creating an EJB in NWDS

kalyangkm
Explorer

Hi All, I am trying to create an EJB project in NWDS for SAP PO. I am having errors in the Build path under SAP Java EE 5 Libraries. I have already setup the environment variable and updated the .ini file with the correct JDK. Also made sure everything is as per the following OSS. Please suggest what else could be wrong?

https://answers.sap.com/questions/420134/po-75-nwds-java-ee-5-libraries-error.html

https://launchpad.support.sap.com/#/notes/2546316

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member189220
Active Contributor

Hello Kalyan,

As I have mentioned in the other forum thread and in the KBA, SAPJVM8 has to be used for building a project in NWDS 7.5. In the attached screenshot might be seen the NWDS 7.5 does refer to SAPJVM5.

1.

In case the developed EJB will run on SAPJVM5, then it must be used NWDS 7.1 ( and not NWDS 7.5) . Of course, this also means the EJB will be eventually deployed on NW AS Java 7.1 .

2.

Otherwise, you do develop EJB which will be deployed on the NW AS Java 7.5 . Fortunately, this error is observed now. If the build had been successful and this EJB had been deployed on the AS 7.5, it might have caused even more troubles. It is good, this error is seen now, so this EJB could be build with the correct JDK.

3.

Please ensure the build path does refer to the SAPJVM8, which should have been installed on your PC. Please navigate through Java EE perspective >>> Right click on the Project >>> Build Path >>> Configure Build Path...

In case everything is configured correctly on the O.S. and in the eclipse.ini file, it should be seen something like this:

In case it is seen more than one JRE library, that is fine. Yet, it is important to be seen the SAPJVM_8 libraries. They might be added through Add Library... and some of the options:

Regards,

former_member187447
Participant
0 Kudos

Hi Milen,

I don't see the JVM in my build path, I thought just the JVM is enough. Please check my screenshots of the build path and suggest.

2018-03-22-11-03-14.png

2018-03-22-11-15-49.png

former_member187447
Participant
0 Kudos

one more scressnshot2018-03-22-11-16-15.png

former_member189220
Active Contributor

Hello Kalyan,

If you do use indeed NWDS 7.5, you do need SAPJVM_8. NWDS 7.5 supports ONLY Windows 10 and SAPJVM 8.

When you do follow the directions from the SAP KBA, it will be displayed SAPJVM8 libraries, similar to the screenshots what I have posted. (there is it displayed JDK1.8 because I have installed ORACLE JDK 1.8 and might select it as alternative)

Please consider the version of the AS Java where the code will be executed. It must be the same like the version of the NWDS. Please you a relevant version of the NWDS.

Regards,

Szabolcs_Renyo
Advisor
Advisor

Hello kalyangkm,

Milen is right. You can find further infomraiton about the NWDS versions in the following WIKI page:
https://wiki.scn.sap.com/wiki/display/Java/NWDS+Download+Links

NWDS 7.5 running only with 64bit SAP JVM 8 (Oracle JDK is not supported in NW 7.50)

Best regards,
Szabolcs

Matt_Fraser
Active Contributor
0 Kudos

Actually, NWDS 7.5 will run on Win7 just fine -- we've done that here. But 100% on the SAPJVM 8.

former_member187447
Participant
0 Kudos

Hi Milen/Szabolcs,
The NWDS I have currently is the following highlighted in the screenshot. So doesnt the SAP JVM 8 come along with this? If so please let me know where else should I download it from?

2018-03-27-18-17-30.png
former_member189220
Active Contributor
0 Kudos

Hello,

The SAPJVM 8 needs to be downloaded from the Service Market Place (please search for SAPJVM8) and installed.

After that the JAVA_HOME variable and the eclispse.ini file has to be configured accordingly.

Then the SAPJVM8 will be available to be selected for building your projects in the NWDS 7.5

Regards,

former_member189220
Active Contributor
0 Kudos

Hello Matt,

This might be so. I have even seen it working on Windows 8 as well.

Yet, officially the only supported OS is Windows 10 (according to PAM.)

Regards,

Matt_Fraser
Active Contributor

Hi Milen,

I'm not sure about that (with the PAM); right now I see this:

The problem could be that Eclipse 4.6 listed as the IDE platform is out of support, supposedly, but there isn't any other version listed for NWDS 7.5, so I'm not sure what a user is supposed to do in this circumstance. Plus, that applies equally to Win10 as Win7. Interestingly, Win8.x is not listed.

There might be a Note out there which says something different from the PAM; that would not be unusual. I admit I haven't gone looking for such a Note. And in any case, having made the conversion from Win7 to Win10 myself on my business machine, I would recommend this for anyone else, too.

Cheers,
Matt

former_member189220
Active Contributor
0 Kudos

Hello Matt,

what you do post is correct. Yet, when you one opens the summary of the SAP NetWeaver 7.5 they will see the following...


I have discussed this matter with developers and they have confirmed Windows 10 is supported.


About the migration, if it works, then keep Windows 7. However, when one needs help from the Product Support - they need to ensure the problem does occur on NWDS installed on Windows 10.


Regards,

former_member187447
Participant
0 Kudos

Hi Milen,

Sorry for the trouble but I am having trouble finding the location of the JVM in service market place. I even tried the path what Szabolcs suggested but cant find it. I just see the NWDS files. Could you please provide the correct path for the download.

Regards

Kalyan.

former_member189220
Active Contributor

Hello Kalyan,

1.

try this URL.

Otherwise the navigation path on the Sevice Market Place is:

https://support.sap.com/patches -

Support Packages and Patches -

Software Download -

Support Packages and Patches -

SAP Netweaver and complementary products -

SAP NETWEAVER -

SAP NETWEAVER 7.5 -

ENTRY BY COMPONENT -

APPLICATION SERVER JAVA -

SAP JVM 8

Please download the latest available patch for SAPJVM8 .

Please download SAPJVM8 for WINDOWS x64!

2.

Then you have to extract & install it with SAPCAR.EXE This is the procedure:

2.1. Download the required .sar files.

2.2. Download the SAPCAR exe from the SAP market place.

2.3. Then create a new folder(e.g C:/HANA/SAR) and then copy SAPCAR exe file in it along with the other .sar files from default download folder.

2.4. Rename the SAPCAR exe filename(For example: rename it from SAPCAR_721-20010453.EXE to SAPCAR.EXE)

2.5. Go to command prompt,and then go to the folder.location(i,e C:/HANA/SAR - This folder is having SAPCAR exe file in it along with the other .sar files)

2.6. Type sapcar -xvf and then the full file name and press enter. Please see below example:

Example: C:\HANA\SAR>sapcar -xvf SAPJVM8_112_5-10009664.SAR press enter

(Where "SAPJVM8_112_5-10009664.SAR" is the file name)

2.7. It will extract required files from SAR package.

Regards,

former_member187447
Participant
0 Kudos

Hi Milen,

Sorry, for the delay. I followed your instructions and was able to successfully extract the JVM. Now I suppose I need to setup the envirnoment variable and add the path to the .ini file of eclipse. But before I do that I just wanted to make sure something. if I do this, JDK wont be the default anymore and I wanted to make sure this wont create errors for the existing or new Java maps or BPMs.

Regards

Kalyan.

former_member189220
Active Contributor
0 Kudos

... you might install a separate eclipse, which will use ORACLE JDK. In this way you will separate the development for Java which is not related to SAP products from this development which will create code for SAP NW AS Java.

Regards,

former_member189220
Active Contributor
0 Kudos

... you might install a separate eclipse, which will use ORACLE JDK. In this way you will separate the development for Java which is not related to SAP products from this development which will create code for SAP NW AS Java.

Regards,

former_member187447
Participant
0 Kudos

I have installed another version of Eclipse which is neon 4.6.3. And The problem now is the environment variable. currently it is pointed to JDK. Unless I change that to point to JVM the default is always going to be JDK for any eclipse I install.

Regards

Kalyan.

former_member189220
Active Contributor

... yes, this is it. The path to the SAPJVM 8 has to be explicitly configured.

https://launchpad.support.sap.com/#/notes/2546316

Regards,

kalyangkm
Explorer
0 Kudos

It worked, I don't see the error now. I had to just add the path of the extracted JVM in the installed JREs and also point the path in the .ini file.

former_member189220
Active Contributor
0 Kudos

I am glad to understand you have managed to resolve the problem.

If the initial question, in this forum thread, is answered from your perspective, then please click on the “Accept” link to complete this question. Otherwise, please post more details on the present impediment you do face.

Regards,

former_member187447
Participant
0 Kudos

Hi Milen,

I tried to do that, but I dont see the accept button/link.

Regards

Kalyan.

Szabolcs_Renyo
Advisor
Advisor
0 Kudos

Hi Kalyan,

Please make sure you searching for the button "accept" below the answer and not below the comment. Please note that a comment can not be accepted only answers. Take a look at the following Blog post:
https://blogs.sap.com/2017/08/15/what-to-do-with-my-answered-questions/

Best regards,
Szabolcs

Szabolcs_Renyo
Advisor
Advisor

Hi Kalyan,

What is the exact NWDS version what you are using?

I think it would be useful if you could attach some screenshots about the error what you get.


Best regards,
Szabolcs

former_member187447
Participant
0 Kudos

Hi Szabolcs,

Version: Neon.3 Release (4.6.3) Build id: 20170314-1500

I am seeing the above mentioned error in the build path and so the overall EJB project is in error. I haven't coded anything yet? Just wanted to make sure there are no errors in the build path before I start.

Regards

Kalyan.