Troubles creating jain slee 1.1 service with mobicents 2.3 and maven

90 views
Skip to first unread message

ionut.andras

unread,
Mar 1, 2011, 9:08:32 AM3/1/11
to mobicent...@googlegroups.com
Hi,


After I've installed mobicents, maven archetypes and m2eclipse I've tried to create a new project with
File -> New -> Other -> Maven -> Maven Project

As archetype I choose
org.mobicents.tools.maven.archetype.slee         |         jain-slee-11-service        |        1.0.0.BETA2-SNAPSHOT
(Mobicents :: Tools :: SLEE :: Maven2 Archetypes :: jain-slee-11-service)

Eclipse asks me for package, artefact ID and service and When I click finish I get the following error:

Failed to create project.
java.lang.NullPointerException

Even I get this error, eclipse creates a directory structure described in newproject4.jpg

To better expose the problem I've also attached the print screen with the key steps of creating project.

However, when I try to "Run As -> Maven install" I get errors in console (attached in errors.txt).

It is normal to see that error when creating the project?
What can I do to successfully build a project?

My envoronment:
Windows 7,
Mobicents 2.3,
Maven 3.0.1
Eclipse Helios with m2eclipse

Thanks  a lot.



newprj.jpg
newprj2.jpg
newprj3.jpg
newproject4.jpg
errors.txt

ziza

unread,
Mar 25, 2011, 8:31:00 AM3/25/11
to mobicents-public
Hi
I’m having a similar problem, I used this tutorial
http://emmartins.blogspot.com/2008/06/jain-slee-beginners-tutorial-thats.html
to build a simple application but everything goes like the tutorial,
but when I run on console I got:

[INFO] ***************************************************************
[INFO] Analizing slee-11-service-du for deployable-unit.xml
[INFO] ***************************************************************
[INFO] Adding component artifact: classes
[ERROR] C:\Documents and Settings\User1\My Documents\workspace\slee-11-
service\library\target\classes isn't a file.
org.codehaus.plexus.archiver.ArchiverException: C:\Documents and
Settings\User1\My Documents\workspace\slee-11-service\library\target
\classes isn't a file.
at
org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:
300)
at
org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:
292)
at
org.mobicents.plugins.du.AbstractDuMojo.createArchive(AbstractDuMojo.java:
480)
at
org.mobicents.plugins.du.AbstractDuMojo.execute(AbstractDuMojo.java:
515)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:
107)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
209)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:
84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:
59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:
183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:
161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:
290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:
230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:
409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Mobicents :: Service :: slee-11-service-parent .... SUCCESS
[0.156s]
[INFO] Mobicents :: Service :: slee-11-service-library ... SUCCESS
[0.438s]
[INFO] Mobicents :: Service :: slee-11-service-events .... SUCCESS
[0.609s]
[INFO] Mobicents :: Service :: slee-11-service-sbb ....... SUCCESS
[0.187s]
[INFO] Mobicents :: Service :: slee-11-service-du ........ FAILURE
[0.172s]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------

Did you find the problem? How can I configure du to look in the
correct folder?
Thanks,
ziza
>  newprj.jpg
> 135KVerTransferir
>
>  newprj2.jpg
> 112KVerTransferir
>
>  newprj3.jpg
> 104KVerTransferir
>
>  newproject4.jpg
> 99KVerTransferir
>
>  errors.txt
> 28KVerTransferir

Bartosz Baranowski

unread,
Mar 25, 2011, 9:03:39 AM3/25/11
to mobicent...@googlegroups.com
Hi 
Could you zip generated directory and send it over? Im not quite sure of the cause. Did not face that. Possibly M3 might be the cause.
Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.

Bartosz Baranowski

unread,
Mar 25, 2011, 9:04:50 AM3/25/11
to mobicent...@googlegroups.com
Also: http://community.jboss.org/wiki/MobicentsJAINSLEEMavenArchetypes

Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.


Teresa Reis

unread,
Mar 25, 2011, 10:08:29 AM3/25/11
to mobicent...@googlegroups.com

Hi,

 

Here it is the eclipse project, and the archetype, that I use for creating the project. I made some changes in the archetype, and in the eclipse pom.

In the archetypes-catalog I add the URL of JBoss repository, because he can´t find the dependencies, in the pom of eclipse I add the parent reference, because without that the I can’t use the command mvn mobicents:eclipse.

 

Thanks in advance,

ziza



2011/3/25 Bartosz Baranowski <bara...@gmail.com>
slee-11-service.zip
archetype-catalog.xml

Bartosz Baranowski

unread,
Mar 25, 2011, 10:24:13 AM3/25/11
to mobicent...@googlegroups.com

