felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John E. Conlon" <jcon...@verticon.com>
Subject Re: iPOJO Felix does not import messages
Date Fri, 28 Jul 2006 16:29:49 GMT
On Fri, 2006-07-28 at 09:19 +0200, Clement Escoffier wrote: 
> Hi John,
> 
> For the second issue, it is a "simple" problem of manipulation. The 
> class was manipulated two times. So it inserts the _cm field (component 
> manager of the component) two times, and that is not allowed by Java. 
> The newest version of iPOJO (patch submitted this morning) solves this 
> problem. Before manipulating a class I check if the class was not 
> already manipulated. So you can test with the newest version of iPOJO 
> plugin, and tell me the result.
Regarding issue 2...
Tried the latest plugin that includes the patch, I now get the arch
command to show up in the interpreter and the arch command works. 

But I am still getting felix messages telling me that I have not defined
the import for 'org.apache.felix.ipojo.architecture' in the several
iPOJO bundles that I have specified for architecture.

> 
> I don't really understand the first issue. iPOJO runtime imports, 
> contains and exports org.osgi.service.cm package. But this should not 
> influence your bundle. Could you rebuild your bundle and check if the 
> your bundle imports really the package (with the command "headers 20" in 
> the console).

Rebuilt everything but my bundle 20 still does not import the org.osgi.service.cm package.

Yet as mentioned previously the bundle and configuration management does work.

Could these two issues be related? 
- Both issues show bundles that are failing to import a package used by iPojo;
and both issues show that the headers from these effected bundles really do NOT import these
packages;
and both issues have bundles being flagged by Felix WARNINGS for not importing packages; 
and for both issues, the bundles in-spite of the WARNINGS still work.

cheers,

John
> 
> Clement
> 
> John E. Conlon a écrit :
> > Hi Clement and Richard,
> >
> > Have been off on another project but came back today and svn uped felix,
> > built it and did the same with a previously working set of iPOJO
> > bundles.
> >
> > I encountered the following two problems when I tried to load my
> > bundles:
> >
> > ------------
> > 1. felix warning errors on my previously working bundles problem telling
> > me that I did not import the 'org.osgi.service.cm' package.  Well I am
> > letting the iPOJO plugin generate my imports but I guess it leaves this
> > one out? Strange that the config admin appears to still update this
> > component. Here is the felix message:
> >
> > DEBUG: WIRE: 20.0 -> org.apache.commons.jxpath -> 8.0
> > WARNING: *** Class 'org.osgi.service.cm.ManagedService' was not found
> > because bundle 20 does not import 'org.osgi.service.cm' even though
> > bundle 4 does export it. To resolve this issue, add an import for
> > 'org.osgi.service.cm' to bundle 20. ***
> > (java.lang.ClassNotFoundException: *** Class
> > 'org.osgi.service.cm.ManagedService' was not found because bundle 20
> > does not import 'org.osgi.service.cm' even though bundle 4 does export
> > it. To resolve this issue, add an import for 'org.osgi.service.cm' to
> > bundle 20. ***)
> >
> > and here is the metadata:
> >
> > <component 
> >   className="com.verticon.react2.osgi.React2Server2"
> > 	           name="com.verticon.react2" architecture="true">
> >   <Provides interface="org.osgi.service.event.EventHandler">
> > 		<Property field="eventTopics" 
> > 		  name="event.topics" 
> > 		  value="com/verticon/rfid/MOVEMENT"/>
> > 		<Property field="eventFilter" 
> > 		  name="event.filter" 
> > 		  value="(event.topics=*)"/>
> >   </Provides>
> >   <ConfigurableProperty field="eventTopics" 
> > 		name="event.topics"/>
> >   <ConfigurableProperty field="eventFilter" 
> > 		name="event.filter"/>
> >   <Provides 
> > 	   interface="com.verticon.react2.business.React2Service"/>
> >   <dependency field="uriObjectLoader"/>
> >   <callback final="VALID" initial="INVALID" method="starting"/>
> >   <callback final="INVALID" initial="VALID" method="stopping"/>
> > </component>
> >
> > ----------------------
> > 2. Loading the ipojo arch bundle failed with the following message:e:
> >
> >
> > DEBUG: WIRE: 23.0 -> org.ungoverned.osgi.service.shell -> 2.0
> > DEBUG: WIRE: 23.0 -> org.apache.felix.ipojo.architecture -> 5.0
> > DEBUG: WIRE: 23.0 -> org.apache.felix.ipojo -> 5.0
> > WARNING: *** Class 'org.apache.felix.ipojo.architecture.Architecture'
> > was not found because bundle 20 does not import
> > 'org.apache.felix.ipojo.architecture' even though bundle 5 does export
> > it. To resolve this issue, add an import for
> > 'org.apache.felix.ipojo.architecture' to bundle 20. ***
> > (java.lang.ClassNotFoundException: *** Class
> > 'org.apache.felix.ipojo.architecture.Architecture' was not found because
> > bundle 20 does not import 'org.apache.felix.ipojo.architecture' even
> > though bundle 5 does export it. To resolve this issue, add an import for
> > 'org.apache.felix.ipojo.architecture' to bundle 20. ***)
> > WARNING: *** Class 'org.apache.felix.ipojo.architecture.Architecture'
> > was not found because bundle 20 does not import
> > 'org.apache.felix.ipojo.architecture' even though bundle 5 does export
> > it. To resolve this issue, add an import for
> > 'org.apache.felix.ipojo.architecture' to bundle 20. ***
> > (java.lang.ClassNotFoundException: *** Class
> > 'org.apache.felix.ipojo.architecture.Architecture' was not found because
> > bundle 20 does not import 'org.apache.felix.ipojo.architecture' even
> > though bundle 5 does export it. To resolve this issue, add an import for
> > 'org.apache.felix.ipojo.architecture' to bundle 20. ***)
> > WARNING: *** Class 'org.apache.felix.ipojo.architecture.Architecture'
> > was not found because bundle 22 does not import
> > 'org.apache.felix.ipojo.architecture' even though bundle 5 does export
> > it. To resolve this issue, add an import for
> > 'org.apache.felix.ipojo.architecture' to bundle 22. ***
> > (java.lang.ClassNotFoundException: *** Class
> > 'org.apache.felix.ipojo.architecture.Architecture' was not found because
> > bundle 22 does not import 'org.apache.felix.ipojo.architecture' even
> > though bundle 5 does export it. To resolve this issue, add an import for
> > 'org.apache.felix.ipojo.architecture' to bundle 22. ***)
> > WARNING: *** Class 'org.apache.felix.ipojo.architecture.Architecture'
> > was not found because bundle 21 does not import
> > 'org.apache.felix.ipojo.architecture' even though bundle 5 does export
> > it. To resolve this issue, add an import for
> > 'org.apache.felix.ipojo.architecture' to bundle 21. ***
> > (java.lang.ClassNotFoundException: *** Class
> > 'org.apache.felix.ipojo.architecture.Architecture' was not found because
> > bundle 21 does not import 'org.apache.felix.ipojo.architecture' even
> > though bundle 5 does export it. To resolve this issue, add an import for
> > 'org.apache.felix.ipojo.architecture' to bundle 21. ***)
> > ERROR: EventDispatcher: Error during dispatch.
> > (java.lang.ClassFormatError: Repetitive field name/signature in class
> > file org/apache/felix/ipojo/arch/ArchCommandImpl)
> > java.lang.ClassFormatError: Repetitive field name/signature in class
> > file org/apache/felix/ipojo/arch/ArchCommandImpl
> >         at java.lang.ClassLoader.defineClass1(Native Method)
> >         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> >         at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
> >         at
> > org.apache.felix.framework.searchpolicy.ContentClassLoader.findClass
> > (ContentClassLoader.java:155)
> >         at
> > org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClassFromModule(ContentClassLoader.java:48)
> >         at
> > org.apache.felix.framework.searchpolicy.ContentLoaderImpl.getClass
> > (ContentLoaderImpl.java:108)
> >         at
> > org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:247)
> >         at
> > org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass
> > (R4SearchPolicyCore.java:132)
> >         at
> > org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass
> > (R4SearchPolicy.java:42)
> >         at org.apache.felix.moduleloader.ModuleImpl.getClass
> > (ModuleImpl.java:83)
> >         at org.apache.felix.framework.Felix.loadBundleClass
> > (Felix.java:1098)
> >         at org.apache.felix.framework.BundleImpl.loadClass
> > (BundleImpl.java:313)
> >         at org.apache.felix.ipojo.ComponentManagerFactory.loadClass
> > (ComponentManagerFactory.java:258)
> >         at org.apache.felix.ipojo.ComponentManager.load
> > (ComponentManager.java:242)
> >         at org.apache.felix.ipojo.ComponentManager.createInstance
> > (ComponentManager.java:308)
> >         at org.apache.felix.ipojo.ComponentManager.getInstance
> > (ComponentManager.java:359)
> >         at
> > org.apache.felix.ipojo.handlers.providedservice.ProvidedService.getService(ProvidedService.java:163)
> >         at
> > org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked
> > (ServiceRegistrationImpl.java:258)
> >         at org.apache.felix.framework.ServiceRegistrationImpl.getService
> > (ServiceRegistrationImpl.java:187)
> >         at org.apache.felix.framework.ServiceRegistry.getService
> > (ServiceRegistry.java:237)
> >         at org.apache.felix.framework.Felix.getService(Felix.java:2168)
> >         at org.apache.felix.framework.BundleContextImpl.getService
> > (BundleContextImpl.java:514)
> >         at org.apache.felix.shell.impl.Activator
> > $ShellServiceImpl.addCommand(Activator.java:286)
> >         at org.apache.felix.shell.impl.Activator$1.serviceChanged
> > (Activator.java:50)
> >         at
> > org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:710)
> >         at
> > org.apache.felix.framework.util.EventDispatcher.fireEventImmediately
> > (EventDispatcher.java:568)
> >         at
> > org.apache.felix.framework.util.EventDispatcher.fireServiceEvent
> > (EventDispatcher.java:500)
> >         at org.apache.felix.framework.Felix.fireServiceEvent
> > (Felix.java:2795)
> >         at org.apache.felix.framework.Felix.access$100(Felix.java:31)
> >         at org.apache.felix.framework.Felix$1.serviceChanged
> > (Felix.java:224)
> >         at org.apache.felix.framework.ServiceRegistry.fireServiceChanged
> > (ServiceRegistry.java:422)
> >         at org.apache.felix.framework.ServiceRegistry.registerService
> > (ServiceRegistry.java:69)
> >         at org.apache.felix.framework.Felix.registerService
> > (Felix.java:2065)
> >         at org.apache.felix.framework.BundleContextImpl.registerService
> > (BundleContextImpl.java:250)
> >         at
> > org.apache.felix.ipojo.handlers.providedservice.ProvidedService.registerService(ProvidedService.java:225)
> >         at
> > org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.start(ProvidedServiceHandler.java:236)
> >         at
> > org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.stateChanged(ProvidedServiceHandler.java:299)
> >         at org.apache.felix.ipojo.ComponentManager.setState
> > (ComponentManager.java:216)
> >         at org.apache.felix.ipojo.ComponentManager.check
> > (ComponentManager.java:486)
> >         at
> > org.apache.felix.ipojo.handlers.dependency.DependencyHandler.checkContext(DependencyHandler.java:135)
> >         at
> > org.apache.felix.ipojo.handlers.dependency.DependencyHandler.start
> > (DependencyHandler.java:325)
> >         at org.apache.felix.ipojo.ComponentManager.start
> > (ComponentManager.java:183)
> >         at org.apache.felix.ipojo.ComponentManagerFactory.start
> > (ComponentManagerFactory.java:232)
> >         at org.apache.felix.ipojo.Activator.start(Activator.java:231)
> >         at org.apache.felix.ipojo.Activator.start(Activator.java:176)
> >         at org.apache.felix.framework.Felix._startBundle
> > (Felix.java:1216)
> >         at org.apache.felix.framework.Felix.startBundle(Felix.java:1149)
> >         at org.apache.felix.framework.Felix.setFrameworkStartLevel
> > (Felix.java:768)
> >         at org.apache.felix.framework.StartLevelImpl.run
> > (StartLevelImpl.java:220)
> >         at java.lang.Thread.run(Thread.java:595)
> >
> >
> > any ideas?
> >
> > John
> >
> >
> >
> >   
> 


Mime
View raw message