You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by Ivanhoe Abrahams <iv...@gmail.com> on 2012/09/20 12:31:21 UTC
Reposting Moving to Aries 1.0.0
Hi all
I have started moving my proof of concept aries project from version 0.3 to
1.0.0
However I now see the following exceptions
ERROR: Bundle org.apache.aries.blueprint.core [65] EventDispatcher: Error
during dispatch. (java.lang.ClassCastException:
org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler cannot be cast to
org.
apache.aries.blueprint.NamespaceHandler)
java.lang.ClassCastException:
org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler cannot be cast to
org.apache.aries.blueprint.NamespaceHandler
at
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.addingService(NamespaceHandlerRegistryImpl.java:113)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:980)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:906)
at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:262)
at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:234)
at
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:941)
...................
Later on in the log output I see
ERROR: Bundle org.apache.aries.jpa.container [69] EventDispatcher: Error
during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
at
org.apache.aries.util.internal.DefaultWorker.setupListener(DefaultWorker.java:99)
at
org.apache.aries.util.internal.DefaultWorker.getClassLoader(DefaultWorker.java:87)
at
org.apache.aries.util.AriesFrameworkUtil.getClassLoaderForced(AriesFrameworkUtil.java:100)
at
org.apache.aries.jpa.container.unit.impl.PersistenceUnitInfoImpl.getClassLoader(PersistenceUnitInfoImpl.java:105)
at
org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:377)
at
org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:314)
at
org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:161)
at
org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:65)
at
org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.createEntityManagerFactories(EntityManagerFactoryManager.java:329)
at
org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.bundleStateChange(EntityManagerFactoryManager.java:175)
at
org.apache.aries.jpa.container.impl.PersistenceBundleManager.modifiedBundle(PersistenceBundleManager.java:296)
at
org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:495)
at
org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:424)
These exceptions then result in my service which contains a persistence.xml
and a blueprint.xml file to fail with the following timeout exception
324028 [Blueprint Extender: 3] ERROR
org.apache.aries.blueprint.container.BlueprintContainerImpl - Unable to
start blueprint container for bundle accountingservice due to unresolved
dependencies [(&(&
(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name
=accountingservice-PersistenceUnit_JTA))(objectClass=javax.persistence.EntityManagerFactory))]
java.util.concurrent.TimeoutException
at
org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:302)
at
org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
Here is my blueprint.xml file of the service that fails with the timeout
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:jpa="
http://aries.apache.org/xmlns/jpa/v1.0.0" xmlns:tx="
http://aries.apache.org/xmlns/transactions/v1.0.0"
default-activation="eager" default-availability="optional">
<!--Export services defined in this module-->
<bean id="AccountingServiceImplementationBean"
class="com.bpi.accountingservice.AccountingServiceImplementation"
init-method="init">
<jpa:context property="entityManager"
unitname="accountingservice-PersistenceUnit_JTA"/>
<tx:transaction method="*" value="Required"/>
<property name="actorService" ref="actorServiceService"/>
</bean>
<service id="AccountingServiceImplementationService"
ref="AccountingServiceImplementationBean"
interface="com.bpi.accountingapi.AccountinService">
<service-properties>
<entry key="service.exported.interfaces" value="*"/>
<entry key="service.exported.configs" value="org.apache.cxf.ws"/>
<entry key="org.apache.cxf.ws.httpservice.context"
value="/AccountinService"/>
</service-properties>
</service>
<!--Import the services that this module uses-->
<reference id="actorServiceService"
interface="com.bpi.actormodel.ActorService"/>
<reference id="userService" interface="com.bpi.user.UserService"/>
</blueprint>
I am running my proof of concept on
- windows 7
- java 1.6
- Apache Felix 4.0.2
Funny thing is that when I check the bundles using the felix webconsole,
all bundles have started fine and are active.
This all worked fine in 0.3 version of aries.
Any pointers will be appreciated.
Kind
Regards
Ivanhoe