[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Eclipse 4.6.3 compilation issues

Hi Team,

I have been able to load my old eclipse 3.7.2 projects into 4.6.3 on Windows and could launch my application successfully.
The application was previously bundled with eclipse 3.7.2 plugins & compiled using java 1.6.

Now when trying to use java 1.8 and eclipse 4.6.3 plugins, compilation fails. There are few number of .java files in my application.
The error encountered is -

   [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

Looking into the build script [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  -
 

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

Thank You,
Kind Regards,
Rohit M Pujar,    

!ENTRY org.eclipse.core.resources 4 567 2018-02-06 20:17:20.580
!MESSAGE Workspace restored, but some problems occurred.
!SUBENTRY 1 org.eclipse.core.resources 4 567 2018-02-06 20:17:20.580
!MESSAGE Could not read metadata for 'com.ibm.xml.xlxp'.
!STACK 1
org.eclipse.core.runtime.CoreException: No file system is defined for scheme: sourcecontrol
	at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:49)
	at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:44)
	at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSystemCore.java:65)
	at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCore.java:107)
	at org.eclipse.core.filesystem.EFS.getStore(EFS.java:478)
	at org.eclipse.core.internal.localstore.FileStoreRoot.createStore(FileStoreRoot.java:123)
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.initializeStore(FileSystemResourceManager.java:623)
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:886)
	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:904)
	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:884)
	at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:735)
	at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1587)
	at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2399)
	at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2156)
	at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:464)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
	at java.security.AccessController.doPrivileged(AccessController.java:677)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
	at org.eclipse.osgi.container.Module.doStart(Module.java:581)
	at org.eclipse.osgi.container.Module.start(Module.java:449)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:571)
	at org.eclipse.ant.core.AntCorePreferences$WrappedClassLoader.findClass(AntCorePreferences.java:97)
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:903)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:848)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:831)
	at org.eclipse.ant.internal.core.AntClassLoader.loadClassPlugins(AntClassLoader.java:68)
	at org.eclipse.ant.internal.core.AntClassLoader.findClass(AntClassLoader.java:46)
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:903)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:848)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:831)
	at org.eclipse.ant.core.AntRunner.run(AntRunner.java:508)
	at org.eclipse.ant.core.AntRunner.start(AntRunner.java:608)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
!SUBENTRY 2 org.eclipse.core.filesystem 4 566 2018-02-06 20:17:20.627
!MESSAGE No file system is defined for scheme: sourcecontrol
Buildfile: C:\Eclipse463/Build/target/eclipse/plugins/org.eclipse.pde.build_3.9.200.v20160204-0642/scripts/productBuild/productBuild.xml