Hi Pavel,

actually I'm not sure where the issue might be at.
I know that Apache Karaf uses 0.12.x for a reason, as 1.0.0 was kind of not
working correctly.
But we never really had the time to investigate further :/

sorry, can't be much of help right now. Especially my $DayJob keeps me from
doing OSS right now ...


regards, Achim

2016-08-17 10:58 GMT+02:00 iJava <[email protected]>:

> Achim, are you there? Can I help somehow because it is impossible to work
> when you can't restart war bundle.
>
>
> On Tuesday, 16 August 2016 11:25:43 UTC+3, iJava wrote:
>>
>> Hi Achim,
>>
>> You know to change from 1 to 0.12 is not so simple - dependencies etc.
>> Could you say - is my code right? Is it enough bundle.stop without
>> WarManager.stop?
>> Or it is enought WarManager.stop without bundle.stop.
>>
>> Is this bug in pax products - I do execute the most simple operation -
>> stop bundle.
>>
>> On Tuesday, 16 August 2016 11:02:35 UTC+3, Achim Nierbeck wrote:
>>>
>>> Hi,
>>>
>>> could you try with Pax-CDI 0.12.0 ... afaik it's what we use with Apache
>>> Karaf, and it seems to work better ...
>>>
>>> regards, Achim
>>>
>>>
>>> 2016-08-16 8:05 GMT+02:00 iJava <[email protected]>:
>>>
>>>> Hi all,
>>>>
>>>> Unfortunately I can't stop wab without exceptions (I use pax-web 4.2.7
>>>> and pax-cdi 1.0) . Now I do this way:
>>>>
>>>> ServiceReference reference = bundleContext.getServiceRefere
>>>> nce(WarManager.class.getName());
>>>> WarManager warManager = (WarManager) bundleContext.getService(refer
>>>> ence);
>>>> warManager.stop(bundle.getBundleId());
>>>> bundle.stop();//I tried without this line but bundle doesn't stop
>>>> (state 32)
>>>>
>>>> I tried it without WarManager but the same result.
>>>>
>>>> And this is what I get - I can't understand if it is pax-web or pax-cdi
>>>>
>>>> java.lang.NullPointerException
>>>>     at org.ops4j.pax.web.extender.war.internal.DefaultWebAppDepende
>>>> ncyManager.removeWebApp(DefaultWebAppDependencyManager.java:99)
>>>>     at org.ops4j.pax.web.extender.war.internal.WebObserver$1.doDest
>>>> roy(WebObserver.java:189)
>>>>     at org.ops4j.pax.web.extender.war.internal.extender.SimpleExten
>>>> sion.destroy(SimpleExtension.java:71)
>>>>     at org.ops4j.pax.web.extender.war.internal.extender.AbstractExt
>>>> ender$2.run(AbstractExtender.java:306)
>>>>     at java.util.concurrent.Executors$RunnableAdapter.call(
>>>> Executors.java:511)
>>>>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>     at org.ops4j.pax.web.extender.war.internal.extender.AbstractExt
>>>> ender.destroyExtension(AbstractExtender.java:332)
>>>>     at org.ops4j.pax.web.extender.war.internal.extender.AbstractExt
>>>> ender.bundleChanged(AbstractExtender.java:190)
>>>>     at org.apache.felix.framework.util.EventDispatcher.invokeBundle
>>>> ListenerCallback(EventDispatcher.java:916)
>>>>     at org.apache.felix.framework.util.EventDispatcher.fireEventImm
>>>> ediately(EventDispatcher.java:835)
>>>>     at org.apache.felix.framework.util.EventDispatcher.fireBundleEv
>>>> ent(EventDispatcher.java:517)
>>>>     at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:
>>>> 4541)
>>>>     at org.apache.felix.framework.Felix.stopBundle(Felix.java:2600)
>>>>     at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:1038)
>>>>     at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:1024)
>>>>     at org.example.solution.mgr.core.services.OsgiServiceImpl.stopB
>>>> undle(OsgiServiceImpl.java:97)
>>>>     at org.example.solution.mgr.svr.services.RmiOsgiServiceImpl.sto
>>>> pBundle(RmiOsgiServiceImpl.java:80)
>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>>> ssorImpl.java:62)
>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>>> thodAccessorImpl.java:43)
>>>>     at java.lang.reflect.Method.invoke(Method.java:497)
>>>>     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.
>>>> java:323)
>>>>     at sun.rmi.transport.Transport$1.run(Transport.java:200)
>>>>     at sun.rmi.transport.Transport$1.run(Transport.java:197)
>>>>     at java.security.AccessController.doPrivileged(Native Method)
>>>>     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
>>>>     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspo
>>>> rt.java:568)
>>>>     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TC
>>>> PTransport.java:826)
>>>>     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$
>>>> run$250(TCPTransport.java:683)
>>>>     at 
>>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/783938596.run(Unknown
>>>> Source)
>>>>     at java.security.AccessController.doPrivileged(Native Method)
>>>>     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCP
>>>> Transport.java:682)
>>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>> Executor.java:1142)
>>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>> lExecutor.java:617)
>>>>     at java.lang.Thread.run(Thread.java:745)
>>>> ERROR: Bundle org.example.site.fend [67] EventDispatcher: Error during
>>>> dispatch. (java.lang.IllegalStateException: Invalid BundleContext.)
>>>> java.lang.IllegalStateException: Invalid BundleContext.
>>>>     at org.apache.felix.framework.BundleContextImpl.checkValidity(B
>>>> undleContextImpl.java:511)
>>>>     at org.apache.felix.framework.BundleContextImpl.getServiceObjec
>>>> ts(BundleContextImpl.java:529)
>>>>     at org.ops4j.pax.cdi.extension.impl.compat.Osgi6ServiceObjectsW
>>>> rapper.init(Osgi6ServiceObjectsWrapper.java:55)
>>>>     at org.ops4j.pax.cdi.extension.impl.compat.OsgiScopeUtils.creat
>>>> eServiceObjectsWrapper(OsgiScopeUtils.java:59)
>>>>     at org.ops4j.pax.cdi.extension.impl.ServiceEventBridge.serviceC
>>>> hanged(ServiceEventBridge.java:62)
>>>>     at org.apache.felix.framework.util.EventDispatcher.invokeServic
>>>> eListenerCallback(EventDispatcher.java:991)
>>>>     at org.apache.felix.framework.util.EventDispatcher.fireEventImm
>>>> ediately(EventDispatcher.java:839)
>>>>     at org.apache.felix.framework.util.EventDispatcher.fireServiceE
>>>> vent(EventDispatcher.java:546)
>>>>     at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java
>>>> :4557)
>>>>     at org.apache.felix.framework.Felix.access$000(Felix.java:106)
>>>>     at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java
>>>> :420)
>>>>     at org.apache.felix.framework.ServiceRegistry.unregisterService
>>>> (ServiceRegistry.java:170)
>>>>     at org.apache.felix.framework.ServiceRegistrationImpl.unregiste
>>>> r(ServiceRegistrationImpl.java:144)
>>>>     at org.apache.felix.framework.ServiceRegistry.unregisterService
>>>> s(ServiceRegistry.java:235)
>>>>     at org.apache.felix.framework.Felix.stopBundle(Felix.java:2635)
>>>>     at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:1038)
>>>>     at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:1024)
>>>>     at org.example.solution.mgr.core.services.OsgiServiceImpl.stopB
>>>> undle(OsgiServiceImpl.java:97)
>>>>     at org.example.solution.mgr.svr.services.RmiOsgiServiceImpl.sto
>>>> pBundle(RmiOsgiServiceImpl.java:80)
>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>>> ssorImpl.java:62)
>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>>> thodAccessorImpl.java:43)
>>>>     at java.lang.reflect.Method.invoke(Method.java:497)
>>>>     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.
>>>> java:323)
>>>>     at sun.rmi.transport.Transport$1.run(Transport.java:200)
>>>>     at sun.rmi.transport.Transport$1.run(Transport.java:197)
>>>>     at java.security.AccessController.doPrivileged(Native Method)
>>>>     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
>>>>     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspo
>>>> rt.java:568)
>>>>     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TC
>>>> PTransport.java:826)
>>>>     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$
>>>> run$250(TCPTransport.java:683)
>>>>     at 
>>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/783938596.run(Unknown
>>>> Source)
>>>>     at java.security.AccessController.doPrivileged(Native Method)
>>>>     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCP
>>>> Transport.java:682)
>>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>> Executor.java:1142)
>>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>> lExecutor.java:617)
>>>>     at java.lang.Thread.run(Thread.java:745)
>>>> [RMI TCP Connection(3)-127.0.0.1] INFO 
>>>> org.ops4j.pax.web.service.internal.HttpServiceFactoryImpl
>>>> - Unbinding bundle: [org.example.site.fend [67]]
>>>>
>>>>
>>>> --
>>>> --
>>>> ------------------
>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "OPS4J" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Apache Member
>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>>> & Project Lead
>>> blog <http://notizblog.nierbeck.de/>
>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>
>>> Software Architect / Project Manager / Scrum Master
>>>
>>> --
> --
> ------------------
> OPS4J - http://www.ops4j.org - [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to