Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse 4.12 build.compiler NoClassDefFoundError( java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/impl/CompilerOptions)
Eclipse 4.12 build.compiler NoClassDefFoundError [message #1808374] Sat, 22 June 2019 15:32 Go to next message
lea ilagan is currently offline lea ilaganFriend
Messages: 59
Registered: October 2012
Member
Hello,

Our build script is running for a long time with no issues for Luna, (tested also in photon and 201812 eclipse.) However when we upgraded to eclipse 4.12 (201906), we encountered this error. Any idea, please advise. Thanks!

 java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/impl/CompilerOptions
        at org.eclipse.jdt.core.JDTCompilerAdapter.setupJavacCommand(JDTCompilerAdapter.java:101)
        at org.eclipse.jdt.core.JDTCompilerAdapter.execute(JDTCompilerAdapter.java:77)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1404)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1133)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:37)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at java.util.Vector.forEach(Vector.java:1275)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391)
        at net.sf.antcontrib.logic.ForTask.doSequentialIteration(ForTask.java:259)
        at net.sf.antcontrib.logic.ForTask.doToken(ForTask.java:268)
        at net.sf.antcontrib.logic.ForTask.doTheTasks(ForTask.java:299)
        at net.sf.antcontrib.logic.ForTask.execute(ForTask.java:244)

[Updated on: Sat, 22 June 2019 15:33]

Report message to a moderator

Re: Eclipse 4.12 build.compiler NoClassDefFoundError [message #1808379 is a reply to message #1808374] Sat, 22 June 2019 23:36 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Which version of Java is running this? Can you post the ant file itself?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Eclipse 4.12 build.compiler NoClassDefFoundError [message #1808380 is a reply to message #1808379] Sun, 23 June 2019 05:14 Go to previous messageGo to next message
lea ilagan is currently offline lea ilaganFriend
Messages: 59
Registered: October 2012
Member
Hello, Please see below.

#### WINDOWS COMMAND
echo Setting up JAVA Environment..
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_211
set JRE_HOME=C:\Program Files\Java\jre1.8.0_211


####INVOKING ANT IN ECLIPSE
%ECLIPSE_HOME%\eclipsec.exe -noSplash --launcher.suppressErrors -application org.eclipse.ant.core.antRunner -buildfile %BUILDFILEPATH% %BUILDCFG%


###WHERE THE ANT SCRIPT IS THIS:
	<!-- Compiler settings. -->
	<property name="javacFailOnError" value="true" />
	<property name="javacDebugInfo" value="on" />
	<property name="javacVerbose" value="false" />
	<property name="logExtension" value=".log" />
	<property name="compilerArg" value="" />
	<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
	
	
	<path id="@dot.classpath">
		<!-- Order here matters for which jar libraries are used -->
		<fileset dir="lib" erroronmissingdir="false">
			<include name="**/*.jar" />
		</fileset>
		<fileset dir="${stageAreaFolder}/..">
			<include name="**/*.jar" />
		</fileset>
		<fileset dir="${eclipse.home}/plugins">
			<include name="**/*.jar" />
		</fileset>
		<dirset dir="${eclipse.home}/plugins">
			<include name="**/*" />
		</dirset>
	</path>
	

	<echo>Compiling classes for ${bundleId} with Java ${ant.java.version}</echo>
	<javac destdir="${build.result.folder}/@dot" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" source="${ant.java.version}" target="${ant.java.version}">
		<classpath refid="@dot.classpath" />
		<src path="${srcpath}" />
		<compilerarg line="-log &apos;${build.result.folder}/@dot${logExtension}&apos; -warn:suppress" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
	</javac>
Re: Eclipse 4.12 build.compiler NoClassDefFoundError [message #1808382 is a reply to message #1808380] Sun, 23 June 2019 08:04 Go to previous message
lea ilagan is currently offline lea ilaganFriend
Messages: 59
Registered: October 2012
Member
Hello,

Prior to that error, just saw this details in the log file "java.lang.IllegalStateException: The instance data location has not been specified yet."

I tried to set eclipse.ini -Dosgi.dataAreaRequiresExplicitInit=false and it fixed the compilation error.

Thanks,
Lea
Previous Topic:Build [ERROR] Invalid extension descriptor for org.eclipse.tycho:tycho-maven-plugin:0.20.0
Next Topic:Hello I'm learning java ---- *.java to fxml code
Goto Forum:
  


Current Time: Fri Apr 26 07:57:22 GMT 2024

Powered by FUDForum. Page generated in 0.08828 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top