Nicely spot ! Could you raise a JIRA for that ?
And for jaxen too, it should be in lib/optional imo.

The default behavior of the maven plugin is to only deploy
new artifacts .  You can use -DforceUpdate=true to ensure
the service assembly will be redeployed each time.


On 2/8/07, Bompart Cedric <[EMAIL PROTECTED]> wrote:
Hi,

I've found the issue, the archtype produces a servicemix.xml with a classpath 
directive, so I've deleted the below section:

<classpath>
      <location>.</location>
</classpath>

The only thing, the jaxen library needs to be in the main container classpath 
(lib/optional). If so why is not bundled by default with SM 3.1?

Another thing, when the SA/SU is deployed to SM, how do you un-deploy with the 
maven2 jbi plugin? So far I'm deleting the entire data folder. If I re-deployed 
my project, SM doesn't reload it (by using the jbi:projectDeploy in the root 
directory of the SA and SU subdirectories).

Regards,
Cedric.

-----Message d'origine-----
De: Bompart Cedric
Envoyé: 08 February 2007 09:56
À: [email protected]
Objet: RE: extension of HelloWorld BC

up... :-)

-----Message d'origine-----
De: Bompart Cedric
Envoyé: 07 February 2007 17:00
À: [email protected]
Objet: RE: extension of HelloWorld BC

Thx for your reply.

I've created a maven2 project with the following archtype:

mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling 
-DarchetypeArtifactId=servicemix-lwcontainer-service-unit 
-DarchetypeVersion=3.1-incubating 
-DgroupId=org.apache.servicemix.samples.test.lw -DartifactId=test-lw-su

I've added the following dependency to the SU pom.xml:

<dependencies>
      <dependency>
         <groupId>org.apache.servicemix</groupId>
         <artifactId>servicemix-lwcontainer</artifactId>
         <version>${servicemix-version}</version>
      </dependency>

      <dependency>
         <groupId>org.apache.servicemix</groupId>
         <artifactId>servicemix-components</artifactId>
         <version>${servicemix-version}</version>
      </dependency>

      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-support</artifactId>
         <version>2.0.2</version>
      </dependency>

      <dependency>
         <groupId>jaxen</groupId>
         <artifactId>jaxen</artifactId>
         <version>1.1</version>
      </dependency>
   </dependencies>


My SU servicemix.xml contains the following beans:

org.apache.servicemix.components.email.MimeMailSender
org.springframework.mail.javamail.JavaMailSenderImpl
org.apache.servicemix.components.email.MimeMailMarshaler
org.apache.servicemix.expression.JaxenStringXPathExpression
org.apache.servicemix.components.file.FilePoller


When I'm deploying the SA/SU via the jbi:projectDeploy, I'm getting an 
exception:

Caused by: java.lang.ClassNotFoundException: 
org.apache.servicemix.components.email.MimeMailSender in classloader 
org.apache.servicemix.components.email.MimeMailSender
        at 
org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:206)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at org.springframework.util.ClassUtils.forName(ClassUtils.java:177)
        at 
org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:93)
        at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:475)
        ... 89 more

The servicemix-components-3.1-incubating.jar is included by default in the SU, 
the org.apache.servicemix.components.email.MimeMailSender class is included in 
it...


Everything it's fine in the container classpath as described before. I've 
started with a fresh SM installation for the new SA/SU project.


Regards,
Cedric.

