[jira] [Commented] (ARIES-1181) Getting a NullPointerException trying to instantiate JPA-related classes

2014-11-03 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on ARIES-1181:


I think this might really be an issue like accessing DB drivers directly in 
OSGi. 

What you really want to do is to use Eclipselink together with aries jpa 
eclipselink adapter.
Simply also install:
install -s 
mvn:org.apache.aries.jpa/org.apache.aries.jpa.eclipselink.adapter/1.0.0-SNAPSHOT
I will organize a release for it soon.

What you did with exporting the EntityManager as a service will also not work. 
EntityManager is not thread safe so you can not simply create it once and 
export it. You can directly work with the EntityManagerFactory and create and 
close the EM in user code. The smoother way is to use aries jpa and the jpa:* 
blueprint element. It allow to work with the EM like in JEE code by wrapping it 
in a thread safe way.

Example:
bean id=taskServiceImpl 
class=net.lr.tasklist.persistence.impl.TaskServiceImpl 
ext:field-injection=true
tx:transaction method=* value=Required/
jpa:context unitname=tasklist property=em/
/bean

Can you try this?

 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 
 

[jira] [Commented] (ARIES-1181) Getting a NullPointerException trying to instantiate JPA-related classes

2014-05-16 Thread Christian Schneider (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 
 

[jira] [Commented] (ARIES-1181) Getting a NullPointerException trying to instantiate JPA-related classes

2014-05-15 Thread Matt Sicker (JIRA)

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

Matt Sicker commented on ARIES-1181:


I tried creating the EntityManagerFactory manually using the 
PersistenceProvider implementation class from EclipseLink, then using the 
normal chain of factory methods to get an EntityManager. I know that normally 
you would use the JPA Blueprint thing, but due to that only supporting up to 
2.0 at the time, I tried to use 2.1 the JavaSE way. Looking at the source code 
for javax.persistence.EntityManagerFactory, I thought it would work more 
compatibly with OSGi by starting the factory chain right from the provider 
package instead.

I thought that in theory, the Blueprint file I was using would work just fine. 
I'll try splitting the data source into its own bundle to see if that works.

 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 
 

[jira] [Commented] (ARIES-1181) Getting a NullPointerException trying to instantiate JPA-related classes

2014-05-15 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on ARIES-1181:


I just checked your example code. The problem is that you define the data 
source in the blueprint that also needs the EntityManger. The blueprint context 
will only be initialized when the EntityManager is present. This will not 
happen though as jpa container will wait for the data source to show up. So you 
run into a timeout. Try to define the data source in a separate bundle.

 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 
 

[jira] [Commented] (ARIES-1181) Getting a NullPointerException trying to instantiate JPA-related classes

2014-05-14 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on ARIES-1181:


Currently aries jpa does not work with JPA 2.1. So you have to make sure you 
use a jpa provider uses the 2.0 jpa API. JB is fixing this. So the next version 
should work with 2.1 too.

 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 
 

[jira] [Commented] (ARIES-1181) Getting a NullPointerException trying to instantiate JPA-related classes

2014-05-13 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on ARIES-1181:


Hi Matt,

can you try to apply the patch from aries-1160. I also had the problem that 
aries was not reproting any useful errors. After this patch you might get some 
more details. I will also look into your project to see what is going on.

Christian

 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 
 

[jira] [Commented] (ARIES-1181) Getting a NullPointerException trying to instantiate JPA-related classes

2014-05-12 Thread Matt Sicker (JIRA)

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

Matt Sicker commented on ARIES-1181:


Would this still work with JPA 2.1? The blueprint standard isn't very clear on 
that (it just mentions 1.0 and 2.0).

 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