Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » How to execute ETL bundled by a plugin from within ANT
How to execute ETL bundled by a plugin from within ANT [message #760727] Sun, 04 December 2011 16:30 Go to next message
St is currently offline St
Messages: 77
Registered: July 2009
Member
Hello,

THis is my ANT script

<project default="main">
<target name="loadModels">
<epsilon.emf.loadRegisteredMetamodel metamodeluri="http://org.se/doctrine" />
<epsilon.emf.loadModel name="input" modelfile="./My.ecore" metamodeluri="http://www.eclipse.org/emf/2002/Ecore" store="false" read="true" />
<epsilon.emf.loadModel name="output" modelfile="./Generated.xmi" metamodeluri="http://org.se/doctrine" store="true" read="false" />
</target>

<target name="main" depends="loadModels">
<epsilon.etl uri="platform:plugin/org.se.doctrine.ecore.transformer/ecore2doctrine.etl">
<model ref="input" />
<model ref="output" />
</epsilon.etl>
</target>
</project>




The error stack trace :


Buildfile: /home/serard/Documents/workspaces/runtime-EclipseApplication/test/generate_doctrine.ant

loadModels:

main:
[epsilon.etl] java.io.FileNotFoundException: /ecore2doctrine.etl
[epsilon.etl] at org.eclipse.osgi.framework.internal.protocol.bundleentry.Handler.findBundleEntry(Handler.java:44)
[epsilon.etl] at org.eclipse.osgi.framework.internal.core.BundleResourceHandler.openConnection(BundleResourceHandler.java:175)
[epsilon.etl] at java.net.URL.openConnection(URL.java:963)
[epsilon.etl] at org.eclipse.core.internal.boot.PlatformURLConnection.connect(PlatformURLConnection.java:110)
[epsilon.etl] at org.eclipse.core.internal.boot.PlatformURLConnection.connect(PlatformURLConnection.java:91)
[epsilon.etl] at org.eclipse.core.internal.boot.PlatformURLConnection.getInputStream(PlatformURLConnection.java:229)
[epsilon.etl] at java.net.URL.openStream(URL.java:1029)
[epsilon.etl] at org.eclipse.epsilon.eol.AbstractModule.parse(AbstractModule.java:104)
[epsilon.etl] at org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.parseModule(ExecutableModuleTask.java:210)
[epsilon.etl] at org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.executeImpl(ExecutableModuleTask.java:177)
[epsilon.etl] at org.eclipse.epsilon.workflow.tasks.EpsilonTask.execute(EpsilonTask.java:40)
[epsilon.etl] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[epsilon.etl] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[epsilon.etl] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[epsilon.etl] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[epsilon.etl] at java.lang.reflect.Method.invoke(Method.java:616)
[epsilon.etl] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[epsilon.etl] at org.apache.tools.ant.Task.perform(Task.java:348)
[epsilon.etl] at org.apache.tools.ant.Target.execute(Target.java:390)
[epsilon.etl] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[epsilon.etl] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[epsilon.etl] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[epsilon.etl] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[epsilon.etl] at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[epsilon.etl] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[epsilon.etl] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:663)
[epsilon.etl] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:496)
[epsilon.etl] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[epsilon.etl] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[epsilon.etl] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[epsilon.etl] at java.lang.reflect.Method.invoke(Method.java:616)
[epsilon.etl] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
[epsilon.etl] at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:298)
[epsilon.etl] at java.lang.Thread.run(Thread.java:679)
[epsilon.etl] EXCEPTION: java.lang.NullPointerException
[epsilon.etl] at org.antlr.runtime.CommonTokenStream.fillBuffer(CommonTokenStream.java:95)
[epsilon.etl] at org.antlr.runtime.CommonTokenStream.LT(CommonTokenStream.java:238)
[epsilon.etl] at org.eclipse.epsilon.eol.AbstractModule.invokeMainRule(AbstractModule.java:182)
[epsilon.etl] at org.eclipse.epsilon.eol.AbstractModule.parse(AbstractModule.java:115)
[epsilon.etl] at org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.parseModule(ExecutableModuleTask.java:210)
[epsilon.etl] at org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.executeImpl(ExecutableModuleTask.java:177)
[epsilon.etl] at org.eclipse.epsilon.workflow.tasks.EpsilonTask.execute(EpsilonTask.java:40)
[epsilon.etl] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[epsilon.etl] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[epsilon.etl] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[epsilon.etl] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[epsilon.etl] at java.lang.reflect.Method.invoke(Method.java:616)
[epsilon.etl] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[epsilon.etl] at org.apache.tools.ant.Task.perform(Task.java:348)
[epsilon.etl] at org.apache.tools.ant.Target.execute(Target.java:390)
[epsilon.etl] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[epsilon.etl] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[epsilon.etl] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[epsilon.etl] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[epsilon.etl] at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[epsilon.etl] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[epsilon.etl] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:663)
[epsilon.etl] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:496)
[epsilon.etl] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[epsilon.etl] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[epsilon.etl] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[epsilon.etl] at java.lang.reflect.Method.invoke(Method.java:616)
[epsilon.etl] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
[epsilon.etl] at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:298)
[epsilon.etl] at java.lang.Thread.run(Thread.java:679)

BUILD FAILED
/home/serard/Documents/workspaces/runtime-EclipseApplication/test/generate_doctrine.ant:9: java.lang.NullPointerException

Total time: 274 milliseconds




SO how do I refer within epsilon.etl to a plugin's bundled etl file ?

Thank you a lot !
Re: How to execute ETL bundled by a plugin from within ANT [message #760732 is a reply to message #760727] Sun, 04 December 2011 17:21 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 836
Registered: July 2009
Senior Member
Hi Stephane,

Could you perhaps try platform:/plugin/... in case it makes a difference? Another reason why this might fail could be because ecore2doctrine.etl has not been included in build.properties. If none of these help, please let me know and I'll investigate.

Cheers,
Dimitris
Previous Topic:[GMF] Containment Problem
Next Topic:[EOL] Get All Properties
Goto Forum:
  


Current Time: Sat Aug 23 01:49:30 EDT 2014

Powered by FUDForum. Page generated in 0.04852 seconds