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.

@SuppressWarnings("unchecked")

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

Apr 25, 2018 in Jenkins by Damon Salvatore
• 5,250 points
89 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,520 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 34 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 84 views
+2 votes
5 answers
+1 vote
5 answers

Unable to login to Jenkins even if I enter valid credentials.

Disable security by editing these two classes ...READ MORE

answered Apr 26 in Jenkins by Vedant
1,306 views
+13 votes
2 answers
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,520 points

edited May 28, 2018 by DareDev 87 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.