Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [etrice-dev] problem with standard headers

Hi Peter,

the classpath for the generator is the weak point here (and definitely deserves improvement).

I dropped e.g.
                <include name="org.eclipse.emf.ecore_2.8*.jar" />
and /org.eclipse.etrice.generator.java.tests/make.xml failed.

In the output folder you will find in this case
/org.eclipse.etrice.generator.java.tests/output/generate_err.txt
with the contents
java.lang.NoClassDefFoundError: org/eclipse/emf/ecore/EObject
Caused by: java.lang.ClassNotFoundException: org.eclipse.emf.ecore.EObject
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: org.eclipse.etrice.generator.java.Main.  Program will exit.
Exception in thread "main" 

To fix the problem you should compare the includes in make.xml, lines 94ff with the contents of ${ETRICE_TARGET_PLATFORM}.
The problematic point is that (part of) the expected version number is specified in the includes.
So in some cases a change of even the minor version would lead to an empty result.

Be careful with the fix that you don't break users with an older set of plug-ins.

I am no Ant expert. But I assume it should be possible to re-use parts of the make.xml for all three generator tests.
That could be extracted and moved to org.eclipse.etrice.generator.common.tests.
Then we could avoid having to apply a fix in three places.

Hope that helps,
Henrik

Am 13.02.2013 11:53, schrieb Karlitschek, Peter:
Hi all,
in Order to debug the issue, I have made a fresh install of eclipse and cloned the etrice git repository on a Windows7 machine. Unfortunately I cannot run the generator tests for cpp ( nor or C or JAVA ). The ant script stops where the generator.xxx\Main.java class should be loaded with a failure.

My setup:
Eclipse Juno 32-bit, Modeling Edition
Xtext,Xtend 2.3.1
Graphiti 0.9.1
CDT 8.1.1
JDK_1_6-39
ETRICE_C_RUNTIME;ETRICE_CPP_RUNTIME;ETRICE_TARGET_PLATFORM variables set

Did I miss anything in the installation instructions? 
Any idea?

- Peter

-----Original Message-----
From: etrice-dev-bounces@xxxxxxxxxxx 
[mailto:etrice-dev-bounces@xxxxxxxxxxx] On Behalf Of Henrik 
Rentz-Reichert
Sent: Montag, 4. Februar 2013 18:44
To: eTrice developer mailing list
Subject: [etrice-dev] problem with standard headers

Hi all,

we're encountering a problem with the unit test (rather end 
to end tests, [1]) for the C++ generator.
The code compiles and runs fine under MinGW on 32 bit systems.

But with MinGW64 there seem to be incompatible types (at 
least the timespec) which are defined in both, pthread.h and timer.h.

Does anyone have an idea how to solve this issue?

-Henrik


[1] 
http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/te
sts/org.eclipse.etrice.generator.cpp.tests

_______________________________________________
etrice-dev mailing list
etrice-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/etrice-dev

---
This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.

Diese Nachricht enthaelt vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfaenger dieser E-mail sein, senden Sie bitte diese an den Absender zurueck und loeschen Sie die E-mail aus Ihrem System.

_______________________________________________
etrice-dev mailing list
etrice-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/etrice-dev


Back to the top