You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Jevgeni Holodkov <je...@gmail.com> on 2007/05/16 17:44:47 UTC

NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Hello,

   I am trying to setup servicemix-quartz component and create a
configuration for it. For this I have created the service-unit with
xbean.xml file in the resources folder. The content of this file is the
following:


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:quartz="http://servicemix.apache.org/quartz/1.0"
xmlns:my="http://my.com/timer">
    <quartz:endpoint service="my:timer" endpoint="timerEndpoint"
targetService="my:trace">
        <quartz:trigger>
            <quartz:cron cronExpression="0/5 * * * * ?" />
        </quartz:trigger>
    </quartz:endpoint>
</beans>


I am running tomcat 5.5 on Java 6 with servicemix-web on the board.
Servicemix version is 3.1-incubating. I have successfully deployed
servicemix-quartz service engine by using this application. After creating a
service assembly with my service unit, I had tried to deploy it as well, but
got the "no class found" error:


nested exception is java.lang.NoClassDefFoundError: org/quartz/JobDetail
        at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
        at
org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
        at
org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:154)
        at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:79)
        at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
        at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:527)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deploy(DeploymentService.java:203)
        at
org.apache.servicemix.jbi.framework.AdminCommandsService.deployServiceAssembly(AdminCommandsService.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)


If I put quartz-1.5.2.jar under servicemix-web\WEB-INF\lib, then it works
perfectly, but, I have a stomach feeling, that this is not the best solution
for the case. I have checked
%tomcat_home%\data\smx\components\servicemix-quartz\version_1\lib\ and see,
that the quartz library is there. Service assembly does not contain any
libraries, and, actually, it doesn't matter as well. If I add manually it
there, it still cannot find it. 

So, the question is - how to overcome this problem and make servicemix use
component's existing libraries?

Thanks,

With best regards,
Jevgeni
-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a10644247
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Posted by Jevgeni Holodkov <je...@gmail.com>.
Here is attached my service assembly: 
http://www.nabble.com/file/8481/simple-timer-sa-1.0-SNAPSHOT.jar
simple-timer-sa-1.0-SNAPSHOT.jar 

Here is the stack trace I get after when deploying it on tomcat with
servicemix-web:  http://www.nabble.com/file/8482/quartz-log.txt
quartz-log.txt 

Jevgeni Holodkov wrote:
> 
> Yes, when I run %servicemix_home%\bin\servicemix, install
> servicemix-quartz (I guess you meant this component, not saxon, didn't
> you?) component by copying it to the %servicemix_home%\bin\install and my
> SA to %servicemix_home%\bin\deploy, then it works.
> 
> 
> gnodet wrote:
>> 
>> It sounds weird.
>> I have you tried to deploy the same SA in servicemix standalone after
>> installing the saxon SE ?
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a10659697
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Posted by Jevgeni Holodkov <je...@gmail.com>.
Yes, when I run %servicemix_home%\bin\servicemix, install servicemix-quartz
(I guess you meant this component, not saxon, didn't you?) component by
copying it to the %servicemix_home%\bin\install and my SA to
%servicemix_home%\bin\deploy, then it works.


gnodet wrote:
> 
> It sounds weird.
> I have you tried to deploy the same SA in servicemix standalone after
> installing the saxon SE ?
> 

-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a10659506
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Posted by Guillaume Nodet <gn...@gmail.com>.
It sounds weird.
I have you tried to deploy the same SA in servicemix standalone after
installing the saxon SE ?

On 5/16/07, Jevgeni Holodkov <je...@gmail.com> wrote:
>
>
> Hello,
>
>    I am trying to setup servicemix-quartz component and create a
> configuration for it. For this I have created the service-unit with
> xbean.xml file in the resources folder. The content of this file is the
> following:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:quartz="http://servicemix.apache.org/quartz/1.0"
> xmlns:my="http://my.com/timer">
>     <quartz:endpoint service="my:timer" endpoint="timerEndpoint"
> targetService="my:trace">
>         <quartz:trigger>
>             <quartz:cron cronExpression="0/5 * * * * ?" />
>         </quartz:trigger>
>     </quartz:endpoint>
> </beans>
>
>
> I am running tomcat 5.5 on Java 6 with servicemix-web on the board.
> Servicemix version is 3.1-incubating. I have successfully deployed
> servicemix-quartz service engine by using this application. After creating
> a
> service assembly with my service unit, I had tried to deploy it as well,
> but
> got the "no class found" error:
>
>
> nested exception is java.lang.NoClassDefFoundError: org/quartz/JobDetail
>         at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(
> ServiceManagerRegistry.java:424)
>         at
> org.apache.xbean.kernel.standard.StandardKernel.registerService(
> StandardKernel.java:220)
>         at
> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java
> :154)
>         at
> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(
> AbstractXBeanDeployer.java:79)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(
> BaseServiceUnitManager.java:88)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.deploy(
> BaseServiceUnitManager.java:69)
>         at
>
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly
> (DeploymentService.java:527)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.deploy(
> DeploymentService.java:203)
>         at
>
> org.apache.servicemix.jbi.framework.AdminCommandsService.deployServiceAssembly
> (AdminCommandsService.java:233)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>
>
> If I put quartz-1.5.2.jar under servicemix-web\WEB-INF\lib, then it works
> perfectly, but, I have a stomach feeling, that this is not the best
> solution
> for the case. I have checked
> %tomcat_home%\data\smx\components\servicemix-quartz\version_1\lib\ and
> see,
> that the quartz library is there. Service assembly does not contain any
> libraries, and, actually, it doesn't matter as well. If I add manually it
> there, it still cannot find it.
>
> So, the question is - how to overcome this problem and make servicemix use
> component's existing libraries?
>
> Thanks,
>
> With best regards,
> Jevgeni
> --
> View this message in context:
> http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a10644247
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Re: NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Posted by "J.Gustafsson" <jo...@diabol.se>.
Hi,

