Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] Generator java version issue
[Texo] Generator java version issue [message #1022622] Fri, 22 March 2013 04:52 Go to next message
techteam is currently offline techteam
Messages: 52
Registered: September 2010
Member
Hi,
this week I switch from my Eclipse Juno JEE SR1 to SR2

Yesterday, after some changes inside the model and xpand files I try to
generate my model again, and I've got an error about a java version issue.

After an update to the new Texo version it works.

Today, it fail's again and I have no idea why.



This is the complete error:

eclipse.buildId=M20130204-1200
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product
org.eclipse.epp.package.jee.product

Error
Fri Mar 22 09:35:17 CET 2013
Unhandled event loop exception

java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at
org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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(EclipseStarter.java:353)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at
org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
at
org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
at
org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
at
org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
at
org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
... 29 more
Caused by: java.lang.IllegalStateException:
java.lang.IllegalStateException: package bar.foo;

/**
* A representation of the model object '<em><b>Product</b></em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class Product
extends bar.foo.AbstractPojo
{




/**
* A toString method which prints the values of all EAttributes of
this instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return "Product "
;
}
}

22: Syntax error, annotations are only available if source level is 1.5
or greater

at
org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:99)
at
org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:59)
at
org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
at
org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
at
org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.IllegalStateException: package bar.foo;

/**
* A representation of the model object '<em><b>Product</b></em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class Product
extends bar.foo.AbstractPojo
{




/**
* A toString method which prints the values of all EAttributes of
this instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return "Product "
;
}
}

22: Syntax error, annotations are only available if source level is 1.5
or greater

at
org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:145)
at
org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:96)
... 8 more
Caused by: java.lang.IllegalStateException: package bar.foo;

/**
* A representation of the model object '<em><b>Product</b></em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class Product
extends bar.foo.AbstractPojo
{




/**
* A toString method which prints the values of all EAttributes of
this instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return "Product "
;
}
}

22: Syntax error, annotations are only available if source level is 1.5
or greater

at
org.eclipse.emf.texo.generator.ImportResolver.setSource(ImportResolver.java:494)
at
org.eclipse.emf.texo.generator.SourceMerger.organizeImports(SourceMerger.java:147)
at
org.eclipse.emf.texo.generator.SourceMerger.mergeImportAndFormat(SourceMerger.java:98)
at org.eclipse.emf.texo.generator.SourceMerger.merge(SourceMerger.java:70)
at
org.eclipse.emf.texo.generator.MergingOutputHandler.beforeWriteAndClose(MergingOutputHandler.java:63)
at org.eclipse.xpand2.output.Outlet.beforeWriteAndClose(Outlet.java:98)
at
org.eclipse.xpand2.output.FileHandleImpl.writeAndClose(FileHandleImpl.java:137)
at org.eclipse.xpand2.output.OutputImpl.closeFile(OutputImpl.java:172)
at
org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:98)
... 9 more
Re: [Texo] Generator java version issue [message #1022639 is a reply to message #1022622] Fri, 22 March 2013 05:20 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5301
Registered: July 2009
Senior Member
Hi Heiko,
Hmm can you check the project properties > Java Compiler there is a jdk compliance option with a setting for source
compatibility.

Let me know what it says (I hope something < 1.5, then it is easy to solve :-).

gr. Martin


On 03/22/2013 09:52 AM, Heiko wrote:
> Hi,
> this week I switch from my Eclipse Juno JEE SR1 to SR2
>
> Yesterday, after some changes inside the model and xpand files I try to generate my model again, and I've got an error
> about a java version issue.
>
> After an update to the new Texo version it works.
>
> Today, it fail's again and I have no idea why.
>
>
>
> This is the complete error:
>
> eclipse.buildId=M20130204-1200
> java.version=1.6.0_23
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
> Framework arguments: -product org.eclipse.epp.package.jee.product
> Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product
>
> Error
> Fri Mar 22 09:35:17 CET 2013
> Unhandled event loop exception
>
> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> 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(EclipseStarter.java:353)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> 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:629)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> Caused by: java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
> at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
> at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
> at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
> ... 29 more
> Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: package bar.foo;
>
> /**
> * A representation of the model object '<em><b>Product</b></em>'.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> public class Product
> extends bar.foo.AbstractPojo
> {
>
>
>
>
> /**
> * A toString method which prints the values of all EAttributes of this instance.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> @Override
> public String toString() {
> return "Product "
> ;
> }
> }
>
> 22: Syntax error, annotations are only available if source level is 1.5 or greater
>
> at org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:99)
> at org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:59)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
> at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> Caused by: java.lang.IllegalStateException: package bar.foo;
>
> /**
> * A representation of the model object '<em><b>Product</b></em>'.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> public class Product
> extends bar.foo.AbstractPojo
> {
>
>
>
>
> /**
> * A toString method which prints the values of all EAttributes of this instance.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> @Override
> public String toString() {
> return "Product "
> ;
> }
> }
>
> 22: Syntax error, annotations are only available if source level is 1.5 or greater
>
> at org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:145)
> at org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:96)
> ... 8 more
> Caused by: java.lang.IllegalStateException: package bar.foo;
>
> /**
> * A representation of the model object '<em><b>Product</b></em>'.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> public class Product
> extends bar.foo.AbstractPojo
> {
>
>
>
>
> /**
> * A toString method which prints the values of all EAttributes of this instance.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> @Override
> public String toString() {
> return "Product "
> ;
> }
> }
>
> 22: Syntax error, annotations are only available if source level is 1.5 or greater
>
> at org.eclipse.emf.texo.generator.ImportResolver.setSource(ImportResolver.java:494)
> at org.eclipse.emf.texo.generator.SourceMerger.organizeImports(SourceMerger.java:147)
> at org.eclipse.emf.texo.generator.SourceMerger.mergeImportAndFormat(SourceMerger.java:98)
> at org.eclipse.emf.texo.generator.SourceMerger.merge(SourceMerger.java:70)
> at org.eclipse.emf.texo.generator.MergingOutputHandler.beforeWriteAndClose(MergingOutputHandler.java:63)
> at org.eclipse.xpand2.output.Outlet.beforeWriteAndClose(Outlet.java:98)
> at org.eclipse.xpand2.output.FileHandleImpl.writeAndClose(FileHandleImpl.java:137)
> at org.eclipse.xpand2.output.OutputImpl.closeFile(OutputImpl.java:172)
> at org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:98)
> ... 9 more
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] Generator java version issue [message #1022648 is a reply to message #1022639] Fri, 22 March 2013 05:34 Go to previous messageGo to next message
techteam is currently offline techteam
Messages: 52
Registered: September 2010
Member
Hi Martin,
thank for your quick answer.
No it's JDK Compliance level 1.6.
These point I also checked yesterday as first option.

Do some more tests:
old Juno SR1 with the old texo version -> works
old Juno SR1 with current texo version -> works
do this also with a very very simple model.

I seems, that the are a problem with the jdt compilation unit

Greetings
Heiko

Am 22.03.2013 10:20, schrieb Martin Taal:
> Hi Heiko,
> Hmm can you check the project properties > Java Compiler there is a jdk
> compliance option with a setting for source compatibility.
>
> Let me know what it says (I hope something < 1.5, then it is easy to
> solve :-).
>
> gr. Martin
>
>
> On 03/22/2013 09:52 AM, Heiko wrote:
>> Hi,
>> this week I switch from my Eclipse Juno JEE SR1 to SR2
>>
>> Yesterday, after some changes inside the model and xpand files I try
>> to generate my model again, and I've got an error
>> about a java version issue.
>>
>> After an update to the new Texo version it works.
>>
>> Today, it fail's again and I have no idea why.
>>
>>
>>
>> This is the complete error:
>>
>> eclipse.buildId=M20130204-1200
>> java.version=1.6.0_23
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
>> Framework arguments: -product org.eclipse.epp.package.jee.product
>> Command-line arguments: -os win32 -ws win32 -arch x86 -product
>> org.eclipse.epp.package.jee.product
>>
>> Error
>> Fri Mar 22 09:35:17 CET 2013
>> Unhandled event loop exception
>>
>> java.lang.IllegalStateException:
>> java.lang.reflect.InvocationTargetException
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
>>
>> at
>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
>> at
>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>
>> at
>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>
>> at
>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
>> at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
>>
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
>>
>> at
>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
>>
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>> at
>> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
>>
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>
>> 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(EclipseStarter.java:353)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
>>
>> 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:629)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
>> Caused by: java.lang.reflect.InvocationTargetException
>> at
>> org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
>> at
>> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
>>
>> at
>> org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
>>
>> at
>> org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
>>
>> at
>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>> at
>> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
>>
>> at
>> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
>>
>> at
>> org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
>>
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
>>
>> ... 29 more
>> Caused by: java.lang.IllegalStateException:
>> java.lang.IllegalStateException: package bar.foo;
>>
>> /**
>> * A representation of the model object '<em><b>Product</b></em>'.
>> * <!-- begin-user-doc -->
>> * <!-- end-user-doc -->
>> * @generated
>> */
>> public class Product
>> extends bar.foo.AbstractPojo
>> {
>>
>>
>>
>>
>> /**
>> * A toString method which prints the values of all EAttributes
>> of this instance.
>> * <!-- begin-user-doc -->
>> * <!-- end-user-doc -->
>> * @generated
>> */
>> @Override
>> public String toString() {
>> return "Product "
>> ;
>> }
>> }
>>
>> 22: Syntax error, annotations are only available if source level is
>> 1.5 or greater
>>
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:99)
>>
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:59)
>>
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
>>
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
>>
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
>>
>> at
>> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
>>
>> at
>> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>>
>> Caused by: java.lang.IllegalStateException: package bar.foo;
>>
>> /**
>> * A representation of the model object '<em><b>Product</b></em>'.
>> * <!-- begin-user-doc -->
>> * <!-- end-user-doc -->
>> * @generated
>> */
>> public class Product
>> extends bar.foo.AbstractPojo
>> {
>>
>>
>>
>>
>> /**
>> * A toString method which prints the values of all EAttributes
>> of this instance.
>> * <!-- begin-user-doc -->
>> * <!-- end-user-doc -->
>> * @generated
>> */
>> @Override
>> public String toString() {
>> return "Product "
>> ;
>> }
>> }
>>
>> 22: Syntax error, annotations are only available if source level is
>> 1.5 or greater
>>
>> at
>> org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:145)
>>
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:96)
>>
>> ... 8 more
>> Caused by: java.lang.IllegalStateException: package bar.foo;
>>
>> /**
>> * A representation of the model object '<em><b>Product</b></em>'.
>> * <!-- begin-user-doc -->
>> * <!-- end-user-doc -->
>> * @generated
>> */
>> public class Product
>> extends bar.foo.AbstractPojo
>> {
>>
>>
>>
>>
>> /**
>> * A toString method which prints the values of all EAttributes
>> of this instance.
>> * <!-- begin-user-doc -->
>> * <!-- end-user-doc -->
>> * @generated
>> */
>> @Override
>> public String toString() {
>> return "Product "
>> ;
>> }
>> }
>>
>> 22: Syntax error, annotations are only available if source level is
>> 1.5 or greater
>>
>> at
>> org.eclipse.emf.texo.generator.ImportResolver.setSource(ImportResolver.java:494)
>>
>> at
>> org.eclipse.emf.texo.generator.SourceMerger.organizeImports(SourceMerger.java:147)
>>
>> at
>> org.eclipse.emf.texo.generator.SourceMerger.mergeImportAndFormat(SourceMerger.java:98)
>>
>> at
>> org.eclipse.emf.texo.generator.SourceMerger.merge(SourceMerger.java:70)
>> at
>> org.eclipse.emf.texo.generator.MergingOutputHandler.beforeWriteAndClose(MergingOutputHandler.java:63)
>>
>> at
>> org.eclipse.xpand2.output.Outlet.beforeWriteAndClose(Outlet.java:98)
>> at
>> org.eclipse.xpand2.output.FileHandleImpl.writeAndClose(FileHandleImpl.java:137)
>>
>> at
>> org.eclipse.xpand2.output.OutputImpl.closeFile(OutputImpl.java:172)
>> at
>> org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:98)
>>
>> ... 9 more
>>
>
>
Re: [Texo] Generator java version issue [message #1022653 is a reply to message #1022648] Fri, 22 March 2013 05:41 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5301
Registered: July 2009
Senior Member
Hi Heiko,
I am on sr1 still I see now. The texo build is done against the latest juno. But still let me download sr2 and try it
also. If you have not heard back from on this thread in a few days then feel free to ping me!

gr. Martin

On 03/22/2013 10:34 AM, Heiko wrote:
> Hi Martin,
> thank for your quick answer.
> No it's JDK Compliance level 1.6.
> These point I also checked yesterday as first option.
>
> Do some more tests:
> old Juno SR1 with the old texo version -> works
> old Juno SR1 with current texo version -> works
> do this also with a very very simple model.
>
> I seems, that the are a problem with the jdt compilation unit
>
> Greetings
> Heiko
>
> Am 22.03.2013 10:20, schrieb Martin Taal:
>> Hi Heiko,
>> Hmm can you check the project properties > Java Compiler there is a jdk
>> compliance option with a setting for source compatibility.
>>
>> Let me know what it says (I hope something < 1.5, then it is easy to
>> solve :-).
>>
>> gr. Martin
>>
>>
>> On 03/22/2013 09:52 AM, Heiko wrote:
>>> Hi,
>>> this week I switch from my Eclipse Juno JEE SR1 to SR2
>>>
>>> Yesterday, after some changes inside the model and xpand files I try
>>> to generate my model again, and I've got an error
>>> about a java version issue.
>>>
>>> After an update to the new Texo version it works.
>>>
>>> Today, it fail's again and I have no idea why.
>>>
>>>
>>>
>>> This is the complete error:
>>>
>>> eclipse.buildId=M20130204-1200
>>> java.version=1.6.0_23
>>> java.vendor=Sun Microsystems Inc.
>>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
>>> Framework arguments: -product org.eclipse.epp.package.jee.product
>>> Command-line arguments: -os win32 -ws win32 -arch x86 -product
>>> org.eclipse.epp.package.jee.product
>>>
>>> Error
>>> Fri Mar 22 09:35:17 CET 2013
>>> Unhandled event loop exception
>>>
>>> java.lang.IllegalStateException:
>>> java.lang.reflect.InvocationTargetException
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
>>>
>>> at
>>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
>>> at
>>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>>
>>> at
>>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>>
>>> at
>>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>>
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
>>> at
>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
>>> at
>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
>>>
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>
>>> at
>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
>>>
>>> at
>>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
>>>
>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>>> at
>>> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
>>>
>>> at
>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>>
>>> 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(EclipseStarter.java:353)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
>>>
>>> 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:629)
>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
>>> Caused by: java.lang.reflect.InvocationTargetException
>>> at
>>> org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
>>> at
>>> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
>>>
>>> at
>>> org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
>>>
>>> at
>>> org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
>>>
>>> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>>> at
>>> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
>>>
>>> at
>>> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
>>>
>>> at
>>> org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
>>>
>>> ... 29 more
>>> Caused by: java.lang.IllegalStateException:
>>> java.lang.IllegalStateException: package bar.foo;
>>>
>>> /**
>>> * A representation of the model object '<em><b>Product</b></em>'.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> public class Product
>>> extends bar.foo.AbstractPojo
>>> {
>>>
>>>
>>>
>>>
>>> /**
>>> * A toString method which prints the values of all EAttributes
>>> of this instance.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> @Override
>>> public String toString() {
>>> return "Product "
>>> ;
>>> }
>>> }
>>>
>>> 22: Syntax error, annotations are only available if source level is
>>> 1.5 or greater
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:99)
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:59)
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
>>>
>>> at
>>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
>>>
>>> at
>>> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
>>> at
>>> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
>>>
>>> at
>>> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>>>
>>> Caused by: java.lang.IllegalStateException: package bar.foo;
>>>
>>> /**
>>> * A representation of the model object '<em><b>Product</b></em>'.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> public class Product
>>> extends bar.foo.AbstractPojo
>>> {
>>>
>>>
>>>
>>>
>>> /**
>>> * A toString method which prints the values of all EAttributes
>>> of this instance.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> @Override
>>> public String toString() {
>>> return "Product "
>>> ;
>>> }
>>> }
>>>
>>> 22: Syntax error, annotations are only available if source level is
>>> 1.5 or greater
>>>
>>> at
>>> org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:145)
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:96)
>>>
>>> ... 8 more
>>> Caused by: java.lang.IllegalStateException: package bar.foo;
>>>
>>> /**
>>> * A representation of the model object '<em><b>Product</b></em>'.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> public class Product
>>> extends bar.foo.AbstractPojo
>>> {
>>>
>>>
>>>
>>>
>>> /**
>>> * A toString method which prints the values of all EAttributes
>>> of this instance.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> @Override
>>> public String toString() {
>>> return "Product "
>>> ;
>>> }
>>> }
>>>
>>> 22: Syntax error, annotations are only available if source level is
>>> 1.5 or greater
>>>
>>> at
>>> org.eclipse.emf.texo.generator.ImportResolver.setSource(ImportResolver.java:494)
>>>
>>> at
>>> org.eclipse.emf.texo.generator.SourceMerger.organizeImports(SourceMerger.java:147)
>>>
>>> at
>>> org.eclipse.emf.texo.generator.SourceMerger.mergeImportAndFormat(SourceMerger.java:98)
>>>
>>> at
>>> org.eclipse.emf.texo.generator.SourceMerger.merge(SourceMerger.java:70)
>>> at
>>> org.eclipse.emf.texo.generator.MergingOutputHandler.beforeWriteAndClose(MergingOutputHandler.java:63)
>>>
>>> at
>>> org.eclipse.xpand2.output.Outlet.beforeWriteAndClose(Outlet.java:98)
>>> at
>>> org.eclipse.xpand2.output.FileHandleImpl.writeAndClose(FileHandleImpl.java:137)
>>>
>>> at
>>> org.eclipse.xpand2.output.OutputImpl.closeFile(OutputImpl.java:172)
>>> at
>>> org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:98)
>>>
>>> ... 9 more
>>>
>>
>>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] Generator java version issue [message #1022669 is a reply to message #1022653] Fri, 22 March 2013 06:19 Go to previous message
techteam is currently offline techteam
Messages: 52
Registered: September 2010
Member
Hi Martin,
I've found a solution:
After switch the jdk complicance to 1.5 rebuild workspace and than back
again to 1.6, it works fine.
But why I've got the error - I don't know. :/

Greetings
Heiko


Am 22.03.2013 10:41, schrieb Martin Taal:
> Hi Heiko,
> I am on sr1 still I see now. The texo build is done against the latest
> juno. But still let me download sr2 and try it also. If you have not
> heard back from on this thread in a few days then feel free to ping me!
>
> gr. Martin
>
> On 03/22/2013 10:34 AM, Heiko wrote:
>> Hi Martin,
>> thank for your quick answer.
>> No it's JDK Compliance level 1.6.
>> These point I also checked yesterday as first option.
>>
>> Do some more tests:
>> old Juno SR1 with the old texo version -> works
>> old Juno SR1 with current texo version -> works
>> do this also with a very very simple model.
>>
>> I seems, that the are a problem with the jdt compilation unit
>>
>> Greetings
>> Heiko
>>
>> Am 22.03.2013 10:20, schrieb Martin Taal:
>>> Hi Heiko,
>>> Hmm can you check the project properties > Java Compiler there is a jdk
>>> compliance option with a setting for source compatibility.
>>>
>>> Let me know what it says (I hope something < 1.5, then it is easy to
>>> solve :-).
>>>
>>> gr. Martin
>>>
>>>
>>> On 03/22/2013 09:52 AM, Heiko wrote:
>>>> Hi,
>>>> this week I switch from my Eclipse Juno JEE SR1 to SR2
>>>>
>>>> Yesterday, after some changes inside the model and xpand files I try
>>>> to generate my model again, and I've got an error
>>>> about a java version issue.
>>>>
>>>> After an update to the new Texo version it works.
>>>>
>>>> Today, it fail's again and I have no idea why.
>>>>
>>>>
>>>>
>>>> This is the complete error:
>>>>
>>>> eclipse.buildId=M20130204-1200
>>>> java.version=1.6.0_23
>>>> java.vendor=Sun Microsystems Inc.
>>>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
>>>> Framework arguments: -product org.eclipse.epp.package.jee.product
>>>> Command-line arguments: -os win32 -ws win32 -arch x86 -product
>>>> org.eclipse.epp.package.jee.product
>>>>
>>>> Error
>>>> Fri Mar 22 09:35:17 CET 2013
>>>> Unhandled event loop exception
>>>>
>>>> java.lang.IllegalStateException:
>>>> java.lang.reflect.InvocationTargetException
>>>> at
>>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
>>>>
>>>> at
>>>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>>>
>>>>
>>>> at
>>>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
>>>> at
>>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
>>>> at
>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
>>>> at
>>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>>
>>>>
>>>> at
>>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
>>>>
>>>>
>>>> at
>>>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
>>>>
>>>>
>>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
>>>> at
>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>>>> at
>>>> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
>>>>
>>>>
>>>> at
>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>>>
>>>>
>>>> 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(EclipseStarter.java:353)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
>>>>
>>>>
>>>> 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:629)
>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
>>>> Caused by: java.lang.reflect.InvocationTargetException
>>>> at
>>>> org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
>>>> at
>>>> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
>>>>
>>>>
>>>> at
>>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>>>> at
>>>> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
>>>>
>>>>
>>>> ... 29 more
>>>> Caused by: java.lang.IllegalStateException:
>>>> java.lang.IllegalStateException: package bar.foo;
>>>>
>>>> /**
>>>> * A representation of the model object '<em><b>Product</b></em>'.
>>>> * <!-- begin-user-doc -->
>>>> * <!-- end-user-doc -->
>>>> * @generated
>>>> */
>>>> public class Product
>>>> extends bar.foo.AbstractPojo
>>>> {
>>>>
>>>>
>>>>
>>>>
>>>> /**
>>>> * A toString method which prints the values of all EAttributes
>>>> of this instance.
>>>> * <!-- begin-user-doc -->
>>>> * <!-- end-user-doc -->
>>>> * @generated
>>>> */
>>>> @Override
>>>> public String toString() {
>>>> return "Product "
>>>> ;
>>>> }
>>>> }
>>>>
>>>> 22: Syntax error, annotations are only available if source level is
>>>> 1.5 or greater
>>>>
>>>> at
>>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:99)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:59)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
>>>> at
>>>> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>>>>
>>>>
>>>> Caused by: java.lang.IllegalStateException: package bar.foo;
>>>>
>>>> /**
>>>> * A representation of the model object '<em><b>Product</b></em>'.
>>>> * <!-- begin-user-doc -->
>>>> * <!-- end-user-doc -->
>>>> * @generated
>>>> */
>>>> public class Product
>>>> extends bar.foo.AbstractPojo
>>>> {
>>>>
>>>>
>>>>
>>>>
>>>> /**
>>>> * A toString method which prints the values of all EAttributes
>>>> of this instance.
>>>> * <!-- begin-user-doc -->
>>>> * <!-- end-user-doc -->
>>>> * @generated
>>>> */
>>>> @Override
>>>> public String toString() {
>>>> return "Product "
>>>> ;
>>>> }
>>>> }
>>>>
>>>> 22: Syntax error, annotations are only available if source level is
>>>> 1.5 or greater
>>>>
>>>> at
>>>> org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:145)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:96)
>>>>
>>>>
>>>> ... 8 more
>>>> Caused by: java.lang.IllegalStateException: package bar.foo;
>>>>
>>>> /**
>>>> * A representation of the model object '<em><b>Product</b></em>'.
>>>> * <!-- begin-user-doc -->
>>>> * <!-- end-user-doc -->
>>>> * @generated
>>>> */
>>>> public class Product
>>>> extends bar.foo.AbstractPojo
>>>> {
>>>>
>>>>
>>>>
>>>>
>>>> /**
>>>> * A toString method which prints the values of all EAttributes
>>>> of this instance.
>>>> * <!-- begin-user-doc -->
>>>> * <!-- end-user-doc -->
>>>> * @generated
>>>> */
>>>> @Override
>>>> public String toString() {
>>>> return "Product "
>>>> ;
>>>> }
>>>> }
>>>>
>>>> 22: Syntax error, annotations are only available if source level is
>>>> 1.5 or greater
>>>>
>>>> at
>>>> org.eclipse.emf.texo.generator.ImportResolver.setSource(ImportResolver.java:494)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.generator.SourceMerger.organizeImports(SourceMerger.java:147)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.generator.SourceMerger.mergeImportAndFormat(SourceMerger.java:98)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.texo.generator.SourceMerger.merge(SourceMerger.java:70)
>>>> at
>>>> org.eclipse.emf.texo.generator.MergingOutputHandler.beforeWriteAndClose(MergingOutputHandler.java:63)
>>>>
>>>>
>>>> at
>>>> org.eclipse.xpand2.output.Outlet.beforeWriteAndClose(Outlet.java:98)
>>>> at
>>>> org.eclipse.xpand2.output.FileHandleImpl.writeAndClose(FileHandleImpl.java:137)
>>>>
>>>>
>>>> at
>>>> org.eclipse.xpand2.output.OutputImpl.closeFile(OutputImpl.java:172)
>>>> at
>>>> org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:98)
>>>>
>>>>
>>>> ... 9 more
>>>>
>>>
>>>
>>
>
>
Re: [Texo] Generator java version issue [message #1022670 is a reply to message #1022648] Fri, 22 March 2013 06:19 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 3844
Registered: July 2009
Senior Member
Hi

Make sure you do a clean all and a full rebuild.

Make sure you haven't got a 1.5 JRE in use for some projects and a
1.6/1.7 for others,. When you have problems disable all but one recent
JRE and clean and rebuild and clean again.

Regards

Ed Willink

On 22/03/2013 09:34, Heiko wrote:
> Hi Martin,
> thank for your quick answer.
> No it's JDK Compliance level 1.6.
> These point I also checked yesterday as first option.
>
> Do some more tests:
> old Juno SR1 with the old texo version -> works
> old Juno SR1 with current texo version -> works
> do this also with a very very simple model.
>
> I seems, that the are a problem with the jdt compilation unit
>
> Greetings
> Heiko
>
> Am 22.03.2013 10:20, schrieb Martin Taal:
>> Hi Heiko,
>> Hmm can you check the project properties > Java Compiler there is a jdk
>> compliance option with a setting for source compatibility.
>>
>> Let me know what it says (I hope something < 1.5, then it is easy to
>> solve :-).
>>
>> gr. Martin
>>
>>
>> On 03/22/2013 09:52 AM, Heiko wrote:
>>> Hi,
>>> this week I switch from my Eclipse Juno JEE SR1 to SR2
>>>
>>> Yesterday, after some changes inside the model and xpand files I try
>>> to generate my model again, and I've got an error
>>> about a java version issue.
>>>
>>> After an update to the new Texo version it works.
>>>
>>> Today, it fail's again and I have no idea why.
>>>
>>>
>>>
>>> This is the complete error:
>>>
>>> eclipse.buildId=M20130204-1200
>>> java.version=1.6.0_23
>>> java.vendor=Sun Microsystems Inc.
>>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
>>> Framework arguments: -product org.eclipse.epp.package.jee.product
>>> Command-line arguments: -os win32 -ws win32 -arch x86 -product
>>> org.eclipse.epp.package.jee.product
>>>
>>> Error
>>> Fri Mar 22 09:35:17 CET 2013
>>> Unhandled event loop exception
>>>
>>> java.lang.IllegalStateException:
>>> java.lang.reflect.InvocationTargetException
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
>>>
>>>
>>> at
>>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
>>>
>>> at
>>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>>>
>>>
>>> at
>>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>>>
>>>
>>> at
>>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>>>
>>>
>>> at
>>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
>>> at
>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
>>> at
>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
>>> at
>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
>>>
>>>
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>
>>>
>>> at
>>> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
>>>
>>>
>>> at
>>> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
>>>
>>>
>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>>>
>>>
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
>>>
>>>
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>>> at
>>> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
>>>
>>>
>>> at
>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>>>
>>>
>>> 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(EclipseStarter.java:353)
>>>
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
>>>
>>>
>>> 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:629)
>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
>>> Caused by: java.lang.reflect.InvocationTargetException
>>> at
>>> org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
>>> at
>>> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
>>>
>>>
>>> at
>>> org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
>>>
>>>
>>> at
>>> org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
>>>
>>>
>>> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>>> at
>>> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
>>>
>>>
>>> at
>>> org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
>>>
>>>
>>> at
>>> org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
>>>
>>>
>>> ... 29 more
>>> Caused by: java.lang.IllegalStateException:
>>> java.lang.IllegalStateException: package bar.foo;
>>>
>>> /**
>>> * A representation of the model object '<em><b>Product</b></em>'.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> public class Product
>>> extends bar.foo.AbstractPojo
>>> {
>>>
>>>
>>>
>>>
>>> /**
>>> * A toString method which prints the values of all EAttributes
>>> of this instance.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> @Override
>>> public String toString() {
>>> return "Product "
>>> ;
>>> }
>>> }
>>>
>>> 22: Syntax error, annotations are only available if source level is
>>> 1.5 or greater
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:99)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:59)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
>>>
>>>
>>> at
>>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
>>>
>>>
>>> at
>>> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
>>> at
>>> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
>>>
>>>
>>> at
>>> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>>>
>>>
>>> Caused by: java.lang.IllegalStateException: package bar.foo;
>>>
>>> /**
>>> * A representation of the model object '<em><b>Product</b></em>'.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> public class Product
>>> extends bar.foo.AbstractPojo
>>> {
>>>
>>>
>>>
>>>
>>> /**
>>> * A toString method which prints the values of all EAttributes
>>> of this instance.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> @Override
>>> public String toString() {
>>> return "Product "
>>> ;
>>> }
>>> }
>>>
>>> 22: Syntax error, annotations are only available if source level is
>>> 1.5 or greater
>>>
>>> at
>>> org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:145)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:96)
>>>
>>>
>>> ... 8 more
>>> Caused by: java.lang.IllegalStateException: package bar.foo;
>>>
>>> /**
>>> * A representation of the model object '<em><b>Product</b></em>'.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> public class Product
>>> extends bar.foo.AbstractPojo
>>> {
>>>
>>>
>>>
>>>
>>> /**
>>> * A toString method which prints the values of all EAttributes
>>> of this instance.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> @Override
>>> public String toString() {
>>> return "Product "
>>> ;
>>> }
>>> }
>>>
>>> 22: Syntax error, annotations are only available if source level is
>>> 1.5 or greater
>>>
>>> at
>>> org.eclipse.emf.texo.generator.ImportResolver.setSource(ImportResolver.java:494)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.generator.SourceMerger.organizeImports(SourceMerger.java:147)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.generator.SourceMerger.mergeImportAndFormat(SourceMerger.java:98)
>>>
>>>
>>> at
>>> org.eclipse.emf.texo.generator.SourceMerger.merge(SourceMerger.java:70)
>>> at
>>> org.eclipse.emf.texo.generator.MergingOutputHandler.beforeWriteAndClose(MergingOutputHandler.java:63)
>>>
>>>
>>> at
>>> org.eclipse.xpand2.output.Outlet.beforeWriteAndClose(Outlet.java:98)
>>> at
>>> org.eclipse.xpand2.output.FileHandleImpl.writeAndClose(FileHandleImpl.java:137)
>>>
>>>
>>> at
>>> org.eclipse.xpand2.output.OutputImpl.closeFile(OutputImpl.java:172)
>>> at
>>> org.eclipse.emf.texo.generator.ArtifactGenerator.run(ArtifactGenerator.java:98)
>>>
>>>
>>> ... 9 more
>>>
>>
>>
>
Previous Topic:[teneo] How to specify formula with oracle || concat
Next Topic:EMFStore Hello World example
Goto Forum:
  


Current Time: Mon Apr 21 00:42:11 EDT 2014

Powered by FUDForum. Page generated in 0.01837 seconds