Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [GWT] Compilation Problems(EMF Project cannot be compiled if inherited in other GWT project)
[GWT] Compilation Problems [message #1801133] Mon, 14 January 2019 13:12 Go to next message
Benno Kallweit is currently offline Benno KallweitFriend
Messages: 8
Registered: November 2016
Junior Member
Hi all,

i am currently developing a web application and i am now struggling with the same error for many days now.

What i did so far:

- I created an EMF project in eclipse (photon) with the project wizard. Just a basic data model with 8 classes and one or two relations each, just to other elements that are modeled here, no external types or anything else.
Everything works as expected and compiles just great without any problems.

- As the runtime platform i choose GWT as i want to use this project in my web application.

- The myProject.gwt.xml file is generated and looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.1/distro-source/core/src/gwt-module.dtd">

<!--
-->

<module>
  <inherits name="com.google.gwt.user.User" />
  <inherits name="org.eclipse.emf.ecore.Ecore" />
  <source path=""/>
  <source path="impl"/>
  <source path="util"/>
</module>



- When i compile the EMF project with the GWT compiler (2.7 or 2.8) it works just fine, with any GWT SDK version.

- Now i inherit the created project in the xxx.gwt.xml file in my web application project with the following get.xml file and places the exported jar file of the EMF project under war/WEB-INF/lib.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN"
  "http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module >
	<inherits name='com.google.gwt.user.User'/>
  	<inherits name='com.google.gwt.user.theme.clean.Clean'/>
  	<inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
  	<inherits name="org.eclipse.emf.ecore.Ecore" />
  	<inherits name="x.y.MyProject" />

  	<entry-point class='x.y.webApplicationProject'/>
  	
  	<source path='client'/>
  	<source path='shared'/>
  	</module>



- I also tried to include the project on the build path instead of the jar file, but the result is the same:

Quote:

Jan 14, 2019 1:40:29 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Compiling module x.y.webApplicationProject.
webApplicationProject
Tracing compile failure path for type 'x.y.myProjectPackageImpl'
[ERROR] Errors in 'file:/C:/.../MyProjectPackageImpl.java'
[ERROR] Line 625: The method getResource(String) is undefined for the type Class<capture#1-of ? extends MyProjectPackageImpl>
[ERROR] Hint: Your source appears not to live underneath a subpackage called 'client'; no problem, but you'll need to use the <source> directive in your module to make it accessible



The last error just came up today. Unfortunately i cannot reproduce what i did before it came up. My source is underneath the client package and is also added as <source>.

Does anyone have an idea where that comes from? Creating a new Project and importing my code did not solve anything.

[Updated on: Fri, 18 January 2019 09:21]

Report message to a moderator

Re: [GWT] Compilation Problems [message #1801440 is a reply to message #1801133] Sat, 19 January 2019 07:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Sorry, it's been so very long since I've really even tested the GWT stuff. I've considered several times to discontinue it; most recently when I needed to port the build to Maven/Tycho.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [GWT] Compilation Problems [message #1808357 is a reply to message #1801440] Fri, 21 June 2019 21:36 Go to previous message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
Hello,
Happy user of EMF and EMF/GWT here. Haven't been looking at the newsgroup for a long time since everything works so well :-)
Please don't discontinue it.

Regards,
Anders
Previous Topic:Dynamic loading of Meta Model
Next Topic:Extra getPackage in model generation
Goto Forum:
  


Current Time: Fri Apr 19 10:29:37 GMT 2024

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

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

Back to the top