Eclipsec: Java was started but returned exit code = 1 after build finished

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Eclipsec: Java was started but returned exit code = 1 after build finished

5,401 Views
Toma_Hai
NXP Employee
NXP Employee

Hello,

I using S32 Design Studio for Vision 2018.R1.  build my project using the command line and my project has an error. 

After the build is finished, only the error message is displayed as below, but the ERRORLEVEL variable is not changed

Does this issue come from eclipse not supporting or is the version of JDK incorrect?

 

Thanks

 

Error message:

17:11:19 Build Finished (took 22s.304ms)
 
Eclipsec:
Java was started but returned exit code=1
-Djava.class.path=C:/NXP/S32DS_ARM_v2018.R1/eclipse\plugins\org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
-os win32
-ws win32
-arch x86
-launcher C:/NXP/S32DS_ARM_v2018.R1/eclipse\eclipsec.exe
-name Eclipsec
--launcher.library C:/NXP/S32DS_ARM_v2018.R1/eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.1.401.v20161122-1740\eclipse_1617.dll
-startup C:/NXP/S32DS_ARM_v2018.R1/eclipse\plugins\org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.overrideVmargs
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-data C:\Users\haimt2\AppData\Local\Temp\eclipse-workspace-for-headless-cdt-builds-multi\aNfcReaderLibS32KBuildSystemTest_27432
0 Kudos
15 Replies

4,706 Views
redlin6688
Contributor I

hello, after some day testing, I found that when the compling has some errors, it will pop up this windows ( java exit code =1 ) after the compiling via command line.

scenario 1:

       1). open S32 Design studio and switch to a new workspace as E:\00_SoftWare_Program\NXP\nxp_s32_workspace

       2). import a project in local disk dirve, as in E:\000_ProjectShare\honglin.liang\loop2test\

           PS:  the project folder is extracted from a zip file, which is sent by my colleague

       3). clean the project via right click menu

       4). build the project

       5). no errors appear in "Problem View“ 

                  redlin6688_3-1649321565380.png

       6). exit the S32 Design Studio

      7). open cmd window,  and goes into the path where the project locates, E:\000_ProjectShare\honglin.liang\loop2test\    

      8). build with command line:  <s32ds install path>\eclipse\s32ds.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data E:\00_SoftWare_Program\NXP\nxp_s32_workspace -cleanBuild <project name>/Debug

     9). wait until the building finished, no "Java was started but returned exit code = 1" dialog pops up.

    10). as a comparion, I also used eclipsec.exe to build the project, the result is same as using s32ds.exe

 

scenario 2:

      1). base on scenario 1, switch to a new s32 design studio workspace, as  E:\00_SoftWare_Program\NXP\s32ds_workspace

      2). copy the same project folder to a new place, as in E:\jenkins_workspace\loop2test

      3). import the project into S32 design studio

      4). clean the project via right click menu

      5). build the project

      6). after the building finished, we can see that there are some errors in the Problem view of S32 Design Studio, and these errors has no relation with the project, and I can not find these files that errors indicating in the system local drives.

                      

redlin6688_5-1649322362040.png

 

      7). Exit S32 design Studio

      8). open cmd window,  and goes into the path where the project locates, E:\jenkins_workspace\loop2test   

      9). build with command line:  <s32ds install path>\eclipse\s32ds.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data E:\00_SoftWare_Program\NXP\s32ds_workspace -cleanBuild <project name>/Debug

     10). wait until the building finished, and the "Java was started but returned exit code = 1" dialog will pop up

                               

redlin6688_6-1649322865132.png

 

 

     11) . as a comparion, I also used eclipsec.exe to build the project, the result is same as using s32ds.exe

 

          

    so I try to repeat scenario 2 with a s32 design studio and another new project location, the result is approximately the same, the difference is that the error number

                    

 

and I try to go a further investigation, then I do below experiments:

          a).   Use scenario 1's S32 Design Studio workspace and scenario 2's project location to build

                         1). delete the .metadata under the s32 design studio root path

                         2). open S32 design studio and import the project

                         3). do the steps to build as described in scenario.

                         4).  some erros appear in  the Problem view of S32 Design Studio

                         5) and ""Java was started but returned exit code = 1" dialog" pops up when build using command line.

 

          b).   Use scenario 2's S32 Design Studio workspace and scenario 1's project location to build

                         1). delete the .metadata under the s32 design studio root path

                         2). open S32 design studio and import the project

                         3). do the steps to build as described in scenario.

                         4).  no errors a in the Problem view of S32 Design Studio

                         5) and no ""Java was started but returned exit code = 1" dialog" pops up when build using command line.

 

so base on these experiments, does it means that the error has something to do with the project folder location, and none business about the S32 design studio worksapce ?

 

0 Kudos

4,704 Views
redlin6688
Contributor I

for scenario 2,  I did more tests.

1). delete the Debug folder under the project

2). build the project

3). no errors appear

4). clean the project

5). build again

6). errors appear

 

0 Kudos

5,080 Views
mikedoidge
NXP Employee
NXP Employee

Hello,

I would suggest that you try to perform command line actions without Jenkins first

We recommend that you use the S32DS.exe instead of the eclipsec.exe. The S32DS.exe will incorporate all of the commands from S32DS.ini, which are needed to successfully work with S32DS from the command line.

Best Regards,

Mike

0 Kudos

5,077 Views
redlin6688
Contributor I

I had already performed the command line actions without Jenkins on the building server, the result is the same.

actually I did use S32DS.exe to build the project, just replace with  the eclipsec.exe for test.

For some reason, I can't attach the log here. but the S32DS workspace log file under .metadata always has a message like:

redlin6688_0-1647396049579.png

 

0 Kudos

5,060 Views
mikedoidge
NXP Employee
NXP Employee

You can attach files by the following:

Click on the '...' button (Expand toolbar)

image.png

Then, below the message field, you will see the method to attach a file:

image.png

It would be helpful to see the full log showing both the command you are entering as well as the response. There will likely be clues to what is going wrong.

0 Kudos

5,056 Views
redlin6688
Contributor I

sorry, my env is in a internal network,  and the log files can not be export out.

if you need i can attach it via screenshots.

btw, is any other log files need  be investigated ?

0 Kudos

5,018 Views
mikedoidge
NXP Employee
NXP Employee

We need to see some error message or something which identifies that some error has occurred. Also, it would help to see how you have assembled the command to invoke the executable. Perhaps there is some error in how you are implementing it.

Another possibility is that some version of Java which is different than the one supplied with S32 Design Studio is being used.

0 Kudos

4,940 Views
redlin6688
Contributor I

I have set up a new env and install S32 Design Studio, and test many times for comparsion.

And the result is totally different with the previous env.

No such error appears, so I am wondering if some other thing interfered the building process from command line calling?

 

0 Kudos

4,933 Views
mikedoidge
NXP Employee
NXP Employee

Hi Honglin,

Thanks for the update. It's possible something went wrong during the install. Maybe some file got corrupted. Good to know the issue is solved for you now.

Best Regards,

Mike

0 Kudos

4,909 Views
redlin6688
Contributor I

I am still trying to figure out why.

 

I reinstall S32 Design Studio again on the server that have errors.

but the result is the same. the jvm error still pops up.

 

And I found a wierd case:

for a totally idea project, when compiled on the new nev, there is no building error( means error displays in s32 design studio window's Problem view),  but  on the old env, there is some errors displays which indicates some .h not found, but indeed these .h files exists.

the only good thing is that it seems that it has no interference the output of the compling.

 

0 Kudos

4,899 Views
mikedoidge
NXP Employee
NXP Employee

Hello Honglin,

Based on what you have told me, here are my thoughts on the issue:

The issue is experienced on network location but not on new environment (is this a PC?). The issue on the network location occurs only when accessing from command line, the same operation from within the S32 Design Studio GUI environment works well. The S32 Design Studio GUI controls the environment so the correct versions of Java, Python, etc. are used. When running the S32 Design Studio functions from command line, the S32 Design Studio is not in control of the environment and it is the responsibility of the user to ensure the environment is setup to use the correct versions. For some reason, the new environment does not have this issue, which means the correct versions are used, perhaps because the S32 Design Studio installation setup is not being overruled by some other settings.

Hope that helps,

Mike

0 Kudos

4,849 Views
redlin6688
Contributor I

the old env have this issue is a server(Dell R 740), indeed it has a lot of applications installed on it.

the new env is a personal PC.

 

We also thought the the cause is something overruled 32 Design Studio's configuration, but still not find it.

 

 

0 Kudos

4,995 Views
redlin6688
Contributor I

Sorry, I  can not tranfer the log file out of the internal env. ( I double confirmed this morning).

 I'll think about it again and try other ways.

0 Kudos

5,395 Views
mikedoidge
NXP Employee
NXP Employee

Hello @Toma_Hai,

You indicate your intention to use S32 Design Studio for Vision 2018.R1, but the log you shared contains S32 Design Studio for ARM v2018.R1. Could this be your issue?

Assuming you intended to use S32DS for ARM v2018.R1, would you mind to share the project? (just create a ZIP or similar archive of the folder at workspace level)

Is there a reason to use such old version of the tools? We have newer versions available.

Best Regards,

Mike

0 Kudos

5,093 Views
redlin6688
Contributor I

Hi, I has encounter this issue recently, and have no idea about solving it.

I try to use S32DS for ARM v2018.R1 to buid a project.

Start from the client UI, it is OK

but once I start it from the command line interface( call a bat from jenkins), when the build process finished, it will definitely pop up a dialog window to say that Java was started but returned exit code=1(see attached picture).

 

I google this issue and has many possilbe solutions as 

           1. increase or decrease -Xmx

           2. add an argument in s32ds.ini

                 -vm  <path to 32 bit jre>\bin\client\jvm.dll

                 or -vm  <path to 32 bit jre>\bin\javaw.exe

           3. remove the IDE workspace, may

                            --- remove .metadata folder

                            --- remove .snap files under .metadata folder

 

but none of above works for me.

 

I am confused about this.

redlin6688_0-1647310420930.png

 

0 Kudos