ktmprabhu / spray

Automatically exported from code.google.com/p/spray
0 stars 0 forks source link

Activator is "invalid/not found" in runtime Eclipse #225

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

i've got a Problem with the latest stable build (#109) of the "Spray SDK 
Feature".
When i try to create a graphiti diagramm with my own diagramm type in the 
runtime Eclipse environment, i get an exception in the development environment 
console that the activator for my plugin (e.g. my diagram type "jsfbuilder") is 
invalid (or maybe not found ?).
The result is that the "diagram Area" shows following message "Could not find 
diagram type provider for jsfbuilder".

What steps will reproduce the problem?
1. Create or import metamodel Project (in my case ecore metamodel)
2. Create Spray Project using this metamodel
3. Launch runtime Eclipse environment
4. Create new Project and in this project a new "graphiti diagram" with your 
own diagram type

What is the expected output? What do you see instead?
Expected Output: A Diagram Area with the Shapes and Connections of my own 
metamodel.
What i See: Exception in development environment console (see attachment 
stacktrace.txt) and in the runtime environment i see following message in the 
Diagram Area "Could not find diagram type provider for jsfbuilder".

What version of the product are you using? On what operating system?
OS: Windows 7 Professional SP1 64-Bit Architecture

Eclipse: Fresh copy of eclipse-SDK-4.2.1-win32-x86_64 (Juno Classic)

Runtime-JRE of Eclipse: JDK 1.7

JRE System Library of Spray and MetaModel Projects: JDK 1.5.0_22

Spray 3rdParty: 
https://spray.ci.cloudbees.com/job/spray-ci-targetplatform/lastSuccessfulBuild/a
rtifact/releng/org.eclipselabs.spray.repository/target/repository/

(at the time i installed it was Build #13, i installed the dependencies, cause 
i had a fresh Eclipse Juno)

Spray SDK Feature: version 0.5.0.201212052314
https://spray.ci.cloudbees.com/job/spray-assembly-build/lastSuccessfulBuild/arti
fact/releng/org.eclipselabs.spray.updatesite/target/repository/

(at the time i installed it was Build #109)

Please provide any additional information below.

I had to do a workaround to get the Build #109 installed from the update site. 
The update Site misses following two components of spray:

org.eclipselabs.spray.generator.common_0.5.0.201212052314.jar
org.eclipselabs.spray.tychohelpers_0.5.0.201212052314.jar

So i downloaded the missing artifacts from the CI-Build modules,
renamed them as shown above,
put them into the eclipse dropins folder,
restarted eclipse and could then install the SPRAY SDK Feature from the 
update-site of Build #109.

https://spray.ci.cloudbees.com/view/1.%20Eclipse%20Juno/job/spray-assembly-build
/109/org.eclipselabs.spray$org.eclipselabs.spray.tychohelpers/

https://spray.ci.cloudbees.com/view/1.%20Eclipse%20Juno/job/spray-assembly-build
/109/org.eclipselabs.spray$org.eclipselabs.spray.generator.common/

I really need the fixes of Build #109, thats why i tried to get it running.

Original issue reported on code.google.com by Nosezeic...@gmail.com on 6 Dec 2012 at 6:16

Attachments:

GoogleCodeExporter commented 8 years ago
There's also an import that cant be resolved (just after creating new Spray 
Project).

import org.eclipselabs.spray.runtime.containers.OwnerPropertyDeleteFeature;

in "src-gen/diagrams/JsfbuilderFeatureProviderBase.java". i commented that line 
out.

Original comment by Nosezeic...@gmail.com on 6 Dec 2012 at 6:24

GoogleCodeExporter commented 8 years ago
Of course i checked if the Activator.java is there. Its location is 
"src-gen/spray/Activator.java".
See attachment

Original comment by Nosezeic...@gmail.com on 6 Dec 2012 at 6:33

Attachments:

