Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problems generating a headless build application
Problems generating a headless build application [message #336119] Fri, 22 May 2009 14:05 Go to next message
chris is currently offline chris
Messages: 72
Registered: July 2009
Member
Hi everybody,

I'm trying to implement an extension of the
org.eclipsecore.runtime.applications extension point whose purpose is to
allow for a headless generation of some GMF editor plug-ins.

This is trying to drive me crazy: Often, the stuff fails with the
exception I've attached below, but not always. It seems that if I just
let the code run, it happens more often than if I step through the code.

Does anybody have a hint of what might be going on here? :-(

Thanks a lot in advance,
Chris


java.lang.NoClassDefFoundError: org/eclipse/jdt/ui/PreferenceConstants
at
org.eclipse.gmf.internal.common.codegen.OrganizeImportsPostp rocessor.configureImportRewrite(OrganizeImportsPostprocessor .java:322)
at
org.eclipse.gmf.internal.common.codegen.OrganizeImportsPostp rocessor.createImportRewrite(OrganizeImportsPostprocessor.ja va:317)
at
org.eclipse.gmf.internal.common.codegen.OrganizeImportsPostp rocessor.organizeImports(OrganizeImportsPostprocessor.java:1 72)
at
org.eclipse.gmf.internal.common.codegen.OrganizeImportsPostp rocessor.organizeImports(OrganizeImportsPostprocessor.java:1 05)
at
org.eclipse.gmf.internal.common.codegen.GeneratorBase.doGene rateJavaClass(GeneratorBase.java:372)
at
org.eclipse.gmf.codegen.util.Generator.generateExternalizati onSupport(Generator.java:916)
at org.eclipse.gmf.codegen.util.Generator.customRun(Generator.j ava:98)
at
org.eclipse.gmf.internal.common.codegen.GeneratorBase$1.run( GeneratorBase.java:474)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1800)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1782)
at
org.eclipse.gmf.internal.common.codegen.GeneratorBase.doRun( GeneratorBase.java:471)
at
org.eclipse.gmf.internal.common.codegen.GeneratorBase.run(Ge neratorBase.java:90)
at
de.itemis.gmf.tools.ExecuteTemplatesOperation.runX(ExecuteTe mplatesOperation.java:177)
at
de.itemis.gmf.tools.ExecuteTemplatesOperation.doRunWithStatu s(ExecuteTemplatesOperation.java:161)
at
de.itemis.gmf.tools.ExecuteTemplatesOperation.run(ExecuteTem platesOperation.java:94)
at
de.itemis.gmf.tools.CodeGenerator.generateDiagramCode(CodeGe nerator.java:15)
at
de.itemis.gmf.tools.application.DiagramBuilderApplication.st art(DiagramBuilderApplication.java:73)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by:
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
An error occurred while automatically activating bundle
org.eclipse.jdt.ui (208).
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:125)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:427)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:370)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:446)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:399)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:387)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:315)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:160)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:867)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.core.internal.filebuffers.ExtensionsRegistry.get Extension(ExtensionsRegistry.java:238)
at
org.eclipse.core.internal.filebuffers.ExtensionsRegistry.doG etDocumentSetupParticipants(ExtensionsRegistry.java:361)
at
org.eclipse.core.internal.filebuffers.ExtensionsRegistry.get DocumentSetupParticipants(ExtensionsRegistry.java:383)
at
org.eclipse.core.internal.filebuffers.ResourceExtensionRegis try.getDocumentSetupParticipants(ResourceExtensionRegistry.j ava:119)
at
org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer Manager.createEmptyDocument(ResourceTextFileBufferManager.ja va:161)
at
org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer .initializeFileBufferContent(ResourceTextFileBuffer.java:289 )
at
org.eclipse.core.internal.filebuffers.ResourceFileBuffer.cre ate(ResourceFileBuffer.java:241)
at
org.eclipse.core.internal.filebuffers.TextFileBufferManager. connect(TextFileBufferManager.java:112)
at
org.eclipse.pde.internal.core.builders.ErrorReporter.createD ocument(ErrorReporter.java:71)
at
org.eclipse.pde.internal.core.builders.BuildErrorReporter.pr epareTextBuildModel(BuildErrorReporter.java:512)
at
org.eclipse.pde.internal.core.builders.BuildErrorReporter.va lidate(BuildErrorReporter.java:112)
at
org.eclipse.pde.internal.core.builders.ErrorReporter.validat eContent(ErrorReporter.java:127)
at
org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.validateBuildProperties(ManifestConsistencyChecker.jav a:341)
at
org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.validateProject(ManifestConsistencyChecker.java:256)
at
org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.build(ManifestConsistencyChecker.java:182)
at
org.eclipse.core.internal.events.BuildManager$2.run(BuildMan ager.java:633)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:170)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:201)
at
org.eclipse.core.internal/-.events.BuildManager$1.run(BuildM anager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:256)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop (BuildManager.java:309)
at
org.eclipse.core.internal.events.BuildManager.build(BuildMan ager.java:341)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBu ildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJ ob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.osgi.framework.BundleException: Exception in
org.eclipse.jdt.internal.ui.JavaPlugin.start() of bundle org.eclipse.jdt.ui.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1028)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:984)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at
org*+*+*+*+*+*+*+*+*+*+--.eclipse.core.runtime.internal.adap tor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter .java:111)
.... 42 more
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:86)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:74)
at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:281)
at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:299)
at
org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
at
org.eclipse.jdt.internal.ui.JavaPlugin.ensurePreferenceStore BackwardsCompatibility(JavaPlugin.java:436)
at org.eclipse.jdt.internal.ui.JavaPlugin.start(JavaPlugin.java :361)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1003)
.... 47 more
******


