-
1. Re: error while creating multicast with aggregation strategy in java dsl
davsclaus Nov 10, 2009 12:18 PM (in response to lyfe)How do you run it?
If using OSGi you have all the usual issues with class visibility.
You may need to add your class in the MANIFEST.MF files (OSGi stuff)
If you run it as a pure junit test outside OSGi I am sure it works.
-
2. Re: error while creating multicast with aggregation strategy in java dsl
lyfe Nov 10, 2009 12:36 PM (in response to davsclaus)hmm..the more i learn, the more difficult this seems.
oh well...thanks.
-
3. Re: error while creating multicast with aggregation strategy in java dsl
oisin Nov 10, 2009 12:43 PM (in response to lyfe)I think Claus is really just pointing out that there isn't enough information in the post to make any guesses about how that exception is occurring. It's usually the case that exceptions are keenly tied to the environment in which your business logic is operating, rather than being "obviously" due to a code defect. So it's vital that anyone that is attempting to analyze an issue has full information of the environment, best case being a test case that manifests the problem.
-
4. Re: error while creating multicast with aggregation strategy in java dsl
lyfe Nov 10, 2009 12:59 PM (in response to oisin)"difficult" isn't the right word to use. a better word is "involved".
sorry about that...
-
5. Re: error while creating multicast with aggregation strategy in java dsl
lyfe Nov 12, 2009 9:01 AM (in response to davsclaus)I'm think I'm getting closer to the prob. In my log file, I see errors pertaining to finding my aggregation strategy class. I think it may be a MANIFEST file thing.
This post seems to relate to my problem: http://fusesource.com/forums/thread.jspa?messageID=4863ዿ
Could you point me to a good source for creating manifest files or is this outside the scope of this forum?
-
6. Re: error while creating multicast with aggregation strategy in java dsl
oisin Nov 12, 2009 10:24 AM (in response to lyfe)As best I can make out that exception, it says org.MyRouteBuilder is loading org.apache.camel.processor.aggregate.AggregationStrategy from one particular class loader and org.apache.camel.model.RouteType is loading the same AggregationStrategy using a different classloader. And this is causing problems.
The goal is to find out why this is being loaded by two different classloaders, and indeed why one of them is a JarFileClassLoader rather than a ModuleClassLoader.
Yes, it will definitely be MANIFEST-related. Want to post it here? Or better still zip up the offending project and attach?
-
7. Re: error while creating multicast with aggregation strategy in java dsl
oisin Nov 12, 2009 10:33 AM (in response to lyfe)I didn't answer your question, my apologies.
Could you point me to a good source for creating manifest files...?
Some ways to do this:
create it yourself, with a little help from an IDE - I use Eclipse PDE tools to do that - check out this tutorial for some information on how to do that.
let it be created for you - the maven-bundle-plugin will help if you are using a maven build - here's what the plugin does.
more let it be created for you with the pax stuff - again a mavenistic approach, check out this tutorial for more information.
-
8. Re: error while creating multicast with aggregation strategy in java dsl
lyfe Nov 12, 2009 12:00 PM (in response to oisin)Ok..making progress bit by bit.
I pulled together a few things:
- I followed the steps in "Migrating FUSE Mediation Router Applications to OSGi" (http://fusesource.com/docs/esb/4.1/migration/index.html?url=http://fusesource.com/docs/esb/4.1/migration/ESBMigrationFMR.html)
- I added the extensions == true tag to the maven-bundle-plugin
- I added a dependency to biz.aQute's bndlib jar
- I let maven generate what I needed
- I deployed my routing info as an OSGi, I believe. I didn't need to create a service assembly for it
- I deployed my http provider and consumers as a separate service assembly
After all this, I'm getting an error about failed delievery and the markup in the document following the root element must be well-formed.
At least it's deploying and it's hitting my webservice now. I'm marking this as answered.
-
9. Re: error while creating multicast with aggregation strategy in java dsl
lyfe Nov 12, 2009 12:01 PM (in response to lyfe)oh yeah..thanks!
-
10. Re: error while creating multicast with aggregation strategy in java dsl
oisin Nov 12, 2009 12:06 PM (in response to lyfe)Glad it's getting there for you!
-
11. Re: error while creating multicast with aggregation strategy in java dsl
lyfe Nov 12, 2009 2:59 PM (in response to oisin)Just to add closure, the error about the root element is due to the way the results are aggregated.
ie, using the below as an example
Now for a question:
Is there a way to that a root element can be added automatically before returning the results or do I need to add custom coding for my own root element to be added?
-
12. Re: error while creating multicast with aggregation strategy in java dsl
lyfe Nov 12, 2009 3:16 PM (in response to lyfe)I found my answer..need to manually do it
http://fusesource.com/forums/thread.jspa?messageID=1481׉
I knew I remember reading it somewhere just couldn't find it...