You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2013/03/07 12:11:38 UTC
Re: svn commit: r1453733 - in /camel/branches/camel-2.10.x: ./
camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java
camel-core/src/test/java/org/apache/camel/impl/CompositeRegistryTest.java components/camel-jms/
Hi Willem
I think there is a build error on 2.10 branch now. Just got this
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.341s
[INFO] Finished at: Thu Mar 07 12:10:56 CET 2013
[INFO] Final Memory: 87M/418M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
(default-testCompile) on project camel-core: Compilation failure
[ERROR] /Users/davsclaus/workspace/camel-2.10/camel-core/src/test/java/org/apache/camel/impl/CompositeRegistryTest.java:[41,32]
error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
On Thu, Mar 7, 2013 at 9:43 AM, <ni...@apache.org> wrote:
> Author: ningjiang
> Date: Thu Mar 7 08:43:42 2013
> New Revision: 1453733
>
> URL: http://svn.apache.org/r1453733
> Log:
> CAMEL-6135 CompositeRegistry should catch the exception when it lookup the component across the registries
> Merged revisions 1453704 via svnmerge from
> https://svn.apache.org/repos/asf/camel/trunk
>
> ........
> r1453704 | ningjiang | 2013-03-07 14:23:24 +0800 (Thu, 07 Mar 2013) | 1 line
>
> CAMEL-6135 CompositeRegistry should catch the exception when it lookup the component across the registries
> ........
>
> Added:
> camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/impl/CompositeRegistryTest.java
> - copied unchanged from r1453704, camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CompositeRegistryTest.java
> Modified:
> camel/branches/camel-2.10.x/ (props changed)
> camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java
> camel/branches/camel-2.10.x/components/camel-jms/ (props changed)
>
> Propchange: camel/branches/camel-2.10.x/
> ------------------------------------------------------------------------------
> Merged /camel/trunk:r1453704
>
> Propchange: camel/branches/camel-2.10.x/
> ------------------------------------------------------------------------------
> Binary property 'svnmerge-integrated' - no diff available.
>
> Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java
> URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java?rev=1453733&r1=1453732&r2=1453733&view=diff
> ==============================================================================
> --- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java (original)
> +++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java Thu Mar 7 08:43:42 2013
> @@ -22,6 +22,7 @@ import java.util.List;
> import java.util.Map;
>
> import org.apache.camel.NoSuchBeanException;
> +import org.apache.camel.RuntimeCamelException;
> import org.apache.camel.spi.Registry;
>
> /**
> @@ -44,22 +45,28 @@ public class CompositeRegistry implement
>
> public <T> T lookup(String name, Class<T> type) {
> T answer = null;
> + RuntimeCamelException ex = null;
> for (Registry registry : registryList) {
> try {
> answer = registry.lookup(name, type);
> - if (answer != null) {
> - break;
> - }
> } catch (Throwable e) {
> // do not double wrap the exception
> if (e instanceof NoSuchBeanException) {
> - throw (NoSuchBeanException) e;
> - }
> - throw new NoSuchBeanException(name, "Cannot lookup: " + name + " from registry: " + registry
> + ex = (NoSuchBeanException)e;
> + } else {
> + ex = new NoSuchBeanException(name, "Cannot lookup: " + name + " from registry: " + registry
> + " with expected type: " + type + " due: " + e.getMessage(), e);
> + }
> + }
> + if (answer != null) {
> + return answer;
> }
> }
> - return answer;
> + if (ex != null) {
> + throw ex;
> + } else {
> + return answer;
> + }
> }
>
> public Object lookup(String name) {
>
> Propchange: camel/branches/camel-2.10.x/components/camel-jms/
> ------------------------------------------------------------------------------
> Merged /camel/trunk/components/camel-jms:r1453704
>
>
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: svn commit: r1453733 - in /camel/branches/camel-2.10.x: ./ camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.javacamel-core/src/test/java/org/apache/camel/impl/CompositeRegistryTest.java components/camel-jms/
Posted by Willem jiang <wi...@gmail.com>.
Sorry for that.
I just committed a quick fix for it, the build should be OK now.
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On Thursday, March 7, 2013 at 7:11 PM, Claus Ibsen wrote:
> Hi Willem
>
> I think there is a build error on 2.10 branch now. Just got this
>
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 35.341s
> [INFO] Finished at: Thu Mar 07 12:10:56 CET 2013
> [INFO] Final Memory: 87M/418M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile
> (default-testCompile) on project camel-core: Compilation failure
> [ERROR] /Users/davsclaus/workspace/camel-2.10/camel-core/src/test/java/org/apache/camel/impl/CompositeRegistryTest.java:[41,32]
> error: cannot find symbol
> [ERROR] -> [Help 1]
> [ERROR]
>
>
> On Thu, Mar 7, 2013 at 9:43 AM, <ningjiang@apache.org (mailto:ningjiang@apache.org)> wrote:
> > Author: ningjiang
> > Date: Thu Mar 7 08:43:42 2013
> > New Revision: 1453733
> >
> > URL: http://svn.apache.org/r1453733
> > Log:
> > CAMEL-6135 CompositeRegistry should catch the exception when it lookup the component across the registries
> > Merged revisions 1453704 via svnmerge from
> > https://svn.apache.org/repos/asf/camel/trunk
> >
> > ........
> > r1453704 | ningjiang | 2013-03-07 14:23:24 +0800 (Thu, 07 Mar 2013) | 1 line
> >
> > CAMEL-6135 CompositeRegistry should catch the exception when it lookup the component across the registries
> > ........
> >
> > Added:
> > camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/impl/CompositeRegistryTest.java
> > - copied unchanged from r1453704, camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CompositeRegistryTest.java
> > Modified:
> > camel/branches/camel-2.10.x/ (props changed)
> > camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java
> > camel/branches/camel-2.10.x/components/camel-jms/ (props changed)
> >
> > Propchange: camel/branches/camel-2.10.x/
> > ------------------------------------------------------------------------------
> > Merged /camel/trunk:r1453704
> >
> > Propchange: camel/branches/camel-2.10.x/
> > ------------------------------------------------------------------------------
> > Binary property 'svnmerge-integrated' - no diff available.
> >
> > Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java
> > URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java?rev=1453733&r1=1453732&r2=1453733&view=diff
> > ==============================================================================
> > --- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java (original)
> > +++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java Thu Mar 7 08:43:42 2013
> > @@ -22,6 +22,7 @@ import java.util.List;
> > import java.util.Map;
> >
> > import org.apache.camel.NoSuchBeanException;
> > +import org.apache.camel.RuntimeCamelException;
> > import org.apache.camel.spi.Registry;
> >
> > /**
> > @@ -44,22 +45,28 @@ public class CompositeRegistry implement
> >
> > public <T> T lookup(String name, Class<T> type) {
> > T answer = null;
> > + RuntimeCamelException ex = null;
> > for (Registry registry : registryList) {
> > try {
> > answer = registry.lookup(name, type);
> > - if (answer != null) {
> > - break;
> > - }
> > } catch (Throwable e) {
> > // do not double wrap the exception
> > if (e instanceof NoSuchBeanException) {
> > - throw (NoSuchBeanException) e;
> > - }
> > - throw new NoSuchBeanException(name, "Cannot lookup: " + name + " from registry: " + registry
> > + ex = (NoSuchBeanException)e;
> > + } else {
> > + ex = new NoSuchBeanException(name, "Cannot lookup: " + name + " from registry: " + registry
> > + " with expected type: " + type + " due: " + e.getMessage(), e);
> > + }
> > + }
> > + if (answer != null) {
> > + return answer;
> > }
> > }
> > - return answer;
> > + if (ex != null) {
> > + throw ex;
> > + } else {
> > + return answer;
> > + }
> > }
> >
> > public Object lookup(String name) {
> >
> > Propchange: camel/branches/camel-2.10.x/components/camel-jms/
> > ------------------------------------------------------------------------------
> > Merged /camel/trunk/components/camel-jms:r1453704
>
>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com (mailto:cibsen@redhat.com)
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen