These class not found issues I'm getting does not seem to be related to how
the dependencies are added in the pom. I've added this dependency:
<dependency>
<groupId>org.apache.servicemix</groupId>
<artifactId>servicemix-jbi</artifactId>
<version>3.0-incubating-SNAPSHOT</version>
</dependency>
in all of my pom files and I still get this error:
*************************************************
[INFO] Unable to deploy project, Error accessing ServiceMix administration
javax/jbi/management/LifeCycleMBean
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to deploy
project
, Error accessing ServiceMix administration
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:559)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:488)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:458)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:273)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to deploy
proj
ect, Error accessing ServiceMix administration
at
org.apache.servicemix.maven.plugin.jbi.JbiProjectDeployerMojo.deployP
roject(JbiProjectDeployerMojo.java:146)
at
org.apache.servicemix.maven.plugin.jbi.JbiProjectDeployerMojo.execute
(JbiProjectDeployerMojo.java:75)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:534)
... 16 more
Caused by: Error accessing ServiceMix administration
at
org.apache.servicemix.jbi.management.task.JbiTask.execute(JbiTask.jav
a:272)
at
org.apache.servicemix.maven.plugin.jbi.JbiProjectDeployerMojo.isDeplo
yed(JbiProjectDeployerMojo.java:194)
at
org.apache.servicemix.maven.plugin.jbi.JbiProjectDeployerMojo.deployP
roject(JbiProjectDeployerMojo.java:120)
... 19 more
Caused by: java.lang.NoClassDefFoundError:
javax/jbi/management/LifeCycleMBean
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL
oader.java:195)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:255)
at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.
java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
org.apache.servicemix.jbi.management.task.JbiTask.class$(JbiTask.java
:123)
at
org.apache.servicemix.jbi.management.task.JbiTask.getAdminCommandsSer
vice(JbiTask.java:123)
at
org.apache.servicemix.jbi.management.task.JbiTask.execute(JbiTask.jav
a:268)
... 21 more
*************************************
Funny thing is that the servicemix-jbi-3.0-incubating.jar is in the
%smx_home%\lib directory so I don't really know how to continue debugging
this.
-los
Philip Dodds-2 wrote:
>
> Can you try using the following?
>
> <packaging>jbi-service-unit</packaging>
> <version>1.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>org.apache.servicemix</groupId>
> <artifactId>servicemix-lwcontainer</artifactId>
> <version>3.0-incubating-SNAPSHOT</version>
> </dependency>
> <dependency>
> <groupId>com.test.integration.servicemix</groupId>
> <artifactId>test-integration-servicemix</artifactId>
> <version>1.0-SNAPSHOT</version>
> <scope>runtime</scope>
> </dependency>
> </dependencies>
> <properties>
> <componentName>servicemix-lwcontainer</componentName>
> </properties>
>
> I'm not sure why you have a dependency on test-integration-servicemix
> in both your SU and you SA?
>
> Cheers
> P
>
> On 10/19/06, moraleslos <[EMAIL PROTECTED]> wrote:
>>
>> I'm running smx 3.0. As for component dependencies, I'm not exactly sure
>> what you are describing so I'll just post my poms:
>>
>> SU pom:
>> *********************************
>> .....
>> <packaging>jbi-service-unit</packaging>
>> <version>1.0-SNAPSHOT</version>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.servicemix</groupId>
>> <artifactId>servicemix-core</artifactId>
>> <version>3.0-incubating-SNAPSHOT</version>
>> <scope>provided</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.servicemix</groupId>
>> <artifactId>servicemix-jbi</artifactId>
>> <version>3.0-incubating-SNAPSHOT</version>
>> <scope>provided</scope>
>> </dependency>
>> <dependency>
>> <groupId>geronimo-spec</groupId>
>> <artifactId>geronimo-spec-activation</artifactId>
>> <version>1.0.2-rc4</version>
>> <scope>provided</scope>
>> </dependency>
>> <dependency>
>> <groupId>com.test.integration.servicemix</groupId>
>> <artifactId>test-integration-servicemix</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> <scope>runtime</scope>
>> </dependency>
>> </dependencies>
>> <properties>
>> <componentName>servicemix-lwcontainer</componentName>
>> </properties>
>> ...
>> **********************************
>>
>>
>> SA pom:
>> *********************************
>> ...
>> <packaging>jbi-service-assembly</packaging>
>> <version>1.0-SNAPSHOT</version>
>> <dependencies>
>> <dependency>
>> <groupId>com.test.integration.servicemix</groupId>
>> <artifactId>test-integration-servicemix</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> </dependency>
>> </dependencies>
>> ...
>> ***********************************
>>
>> Is this what you were looking for?
>>
>> -los
>>
>>
>> Philip Dodds-2 wrote:
>> >
>> > The Maven plugin should be able to deploy in the example you gave, in
>> > fact you can also run ServiceMix under Maven using jbi:servicemix
>> > which would work - as long as your Service Units have a dependency to
>> > their Components (since it uses this to ensure the components are
>> > deployed).
>> >
>> > I'm wondering if you are hitting a problem with either the ServiceMix
>> > versions (which version of smx are you running against) or have you
>> > added servicemix-core as provided maybe?
>> >
>> > Thanks
>> >
>> > P
>> >
>> > On 10/19/06, moraleslos <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Well, looks like it can't find the LifeCycleMBean class:
>> >>
>> >> ***********************************************
>> >> [INFO] Unable to deploy project, Error accessing ServiceMix
>> >> administration
>> >>
>> >> javax/jbi/management/LifeCycleMBean
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [DEBUG] Trace
>> >> org.apache.maven.lifecycle.LifecycleExecutionException: Unable to
>> deploy
>> >> project
>> >> , Error accessing ServiceMix administration
>> >> at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> >> ultLifecycleExecutor.java:559)
>> >> at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
>> >> Goal(DefaultLifecycleExecutor.java:488)
>> >> at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> >> ltLifecycleExecutor.java:458)
>> >> at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
>> >> dleFailures(DefaultLifecycleExecutor.java:306)
>> >> at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> >> ts(DefaultLifecycleExecutor.java:273)
>> >> at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> >> fecycleExecutor.java:140)
>> >> at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>> >> at
>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>> >> at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >> at
>> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> >> java:39)
>> >> at
>> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> >> sorImpl.java:25)
>> >> at java.lang.reflect.Method.invoke(Method.java:585)
>> >> at
>> >> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>> >> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>> >> at
>> >> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>> >>
>> >> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> >> Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to
>> >> deploy
>> >> proj
>> >> ect, Error accessing ServiceMix administration
>> >> at
>> >> org.apache.servicemix.maven.plugin.jbi.JbiProjectDeployerMojo.deployP
>> >> roject(JbiProjectDeployerMojo.java:146)
>> >> at
>> >> org.apache.servicemix.maven.plugin.jbi.JbiProjectDeployerMojo.execute
>> >> (JbiProjectDeployerMojo.java:75)
>> >> at
>> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> >> nManager.java:412)
>> >> at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> >> ultLifecycleExecutor.java:534)
>> >> ... 16 more
>> >> Caused by: Error accessing ServiceMix administration
>> >> at
>> >> org.apache.servicemix.jbi.management.task.JbiTask.execute(JbiTask.jav
>> >> a:272)
>> >> at
>> >> org.apache.servicemix.maven.plugin.jbi.JbiProjectDeployerMojo.isDeplo
>> >> yed(JbiProjectDeployerMojo.java:194)
>> >> at
>> >> org.apache.servicemix.maven.plugin.jbi.JbiProjectDeployerMojo.deployP
>> >> roject(JbiProjectDeployerMojo.java:120)
>> >> ... 19 more
>> >> Caused by: java.lang.NoClassDefFoundError:
>> >> javax/jbi/management/LifeCycleMBean
>> >> at java.lang.ClassLoader.defineClass1(Native Method)
>> >> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>> >> at
>> >> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
>> >> 4)
>> >> at
>> java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>> >> at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>> >> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>> >> at java.security.AccessController.doPrivileged(Native Method)
>> >> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>> >> at
>> >> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL
>> >> oader.java:195)
>> >> at
>> >> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
>> >> m.java:255)
>> >> at
>> >> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.
>> >> java:214)
>> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>> >> at
>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>> >> at java.lang.Class.forName0(Native Method)
>> >> at java.lang.Class.forName(Class.java:164)
>> >> at
>> >> org.apache.servicemix.jbi.management.task.JbiTask.class$(JbiTask.java
>> >> :123)
>> >> at
>> >> org.apache.servicemix.jbi.management.task.JbiTask.getAdminCommandsSer
>> >> vice(JbiTask.java:123)
>> >> at
>> >> org.apache.servicemix.jbi.management.task.JbiTask.execute(JbiTask.jav
>> >> a:268)
>> >> ... 21 more
>> >> ****************************************************
>> >>
>> >> All I want to do is have a convenient build/deploy process using
>> Maven.
>> >> Not
>> >> sure what is the appropriate way to do this. With Ant, I'm used to
>> >> creating
>> >> a deploy task which copies the jar/war/ear to the appServer's deploy
>> >> directory. So that is what I was *hoping* to accomplish with Maven
>> and
>> >> deploying the SA onto ServiceMix. Now if there is a much better way
>> of
>> >> deploying SAs after a build, I would like your suggestion on this.
>> >> Thanks!
>> >>
>> >> -los
>> >>
>> >>
>> >> Philip Dodds-2 wrote:
>> >> >
>> >> > The maven JBI plugins uses the JMX infrastructure to deploy the
>> >> > service assemblies from the target directory to the server - it
>> >> > doesn't copy the files to the deploy or install directory.
>> >> >
>> >> > Can you re-run with a -X to get the details of the failure :)
>> >> >
>> >> > Thanks
>> >> >
>> >> > P
>> >> >
>> >> > On 10/19/06, moraleslos <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> The final step in my build/deploy of my SA is to copy the SA
>> created
>> >> in
>> >> >> my
>> >> >> repo into the %servicemix_home%\deploy directory. I was looking at
>> >> the
>> >> >> jbi:projectDeploy but don't really understand how this works. When
>> I
>> >> >> tried
>> >> >> it, I get this message:
>> >> >>
>> >> >> **************************************
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [ERROR] BUILD ERROR
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Unable to deploy project, Error accessing ServiceMix
>> >> >> administration
>> >> >>
>> >> >> javax/jbi/management/LifeCycleMBean
>> >> >> **************************************
>> >> >>
>> >> >> Basically all I want to do is copy or move the zip file
>> respresenting
>> >> my
>> >> >> SA
>> >> >> stored in my local repo into the /deploy directory of ServiceMix.
>> How
>> >> >> can I
>> >> >> accomplish this with maven and/or corresponding jbi goals? Thanks
>> in
>> >> >> advance.
>> >> >>
>> >> >> -los
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/maven-jbi%3AprojectDeploy-question-tf2473814.html#a6897988
>> >> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/maven-jbi%3AprojectDeploy-question-tf2473814.html#a6898382
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/maven-jbi%3AprojectDeploy-question-tf2473814.html#a6899085
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/maven-jbi%3AprojectDeploy-question-tf2473814.html#a6901854
Sent from the ServiceMix - User mailing list archive at Nabble.com.