Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » java.lang.IllegalArgumentException while stopping my bundle(java.lang.IllegalArgumentException while stopping my bundle)
java.lang.IllegalArgumentException while stopping my bundle [message #1733011] Mon, 23 May 2016 16:58 Go to next message
Pavel No is currently offline Pavel NoFriend
Messages: 47
Registered: May 2016
Member
I can't give much information, because I don't know what the problem is.

This is the bundles I install:

Name:org.apache.felix.framework,version:5.4.0
Name:org.ops4j.pax.exam,version:4.2.0
Name:org.ops4j.pax.exam.inject,version:4.2.0
Name:org.ops4j.pax.exam.extender.service,version:4.2.0
Name:osgi.cmpn,version:4.2.0.200908310645
Name:org.ops4j.pax.logging.pax-logging-api,version:1.6.4
Name:org.ops4j.base,version:1.4.0
Name:org.ops4j.pax.swissbox.core,version:1.7.1
Name:org.ops4j.pax.swissbox.extender,version:1.7.1
Name:org.ops4j.pax.swissbox.framework,version:1.7.1
Name:org.ops4j.pax.swissbox.lifecycle,version:1.7.1
Name:org.ops4j.pax.swissbox.tracker,version:1.7.1
Name:org.apache.geronimo.specs.geronimo-atinject_1.0_spec,version:1.0.0
Name:org.ops4j.pax.tipi.junit,version:4.11.0.1
Name:org.ops4j.pax.tipi.hamcrest.core,version:1.3.0.1
Name:org.ops4j.pax.exam.invoker.junit,version:4.2.0
Name:org.apache.felix.scr,version:2.0.2
Name:osgi.enterprise,version:5.0.0.201203141834
Name:javax.annotation-api,version:1.2.0
Name:javax.enterprise.cdi-api,version:1.2.0
Name:javax.el-api,version:3.0.0
Name:org.apache.servicemix.bundles.javax-inject,version:1.0.0.2
Name:javax.interceptor-api,version:1.2.0
Name:org.jboss.weld.osgi-bundle,version:2.2.11.Final
Name:com.google.guava,version:18.0.0
Name:jboss-classfilewriter,version:1.1.2.Final
Name:org.jboss.logging.jboss-logging,version:3.3.0.Final
Name:org.apache.logging.log4j.api,version:2.5.0
Name:slf4j.api,version:1.7.21
Name:slf4j.simple,version:1.7.21
Name:org.apache.xbean.bundleutils,version:4.5.0
Name:org.ops4j.base.lang,version:1.5.0
Name:org.ops4j.pax.cdi.weld,version:1.0.0.RC1
Name:org.ops4j.pax.cdi.spi,version:1.0.0.RC1
Name:org.ops4j.pax.cdi.extension,version:1.0.0.RC1
Name:org.ops4j.pax.cdi.extender,version:1.0.0.RC1
Name:org.ops4j.pax.cdi.api,version:1.0.0.RC1
Name:org.ops4j.pax.swissbox.core,version:1.8.2
Name:org.ops4j.pax.swissbox.lifecycle,version:1.8.2
Name:org.ops4j.pax.swissbox.tracker,version:1.8.2
Name:org.ops4j.pax.swissbox.extender,version:1.8.2
Name:javax.persistence,version:2.1.1.v201509150925
Name:org.eclipse.persistence.antlr,version:3.2.0.v201302191141
Name:org.eclipse.persistence.asm,version:5.0.1.v201405080102
Name:org.eclipse.persistence.core,version:2.6.3.v20160428-59c81c5
Name:org.eclipse.persistence.jpa.jpql,version:2.6.3.v20160428-59c81c5
Name:org.eclipse.persistence.jpa,version:2.6.3.v20160428-59c81c5
Name:org.eclipse.gemini.jpa,version:1.2.0.M1
Name:org.eclipse.gemini.dbaccess.h2,version:1.1.0.RELEASE
Name:org.eclipse.gemini.dbaccess.util,version:1.1.0.201206011559
Name:org.h2,version:1.3.176
Name:org.apache.servicemix.bundles.dbunit,version:2.5.2.1
Name:org.apache.commons.collections,version:3.2.1
+ my bundle


This is the exception I get:
ERROR: Bundle mybundle [57] EventDispatcher: Error during dispatch. (java.lang.IllegalArgumentException)
java.lang.IllegalArgumentException
	at org.apache.felix.framework.BundleContextImpl$ServiceObjectsImpl.ungetService(BundleContextImpl.java:584)
	at org.ops4j.pax.cdi.extension.impl.compat.Osgi6ServiceObjectsWrapper.ungetService(Osgi6ServiceObjectsWrapper.java:45)
	at org.ops4j.pax.cdi.extension.impl.ServiceEventBridge.serviceChanged(ServiceEventBridge.java:75)
	at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
	at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(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.unregister(ServiceRegistrationImpl.java:144)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:883)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:857)
	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:140)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterService(AbstractComponentManager.java:925)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:774)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:757)
	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1014)
	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:915)
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1241)
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1136)
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:996)
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1175)
	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)
	at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
	at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(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.unregister(ServiceRegistrationImpl.java:144)
	at org.eclipse.gemini.jpa.ServicesUtil.unregisterEMFService(ServicesUtil.java:327)
	at org.eclipse.gemini.jpa.ServicesUtil.unregisterEMFServices(ServicesUtil.java:165)
	at org.eclipse.gemini.jpa.GeminiManager.unregisterPersistenceUnits(GeminiManager.java:281)
	at org.eclipse.gemini.jpa.PersistenceBundleExtender.unregisterPersistenceUnitsInBundle(PersistenceBundleExtender.java:321)
	at org.eclipse.gemini.jpa.PersistenceBundleExtender.bundleChanged(PersistenceBundleExtender.java:413)
	at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
	at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(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.Felix.setActiveStartLevel(Felix.java:1389)
	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
	at java.lang.Thread.run(Thread.java:745)


Is the problem in gemini service?
Re: java.lang.IllegalArgumentException while stopping my bundle [message #1733047 is a reply to message #1733011] Tue, 24 May 2016 04:47 Go to previous messageGo to next message
Michael Keith is currently offline Michael KeithFriend
Messages: 243
Registered: July 2009
Senior Member
Hard to say what the problem is. By the time the pax cdi extension gets invoked there is clearly something amiss but I doubt it is either pax or gemini jpa. Could be a timing issue or the events being triggered at unexpected times.
Re: java.lang.IllegalArgumentException while stopping my bundle [message #1733050 is a reply to message #1733047] Tue, 24 May 2016 05:23 Go to previous messageGo to next message
Pavel No is currently offline Pavel NoFriend
Messages: 47
Registered: May 2016
Member
Hi Michael

Thank you for your answer. I can add, that when I added the following code

try {
    Thread.sleep(5000);                 
} catch(InterruptedException ex) {
    Thread.currentThread().interrupt();
}

The problem disappears. But when delay is 1,2,3 seconds the problem stay. What can it mean and what should I do?

[Updated on: Mon, 23 May 2016 22:38]

Report message to a moderator

Re: java.lang.IllegalArgumentException while stopping my bundle [message #1733286 is a reply to message #1733050] Thu, 26 May 2016 08:12 Go to previous messageGo to next message
Pavel No is currently offline Pavel NoFriend
Messages: 47
Registered: May 2016
Member
So is that all I can expect from community about this problem?
Re: java.lang.IllegalArgumentException while stopping my bundle [message #1733475 is a reply to message #1733286] Fri, 27 May 2016 23:38 Go to previous message
Michael Keith is currently offline Michael KeithFriend
Messages: 243
Registered: July 2009
Senior Member
Hi Pavel,

That basically just points to the problem being due to timing issues. I am not familiar with pax cdi or using it with Gemini JPA. If nobody else has any experience with this then you will just need to try to isolate the problem on your own. One thing I can say is that sometimes the weaving that Gemini JPA does, and the bundle restarts that result from that, can cause some other bundles to get thrown off. To see if that is the problem try doing static weaving (see Gemini JPA doc for how to do that).

-Mike
Previous Topic:Gemini doesn't read parent classes from another bundles
Next Topic:OSGi access to Apache Tomcat JNDI
Goto Forum:
  


Current Time: Mon Dec 09 10:30:32 GMT 2024

Powered by FUDForum. Page generated in 0.07712 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top