Thanks for the advice. Bundle-ActivationPolicy: lazy is the only way in
Eclipse according to what I found.

The Bundle-ActivationPolicy Header
The Bundle-ActivationPolicy header is introduced to allow a bundle to
specify a bundle start policy. 

Bundle-ActivationPolicy ::= policy-type (';' directive)*
policy-type ::= token

The only defined policy type is lazy. 

The lazy activation policy has the following defined directives: 

include � A comma-separated list of package names that require the lazy
activation policy. Note that the use of a comma in the value requires it to
be enclosed in double quotes. If not specified then all packages require the
lazy activation policy. 
exclude � A comma-separated list of package names that do not use the lazy
activation policy. Note that the use of a comma in the value requires it to
be enclosed in double quotes. If not specified then all packages require the
lazy activation policy. 

I have add the Exclude like the follow:
Bundle-ActivationPolicy: lazy; exclude:="org.apache.camel.converter"
but still give me the exception.
2009-08-07 11:18:14,382 INFO
[org.apache.camel.spring.handler.CamelNamespaceHandler] - camel-osgi.jar not
detected in classpath

2009-08-07 11:18:28,944 WARN
[org.apache.camel.impl.DefaultPackageScanClassResolver] - Could not read
entries in url:
bundleresource://61.fwk26208195:17/org/apache/camel/converter/
java.io.FileNotFoundException: \org\apache\camel\converter (The system
cannot find the path specified)

I have to gave up the camel at this time because of the deadline. 

Thank you for all the helps.