--
Alex Levin: "The reason there is so little crime in Germany is that it's
against the law."
Re: Problems generating a headless build application [message #336126 is a reply to message #336119] Sat, 23 May 2009 11:28 Go to previous message
chris is currently offline chris
Messages: 72
Registered: July 2009
Member
Hi,

I solved my problem by switching off autobuilding for the according
workspace before generating my GMF editors. Apparently, some builder in
my workspace needed a running workbench and were triggered by the
generation of the editors, therefore causing exceptions which resulted
in the mess described below. Still no idea about the cause of that being
kind of undeterministic, though...

Cheers,
Chris


chris schrieb:
> Hi everybody,
>
> I'm trying to implement an extension of the
> org.eclipsecore.runtime.applications extension point whose purpose is to
> allow for a headless generation of some GMF editor plug-ins.
>
> This is trying to drive me crazy: Often, the stuff fails with the
> exception I've attached below, but not always. It seems that if I just
> let the code run, it happens more often than if I step through the code.
>
> Does anybody have a hint of what might be going on here? :-(
>
> Thanks a lot in advance,
> Chris
>
>
> java.lang.NoClassDefFoundError: org/eclipse/jdt/ui/PreferenceConstants
> at
> org.eclipse.gmf.internal.common.codegen.OrganizeImportsPostp rocessor.configureImportRewrite(OrganizeImportsPostprocessor .java:322)
> at
> org.eclipse.gmf.internal.common.codegen.OrganizeImportsPostp rocessor.createImportRewrite(OrganizeImportsPostprocessor.ja va:317)
> at
> org.eclipse.gmf.internal.common.codegen.OrganizeImportsPostp rocessor.organizeImports(OrganizeImportsPostprocessor.java:1 72)
> at
> org.eclipse.gmf.internal.common.codegen.OrganizeImportsPostp rocessor.organizeImports(OrganizeImportsPostprocessor.java:1 05)
> at
> org.eclipse.gmf.internal.common.codegen.GeneratorBase.doGene rateJavaClass(GeneratorBase.java:372)
> at
> org.eclipse.gmf.codegen.util.Generator.generateExternalizati onSupport(Generator.java:916)
> at org.eclipse.gmf.codegen.util.Generator.customRun(Generator.j ava:98)
> at
> org.eclipse.gmf.internal.common.codegen.GeneratorBase$1.run( GeneratorBase.java:474)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1800)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1782)
> at
> org.eclipse.gmf.internal.common.codegen.GeneratorBase.doRun( GeneratorBase.java:471)
> at
> org.eclipse.gmf.internal.common.codegen.GeneratorBase.run(Ge neratorBase.java:90)
> at
> de.itemis.gmf.tools.ExecuteTemplatesOperation.runX(ExecuteTe mplatesOperation.java:177)
> at
> de.itemis.gmf.tools.ExecuteTemplatesOperation.doRunWithStatu s(ExecuteTemplatesOperation.java:161)
> at
> de.itemis.gmf.tools.ExecuteTemplatesOperation.run(ExecuteTem platesOperation.java:94)
> at
> de.itemis.gmf.tools.CodeGenerator.generateDiagramCode(CodeGe nerator.java:15)
> at
> de.itemis.gmf.tools.application.DiagramBuilderApplication.st art(DiagramBuilderApplication.java:73)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> 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.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
> Caused by:
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
> An error occurred while automatically activating bundle
> org.eclipse.jdt.ui (208).
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:125)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:427)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:370)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:446)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:399)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:387)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:315)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:160)
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:867)
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
> at
> org.eclipse.core.internal.filebuffers.ExtensionsRegistry.get Extension(ExtensionsRegistry.java:238)
> at
> org.eclipse.core.internal.filebuffers.ExtensionsRegistry.doG etDocumentSetupParticipants(ExtensionsRegistry.java:361)
> at
> org.eclipse.core.internal.filebuffers.ExtensionsRegistry.get DocumentSetupParticipants(ExtensionsRegistry.java:383)
> at
> org.eclipse.core.internal.filebuffers.ResourceExtensionRegis try.getDocumentSetupParticipants(ResourceExtensionRegistry.j ava:119)
> at
> org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer Manager.createEmptyDocument(ResourceTextFileBufferManager.ja va:161)
> at
> org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer .initializeFileBufferContent(ResourceTextFileBuffer.java:289 )
> at
> org.eclipse.core.internal.filebuffers.ResourceFileBuffer.cre ate(ResourceFileBuffer.java:241)
> at
> org.eclipse.core.internal.filebuffers.TextFileBufferManager. connect(TextFileBufferManager.java:112)
> at
> org.eclipse.pde.internal.core.builders.ErrorReporter.createD ocument(ErrorReporter.java:71)
> at
> org.eclipse.pde.internal.core.builders.BuildErrorReporter.pr epareTextBuildModel(BuildErrorReporter.java:512)
> at
> org.eclipse.pde.internal.core.builders.BuildErrorReporter.va lidate(BuildErrorReporter.java:112)
> at
> org.eclipse.pde.internal.core.builders.ErrorReporter.validat eContent(ErrorReporter.java:127)
> at
> org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.validateBuildProperties(ManifestConsistencyChecker.jav a:341)
> at
> org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.validateProject(ManifestConsistencyChecker.java:256)
> at
> org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.build(ManifestConsistencyChecker.java:182)
> at
> org.eclipse.core.internal.events.BuildManager$2.run(BuildMan ager.java:633)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at
> org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:170)
> at
> org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:201)
> at
> org.eclipse.core.internal/-.events.BuildManager$1.run(BuildM anager.java:253)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at
> org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:256)
> at
> org.eclipse.core.internal.events.BuildManager.basicBuildLoop (BuildManager.java:309)
> at
> org.eclipse.core.internal.events.BuildManager.build(BuildMan ager.java:341)
> at
> org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBu ildJob.java:140)
> at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJ ob.java:238)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: org.osgi.framework.BundleException: Exception in
> org.eclipse.jdt.internal.ui.JavaPlugin.start() of bundle org.eclipse.jdt.ui.
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1028)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:984)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
> at org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
> at
> org*+*+*+*+*+*+*+*+*+*+--.eclipse.core.runtime.internal.adap tor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter .java:111)
> ... 42 more
> Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:86)
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:74)
> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:281)
> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:299)
> at
> org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
> at
> org.eclipse.jdt.internal.ui.JavaPlugin.ensurePreferenceStore BackwardsCompatibility(JavaPlugin.java:436)
> at org.eclipse.jdt.internal.ui.JavaPlugin.start(JavaPlugin.java :361)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:1009)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1003)
> ... 47 more
> ******
>
>


--
Thomas Alva Edison: "Opportunity is missed by most people because it is
dressed in overalls and looks like work."
Previous Topic:[Databinding] db-related objects lifecycle and (listeners) management
Next Topic:[CommonNavigator] Adding the New Menu
Goto Forum:
  


Current Time: Tue Sep 16 05:05:48 GMT 2014

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

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