-----Message d'origine-----
De: Guillaume Nodet [mailto:[EMAIL PROTECTED]
Envoyé: 07 February 2007 15:24
À: [email protected]
Objet: Re: RE : extension of HelloWorld BC

You can deploy a servicemix.xml file to the servicemix-lwcontainer JBI
component.  But you have to build a SU and a SA.  Inside the SU,
you can add all the jars you need.

But if you choose to modify the main servicemix.xml file,
well you have to modify the container classpath to suit
your needs, just as you did, by copying jars in the lib/optional
folder.

On 2/7/07, Bompart Cedric <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've done my scenario (with only a servicemix.xml file), which pools files 
from a directory and sends an email based on the content of a file.
>
> To be able to use this scenario, I have to copy the following libraries in 
lib/optional:
>   - commons-lang-2.2.jar
>   - jaxen-1.1-beta9.jar
>   - servicemix-components-3.1-incubating.jar
>   - spring-support.jar
>
> Is there a way to provide an archive installer like the JBI one?
> And is the lib/optional folder the correct place to drop these jars?
> If I reference my own POJO in the servicemix.xml (for example a custom 
marshaller), how do I include the jar to SM? Drop it in the lib/optional folder?
> If the deployment was managed by an archive, then it won't really pollute the 
lib/optional folder and I can have different library version for different stuff 
overtime in the ESB.
>
> Is my description correct or did I missed the boat?
>
> Regard,
> Cedric.
>
> -----Message d'origine-----
> De: Bompart Cedric
> Envoyé: 07 February 2007 09:22
> À: [email protected]; [EMAIL PROTECTED]
> Objet: RE: RE : RE: RE : extension of HelloWorld BC
>
> Hi,
>
> Ok I'll try to find out how to do that... :-)
>
> Do we have an archetype for maven 2 for this kind of project structure?
>
> Regards,
> Cedric.
>
>
> -----Message d'origine-----
> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Envoyé: 06 February 2007 15:37
> À: [email protected]
> Objet: RE : RE: RE : extension of HelloWorld BC
>
>
> Hello cedric,
>
> i don't know all your need, with hello world you have
> to re-develop all component from scratch, it is good
> for very specific need like call an proprietary
> protocol. But with several servicemix components you
> just have to provide your custom marshaller. The
> component does the remainder. For an example just see
> MimeMailSender with MimeMailMarshaller.
>
> Cordialement,
> Grégoire A.
>
>
> --- Bompart Cedric <[EMAIL PROTECTED]> a
> écrit :
>
> > Hi,
> >
> > Can you be a little bit more specific please? With
> > an example... and if I want to change the NMR
> > message before sending it via email?  I though I'll
> > base this scenario on the HelloWorld BC example...
> >
> > Regards,
> > Cedric.
> >
> > -----Message d'origine-----
> > De : [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > Envoyé : 06 February 2007 12:45
> > À : [email protected]
> > Objet : RE : extension of HelloWorld BC
> >
> > hello cedric,
> >
> > i will just reply for your second question,
> > I can use servicemix-file to poll your directory
> > use a marshaller to map your file to a jbi-message.
> > and use target attribute to send it to the email
> > sender
> >
> (http://cwiki.apache.org/confluence/display/SM/Email).
> > You have to describe strictly your jbi-message, to
> > map
> > your file properties to your email ones.
> >
> > Cordialement,
> > Grégoire A.
> >
> > --- Bompart Cedric <[EMAIL PROTECTED]>
> > a
> > écrit :
> >
> > > Hello,
> > >
> > > I'm using the SM 3.1 release (Java 1.5) and I've
> > > followed the tutorial
> > > on http://servicemix.org/site/hello-world-bc.html.
> > > So far it's all
> > > compiled and deployed successfully in SM.
> > >
> > > Currently the provider endpoint is called by the
> > > test class, so I've
> > > added a content string to the out message. Do I
> > need
> > > to do anything else
> > > to the "processInOut" method?
> > >
> > > The entire code described for the consumer
> > endpoint
> > > is not used, how can
> > > I use it when it's deployed to SM?
> > >
> > > What I would like to do (to get familiar with SM),
> > > is to poll files from
> > > a directory (using servicemix-file, I think) and
> > > send an email when the
> > > file is received from the NMR. How can I achieve
> > > this?  Can I do that
> > > with a BC approach (with custom code) or this
> > > scenario can be handled
> > > with a plug and play approach (via the
> > > servicemix.xml)?
> > >
> > > Sorry I'm trying to learn and produce a proof of
> > > concept on ESB...
> > >
> > > Regards,
> > > Cedric.
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> ___________________________________________________________________________
> >
> > Découvrez une nouvelle façon d'obtenir des réponses
> > à toutes vos questions !
> > Profitez des connaissances, des opinions et des
> > expériences des internautes sur Yahoo!
> > Questions/Réponses
> > http://fr.answers.yahoo.com
> >
> >
> >
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
> Profitez des connaissances, des opinions et des expériences des internautes 
sur Yahoo! Questions/Réponses
> http://fr.answers.yahoo.com
>
>
>
>
>


--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/









--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Reply via email to