aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse Error" Watch "Eclipse Error" New topic
Author

Eclipse Error

Rachel Kozlowski
Ranch Hand

Joined: Jan 14, 2009
Posts: 40
I got the following error:

java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getErrors()[Lorg/eclipse/jdt/core/compiler/IProblem;

My jar file is in the following location:
C:\SOFTWARE\Tomcat5.5\common\lib\jasper-compiler-jdt.jar

Any thoughts on how to fix this?

I am starting to really dislike Eclipse.
Tiho Beretous
Greenhorn

Joined: May 28, 2003
Posts: 8
This means your compiler cannot locate the method you are calling in your code. The next line of your error should say what line in your code called the missing method. That should tell you what resource you need to add to your build path. I am assuming the missing file is the one you have mentioned (jasper-compiler-jdt.jar).
Check that the jar is included in your build-path for your project. Also, if there are two included jars on your build path that have the same class; then the compiler might be picking the 'wrong' one.
Most commonly, maybe you have an older version and a newer version of the class in your path and eclipse is picking the first one it finds. In this case, remove the old one from the build path.
Rachel Kozlowski
Ranch Hand

Joined: Jan 14, 2009
Posts: 40
Hi,

The next line of the error states:

java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getErrors()[Lorg/eclipse/jdt/core/compiler/IProblem;
net.sf.jasperreports.engine.design.JRJdtCompiler$2.acceptResult(JRJdtCompiler.java:418)

What jars would I find this JRJdtCompiler class in? Is there an easy way to find this?
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
which version of jasper reports you are using?


Mourougan
Open Source leads to Open Mind
Rachel Kozlowski
Ranch Hand

Joined: Jan 14, 2009
Posts: 40
3.5.0
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Is there any specific reason to use jasper-compiler-jdt.jar, which is tomcat supplied?

You can try using jdt-compiler-3.1.1.jar which comes with jasper reports 3.5
Tiho Beretous
Greenhorn

Joined: May 28, 2003
Posts: 8
If you do a project search (Ctrl+Shift+T) for the class JRJdtCompiler, I'm guessing more than one result will be found. That'll be a way to identify the conflicting jars.
Rachel Kozlowski
Ranch Hand

Joined: Jan 14, 2009
Posts: 40
Ok, I did a project search and found only one jar that has this class. It is jasperreports-2.0.1.jar.

However, I did a computer search for this same class and found jasperreports-1.3.3.jar in a few spots and also did a check of my classpath under environment variables.

The classpath at the user level is: %CLASSPATH%;C:\mobileclient\bin\olite40.jar;C:\mobileclient\bin\webtogo.jar

The classpath at the system level is: C:\ProgramFiles\Java\jre1.5.0_10;C:\Olite10g_2\MOBILE\Sdk\bin\OLITE40.JAR;C:\PROJECTS\DCSDIT\lib;C:\Projects\ReportingSuite\WEB-INF\log4j.properties;

I checked the location of C:\PROJECTS\DCSDIT\lib and did not find any jasper report jars. I also checked C:\ProgramFiles\Java\jre1.5.0_10 and did not find any jasper report jars.

Any thoughts?
Tiho Beretous
Greenhorn

Joined: May 28, 2003
Posts: 8
Ok - I am not familiar with Jasper Reports, so I can only provide more general help.
So I take it jasperreports-2.0.1.jar is on your project build path. By that, I mean the one in Project Menu -> Properties -> Java Build Path. You could check within the jar to see if the method (JRJdtCompiler$2.acceptResult()) is there? If it is, you could then try to ctrl+click through to that method from your stack trace. If it gets to the same place, see if you can add a debug break-point; and follow that in to see if it gets to the class that you anticipate it should be using (the version of JRJdtCompiler with the acceptResult method).
It sounds to me like two of your jars are not compatible with each other. This may be an issue that is specific to jasperreports (http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=32400).
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Mourouganandame Arunachalam wrote:Is there any specific reason to use jasper-compiler-jdt.jar, which is tomcat supplied?

You can try using jdt-compiler-3.1.1.jar which comes with jasper reports 3.5



Did you try the above suggestion?
Rachel Kozlowski
Ranch Hand

Joined: Jan 14, 2009
Posts: 40
Your suggestion about using a more recent compiler worked, but I needed more.

I used:

jasper-compiler-jdt-5.5.12.jar AND jasper-compiler-5.5.15.jar with jasperreports-3.5.0.jar AND jasperreports-3.5.0-javaflow.jar.



Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Rachel Kozlowski wrote:Your suggestion about using a more recent compiler worked, but I needed more.

I used:

jasper-compiler-jdt-5.5.12.jar AND jasper-compiler-5.5.15.jar with jasperreports-3.5.0.jar AND jasperreports-3.5.0-javaflow.jar.



you don't require jasper-compiler-jdt.5.5.12.jar since you have the latest version jasper-compiler.5.5.15.jar. (this is tomcat supplied)

If your problem still persists, you can download the jasperreports source from http://sourceforge.net/project/showfiles.php?group_id=36382&package_id=28579 (jasperreports-3.5.0-project.zip). Unzip it. inside the unzipped folders look for "jdt-compiler-3.1.1.jar " file under "jasperreports-3.5.0\lib" folder. You can use this jar (jdt-compiler-3.1.1.jar) instead of jasper-compiler.5.5.15.jar.

Rachel Kozlowski
Ranch Hand

Joined: Jan 14, 2009
Posts: 40
The original error is now gone. I now have a new problem:


1. The type Greatest32Number32of32Patients32with32Hemoglobin3262321346032g47dL_1239285317389_296377 must implement the inherited abstract method JREvaluator.customizedInit(Map, Map, Map)
public class Greatest32Number32of32Patients32with32Hemoglobin3262321346032g47dL_1239285317389_296377 extends JREvaluator
<------------------------------------------------------------------------------------->
2. The method get(String) is undefined for the type Map
parameter_REPORT_RESOURCE_BUNDLE = (JRFillParameter)pm.get("REPORT_RESOURCE_BUNDLE");
<->
3. The method get(String) is undefined for the type Map
parameter_JASPER_REPORT = (JRFillParameter)pm.get("JASPER_REPORT");
<->
4. The method get(String) is undefined for the type Map
parameter_REPORT_CLASS_LOADER = (JRFillParameter)pm.get("REPORT_CLASS_LOADER");
<->
5. The method get(String) is undefined for the type Map
parameter_REPORT_FORMAT_FACTORY = (JRFillParameter)pm.get("REPORT_FORMAT_FACTORY");
<->
6. The method get(String) is undefined for the type Map
parameter_REPORT_TIME_ZONE = (JRFillParameter)pm.get("REPORT_TIME_ZONE");
<->
7. The method get(String) is undefined for the type Map
parameter_REPORT_DATA_SOURCE = (JRFillParameter)pm.get("REPORT_DATA_SOURCE");
<->
8. The method get(String) is undefined for the type Map
parameter_REPORT_LOCALE = (JRFillParameter)pm.get("REPORT_LOCALE");
<->
9. The method get(String) is undefined for the type Map
parameter_REPORT_FILE_RESOLVER = (JRFillParameter)pm.get("REPORT_FILE_RESOLVER");
<->
10. The method get(String) is undefined for the type Map
parameter_REPORT_URL_HANDLER_FACTORY = (JRFillParameter)pm.get("REPORT_URL_HANDLER_FACTORY");
<->
11. The method get(String) is undefined for the type Map
parameter_REPORT_PARAMETERS_MAP = (JRFillParameter)pm.get("REPORT_PARAMETERS_MAP");
<->
12. The method get(String) is undefined for the type Map
parameter_REPORT_CONNECTION = (JRFillParameter)pm.get("REPORT_CONNECTION");
<->
13. The method get(String) is undefined for the type Map
parameter_IS_IGNORE_PAGINATION = (JRFillParameter)pm.get("IS_IGNORE_PAGINATION");
<->
14. The method get(String) is undefined for the type Map
parameter_REPORT_TEMPLATES = (JRFillParameter)pm.get("REPORT_TEMPLATES");
<->
15. The method get(String) is undefined for the type Map
parameter_REPORT_VIRTUALIZER = (JRFillParameter)pm.get("REPORT_VIRTUALIZER");
<->
16. The method get(String) is undefined for the type Map
parameter_REPORT_SCRIPTLET = (JRFillParameter)pm.get("REPORT_SCRIPTLET");
<->
17. The method get(String) is undefined for the type Map
parameter_REPORT_MAX_COUNT = (JRFillParameter)pm.get("REPORT_MAX_COUNT");
<->
18. The method get(String) is undefined for the type Map
variable_PAGE_NUMBER = (JRFillVariable)vm.get("PAGE_NUMBER");
<->
19. The method get(String) is undefined for the type Map
variable_COLUMN_NUMBER = (JRFillVariable)vm.get("COLUMN_NUMBER");
<->
20. The method get(String) is undefined for the type Map
variable_REPORT_COUNT = (JRFillVariable)vm.get("REPORT_COUNT");
<->
21. The method get(String) is undefined for the type Map
variable_PAGE_COUNT = (JRFillVariable)vm.get("PAGE_COUNT");
<->
22. The method get(String) is undefined for the type Map
variable_COLUMN_COUNT = (JRFillVariable)vm.get("COLUMN_COUNT");
<->
23. The method get(String) is undefined for the type Map
variable_singleGridTitle_COUNT = (JRFillVariable)vm.get("singleGridTitle_COUNT");
<->
24. The method get(String) is undefined for the type Map
variable_oneTable_COUNT = (JRFillVariable)vm.get("oneTable_COUNT");
<->
24 errors

at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:195)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:219)
at com.amgen.reportingsuite.util.reports.ReportingManager.compileNFillReportData(ReportingManager.java:1292)
at com.amgen.reportingsuite.service.impl.DashboardServiceImpl.loadBreakoutById(DashboardServiceImpl.java:938)
at com.amgen.reportingsuite.web.DashboardController.viewBreakout(DashboardController.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Rachel Kozlowski
Ranch Hand

Joined: Jan 14, 2009
Posts: 40
Solution-Reinstall Tomcat and then go into Catalina\localhost and make sure docBase is correct. Also go into Eclipse and make sure that Tomcat settings are correct.

My problem was caused by copying all of my coworker's jars into my Tomcat common\lib and overwriting the jars that were already there.
 
 
subject: Eclipse Error