osgi lab problem

0 views
Skip to first unread message

matthieu vidal

unread,
Jan 18, 2010, 1:18:09 PM1/18/10
to javaee6-codecamp
Hi

Sorry I'm still a newbie with maven. I encounter the following error
message when building and installing exercice 3.2 :


~/Bureau/glassfish_osgi/samples/pluggability-cli/cli > mvn clean
install
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.glassfish.pluggability:pluggability:pom:null

Reason: Cannot find parent: org.glassfish:glassfish-parent for
project: org.glassfish.pluggability:pluggability:pom:null for project
org.glassfish.pluggability:pluggability:pom:null


[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent:
org.glassfish:glassfish-parent for project:
org.glassfish.pluggability:pluggability:pom:null for project
org.glassfish.pluggability:pluggability:pom:null
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
...

I don't know what kind of problem it can be ... seems to be a
dependancy problem with a main pom.xml ?

miga

unread,
Jan 18, 2010, 1:33:35 PM1/18/10
to javaee6-codecamp

I don't know either, but I had also the same error when trying this
exercise.
It worked after I made the last exercise, so I'm not sure at all, but
I wonder if it does not require the felix jar source. That's a wild
guess.
So, could you try the exercise 5, then retry the exercise 3, and tell
here if it works, then we could change the order of the exercises (not
very logical, but well...).

matthieu vidal

unread,
Jan 18, 2010, 3:53:26 PM1/18/10
to javaee6-codecamp
I have a new problem with exercise 5 when building the servlet :

~/myosgiprojects/services/webclient > mvn install


[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------

[INFO] Building Web client accessing Simple Provider Services
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/matthieu/
myosgiprojects/services/webclient/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to /home/matthieu/myosgiprojects/
services/webclient/target/classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
/home/matthieu/myosgiprojects/services/webclient/src/main/java/
HelloWorld.java:[24,64] non-static method getClass() cannot be
referenced from a static context

...

matthieu vidal

unread,
Jan 18, 2010, 4:21:08 PM1/18/10
to javaee6-codecamp
About exercise 5 :

Well ... that's obvious ... cut/paste is never a good way to
work ...

The HelloServlet.java should have lowercase "s" instead of "S" at
line 24

simpleService.getClass()...
instead of
SimpleService.getClass()


About exercise 3.2

The problem disappeared and I'm now able to build it ... and frankly I
don't know why ...

Piotr Swiecicki

unread,
Jan 18, 2010, 6:53:49 PM1/18/10
to javaee6-codecamp
On Jan 18, 6:18 pm, matthieu vidal <m...@matthieu-vidal.com> wrote:
> Hi
>
> Sorry I'm still a newbie with maven. I encounter the following error
> message when building and installing exercice 3.2 :
>
[...]

> Reason: Cannot find parent: org.glassfish:glassfish-parent for
> project: org.glassfish.pluggability:pluggability:pom:null for project
> org.glassfish.pluggability:pluggability:pom:null

The parent project, org.glassfish:glassfish-parent:3.0-SNAPSHOT, is
not available in standard maven repositories. To get access to it you
can follow this instruction: http://wiki.glassfish.java.net/Wiki.jsp?page=V3DevelopmentInstructions
or just add the snippet included below to your pom.xml file:
<repositories>
<repository>
<id>glassfish-repository</id>
<name>GlassFish Repository</name>
<url>http://download.java.net/maven/glassfish</url>
</repository>
</repositories>

Kind regards,
--
Piotr Swiecicki

miga

unread,
Jan 18, 2010, 11:45:10 PM1/18/10
to javaee6-codecamp

On Jan 18, 10:21 pm, matthieu vidal <m...@matthieu-vidal.com> wrote:
> About exercise 5 :
>
> Well  ... that's obvious ...  cut/paste is never a good way to
> work ...
>
> The HelloServlet.java should have lowercase "s" instead of "S"  at
> line 24
>
> simpleService.getClass()...
> instead of
> SimpleService.getClass()

No, the first line gets the class of the interface (well it would
have, if I did not made a mistake), the second line the class of the
implementation:
SimpleService.class -> here SimpleService is a class object (well an
interface object) ==> this line gets corrected
simpleService.getClass() -> here simpleService is an instance of a
class (well an instance of SimpleService, that means really an
instance of simpleServiceImpl as SimpleService is an interface, thus
it is instantiated by its implementation).

The lab has been corrected, you should just wait till it is uploaded
on the javapassion.com ftp site.

Very sorry for the trouble.

Peter

unread,
Jan 19, 2010, 5:31:52 AM1/19/10
to javaee6-codecamp
This worked perfectly for me. Thanks!

Peter Johansson

unread,
Jan 19, 2010, 8:03:40 AM1/19/10
to javaee6-codecamp
Does that correction also concernt that it get compile error in Lab 3?

/Peter

Peter Johansson

unread,
Jan 19, 2010, 8:13:41 AM1/19/10
to javaee6-codecamp
To clarify, the pom in the /cli directory points to parent which seams
to be the one in the pluggability_cli folder, this pom also have a
parent node, but where can this be found, I think the compile error
comes from my system not knowing where to find groupId "org.glassfish"

/PEter

On 19 Jan, 14:03, Peter Johansson <theironicprogram...@gmail.com>
wrote:

Peter Johansson

unread,
Jan 19, 2010, 8:19:37 AM1/19/10
to javaee6-codecamp
Probably fixed, downloaded the zip-file again and now it works.

/Peter

On 19 Jan, 14:13, Peter Johansson <theironicprogram...@gmail.com>
wrote:

Reply all
Reply to author
Forward
0 new messages