cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olamalam <ilker.cikrikc...@aspone.co.uk>
Subject Re: DOSGI Spring DM demo not working either with multi-bundle or single-bundle distro
Date Tue, 27 Apr 2010 09:46:03 GMT

Hi David,

Sorry for my late reply, I was busy with some other projects.

I could run the demo with pax construct and felix.
What I did is:

> pax-create-project -g examples -a test
> cd test
> pax-create-bundle -p org.example.pkg -n test.bundle
> pax-import-bundle -g org.apache.cxf.dosgi -a
> cxf-dosgi-ri-singlebundle-distribution -v 1.1
> pax-import-bundle -g org.osgi -a org.osgi.compendium -v 4.2.0
> mvn pax:eclipse -DdownloadSources
created a context.xml file:
<osgi:service interface="org.example.pkg.ExampleService">
	<osgi:service-properties>
		<entry key="osgi.remote.interfaces" value="*" />
             </osgi:service-properties>
	<bean class="org.example.pkg.internal.ExampleServiceImpl" />
</osgi:service>

> mvn clean install pax:provision

and when I hit this link: 
http://localhost:9000/org/example/pkg/ExampleService?wsdl 
I could see the wsdl generated.

To double check I tried to deploy the same bundle (test.bundle) to karaf 1.4
and it didn't work.
When I try to install single bundle distro (after installing osgi.cpmn) I
got:
*ERROR* Cannot use Factory configuration for org.apache.felix.fileinstall
requested by bundle
mvn:org.apache.cxf.dosgi/cxf-dosgi-ri-singlebundle-distribution/1.1 but
belongs to mvn:org.apache.felix/org.apache.felix.fileinstall/2.0.8
but single bundle distro seems active.

And when I try to deploy test.bundle I got:
Exception in thread "SpringOsgiExtenderThread-2"
java.lang.IllegalStateException
: BeanFactory not initialized or already closed - call 'refresh' before
accessing beans via the ApplicationContext at
org.springframework.context.support.AbstractRefreshableApplicationCon
text.getBeanFactory(AbstractRefreshableApplicationContext.java:153)
...

So the problem is probably about the karaf 1.4 & dosgi combination.

Regards


