Hi

Is the compiler error from Eclipse/IDEA or whatever editor or is it
from maven when you build the code?

It could be because there is classpath issues with not the same
versions of the .jars.
The bug in CAMEL-1125 should not affect the expectedBodisRecieved
methods. Its a fix for a minimum expected count of messages.

Are you sure you have the compiler on jdk5 as Camel and using varargs
requires this.


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>
>>>
>>>
>>>
>>
>>
>
>

Reply via email to