Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Eclipse 4.6.3 compilation issues(Eclipse 4.6.3 compilation issues)
Eclipse 4.6.3 compilation issues [message #1781735] Mon, 12 February 2018 19:29
Rohit Pujar is currently offline Rohit PujarFriend
Messages: 2
Registered: February 2018
Junior Member
Hi
I have been able to load my old eclipse 3.7.2 projects into 4.6.3 on Windows and also launch my application successfully using Java 1.8 SDK.
My application was previously bundled with eclipse 3.7.2 plugins & compiled using java 1.6.

Now when trying to use "org.eclipse.pde.build_3.9.200.v20160204-0642" plugin's antRunner build script to compile my application code with eclipse 4.6.3 plugins using java 1.8, compilation , getting compilation failed messages, though the .class files are being generated.
The error encountered is shown below -

[javac] ERROR in C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\src\com\comp\dep\tool\engine\util\Messages.java (at line 0)
[javac] /* Text description
[javac] ^
[javac] The type java.lang.Exception cannot be resolved. It is indirectly referenced from required .class files

BUILD FAILED
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\productBuild\productBuild.xml:43: The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\build.xml:105: The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\templates\headless-build\customTargets.xml:13: The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\productBuild\allElements.xml:20: The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\genericTargets.xml:119: The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\genericTargets.xml:124: The following error occurred while executing this line:
C:\view\app\build\toolkit\features\org.eclipse.pde.build.container.feature\build.xml:30: The following error occurred while executing this line:
C:\view\app\build\toolkit\features\org.eclipse.pde.build.container.feature\build.xml:16: The following error occurred while executing this line:
C\view\app\build\toolkit\features\com.comp.dep.tool.ui.feature\build.xml:63: The following error occurred while executing this line:
C:\view\app\build\toolkit\eatures\com.comp.dep.tool.ui.feature\build.xml:19: The following error occurred while executing this line:
C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\build.xml:161: The following error occurred while executing this line:
C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\build.xml:122: Compile failed; see the compiler error output for details.
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:568)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:443)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:705)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:568)
... 19 more

Here's the build script code [C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\build.xml], where the compilation error occurred -

<!-- compile the source code -->
<javac destdir="${build.result.folder}/@dot" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" errorProperty="compilation.error.occured" >
<compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
<classpath refid="@dot.classpath" />
<src path="src/" />
<compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
<compilerarg line="-log &apos;${build.result.folder}/@dot${logExtension}&apos;" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
</javac>

One observation here is - the value of ${bundleJavacSource} & ${bundleJavacTarget} are not being set. Though the following entry exists in the build.xml -

<condition property="bundleJavacSource" value="1.8" >
<isset property="JavaSE-1.8"/>
</condition>
<condition property="bundleJavacTarget" value="1.8" >
<isset property="JavaSE-1.8"/>
</condition>
<property name="bundleJavacSource" value="${javacSource}"/>
<property name="bundleJavacTarget" value="${javacTarget}"/>

This build.xml file [C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\build.xml] is being generated as part of the eclipse plugin - org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\genericTargets.xml file and using below target -
<!-- ===================================================================== -->
<!-- Generate a build.xml file for an element -->
<!-- ===================================================================== -->
<target name="generateScript" description="Generating build scripts..." depends="init">
<eclipse.buildScript
elements="${type}@${id}"
buildDirectory="${buildDirectory}"
configInfo="${configs}"
baseLocation="${baseLocation}"
outputUpdateJars="${outputUpdateJars}"
archivesFormat="${archivesFormat}"
product="${product}"
forceContextQualifier="${forceContextQualifier}"
generateJnlp="${generateJnlp}"
signJars="${signJars}"
generateFeatureVersionSuffix="${generateFeatureVersionSuffix}"
significantVersionDigits="${significantVersionDigits}"
generatedVersionLength="${generatedVersionLength}"
generateVersionsLists="${generateVersionsLists}"
generateSourceReferences="${generateSourceReferences}"
groupConfiguration="${groupConfigurations}"
pluginPath="${transformedRepoLocation}${path.separator}${pluginPath}"
filteredDependencyCheck="${filteredDependencyCheck}"
platformProperties="${platformProperties}"
filterP2Base="${filterP2Base}"
flattenDependencies="${flattenDependencies}"
parallelCompilation="${parallelCompilation}"
parallelThreadCount="${parallelThreadCount}"
parallelThreadsPerProcessor="${parallelThreadsPerProcessor}"
customEESources="${customEESources}"
contextRepository="${transformedRepoLocation},${p2.context.repos}"
sourceBundleMode="${sourceBundleMode}"
sourceBundleTemplateFeature="${sourceBundleTemplateFeature}"
sourceBundleFeatureId="${sourceBundleFeatureId}"
sourceBundleFeatureVersion="${sourceBundleFeatureVersion}"
/>
</target>

On searching for resolution, one of the link reported, issue would be due to ant not recognizing the java version [https://github.com/mit-cml/appinventor-sources/issues/861 .
Doing an echo of ${javacSource} & ${javacTarget} in <target name="generateScript" description="Generating build scripts..." depends="init">, could find the value being properly set to 1.8.

Apart from the above errors, also encounter the attached org.eclipse.core.runtime.CoreException - coreRuntimeException.txt [attached].

Any updates to get the above issues resolved, would be very much helpful.

Thank you,
Rohit
Previous Topic:[New Plugin] Files/Class Favorites or Recents
Next Topic:PDE Build - conflicting dependency message with no details
Goto Forum:
  


Current Time: Thu Sep 20 17:19:48 GMT 2018

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

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

Back to the top