GoogleCodeExporter commented 8 years ago
The OwnerPropertyDeleteFeature.java is also there in the spray project and also 
in the jar that is built. I don't know why it cannot be found. Same for the 
activator.
I do see that the eclipse JDK is 1.7,  while the Spray seems to be built with 
JDK 1.5.
Could that cause a a problem ?

Original comment by joswar...@gmail.com on 6 Dec 2012 at 6:47

GoogleCodeExporter commented 8 years ago
Tried to change all the jdk settings to 1.7, still same problem with the 
activator.java
and the non resolvable import. 
The exact message is "The import org.eclipselabs.spray.runtime.containers 
cannot be resolved", e.g. the package isnt found right ?

What jdk or compliance level is recommended for the Metamodel-Project (ecore) 
and Spray-Project ? i thougt we had to set the compliance level in the genmodel 
file to 5.0

will try to set jdk settings to 5.0 for metamodel and spray project

Original comment by Nosezeic...@gmail.com on 6 Dec 2012 at 7:11

GoogleCodeExporter commented 8 years ago
I added the generator.common project to the feature, so you do not have to 
install that separately.  I also remove an unnecessary reference to the 
tychohelper, so this project is not needed anymore. 
I also commented out the three test projects that were failing,  so the latest 
build is successful again. The failure of the tests is due to the fact that 
they use an outdated syntax for the Spray DSL,  they need work to update them.

Original comment by joswar...@gmail.com on 6 Dec 2012 at 7:19

GoogleCodeExporter commented 8 years ago
Setting all the JDK stuff to 1.5 wasnt helpful too. When setting the Runtime 
Eclipse JDK to run with jdk 1.5, my diagramm type isnt even selectable and i 
get many warnings from osgi plugins not executed with jdk 1.6.

"Missing required capability Require-Capability: osgi.ee; 
filter="(&(osgi.ee=JavaSE)(version=1.6))"

So i changed the compliance level of my genmodel to 1.6 (i think this was the 
default) and all other jdk settings too.

The SDK Feature is still not installable from the snapshot repository, see 
attachment

Original comment by Nosezeic...@gmail.com on 6 Dec 2012 at 7:48

Attachments:

GoogleCodeExporter commented 8 years ago
triggered the assembly build with Jos' changes, so hopefully build 113 should 
be installable again

Original comment by de.abg.r...@gmail.com on 6 Dec 2012 at 9:01

GoogleCodeExporter commented 8 years ago
Thx, the update-site works again, without the need to install missing artefacts 
by hand.

Original comment by Nosezeic...@gmail.com on 6 Dec 2012 at 9:31

GoogleCodeExporter commented 8 years ago
I think the Priority of this ticket should be higher, because a fundamental 
functionality doesnt work in the latest build.
E.g. you cant run your diagram editor in the runtime environment as mentioned 
before.

Im not alone with this Problem, see the attached stacktrace of my colleague 
(who has exact same Eclipse and JDK configuration like me).

Thank you for your help :)

Original comment by Nosezeic...@gmail.com on 7 Dec 2012 at 1:33

Attachments:

GoogleCodeExporter commented 8 years ago
Did you copy the plugin.xml file from the src-gen folder to the root folder.  
If I do not do that I get the same problems,  but if I copy this file 
everything works fine.

Original comment by joswar...@gmail.com on 7 Dec 2012 at 1:54

GoogleCodeExporter commented 8 years ago
Yes, i get that exceptions even when i copy the plugin.xml from sr-gen to the 
root of my spray project. Same thing with my colleagues Spray Project.

Has this something to do with my the non resolvable package that i mentioned 
above in comment 4 ?

Original comment by Nosezeic...@gmail.com on 7 Dec 2012 at 2:23

GoogleCodeExporter commented 8 years ago
I just saw in the error log view, that there are non resolved genmodels for 
spray internal stuff, i guess.
see attachment.

Original comment by Nosezeic...@gmail.com on 7 Dec 2012 at 2:40

Attachments:

