[ 
https://issues.apache.org/jira/browse/ARIES-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13998611#comment-13998611
 ] 

Christian Schneider commented on ARIES-1181:
--------------------------------------------

I don't think your approach is covered by the aries jpa project. So please use 
jpa 2.0 and the blueprint jpa support or wait till aries officially supports 
jpa 2.1. Building the EntityManager by hand can work but it will be difficult 
to get this right.

> Getting a NullPointerException trying to instantiate JPA-related classes
> ------------------------------------------------------------------------
>
>                 Key: ARIES-1181
>                 URL: https://issues.apache.org/jira/browse/ARIES-1181
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>         Environment: ServiceMix 5.0.0, Mac OS X 10.8.5, Oracle Java 1.7.0_40, 
> EclipseLink 2.5.1, JPA 2.1
>            Reporter: Matt Sicker
>            Priority: Blocker
>         Attachments: jpa-test.tar.gz
>
>
> Due to the JPA blueprint component not supporting JPA 2.1, I thought that I 
> could just manually set up the entity classes using beans and services. 
> However, no matter how I try to configure it, I get an NPE with no useful 
> debugging information available. I'm able to configure a JDBC data source on 
> its own, so I know it's related to the entity beans.
> The error I get is:
> {quote}
> 2014-04-29 15:05:46,929 | WARN  | ervicemix/deploy | BeanRecipe               
>         | ?                                   ? | 8 - 
> org.apache.aries.blueprint.core - 1.4.0 | Object to be destroyed is not an 
> instance of UnwrapperedBeanHolder, type: null
> 2014-04-29 15:05:46,929 | ERROR | ervicemix/deploy | BlueprintContainerImpl   
>         | ?                                   ? | 8 - 
> org.apache.aries.blueprint.core - 1.4.0 | Unable to start blueprint container 
> for bundle com.peapod.jpa-test
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to 
> instantiate components
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:685)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:378)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[11:org.apache.aries.util:1.1.0]
>       at 
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[11:org.apache.aries.util:1.1.0]
>       at 
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[11:org.apache.aries.util:1.1.0]
>       at 
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[11:org.apache.aries.util:1.1.0]
>       at 
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[11:org.apache.aries.util:1.1.0]
>       at 
> org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.jar:]
>       at 
> org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.0.3.jar:]
>       at 
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.0.3.jar:]
>       at 
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)[org.apache.felix.framework-4.0.3.jar:]
>       at 
> org.apache.felix.framework.Felix.startBundle(Felix.java:1923)[org.apache.felix.framework-4.0.3.jar:]
>       at 
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
>       at 
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1263)[7:org.apache.felix.fileinstall:3.2.8]
>       at 
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1235)[7:org.apache.felix.fileinstall:3.2.8]
>       at 
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:524)[7:org.apache.felix.fileinstall:3.2.8]
>       at 
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[7:org.apache.felix.fileinstall:3.2.8]
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[8:org.apache.aries.blueprint.core:1.4.0]
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_40]
>       at 
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[8:org.apache.aries.blueprint.core:1.4.0]
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:681)[8:org.apache.aries.blueprint.core:1.4.0]
>       ... 20 more
> {quote}
> I'll attach an example project to demo what I'm using for this test. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to