willem.jiang wrote:
> 
> Hi,
> 
> Can you change this property in your MANIFEST.MF ?
> Bundle-ActivationPolicy: lazy
> 
> Willem
> otech wrote:
>> I have moved the osgi jar before camel-spring jar. But the problem still
>> exits. Thank you for all the help.
>> 
>> Logs:
>> 
>> 2009-08-06 11:12:20,308 INFO
>> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading
>> XML bean definitions from URL
>> [bundleresource://53.fwk28904249/beanRefFactory.xml]
>> 2009-08-06 11:12:20,370 INFO
>> [org.springframework.beans.factory.support.DefaultListableBeanFactory] -
>> Pre-instantiating singletons in
>> org.springframework.beans.factory.support.defaultlistablebeanfact...@1343ed0:
>> defining beans [ctx]; root of factory hierarchy
>> 2009-08-06 11:12:20,433 INFO
>> [org.springframework.context.support.ClassPathXmlApplicationContext] -
>> Refreshing
>> org.springframework.context.support.classpathxmlapplicationcont...@17a4989:
>> display name
>> [org.springframework.context.support.classpathxmlapplicationcont...@17a4989];
>> startup date [Thu Aug 06 11:12:20 EDT 2009]; root of context hierarchy
>> 2009-08-06 11:12:20,433 INFO
>> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading
>> XML bean definitions from class path resource [resources/ptcContext.xml]
>> 2009-08-06 11:12:22,527 INFO
>> [org.apache.camel.spring.handler.CamelNamespaceHandler] - camel-osgi.jar
>> not
>> detected in classpath
>> 2009-08-06 11:12:22,964 INFO
>> [org.springframework.context.support.ClassPathXmlApplicationContext] -
>> Bean
>> factory for application context
>> [org.springframework.context.support.classpathxmlapplicationcont...@17a4989]:
>> org.springframework.beans.factory.support.defaultlistablebeanfact...@c8c7d6
>> 2009-08-06 11:12:23,027 INFO [org.apache.camel.impl.DefaultCamelContext]
>> -
>> JMX enabled. Using InstrumentationLifecycleStrategy.
>> 2009-08-06 11:12:23,058 INFO
>> [org.springframework.beans.factory.support.DefaultListableBeanFactory] -
>> Pre-instantiating singletons in
>> org.springframework.beans.factory.support.defaultlistablebeanfact...@c8c7d6:
>> defining beans
>> [activemq,orderTopicMessageProcessor,desktopCamelTemplate,camel:beanPostProcessor,camel,jmsConnectionFactory,lavaOrderTopic,sectorSummaryTopic,Ptc2Pts-RequestQ,jmsTemplate,orderMsgProcessor,orderTopicMessageListener,sectorSummaryMessageListener,sectorSummaryMessageListenerContainer,requester,userRequester];
>> root of factory hierarchy
>> 2009-08-06 11:12:23,339 INFO
>> [org.springframework.jms.connection.SingleConnectionFactory] -
>> Established
>> shared JMS Connection: ActiveMQConnection
>> {id=ID:WJB1DEV3-4488-1249571543230-0:0,clientId=null,started=false}
>> 2009-08-06 11:12:23,402 INFO [org.apache.camel.spring.SpringCamelContext]
>> -
>> Starting Apache Camel as property ShouldStartContext is true
>> 2009-08-06 11:12:23,402 INFO [org.apache.camel.impl.DefaultCamelContext]
>> -
>> Apache Camel 2.0-M3 (CamelContext:camel) is starting
>> 2009-08-06 11:12:23,589 INFO [org.apache.camel.impl.DefaultCamelContext]
>> -
>> Apache Camel 2.0-M3 (CamelContext:camel) started
>> 
>> 
>> The MANIFEST.MF file:
>> Require-Bundle: org.eclipse.ui,
>>  org.eclipse.core.runtime,
>>  org.eclipse.core.databinding;bundle-version="1.2.0",
>>  org.eclipse.core.databinding.beans;bundle-version="1.2.0",
>>  org.eclipse.core.databinding.property;bundle-version="1.2.0",
>>  org.eclipse.jface.databinding;bundle-version="1.3.0"
>> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>> Bundle-ActivationPolicy: lazy
>> Bundle-ClassPath: libs/glazedlists-1.8.0_java15.jar,
>>  libs/net.sourceforge.nattable.core_2.0.0.200906211946.jar,
>> 
>> libs/net.sourceforge.nattable.extension.glazedlists_2.0.0.200906211946.jar,
>>  .,
>>  libs/commons-lang-2.4.jar,
>>  libs/activemq-all-5.2.0.jar,
>>  libs/commons-beanutils-1.8.0.jar,
>>  libs/commons-logging-1.1.1.jar,
>>  libs/log4j-1.2.14.jar,
>>  libs/spring-beans-2.5.6.jar,
>>  libs/spring-context-2.5.6.jar,
>>  libs/spring-core-2.5.6.jar,
>>  libs/spring-jms-2.5.6.jar,
>>  libs/spring-tx-2.5.6.jar,
>>  libs/xbean-spring-3.2.jar,
>>  libs/k170-1.0.jar,
>>  libs/camel-core-2.0-M3.jar,
>>  libs/camel-jms-2.0-M3.jar,
>>  libs/camel-osgi-2.0-M3.jar,
>>  libs/camel-spring-2.0-M3.jar,
>>  libs/spring-aop-2.0.8.jar
>> 
>> 
>> 
>> willem.jiang wrote:
>>> Can you move the camel-osgi-2.0-M3.jar before the
>>> camel-spring-2.0-M3.jar?
>>> It will do a trick to let camel-spring find the camel-osgi module before 
>>> it register the spring handler to parser camelContext element.
>>>
>>> Willem
>>> otech wrote:
>>>> Sorry, I have edited the previous post. The actual file is:
>>>>
>>>> Manifest-Version: 1.0
>>>> Bundle-ManifestVersion: 2
>>>> Bundle-Name: Desktop
>>>> Bundle-SymbolicName:desktop;singleton:=true
>>>> Bundle-Version: 1.0.0
>>>> Bundle-Activator: desktop.Activator
>>>> Bundle-Vendor: com
>>>> Require-Bundle: org.eclipse.ui,
>>>>  org.eclipse.core.runtime,
>>>>  org.eclipse.core.databinding;bundle-version="1.2.0",
>>>>  org.eclipse.core.databinding.beans;bundle-version="1.2.0",
>>>>  org.eclipse.core.databinding.property;bundle-version="1.2.0",
>>>>  org.eclipse.jface.databinding;bundle-version="1.3.0"
>>>> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>>>> Bundle-ActivationPolicy: lazy
>>>> Bundle-ClassPath: libs/glazedlists-1.8.0_java15.jar,
>>>>  libs/net.sourceforge.nattable.core_2.0.0.200906211946.jar,
>>>>
>>>> libs/net.sourceforge.nattable.extension.glazedlists_2.0.0.200906211946.jar,
>>>>  .,
>>>>  libs/commons-lang-2.4.jar,
>>>>  libs/activemq-all-5.2.0.jar,
>>>>  libs/commons-beanutils-1.8.0.jar,
>>>>  libs/commons-logging-1.1.1.jar,
>>>>  libs/log4j-1.2.14.jar,
>>>>  libs/spring-beans-2.5.6.jar,
>>>>  libs/spring-context-2.5.6.jar,
>>>>  libs/spring-core-2.5.6.jar,
>>>>  libs/spring-jms-2.5.6.jar,
>>>>  libs/spring-tx-2.5.6.jar,
>>>>  libs/xbean-spring-3.2.jar,
>>>>  libs/k170-1.0.jar,
>>>>  libs/spring-aop-2.0.8.jar,
>>>>  libs/camel-jms-2.0-M3.jar,
>>>>  libs/jencks-2.0.jar,
>>>>  libs/jencks-amqpool-2.0.jar,
>>>>  libs/commons-pool-1.5.2.jar,
>>>>  libs/camel-core-2.0-M3.jar,
>>>>  libs/camel-spring-2.0-M3.jar,
>>>>  libs/activemq-camel-5.2.0.jar,
>>>>  libs/camel-osgi-2.0-M3.jar
>>>>
>>>>
>>>>
>>>>
>>>> willem.jiang wrote:
>>>>> I didn't find the camel-osgi-2.0-M3.jar in the MANIFEST.MF file.
>>>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Camel-OSGI-is-not-working-in-Eclipse-RCP-3.5-tp24835236p24866795.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to