GoogleCodeExporter commented 8 years ago
Is your spray.properties file available and does it have property definitions 
for all packages ?  I found that the new project wizard does create an empty 
spray.properties file and if the generator has already run for another project 
the result is that the package names from the other project are used.  Which 
mixes up path names.

The Activator is then generated using the path name from the other project, 
while the manifest expects it in another path.

If theer is no other project the activator is generated in a default location 
which is incorrect as well.

Can you check whether the activator class is in the package that the Manifest 
expects it?

Original comment by joswar...@gmail.com on 7 Dec 2012 at 2:52

GoogleCodeExporter commented 8 years ago
Eef is only used by the Fowler example project.  Joerg,  do we deliver example 
projects as part of the distribution (I don't know)?  It should not have any 
implications unless you use the fowler example.  Can you check my previous 
remark?

Original comment by joswar...@gmail.com on 7 Dec 2012 at 3:08

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 4a24d52abcb1.

Original comment by joswar...@gmail.com on 7 Dec 2012 at 3:11

GoogleCodeExporter commented 8 years ago
I had exactly the same problems (see comment 13) and with the latest fix,  the 
problems are gone in my Spray runtime. Can you verify when the new build is 
ready ?

Original comment by joswar...@gmail.com on 7 Dec 2012 at 3:15

GoogleCodeExporter commented 8 years ago
spray.properties is available but empty. How should its content look like ?
I've got also an ${MyProjectName}.properties.
In the previous version of Spray SDK Feature (Build #97) i had no 
spray.properties file.

see attachment for content of my jsfbuilder.properties

Original comment by Nosezeic...@gmail.com on 7 Dec 2012 at 3:22

Attachments:

GoogleCodeExporter commented 8 years ago
I changed the non resolvable import from "import 
org.eclipselabs.spray.runtime.containers.OwnerPropertyDeleteFeature;"
to "import 
org.eclipselabs.spray.runtime.graphiti.containers.OwnerPropertyDeleteFeature;"
now the import can be resolved.
Is this correct this way ?

Original comment by Nosezeic...@gmail.com on 7 Dec 2012 at 3:29

GoogleCodeExporter commented 8 years ago
The Manifest expects the activator in "Bundle-Activator: 
ba.jsfbuilder.Activator" when i understand it right. But my Activator.java is 
located in "ba.jsfbuilder/src-gen/spray/Activator.java"

Original comment by Nosezeic...@gmail.com on 7 Dec 2012 at 3:33

GoogleCodeExporter commented 8 years ago
The name of the properties file has changed to spray.properties. the 
<projectname>.properties is not used anymore.  The wizard should create a 
spray.properties file, instead of the <projectname>.properties. This is what I 
fixed in my lst commit.  The correct properties file is created by the wizard.  
The wizard also creates thye first spray model files,  and the spray generator 
runs on these files during project creation. Thus immediately generating files 
in the wrong location.

You should copy the contents from the <project>,properties file to the 
spray.properties file and then generate all code again. This might solve the 
problems (I did not try this)

Original comment by joswar...@gmail.com on 7 Dec 2012 at 3:33

GoogleCodeExporter commented 8 years ago
This helped :)
"You should copy the contents from the <project>,properties file to the 
spray.properties file and then generate all code again. This might solve the 
problems (I did not try this)"

Thank you for your fast help. I think i can work with this version of spray now 
to develop my spray-project :)

Original comment by Nosezeic...@gmail.com on 7 Dec 2012 at 3:45

GoogleCodeExporter commented 8 years ago
Good!  In that case the fix is the right one.  Have fun with your Spray 
project, and if you have anything to show,  I would find it wonderful to get 
some pictures of your editor.

Original comment by joswar...@gmail.com on 7 Dec 2012 at 4:16

GoogleCodeExporter commented 8 years ago
Im using Spray for my Bachelor Thesis. when its finished. i'll post screenshots 
of it. if its ok with the university i would also share the code.

I think until then we'll see us in the spray user-group.

Original comment by Nosezeic...@gmail.com on 7 Dec 2012 at 8:05