Strange Error, I think it's related to eclipse - java

I am getting the following compiler error on the package:
package com.core.cronjob.mapping;
The Error :
Internal compiler error: java.lang.IllegalArgumentException: info
cannot be null at
org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:81)
I don't think it's the code.
I'm using Ant 1.9.4 to build the project and Eclipse Mars.1 Release .
(4.5.1)
The compiler version is : javac 1.7.0_79
Was anyone encountered this error before?
Thanks

As stated in the comment, it's indeed an Eclipse bug, recurrent since Eclipse 3.X.
The last time I encountered this one it was fix with an Eclipse upgrade but since you're already up to date; you may try to downgrade to Luna (4.4) ? or wait for Eclipse to fix this one in a new RC..
As far as I know there is no workaround (Uninstall/Reinstall might also do some good..)

I know this is a older post, however, I did experience this using IntelliJ SpringBoot project on a Junit/Mockito test class.
With the help from smarter and more experienced Java guru's, they helped me resolve the issue.
We had to comment out all the code in the class and un-comment out sections until we found the statement causing the error.
It was this setId(configId++), we tried ++configId with no success. We then realized the class member variable is a 'Long' and the local variable is a 'long'.
Change the local to 'Long' and it compiled.
1. ERROR in C:\JenkinsJAAS\workspace\ohsu\woa-ohsu-parent\master\di-config-ohsu\di-config-service-impl-ohsu\src\test\java\com.ge.ps.diconfig.data.impl\ConfigDataServiceImplTest.java (at line 0)
/*
^
Internal compiler error: java.lang.IllegalArgumentException: info cannot be null at org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:81)
----------
info cannot be null

Related

Error on Intellij Idea when trying to run a kotlin project

Im getting this error. What I was doing was the code I want to run didnt run rather it showed up the Edit Configurations
The error: Failed to download Amazon Corretto 18.0.2. EventQueue.isDispatchThread()=false Current thread: Thread[ApplicationImpl pooled thread 110,4,main] 2031890033 SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1808191328
This was what I was trying to fix: Image Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.Array'. Check your module classpath for missing or conflicting dependencies
And it says that the JDK "corretto-18" is not found on the disk or corrupted.
Im using: IntelliJ up to date, Java 18
Does anyone has a solution for this issue??
Thanks-

Eclipse build issue

I am trying to build a project into Eclipse and I'm getting this error message on compiling Scala file and this is error I'm getting:
'The method size() is ambiguous for the type SortedSet'
There are this dependencies inside pom.xml file:
<org.scala-lang>2.13.0</org.scala-lang>
<com.typesafe.akka>2.6.18</com.typesafe.akka>
<com.lightbend.akka>1.0.7</com.lightbend.akka>
Project is using Java OpenJdk 1_8_u333.
Does anyone know how to resolve it?
I've been looking and found there was bug in Eclipse with ambiguous method calls which seems still present:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=468276
I've tried to avoid it by adding this parameter to eclipse.ini file, but it doesn't work:
-DtolerateIllegalAmbiguousVarargsInvocation=true
Error doesn't occur when I change compiler to Java 7, but I can't avoid this error ... the second way to avoid it is to call exact method name iterator().size()
Note: I tried same code in IntelliJ with same JDK and there was any errors ... any suggestion would be very helpful.
Thanks in advance!

Which java class issues warning on catalina.out

I' am currently debugging why a legacy Maven web application compiled in Java 1.8 that we deploy on a Tomcat 8.5 is sending all the time following message:
Warning: Could not get charToByteConverterClass!
Curiously enough, when launching it on my local Tomcat instance, I see the warning in the console, but not in the catalina.out file.
My guess so far is that this is caused by some dependency, as we have no such warning inside our code.
The problem is that we have very old dependencies and also lot of them, so before getting into trying to upgrade them I would like to know if there is any way to:
see the printing "call stack".
or at least see which class is printing that.
Things I have tried so far:
Setting application log level to info.
Setting Tomcat's logging level to All.
You need to upgrade xalan due to a fixed issue since 2.7 release:
issue is now resolved as being fixed in the Xalan-J 2.7 release. As the issue reporter please confirm the code no longer has this problem so that we can close this issue down.
Actually the code that had the problem is totally gone, haha! Through XALANJ-2087 the dependancy on CharToByteConverter was removed plus a number of bugs were fixed due to an incorrect algorithm.
If anyone encounters this problem. xalan 2.7 did not eliminate the message. Adding the following stub class to your build will silence the error message:
package sun.io;
public class CharToByteConverter {
public static CharToByteConverter getConverter(String encoding) {
return new CharToByteConverter();
}
}

I am new to camel framework , I tried a program to copy a file from one directory to another but while running the program I got the following error

Error:(3, 24) java: /C:/Users/AMIT/IdeaProjects/learncamel/src/main/java/com/learnCamel/copyfile.java:3: cannot access org.apache.camel.CamelContext
bad class file: jar:///C:/Users/AMIT/.m2/repository/org/apache/camel/camel-api/3.1.0/camel-api-3.1.0.jar!/org/apache/camel/CamelContext.class from ZipFileObject
class file has wrong version 52.0, should be 50.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
I am new to Camel and java so I am not sure how to correct it. If anyone can help I would be thankful.
So, I resolved this issue. The problem was that my runtime java was version 1.6 and the compiler was using version 1.8 for compiling so that's why it was showing error.

I'm having a trouble with starting Eclipse : Error : ... cannot be solved to a type

I really don't know what the problem is.
I followed several web postings about installing and settings of JDK/ JRE and also completed clearly on environment variables :Path & CLASS PATH
I'm sure about that since i checked the cmd and it worked well.
the same problem occured over and over again.
I corrected on Library tab
I add the Library list like this,
But, I still have the same problem. Did I make a severe mistake? what should I do about this problem?
still have JAVA problems
Please check the Java source directory configuration under Java Build Path, Source tab and Java Compiler version settings.
Did you recently update your Java version? If so, then you have to readjust your path so that it directs to the new updated version.

Categories