I have had no respite from this. Additional info:
template.sendBodyAndHeader("direct:a", "answer", "recipientListHeader",
"mock:x,mock:y,mock:z"); gives me a compiler error.
says this is undefined for producer template. and
producer template can not be resolved. It is referenced indirectly from
required .class files.
Sylvester
Claus Ibsen wrote:
Hi
Remember to refresh in Eclipse to let it pickup the .jar changes.
Right click on project root and select refresh (F5 i think).
It doesn't synchronize automatically when you change pom files.
Or try running
mvn eclipse:eclipse
To let maven generate new eclipse .classpath files so it's using the
correct jars
/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/
On Mon, Dec 1, 2008 at 1:12 PM, Sylvester <[EMAIL PROTECTED]> wrote:
Hi
Is the compiler error from Eclipse/IDEA or whatever editor or is it
from maven when you build the code?
This is a compiler error from eclipse
It could be because there is classpath issues with not the same
versions of the .jars.
I'm using maven, shouldn't that take care of including the right version of
the right jar as long as its correctly mentioned in the pom? (pom pasted
below)
The bug in CAMEL-1125 should not affect the expectedBodisRecieved
methods. Its a fix for a minimum expected count of messages.
OK.
Are you sure you have the compiler on jdk5 as Camel and using varargs
requires this.
Well, it was working before and I made no changes to my JDK. Eclipse shows
the compiler compliance level as 5.0
Thanks,
Sylvester
Here is from 1.5.1 source, the two methods for the expected bodies:
public void expectedBodiesReceived(Object... bodies)
public void expectedBodiesReceived(final List bodies)
/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/
On Mon, Dec 1, 2008 at 12:56 PM, Sylvester <[EMAIL PROTECTED]>
wrote:
Hi,
Claus Ibsen wrote:
Hi
Do you get a compiler error? Is that what the error is?
Yup, its a compiler error.
We use varargs so you should be able to supply multiple strings
expectedBodisRecieved("hello", "bye", "world");
Or just a single
expectedBodisRecieved("hello");
I tried both. I got the same compiler error.
Could you mess a bit more? Looks weird.
Sure, I'll do that in the meanwhile, but I don't understand why this
should
happen.
NOTE: My main reason for playing around with the pom was this bug:
https://issues.apache.org/activemq/browse/CAMEL-1125
So I changed camel-version to 1.5 / 1.5.0 / 1.5.1 and changed it back to
1.4.0 when those failed to work. But now 1.4.0. isn't working either :(
Sylvester
/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/
On Mon, Dec 1, 2008 at 5:51 AM, Sylvester <[EMAIL PROTECTED]>
wrote:
Hi,
Earlier the following was running just fine. Out of the blue it started
giving me this error:
expectedBodiesReceived (List) not applicable to
expectedBodiesReceived(String). I understand what it means, but:
1. The examples on the camel website all have strings, so this should
not be a problem.
2. Why should it stop working just like that? ( I had played around
with the pom, could that be it?)
public void testSendingAMessageUsingMulticastReceivesItsOwnExchange()
throws
Exception {
MockEndpoint x = getMockEndpoint("mock:x");
MockEndpoint y = getMockEndpoint("mock:y");
MockEndpoint z = getMockEndpoint("mock:z");
x.expectedBodiesReceived("answer");
y.expectedBodiesReceived("answer");
z.expectedBodiesReceived("answer");
z.expectedMinimumMessageCount(100);
sendBody();
// z.assertIsSatisfied();
assertMockEndpointsSatisifed();
}
pom excerpt:
<properties>
<activemq-version>5.1.0</activemq-version>
<camel-version>1.4.0</camel-version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel-version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel-version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
</dependency>
</dependencies>