Error injecting method [Xtext project on Tomcat] [message #1256454] |
Tue, 25 February 2014 12:55 |
Simone Dionisi Messages: 4 Registered: February 2014 |
Junior Member |
|
|
Hi everybody,
I have created a Web service deployed on Tomcat that uses a X-text project as library.
On start-up of the service I have added the EMF registration, but when I call the method Guice.createInjector(new MyRuntimeModule()) it returns the following exception:
com.google.inject.CreationException: Guice creation errors:
1) Error injecting method, java.lang.ExceptionInInitializerError
at org.eclipse.xtext.validation.AbstractInjectableValidator.register(AbstractInjectableValidator.java:44)
at org.eclipse.xtext.service.MethodBasedModule.configure(MethodBasedModule.java:55)
while locating MyValidator
If i try to run the application within eclipse, so without deploying it in Tomcat I don't have the same issue.
The jar library has been created using Maven Tycho
<?xml version="1.0" encoding="UTF-8"?>
<project >
<modelVersion>4.0.0</modelVersion>
<artifactId>parserCompiler</artifactId>
<packaging>eclipse-plugin</packaging>
<name>Metalanguage - Grammar</name>
<properties>
<jdk.version>1.7</jdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<!-- The src directory must be named as resource dir to put it on the build classpath. This is required to resolve the
workflow module named in the .mwe2 file -->
<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*.xtext</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src-gen</source>
<source>xtend-gen</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.fornax.toolsupport</groupId>
<artifactId>fornax-oaw-m2-plugin</artifactId>
<configuration>
<workflowDescriptor>src/../Generate.mwe2</workflowDescriptor>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Thanks in advance
[Updated on: Thu, 27 February 2014 13:11] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03491 seconds