4 Replies Latest reply on Oct 31, 2013 11:47 AM by Jose Miguel Loor

    problem deploying an osgi application

    Jose Miguel Loor Apprentice

      hi

       

      i am trying to deploy a simple application; i have attached the camel files in the post

       

      when i deploy the application using the fuse ide to my local fuse installation, everything works fine; but when i get to the console and run:

       

      osgi:install -s mvn:ec.gob.senplades/senplades-esb-camel-contract

       

      i get this exception:

       

      Exception in thread "SpringOsgiExtenderThread-2" org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[cxf:bean:agendaFacadeEndpoint]] -> [To[log:input... because of Failed to resolve endpoint: cxf://bean:agendaFacadeEndpoint due to: Cannot lookup: agendaFacadeEndpoint from registry: org.apache.camel.spring.spi.ApplicationContextRegistry@160c0ae with expected type: class org.apache.camel.component.cxf.CxfEndpoint due: Error creating bean with name 'agendaFacadeEndpoint': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'serviceClass'; nested exception is java.lang.IllegalArgumentException: Error loading class [ec.gob.senplades.sipp.negocio.seguimiento.ws.impl.AgendaSectorialWSImpl]: problem with class file or dependent class.

        at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1326)

        at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)

        at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:283)

        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)

        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)

        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:941)

        at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)

        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)

        at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)

        at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)

        at java.lang.Thread.run(Thread.java:722)

      Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[cxf:bean:agendaFacadeEndpoint]] -> [To[log:input... because of Failed to resolve endpoint: cxf://bean:agendaFacadeEndpoint due to: Cannot lookup: agendaFacadeEndpoint from registry: org.apache.camel.spring.spi.ApplicationContextRegistry@160c0ae with expected type: class org.apache.camel.component.cxf.CxfEndpoint due: Error creating bean with name 'agendaFacadeEndpoint': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'serviceClass'; nested exception is java.lang.IllegalArgumentException: Error loading class [ec.gob.senplades.sipp.negocio.seguimiento.ws.impl.AgendaSectorialWSImpl]: problem with class file or dependent class.

        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:177)

        at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:731)

        at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1803)

        at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1589)

        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1453)

        at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1421)

        at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)

        at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)

        ... 10 more

      Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: cxf://bean:agendaFacadeEndpoint due to: Cannot lookup: agendaFacadeEndpoint from registry: org.apache.camel.spring.spi.ApplicationContextRegistry@160c0ae with expected type: class org.apache.camel.component.cxf.CxfEndpoint due: Error creating bean with name 'agendaFacadeEndpoint': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'serviceClass'; nested exception is java.lang.IllegalArgumentException: Error loading class [ec.gob.senplades.sipp.negocio.seguimiento.ws.impl.AgendaSectorialWSImpl]: problem with class file or dependent class.

        at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:488)

        at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:61)

        at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:187)

        at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)

        at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114)

        at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)

        at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90)

        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:857)

        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:172)

        ... 19 more

      Caused by: org.apache.camel.NoSuchBeanException: Cannot lookup: agendaFacadeEndpoint from registry: org.apache.camel.spring.spi.ApplicationContextRegistry@160c0ae with expected type: class org.apache.camel.component.cxf.CxfEndpoint due: Error creating bean with name 'agendaFacadeEndpoint': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'serviceClass'; nested exception is java.lang.IllegalArgumentException: Error loading class [ec.gob.senplades.sipp.negocio.seguimiento.ws.impl.AgendaSectorialWSImpl]: problem with class file or dependent class.

        at org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:57)

        at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:62)

        at org.apache.camel.util.CamelContextHelper.lookup(CamelContextHelper.java:119)

        at org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:139)

        at org.apache.camel.component.cxf.CxfComponent.createEndpoint(CxfComponent.java:70)

        at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)

        at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:469)

        ... 27 more

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agendaFacadeEndpoint': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'serviceClass'; nested exception is java.lang.IllegalArgumentException: Error loading class [ec.gob.senplades.sipp.negocio.seguimiento.ws.impl.AgendaSectorialWSImpl]: problem with class file or dependent class.

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1109)

        at org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:43)

        at org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:51)

        ... 33 more

      Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'serviceClass'; nested exception is java.lang.IllegalArgumentException: Error loading class [ec.gob.senplades.sipp.negocio.seguimiento.ws.impl.AgendaSectorialWSImpl]: problem with class file or dependent class.

        at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:490)

        at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516)

        at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1406)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1365)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)

        ... 39 more

      Caused by: java.lang.IllegalArgumentException: Error loading class [ec.gob.senplades.sipp.negocio.seguimiento.ws.impl.AgendaSectorialWSImpl]: problem with class file or dependent class.

        at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:297)

        at org.springframework.beans.propertyeditors.ClassEditor.setAsText(ClassEditor.java:63)

        at org.springframework.beans.TypeConverterDelegate.doConvertTextValue(TypeConverterDelegate.java:435)

        at org.springframework.beans.TypeConverterDelegate.doConvertValue(TypeConverterDelegate.java:407)

        at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:164)

        at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470)

        ... 45 more

      Caused by: java.lang.ClassFormatError: Weaving hook failed.

        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2074)

        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1501)

        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)

        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

        at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1862)

        at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937)

        at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)

        at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

        at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)

        at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:291)

        ... 50 more

      Caused by: java.lang.NullPointerException

        at org.apache.aries.proxy.impl.weaving.ProxyWeavingHook.weave(ProxyWeavingHook.java:73)

        at org.apache.felix.framework.util.SecureAction.invokeWeavingHook(SecureAction.java:1127)

        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2057)

        ... 61 more

       

      any ideas ??