unable to compile java code in Jenkins

0 votes

I am getting the following error in jenkins on compiling a java project that I build:

[javac] C:\Users\Administrator\.jenkins\workspace\AMRM\AMRM-rad-workspace\AMRM\src\com\bidv\amrm\struts2\jdbc\DeclareAppImpl.java:232: error: incompatible types
    [javac]                   return DB.getConnection().queryForObject(sql, new Object[]{id}, new DTOMapper());
    [javac]                                                           ^
    [javac]   required: ListAppDTO
    [javac]   found:    Object

I found a solution to fix is adding the line: @SuppressWarnings("unchecked") before relate function in java code

I got a temporary fix by adding the below line before relate funcion in java.


But I'd like some permanent solution if there is one

Apr 25, 2018 in Jenkins by Damon Salvatore
• 5,510 points

1 answer to this question.

0 votes
If the code is compiling and running in eclipse then maybe your jenkins is using a different version of java. Check your build statement if the java version is correct.
answered Apr 25, 2018 by DareDev
• 6,810 points

Related Questions In Jenkins

0 votes
1 answer

Unable to open Jenkins in master vm

There seems to be an issue with ...READ MORE

answered Dec 18, 2018 in Jenkins by Charlie

edited Dec 20, 2018 57 views
0 votes
0 answers

how to get jenkins "EnvInject Plugin" property content value via Java code.

How to get "properties content" key and ...READ MORE

Mar 6 in Jenkins by anonymous

edited Mar 6 461 views
0 votes
1 answer
0 votes
2 answers

How to auto build a job in jenkins if there is any change in code on Github repository?

To automatically run build on code commit, follow ...READ MORE

answered Jul 31 in Jenkins by Sirajul
• 41,000 points
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

Unable to integrate jenkins with tfs: EndpointNotFoundException

Check if you can connect to tfs ...READ MORE

answered May 28, 2018 in Jenkins by DareDev
• 6,810 points

edited May 28, 2018 by DareDev 208 views