How did you run it? I dont have problems with building it:

......................


[INFO] No tests to run.
[INFO] [library:create {execution: default-create}]
[INFO] Library Refs Configuration:
null
[INFO] EventType Refs:
null
[INFO] ProfileSpec Refs:
null
[INFO] RA Type Refs:
null
[INFO] SBB Refs:
null
[INFO] I depend on: [junit#junit#4.1] @ compile
[INFO] Generated Library descriptor: E:\workspace\slee-11-service\library\target\classes\META-INF\library-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library-jar PUBLIC
                "-//Sun Microsystems, Inc.//DTD JAIN SLEE Library 1.1//EN"

<library-jar>
        <library>
                <library-name>slee-11-service</library-name>
                <library-vendor>org.mobicents.example</library-vendor>
                <library-version>1.0-SNAPSHOT</library-version>

                <jar>
                        <jar-name>jars/junit-4.1.jar</jar-name>
                </jar>
        </library>
</library-jar>


[INFO] Building jar: E:\workspace\slee-11-service\library\target\slee-11-service-library-1.0-SNAPSHOT.jar
[INFO] Installing E:\workspace\slee-11-service\library\target\slee-11-service-library-1.0-SNAPSHOT.jar to C:\Users\baranowb\.m2\repository\org\mobicents\example\slee-11-service-library\1.0-SNAPSHOT\sl
ee-11-service-library-1.0-SNAPSHOT.jar
[INFO] [install:install {execution: default-install}]
[INFO] Installing E:\workspace\slee-11-service\library\target\slee-11-service-library-1.0-SNAPSHOT.jar to C:\Users\baranowb\.m2\repository\org\mobicents\example\slee-11-service-library\1.0-SNAPSHOT\sl
ee-11-service-library-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------


.......................


<!DOCTYPE deployable-unit PUBLIC "-//Sun Microsystems, Inc.//DTD JAIN SLEE Deployable Unit 1.1//EN" "http://java.sun.com/dtd/slee-deployable-unit_1_1.dtd">
<deployable-unit>
        <jar>slee-11-service-library-1.0-SNAPSHOT.jar</jar>
        <jar>slee-11-service-events-1.0-SNAPSHOT.jar</jar>
        <jar>slee-11-service-sbb-1.0-SNAPSHOT.jar</jar>
        <service-xml>services/service.xml</service-xml>
</deployable-unit>

[INFO] Generating ant script for management without maven...
[INFO] Parsing services\service.xml with validation
[INFO] Resolved filename slee-service_1_0.dtd
[INFO] build.xml generated in target dir
[INFO] Building jar: E:\workspace\slee-11-service\du\target\slee-11-service-du-1.0-SNAPSHOT.jar
[INFO] Installing E:\workspace\slee-11-service\du\target\slee-11-service-du-1.0-SNAPSHOT.jar to C:\Users\baranowb\.m2\repository\org\mobicents\example\slee-11-service-du\1.0-SNAPSHOT\slee-11-service-d
u-1.0-SNAPSHOT.jar
[INFO] [antrun:run {execution: deploy-DU}]
[INFO] Executing tasks
     [copy] Copying 1 file to E:\tmp\2.4.0\jboss-5.1.0.GA\server\default\deploy
[INFO] Executed tasks
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Mobicents :: Service :: slee-11-service-parent ........ SUCCESS [1.962s]
[INFO] Mobicents :: Service :: slee-11-service-library ....... SUCCESS [20.355s]
[INFO] Mobicents :: Service :: slee-11-service-events ........ SUCCESS [0.301s]
[INFO] Mobicents :: Service :: slee-11-service-sbb ........... SUCCESS [0.093s]
[INFO] Mobicents :: Service :: slee-11-service-du ............ SUCCESS [0.978s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26 seconds
[INFO] Finished at: Fri Mar 25 15:18:50 CET 2011
[INFO] Final Memory: 39M/372M
[INFO] ------------------------------------------------------------------------



Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.


Teresa Reis

unread,
Mar 25, 2011, 10:35:20 AM3/25/11
to mobicent...@googlegroups.com

First I use eclipse, and I made like in the picture, Run as -> maven install.

I had the error presented in this post. Then I use the windows console, I start Mobicents JAIN SLEE, ant in the project directory I use the command mvn install, but o got the same error as before.

I need to build before using mvn install? Which Goals and Profiles I shold use?

 

Best regards,

MavenInstall.JPG

Bartosz Baranowski

unread,
Mar 25, 2011, 11:27:01 AM3/25/11
to mobicent...@googlegroups.com
m2 eclipse comes with maven 3, this fails. To make it build, edit maven plugin settings and add maven installation (maven 2). 
Not sure why it fails with 3 though, will have to check.

Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.


Teresa Reis

unread,
Mar 25, 2011, 11:40:35 AM3/25/11
to mobicent...@googlegroups.com

Hi Bartosz


This is really I can’t use the command mvn install but if I use the following sequence:

Mvn install

I got:

[INFO] Mobicents :: Service :: slee-11-service-parent .... SUCCESS [0.157s]

[INFO] Mobicents :: Service :: slee-11-service-library ... SUCCESS [0.437s]

[INFO] Mobicents :: Service :: slee-11-service-events .... SUCCESS [0.984s]

[INFO] Mobicents :: Service :: slee-11-service-sbb ....... SUCCESS [0.516s]

[INFO] Mobicents :: Service :: slee-11-service-du ........ FAILURE [0.141s]

And next if I use

mvn install -rf :slee-11-service-du

I can make the build and deploy in Mobicents JSLEE server, which does not make any sense for me.

I will check that solution and give my feedback. Thanks for the tip.

Really sorry for the spam, but I want to start using Mobicents JAIN SLEE because I believe that is a powerful tool, and I want to show in the group I work, how to develop using this technologies.

 

Thanks again,

Teresa Reis

unread,
Mar 25, 2011, 11:42:41 AM3/25/11
to mobicent...@googlegroups.com

Hi Bartosz

I can not use the command mvn install but if I use the following sequence:

Mvn install

I got:

[INFO] Mobicents :: Service :: slee-11-service-parent .... SUCCESS [0.157s]

[INFO] Mobicents :: Service :: slee-11-service-library ... SUCCESS [0.437s]

[INFO] Mobicents :: Service :: slee-11-service-events .... SUCCESS [0.984s]

[INFO] Mobicents :: Service :: slee-11-service-sbb ....... SUCCESS [0.516s]

[INFO] Mobicents :: Service :: slee-11-service-du ........ FAILURE [0.141s]

And next if I use

mvn <goals> -rf :slee-11-service-du

I can make the build and deploy in Mobicents JSLEE server, this does not make any sense, what is sopose to be in

\workspace\slee-11-service\library\target\classes  

For he make the full build using mvn install.

Really sorry for the spam, but I want to start using Mobicents JAIN SLEE because I believe that is a powerful tool, and I want to show in the group I work how to develop using this technologies.

 

Thanks again,

ziza

 



2011/3/25 Teresa Reis <ziza...@gmail.com>

Teresa Reis

unread,
Mar 25, 2011, 12:22:31 PM3/25/11
to mobicent...@googlegroups.com

Hi Bartosz,


That solution really solves my problem, thank you. I hope that in the future eclipse-plugin work with Maven 3.x.

Now I will continue my learning in Mobicents JAIN SLEE, and I point my work in some resources that join Android and IPTV (two areas that I work), so I hope in the future contribute for this great project ;)


Thanks for all help.

 

Best regards,

Teresa Reis

unread,
Mar 25, 2011, 3:15:24 PM3/25/11
to mobicent...@googlegroups.com

Hi,

 

It came to me a small question, if I want to add a new .jar to the service created, how can I do that, I need to create a new achetype-catalog? I just can add the jar in the main pom?

For example, I’m trying to add javax.sip.RequestEvent, and in my sbb but it don’t recognize javax.sip, I add jain-sip in my pom, but I still can´t get javax.sip.

Alexandre Mendonça

unread,
Mar 25, 2011, 8:39:43 PM3/25/11
to mobicent...@googlegroups.com, Teresa Reis
Hi Teresa,

Where do you need the jar to be included ? in the eclipse project classpath or in the deployable unit jar ?

For the first, add the dependency to the pom and do mvn mobicents:eclipse, it should fix it.
For the latter, add the dependency to a library pom, it should be included in the deployed DU.

Regards,

--
Alexandre Mendonça // JBoss R&D
http://ammendonca.blogspot.com/

ziza

unread,
Mar 28, 2011, 9:54:25 AM3/28/11
to mobicents-public
Hi Alexandre,

That solution really workout, my confusion was related with the fact
that my Eclipse don’t recognize javax.sip as a dependency, only
javax.servet.sip-api. And when I used maven-archetypes I didn’t need
to add any library, so I thought that for add any more libraries, I
needed to edit maven-archetypes, and create a new project.
But with you help I realize that I just need to edit the pom.xml and
the reference in libs/pom.xml.
Really thanks for the help.

Best regards,
Teresa



On 26 Mar, 01:39, Alexandre Mendonça <brains...@gmail.com> wrote:
> Hi Teresa,
>
> Where do you need the jar to be included ? in the eclipse project classpath
> or in the deployable unit jar ?
>
> For the first, add the dependency to the pom and do mvn mobicents:eclipse,
> it should fix it.
> For the latter, add the dependency to a library pom, it should be included
> in the deployed DU.
>
> Regards,
>
> --
> *Alexandre Mendonça* // JBoss R&Dhttp://ammendonca.blogspot.com/
>
>
>
>
>
>
>
> On Fri, Mar 25, 2011 at 19:15, Teresa Reis <zizata...@gmail.com> wrote:
> > Hi,
>
> > It came to me a small question, if I want to add a new .jar to the service
> > created, how can I do that, I need to create a new achetype-catalog? I just
> > can add the jar in the main pom?
>
> > For example, I’m trying to add javax.sip.RequestEvent, and in my sbb but it
> > don’t recognize javax.sip, I add jain-sip in my pom, but I still can´t get
> > javax.sip.
>
> > Best regards,
>
> > ziza
>
> > 2011/3/25 Teresa Reis <zizata...@gmail.com>
>
> >> Hi Bartosz,
>
> >> That solution really solves my problem, thank you. I hope that in the
> >> future eclipse-plugin work with Maven 3.x.
>
> >> Now I will continue my learning in Mobicents JAIN SLEE, and I point my
> >> work in some resources that join Android and IPTV (two areas that I work),
> >> so I hope in the future contribute for this great project ;)
>
> >> Thanks for all help.
>
> >> Best regards,
>
> >> ziza
>
> >> 2011/3/25 Teresa Reis <zizata...@gmail.com>
> >>> 2011/3/25 Teresa Reis <zizata...@gmail.com>
>
> >>>> First I use eclipse, and I made like in the picture, Run as -> maven
> >>>> install.
>
> >>>> I had the error presented in this post. Then I use the windows console,
> >>>> I start Mobicents JAIN SLEE, ant in the project directory I use the command
> >>>> mvn install, but o got the same error as before.
>
> >>>> I need to build before using mvn install? Which Goals and Profiles I
> >>>> shold use?
>
> >>>> Best regards,
>
> >>>> ziza
>
> >>>> 2011/3/25 Bartosz Baranowski <baran...@gmail.com>
> >>>>> fromhttp://java.sun.com/dtd/slee-service_1_0.dtd
> >>>>> On Fri, Mar 25, 2011 at 3:08 PM, Teresa Reis <zizata...@gmail.com>wrote:
>
> >>>>>> Hi,
>
> >>>>>> Here it is the eclipse project, and the archetype, that I use for
> >>>>>> creating the project. I made some changes in the archetype, and in the
> >>>>>> eclipse pom.
>
> >>>>>> In the archetypes-catalog I add the URL of JBoss repository, because
> >>>>>> he can´t find the dependencies, in the pom of eclipse I add the parent
> >>>>>> reference, because without that the I can’t use the command mvn
> >>>>>> mobicents:eclipse.
>
> >>>>>> Thanks in advance,
>
> >>>>>> ziza
>
> >>>>>> 2011/3/25 Bartosz Baranowski <baran...@gmail.com>
>
> >>>>>>> Also:
> >>>>>>>http://community.jboss.org/wiki/MobicentsJAINSLEEMavenArchetypes
>
> >>>>>>> Bartosz Baranowski
> >>>>>>> JBoss R & D
> >>>>>>> ==================================
> >>>>>>> Word of criticism meant to improve is always step forward.
>
> >>>>>>> On Fri, Mar 25, 2011 at 2:03 PM, Bartosz Baranowski <
> >>>>>>> baran...@gmail.com> wrote:
>
> >>>>>>>> Hi
> >>>>>>>> Could you zip generated directory and send it over? Im not quite
> >>>>>>>> sure of the cause. Did not face that. Possibly M3 might be the cause.
> >>>>>>>> Bartosz Baranowski
> >>>>>>>> JBoss R & D
> >>>>>>>> ==================================
> >>>>>>>> Word of criticism meant to improve is always step forward.
>
> >>>>>>>> On Fri, Mar 25, 2011 at 1:31 PM, ziza <zizata...@gmail.com> wrote:
>
> >>>>>>>>> Hi
> >>>>>>>>> I’m having a similar problem, I used this tutorial
>
> >>>>>>>>>http://emmartins.blogspot.com/2008/06/jain-slee-beginners-tutorial-th...
> >>>>>>>>> to build a simple application but everything goes like the
> >>>>>>>>> tutorial,
> >>>>>>>>> but when I run on console I got:
>
> >>>>>>>>> [INFO]
>
> ...
>
> mais informações »
Reply all
Reply to author
Forward
0 new messages