You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Charles Moulliard <ch...@gmail.com> on 2013/01/10 13:13:08 UTC

camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

Hi,

When I deploy a camel project as a bundle on Karaf 2.3.0, Spring generates
the following error that I don't really understand as classes are well
packaged in the bundle

2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 | ContextLoaderListener
           | ?                                   ? | 235 -
org.springframework.osgi.extender - 1.2.1 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'enrich' defined in URL
[bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of bean
failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [com.fusesource.training.camel.Enrich]: Constructor threw
exception; nested exception is java.lang.Error: Unresolved compilation
problems:
Customer cannot be resolved to a type
Customer cannot be resolved to a type
SaveCustomer cannot be resolved to a type
Customer cannot be resolved to a type
Customer cannot be resolved to a type
CustomerType cannot be resolved to a variable
SaveCustomer cannot be resolved to a type
SaveCustomer cannot be resolved to a type
GetAllCustomersResponse cannot be resolved to a type
GetAllCustomersResponse cannot be resolved to a type
GetAllCustomersResponse cannot be resolved to a type

Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using JDK
1.6

Regards,

-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

Posted by Charles Moulliard <ch...@gmail.com>.
Sorry about my previous but I have posted the question here as I don't have
access from Aviva customer to RedHat IRC channel or even WebMail (blocked)

The project that I deploy is an example that we have in the Fuse Training
and it works fine locally using mvn camel:run



On Thu, Jan 10, 2013 at 1:34 PM, Claus Ibsen <cl...@gmail.com> wrote:

> On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard <ch...@gmail.com>
> wrote:
> > Hi,
> >
> > When I deploy a camel project as a bundle on Karaf 2.3.0, Spring
> generates
> > the following error that I don't really understand as classes are well
> > packaged in the bundle
> >
> > 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 |
> ContextLoaderListener
> >            | ?                                   ? | 235 -
> > org.springframework.osgi.extender - 1.2.1 | Application context refresh
> > failed
> (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
> > config=osgibundle:/META-INF/spring/*.xml))
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'enrich' defined in URL
> > [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of
> bean
> > failed; nested exception is
> > org.springframework.beans.BeanInstantiationException: Could not
> instantiate
> > bean class [com.fusesource.training.camel.Enrich]: Constructor threw
> > exception; nested exception is java.lang.Error: Unresolved compilation
> > problems:
> > Customer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > SaveCustomer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > CustomerType cannot be resolved to a variable
> > SaveCustomer cannot be resolved to a type
> > SaveCustomer cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> >
>
> Is the code generated from a wsdl using a wsdl2java maven tool?
> And do you have a jaxb.index file in the bundle? The file is located
> in the same package as the .class files.
>
> Do you see any more details in the log? Is there a stacktrace?
>
> And the 10000$ question, did it work before? And what have changed?
>
>
> > Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using
> JDK
> > 1.6
> >
> > Regards,
> >
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
>
> --
> 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
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard <ch...@gmail.com> wrote:
> Hi,
>
> When I deploy a camel project as a bundle on Karaf 2.3.0, Spring generates
> the following error that I don't really understand as classes are well
> packaged in the bundle
>
> 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 | ContextLoaderListener
>            | ?                                   ? | 235 -
> org.springframework.osgi.extender - 1.2.1 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'enrich' defined in URL
> [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of bean
> failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not instantiate
> bean class [com.fusesource.training.camel.Enrich]: Constructor threw
> exception; nested exception is java.lang.Error: Unresolved compilation
> problems:
> Customer cannot be resolved to a type
> Customer cannot be resolved to a type
> SaveCustomer cannot be resolved to a type
> Customer cannot be resolved to a type
> Customer cannot be resolved to a type
> CustomerType cannot be resolved to a variable
> SaveCustomer cannot be resolved to a type
> SaveCustomer cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
>

Is the code generated from a wsdl using a wsdl2java maven tool?
And do you have a jaxb.index file in the bundle? The file is located
in the same package as the .class files.

Do you see any more details in the log? Is there a stacktrace?

And the 10000$ question, did it work before? And what have changed?


> Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using JDK
> 1.6
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
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: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jan 10, 2013 at 1:21 PM, Charles Moulliard <ch...@gmail.com> wrote:
> Claus,
>
> I'm using Fuse ESB 7 and create a container using Fabric -->
>
> FuseESB:karaf@fuse-aviva> info
> Karaf
>   Karaf version               2.3.0.fuse-71-047
>   Karaf home
>  /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047
>   Karaf base
>  /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047
>   OSGi Framework              org.apache.felix.framework - 4.0.3.fuse-71-047
>
> [ 234] [Active     ] [Created     ] [       ] [   60] camel-blueprint
> (2.10.0.fuse-71-047)
> [ 240] [Active     ] [            ] [       ] [   60] camel-core
> (2.10.0.fuse-71-047)
> [ 243] [Active     ] [            ] [       ] [   60] camel-spring
> (2.10.0.fuse-71-047)
> [ 247] [Active     ] [Created     ] [       ] [   60] camel-karaf-commands
> (2.10.0.fuse-71-047)
> [ 286] [Active     ] [Created     ] [       ] [   60] camel-cxf
> (2.10.0.fuse-71-047)
>
> [ 242] [Active     ] [            ] [       ] [   60] Spring Context
> (3.0.7.RELEASE)
>
> [ 245] [Active     ] [            ] [       ] [   60] spring-osgi-core
> (1.2.1)
> [ 246] [Active     ] [            ] [       ] [   60] spring-osgi-io (1.2.1)
>
> So if camel 2.10 does not work fine with karaf 2.3. Why have we package
> like that ?
>

Use the fuse forums for talking about fuse.
Or make it clear from the very start that you are using Fuse, when you
talk on the *Apache* forums.

When you say Camel 2.10, I assume you use Apache Camel.
Not Fuse Camel.

There is a difference.

Fuse Camel 2.10 has been upgraded to Aries 1.0 and OSGi 4.3 et all.
Where as Apache has not (eg that happens in Camel 2.11).


> Regards,
>
> Charles
>
>
> On Thu, Jan 10, 2013 at 1:16 PM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> Hi
>>
>> You would need Camel 2.11 to run on Karaf 2.3.x.
>>
>> Camel 2.10 does not support it to well. As its tied to Aries 0.3, and OSGi
>> 4.2.
>> Where as Karaf is Aries 1.0, and OSGi 4.3 etc.
>>
>>
>>
>> On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard <ch...@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > When I deploy a camel project as a bundle on Karaf 2.3.0, Spring
>> generates
>> > the following error that I don't really understand as classes are well
>> > packaged in the bundle
>> >
>> > 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 |
>> ContextLoaderListener
>> >            | ?                                   ? | 235 -
>> > org.springframework.osgi.extender - 1.2.1 | Application context refresh
>> > failed
>> (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
>> > config=osgibundle:/META-INF/spring/*.xml))
>> > org.springframework.beans.factory.BeanCreationException: Error creating
>> > bean with name 'enrich' defined in URL
>> > [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of
>> bean
>> > failed; nested exception is
>> > org.springframework.beans.BeanInstantiationException: Could not
>> instantiate
>> > bean class [com.fusesource.training.camel.Enrich]: Constructor threw
>> > exception; nested exception is java.lang.Error: Unresolved compilation
>> > problems:
>> > Customer cannot be resolved to a type
>> > Customer cannot be resolved to a type
>> > SaveCustomer cannot be resolved to a type
>> > Customer cannot be resolved to a type
>> > Customer cannot be resolved to a type
>> > CustomerType cannot be resolved to a variable
>> > SaveCustomer cannot be resolved to a type
>> > SaveCustomer cannot be resolved to a type
>> > GetAllCustomersResponse cannot be resolved to a type
>> > GetAllCustomersResponse cannot be resolved to a type
>> > GetAllCustomersResponse cannot be resolved to a type
>> >
>> > Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using
>> JDK
>> > 1.6
>> >
>> > Regards,
>> >
>> > --
>> > Charles Moulliard
>> > Apache Committer / Sr. Enterprise Architect (RedHat)
>> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>>
>>
>>
>> --
>> 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
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



-- 
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: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

Posted by Charles Moulliard <ch...@gmail.com>.
Claus,

I'm using Fuse ESB 7 and create a container using Fabric -->

FuseESB:karaf@fuse-aviva> info
Karaf
  Karaf version               2.3.0.fuse-71-047
  Karaf home
 /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047
  Karaf base
 /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047
  OSGi Framework              org.apache.felix.framework - 4.0.3.fuse-71-047

[ 234] [Active     ] [Created     ] [       ] [   60] camel-blueprint
(2.10.0.fuse-71-047)
[ 240] [Active     ] [            ] [       ] [   60] camel-core
(2.10.0.fuse-71-047)
[ 243] [Active     ] [            ] [       ] [   60] camel-spring
(2.10.0.fuse-71-047)
[ 247] [Active     ] [Created     ] [       ] [   60] camel-karaf-commands
(2.10.0.fuse-71-047)
[ 286] [Active     ] [Created     ] [       ] [   60] camel-cxf
(2.10.0.fuse-71-047)

[ 242] [Active     ] [            ] [       ] [   60] Spring Context
(3.0.7.RELEASE)

[ 245] [Active     ] [            ] [       ] [   60] spring-osgi-core
(1.2.1)
[ 246] [Active     ] [            ] [       ] [   60] spring-osgi-io (1.2.1)

So if camel 2.10 does not work fine with karaf 2.3. Why have we package
like that ?

Regards,

Charles


On Thu, Jan 10, 2013 at 1:16 PM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> You would need Camel 2.11 to run on Karaf 2.3.x.
>
> Camel 2.10 does not support it to well. As its tied to Aries 0.3, and OSGi
> 4.2.
> Where as Karaf is Aries 1.0, and OSGi 4.3 etc.
>
>
>
> On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard <ch...@gmail.com>
> wrote:
> > Hi,
> >
> > When I deploy a camel project as a bundle on Karaf 2.3.0, Spring
> generates
> > the following error that I don't really understand as classes are well
> > packaged in the bundle
> >
> > 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 |
> ContextLoaderListener
> >            | ?                                   ? | 235 -
> > org.springframework.osgi.extender - 1.2.1 | Application context refresh
> > failed
> (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
> > config=osgibundle:/META-INF/spring/*.xml))
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'enrich' defined in URL
> > [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of
> bean
> > failed; nested exception is
> > org.springframework.beans.BeanInstantiationException: Could not
> instantiate
> > bean class [com.fusesource.training.camel.Enrich]: Constructor threw
> > exception; nested exception is java.lang.Error: Unresolved compilation
> > problems:
> > Customer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > SaveCustomer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > Customer cannot be resolved to a type
> > CustomerType cannot be resolved to a variable
> > SaveCustomer cannot be resolved to a type
> > SaveCustomer cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> > GetAllCustomersResponse cannot be resolved to a type
> >
> > Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using
> JDK
> > 1.6
> >
> > Regards,
> >
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
>
> --
> 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
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You would need Camel 2.11 to run on Karaf 2.3.x.

Camel 2.10 does not support it to well. As its tied to Aries 0.3, and OSGi 4.2.
Where as Karaf is Aries 1.0, and OSGi 4.3 etc.



On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard <ch...@gmail.com> wrote:
> Hi,
>
> When I deploy a camel project as a bundle on Karaf 2.3.0, Spring generates
> the following error that I don't really understand as classes are well
> packaged in the bundle
>
> 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 | ContextLoaderListener
>            | ?                                   ? | 235 -
> org.springframework.osgi.extender - 1.2.1 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=camel-exercises-webservice,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'enrich' defined in URL
> [bundle://311.0:0/META-INF/spring/CamelContext.xml]: Instantiation of bean
> failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not instantiate
> bean class [com.fusesource.training.camel.Enrich]: Constructor threw
> exception; nested exception is java.lang.Error: Unresolved compilation
> problems:
> Customer cannot be resolved to a type
> Customer cannot be resolved to a type
> SaveCustomer cannot be resolved to a type
> Customer cannot be resolved to a type
> Customer cannot be resolved to a type
> CustomerType cannot be resolved to a variable
> SaveCustomer cannot be resolved to a type
> SaveCustomer cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
> GetAllCustomersResponse cannot be resolved to a type
>
> Code has been compiled usin maven 3.0.2 / JDK 1.6 and server runs using JDK
> 1.6
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com



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