Yes the servicemix-quartz-3.1-incubating-installer.zip contains the
quartz-1.5.2.jar.
It's unpacked to rootDir/components/servicemix-quartz/version_1/lib.

That doesn't help me much I'm afraid....

I've tried 3.1.1 earlier, but it made my machine to loop :-( when I was
calling my deployed web-services. Unfortunately I cannot give you much more
information then that about this issue for the moment. We have not got the
time to investigate it further for the time being, but have decided to stick
with version 3.1.

regards,

/j


gnodet wrote:
> 
> Isn't quartz already in the
> servicemix-quartz-3.1-incubating-installer.zip archive ? It should be
> used by the classloader, so I'm tot sure why it fails.  Have you tried
> with 3.1.1 ?
> 
> On 9/19/07, J.Gustafsson <jo...@diabol.se> wrote:
>>
>> Hi,
>>
>> Thanks for your feedback.
>> I solved it by copying the quartz-1.5.2.jar manually (or actually by our
>> deploying ant-script) to the /lib directory. Perhaps I was naive that
>> thought that it would be enough to have the
>> servicemix-quartz-3.1-incubating-installer.zip installed or that the
>> quartz-1.5.2.jar was in the in my deployed Component-sa.jar.
>>
>> I do not need to add the classpath in the xbean.xml, since my xxx/lib
>> directory is already in the classpath through the conf/servicemix.conf
>> file.
>>
>> Thanks again!
>>
>> /j
>>
>>
>> Jevgeni Holodkov wrote:
>> >
>> > Hi,
>> >
>> >    Not quite sure that this was the solution, but try to add to
>> quartz's
>> > xbean.xml the following:
>> >
>> >     <classpath>
>> >                <location>.</location>
>> >                <location>./lib/quartz-1.5.2.jar </location>
>> >    </classpath>
>> >
>> > so, the result will look like:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> >
>> > <beans xmlns:quartz="http://servicemix.apache.org/quartz/1.0"
>> > xmlns:my="http://my.com/timer">
>> >
>> >     <classpath>
>> >                <location>.</location>
>> >                <location>./lib/quartz-1.5.2.jar </location>
>> >    </classpath>
>> >
>> >     <quartz:endpoint service="my:timer" endpoint="timerEndpoint"
>> > targetService="my:trace">
>> >         <quartz:trigger>
>> >             <quartz:cron cronExpression="0/5 * * * * ?" />
>> >         </quartz:trigger>
>> >     </quartz:endpoint>
>> >
>> > </beans>
>> >
>> > Hope that will help you.
>> >
>> > With best wishes,
>> > Jevgeni Holodkov
>> >
>> >
>> > J.Gustafsson wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have exactly the same problem as you. Did you find/get any solution
>> for
>> >> it?
>> >>
>> >> regards,
>> >>
>> >> Jonas
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a12775479
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a12776353
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Posted by Guillaume Nodet <gn...@gmail.com>.
Isn't quartz already in the
servicemix-quartz-3.1-incubating-installer.zip archive ? It should be
used by the classloader, so I'm tot sure why it fails.  Have you tried
with 3.1.1 ?

On 9/19/07, J.Gustafsson <jo...@diabol.se> wrote:
>
> Hi,
>
> Thanks for your feedback.
> I solved it by copying the quartz-1.5.2.jar manually (or actually by our
> deploying ant-script) to the /lib directory. Perhaps I was naive that
> thought that it would be enough to have the
> servicemix-quartz-3.1-incubating-installer.zip installed or that the
> quartz-1.5.2.jar was in the in my deployed Component-sa.jar.
>
> I do not need to add the classpath in the xbean.xml, since my xxx/lib
> directory is already in the classpath through the conf/servicemix.conf file.
>
> Thanks again!
>
> /j
>
>
> Jevgeni Holodkov wrote:
> >
> > Hi,
> >
> >    Not quite sure that this was the solution, but try to add to quartz's
> > xbean.xml the following:
> >
> >     <classpath>
> >                <location>.</location>
> >                <location>./lib/quartz-1.5.2.jar </location>
> >    </classpath>
> >
> > so, the result will look like:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <beans xmlns:quartz="http://servicemix.apache.org/quartz/1.0"
> > xmlns:my="http://my.com/timer">
> >
> >     <classpath>
> >                <location>.</location>
> >                <location>./lib/quartz-1.5.2.jar </location>
> >    </classpath>
> >
> >     <quartz:endpoint service="my:timer" endpoint="timerEndpoint"
> > targetService="my:trace">
> >         <quartz:trigger>
> >             <quartz:cron cronExpression="0/5 * * * * ?" />
> >         </quartz:trigger>
> >     </quartz:endpoint>
> >
> > </beans>
> >
> > Hope that will help you.
> >
> > With best wishes,
> > Jevgeni Holodkov
> >
> >
> > J.Gustafsson wrote:
> >>
> >> Hi,
> >>
> >> I have exactly the same problem as you. Did you find/get any solution for
> >> it?
> >>
> >> regards,
> >>
> >> Jonas
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a12775479
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Posted by "J.Gustafsson" <jo...@diabol.se>.
Hi,

Thanks for your feedback.
I solved it by copying the quartz-1.5.2.jar manually (or actually by our
deploying ant-script) to the /lib directory. Perhaps I was naive that
thought that it would be enough to have the
servicemix-quartz-3.1-incubating-installer.zip installed or that the
quartz-1.5.2.jar was in the in my deployed Component-sa.jar.

I do not need to add the classpath in the xbean.xml, since my xxx/lib
directory is already in the classpath through the conf/servicemix.conf file.

Thanks again!

/j


Jevgeni Holodkov wrote:
> 
> Hi,
> 
>    Not quite sure that this was the solution, but try to add to quartz's
> xbean.xml the following:
> 
>     <classpath>
>                <location>.</location>
>                <location>./lib/quartz-1.5.2.jar </location>
>    </classpath>
> 
> so, the result will look like:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <beans xmlns:quartz="http://servicemix.apache.org/quartz/1.0"
> xmlns:my="http://my.com/timer">
> 
>     <classpath>
>                <location>.</location>
>                <location>./lib/quartz-1.5.2.jar </location>
>    </classpath>
>    
>     <quartz:endpoint service="my:timer" endpoint="timerEndpoint"
> targetService="my:trace">
>         <quartz:trigger>
>             <quartz:cron cronExpression="0/5 * * * * ?" />
>         </quartz:trigger>
>     </quartz:endpoint>
>     
> </beans>
> 
> Hope that will help you.
> 
> With best wishes,
> Jevgeni Holodkov
> 
> 
> J.Gustafsson wrote:
>> 
>> Hi,
>> 
>> I have exactly the same problem as you. Did you find/get any solution for
>> it?
>> 
>> regards,
>> 
>> Jonas
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a12775479
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Posted by Jevgeni Holodkov <je...@gmail.com>.
Hi,

   Not quite sure that this was the solution, but try to add to quartz's
xbean.xml the following:

    <classpath>
               <location>.</location>
               <location>./lib/quartz-1.5.2.jar </location>
   </classpath>

so, the result will look like:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:quartz="http://servicemix.apache.org/quartz/1.0"
xmlns:my="http://my.com/timer">

    <classpath>
               <location>.</location>
               <location>./lib/quartz-1.5.2.jar </location>
   </classpath>
   
    <quartz:endpoint service="my:timer" endpoint="timerEndpoint"
targetService="my:trace">
        <quartz:trigger>
            <quartz:cron cronExpression="0/5 * * * * ?" />
        </quartz:trigger>
    </quartz:endpoint>
    
</beans>

Hope that will help you.

With best wishes,
Jevgeni Holodkov


J.Gustafsson wrote:
> 
> Hi,
> 
> I have exactly the same problem as you. Did you find/get any solution for
> it?
> 
> regards,
> 
> Jonas
> 

-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a12772924
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: NoClassDefFoundError exception when using servicemix-quartz configuration with servicemix-web (3.1)

Posted by "J.Gustafsson" <jo...@diabol.se>.
Hi,

I have exactly the same problem as you. Did you find/get any solution for
it?

regards,

Jonas
-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-exception-when-using-servicemix-quartz-configuration-with-servicemix-web-%283.1%29-tf3765326s12049.html#a12772756
Sent from the ServiceMix - User mailing list archive at Nabble.com.