olamalam wrote:
> 
> Yes, you are right. I'll do that and inform you.
> Thanks again.
> 
> Ilker
> 
> 
> 
> David Bosschaert wrote:
>> 
>> Sure, but it helps pinpointing where the issue is.
>> If it doesn't work plain, then we know to look in DOSGi.
>> If it doesn't work with Karaf, then its in the interaction between
>> DOSGi & Karaf...
>> 
>> David
>> 
>> On 22 April 2010 08:14, olamalam <ilker.cikrikcili@aspone.co.uk> wrote:
>>>
>>> Hi David,
>>>
>>> No, I haven't tried that. But even if it works with plain Felix or
>>> Equinox I
>>> have to run it with karaf 1.4.
>>>
>>> Thanks
>>> Ilker
>>>
>>>
>>>
>>> David Bosschaert wrote:
>>>>
>>>> Hi Ilker,
>>>>
>>>> Just wondering are you getting it to work outside of Karaf, just with
>>>> plain Felix or Equinox?
>>>>
>>>> David
>>>>
>>>> On 19 April 2010 10:42, olamalam <ilker.cikrikcili@aspone.co.uk> wrote:
>>>>>
>>>>> Hi to all,
>>>>>
>>>>> I'm trying to run Spring Dm demo with karaf 1.4 for a couple of days
>>>>> but
>>>>> I
>>>>> still couldn't manage it. Please help me!
>>>>>
>>>>> As http://cxf.apache.org/dosgi-spring-dm-demo-page.html suggests
>>>>> CXF/DOSGi
>>>>> multi bundle distribution I tried to install multi-bundle distro by
>>>>> following:
>>>>> http://cxf.apache.org/dosgi-multi-bundle-setup.html
>>>>>
>>>>> I've appended those lines to etc\config.properties file like:
>>>>> ...
>>>>>  org.xml.sax, \
>>>>>  org.xml.sax.ext, \
>>>>>  org.xml.sax.helpers
>>>>>
>>>>>
>>>>> org.ops4j.pax.web.session.timeout=30
>>>>> org.osgi.framework.startlevel.beginning=81
>>>>> felix.auto.start.50=http://repo2.maven.org/maven2/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar
>>>>>
>>>>> felix.auto.start.51=file:C:/apache-cxf-dosgi-ri-1.1/dosgi_bundles/geronimo-annotation_1.0_spec-1.1.1.jar
>>>>> felix.auto.start.52=file:C:/apache-cxf-dosgi-ri-1.1/dosgi_bundles/geronimo-activation_1.1_spec-1.0.2.jar
>>>>> felix.auto.start.53=file:C:/apache-cxf-dosgi-ri-1.1/dosgi_bundles/geronimo-javamail_1.4_spec-1.2.jar
>>>>> ...
>>>>>
>>>>> But when I start karaf and check the bundle list I couldn't see the
>>>>> necessary bundles installed.
>>>>>
>>>>> Then I tried installing single-bundle distro which was successful this
>>>>> time!
>>>>> I run these commands:
>>>>> osgi:install -s
>>>>> mvn:org.apache.cxf.dosgi/cxf-dosgi-ri-singlebundle-distribution/1.1
>>>>> osgi:install -s mvn:org.osgi/org.osgi.compendium/4.2.0
>>>>> and could saw these 2 bundles are installed and their status are
>>>>> active.
>>>>>
>>>>> I saw these lines on the karaf log:
>>>>>
>>>>> Application context successfully refreshed
>>>>> (OsgiBundleXmlApplicationContext(bundle=com.aspone.trh.springdm-demo,
>>>>> config=osgibundle:/META-INF/spring/*.xml))
>>>>> Defaulting to pojo configuration type
>>>>> Using a default address :
>>>>> http://localhost:9000/com/aspone/trh/springdmdemo/ExampleService
>>>>> Creating a com.aspone.trh.springdmdemo.ExampleService endpoint from
>>>>> CXF
>>>>> PublishHook, address is
>>>>> http://localhost:9000/com/aspone/trh/springdmdemo/ExampleService
>>>>> Could not find intent map file /OSGI-INF/cxf/intents/intent-map.xml
>>>>> Injected intents: {}
>>>>>
>>>>> But when I hit:
>>>>> http://localhost:9000/com/aspone/trh/springdmdemo/ExampleService?wsdl
>>>>> I get http 404 error.
>>>>> Probably the problem is about "Could not find intent map file
>>>>> /OSGI-INF/cxf/intents/intent-map.xml"
>>>>>
>>>>> Please note that my spring context file is like:
>>>>> ...
>>>>> <osgi:service interface="com.aspone.trh.springdmdemo.ExampleService">
>>>>>        <osgi:service-properties>
>>>>>                <entry key="osgi.remote.interfaces" value="*"
/>
>>>>>        </osgi:service-properties>
>>>>>        <bean
>>>>> class="com.aspone.trh.springdmdemo.internal.ExampleServiceImpl" />
>>>>> </osgi:service>
>>>>> ...
>>>>>
>>>>> Can anybody see what I did wrong?
>>>>>
>>>>> Thanks, regards
>>>>> Ilker
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/DOSGI-Spring-DM-demo-not-working-either-with-multi-bundle-or-single-bundle-distro-tp28287633p28287633.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/DOSGI-Spring-DM-demo-not-working-either-with-multi-bundle-or-single-bundle-distro-tp28287633p28324996.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/DOSGI-Spring-DM-demo-not-working-either-with-multi-bundle-or-single-bundle-distro-tp28287633p28374972.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message