Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Error injecting method [Xtext project on Tomcat](Caused by: java.lang.SecurityException: class "org.eclipse.emf.ecore.resource.UR IConverter$Loadable"'s signer information does not match signer information of o ther classes in the same pac)
Error injecting method [Xtext project on Tomcat] [message #1256454] Tue, 25 February 2014 12:55 Go to next message
Simone Dionisi is currently offline Simone DionisiFriend
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

Re: Error injecting method [Xtext project on Tomcat] [message #1257811 is a reply to message #1256454] Wed, 26 February 2014 20:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

hmmmm this looks strange. are you sure the xtend code is compiled and packaged?

a bit more stacktrace would be interesting
you may have a look at https://github.com/cdietrich/xtext-maven-example

btw why dont you simply call new MyDslStandaloneSetup().createInjectorAndDoEMRegistration()


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error injecting method [Xtext project on Tomcat] [message #1258513 is a reply to message #1257811] Thu, 27 February 2014 13:08 Go to previous messageGo to next message
Simone Dionisi is currently offline Simone DionisiFriend
Messages: 4
Registered: February 2014
Junior Member
Hi Christian,

thanks for your reply.
Actually the call new MyDslStandaloneSetup().createInjectorAndDoEMRegistration() is the one that generates the exception.

I have been through the exception and I have found the following cause:

Caused by: java.lang.SecurityException: class "org.eclipse.emf.ecore.resource.UR
IConverter$Loadable"'s signer information does not match signer information of o
ther classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:943)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:657)
at java.lang.ClassLoader.defineClass(ClassLoader.java:785)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
2)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
ClassLoader.java:2918)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
der.java:1174)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1669)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1547)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl
.java:185)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.ja
va:1494)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.ja
va:1282)

... 76 more
Re: Error injecting method [Xtext project on Tomcat] [message #1258603 is a reply to message #1258513] Thu, 27 February 2014 14:58 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hmm Strange, no idea on that. classloader hell

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:How to Add xtext 2.5.1 Zip to Eclipse to provide xtext nature
Next Topic:Comments broke Indentation in formatted code
Goto Forum:
  


Current Time: Fri Apr 26 14:08:01 GMT 2024

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

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

Back to the top