[jira] [Resolved] (ARIES-694) Proxy manager can return a stale proxy built against a previous classloader for bundles having undergone refresh

2011-07-04 Thread Valentin Mahrwald (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARIES-694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Valentin Mahrwald resolved ARIES-694.
-

Resolution: Fixed

Resolved in #1141508 and #1141523 by sanity checking the classloader used for 
proxying and refreshing it if necessary.

 Proxy manager can return a stale proxy built against a previous classloader 
 for bundles having undergone refresh
 

 Key: ARIES-694
 URL: https://issues.apache.org/jira/browse/ARIES-694
 Project: Aries
  Issue Type: Bug
Reporter: Valentin Mahrwald
Assignee: Valentin Mahrwald

 This scenario occurred when using a Blueprint bundle A having a service 
 reference on a service in another bundle B, the service api is also provided 
 by B.
 B got updated to B'. In this process A gets refreshed to use the new classes 
 from B'. However, when Blueprint creates the service reference proxy it gets 
 returned a proxy implementing the old interfaces from B rather than the 
 interfaces passed in (which come from B'). This is because proxy classes are 
 cached by bundle and the bundle has not changed 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (ARIES-697) Java 2 security permission failure in JNDI - Util code path

2011-07-04 Thread Valentin Mahrwald (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARIES-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Valentin Mahrwald resolved ARIES-697.
-

Resolution: Fixed

Resolved in #1141867.

 Java 2 security permission failure in JNDI - Util code path
 ---

 Key: ARIES-697
 URL: https://issues.apache.org/jira/browse/ARIES-697
 Project: Aries
  Issue Type: Bug
  Components: JNDI, Util
Affects Versions: 0.4
Reporter: Valentin Mahrwald
Assignee: Valentin Mahrwald

 Some client code invokes JNDI operations for the first time, which causes an 
 AccessControlException in Equinox as such ...
 java.security.AccessControlException: Access denied 
 (java.lang.RuntimePermission accessDeclaredMembers)
   at 
 java.security.AccessController.checkPermission(AccessController.java:108)
   at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
   at 
 com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java:208)
   at 
 java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:1689)
   at java.lang.Class.checkMemberAccess(Class.java:105)
   at java.lang.Class.getDeclaredMethod(Class.java:574)
   at 
 org.apache.aries.util.internal.EquinoxWorker.invoke(EquinoxWorker.java:54)
   at 
 org.apache.aries.util.internal.EquinoxWorker.getClassLoader(EquinoxWorker.java:31)
   at 
 org.apache.aries.util.AriesFrameworkUtil.getClassLoader(AriesFrameworkUtil.java:56)
   at 
 org.apache.aries.util.nls.MessageUtil.createMessageUtil(MessageUtil.java:147)
   at 
 org.apache.aries.util.nls.MessageUtil.createMessageUtil(MessageUtil.java:107)
   at 
 org.apache.aries.jndi.services.ServiceHelper.clinit(ServiceHelper.java:212)
   at java.lang.J9VMInternals.initializeImpl(Native Method)
   at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
   at 
 org.apache.aries.jndi.url.ServiceRegistryContext.lookup(ServiceRegistryContext.java:99)
   at 
 org.apache.aries.jndi.url.ServiceRegistryContext.lookup(ServiceRegistryContext.java:141)
   at 
 org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
   at javax.naming.InitialContext.lookup(InitialContext.java:431)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (ARIES-690) ClassCircularityError caused by proxy weaving

2011-07-04 Thread Timothy Ward (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARIES-690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Ward resolved ARIES-690.


Resolution: Fixed

 ClassCircularityError caused by proxy weaving
 -

 Key: ARIES-690
 URL: https://issues.apache.org/jira/browse/ARIES-690
 Project: Aries
  Issue Type: Bug
Affects Versions: 0.4
Reporter: Kevan Miller
Assignee: Timothy Ward
 Fix For: 0.4

 Attachments: patch.txt


 I've run into a ClassCircularityError that's apparently caused by proxy 
 weaving code. I captured the stack trace via debugger:
 {quote}
 ejbd 1@1196 daemon, prio=5, in group 'main', status: 'RUNNING'
 at 
 java.lang.ClassCircularityError.init(ClassCircularityError.java:32)
 at java.lang.Class.getDeclaringClass(Class.java:-1)
 at java.lang.Class.getEnclosingClass(Class.java:1085)
 at 
 org.apache.aries.proxy.impl.common.AbstractWovenProxyAdapter.readClass(AbstractWovenProxyAdapter.java:618)
 at 
 org.apache.aries.proxy.impl.weaving.WovenProxyAdapter.visitEnd(WovenProxyAdapter.java:75)
 at org.objectweb.asm.ClassAdapter.visitEnd(Unknown Source:-1)
 at org.objectweb.asm.commons.SerialVersionUIDAdder.visitEnd(Unknown 
 Source:-1)
 at 
 org.apache.aries.proxy.impl.weaving.SyntheticSerialVerUIDAdder.visitEnd(SyntheticSerialVerUIDAdder.java:35)
 at org.objectweb.asm.ClassReader.accept(Unknown Source:-1)
 at org.objectweb.asm.ClassReader.accept(Unknown Source:-1)
 at 
 org.apache.aries.proxy.impl.weaving.WovenProxyGenerator.getWovenProxy(WovenProxyGenerator.java:52)
 at 
 org.apache.aries.proxy.impl.weaving.ProxyWeavingHook.weave(ProxyWeavingHook.java:63)
 at 
 org.eclipse.osgi.internal.baseadaptor.weaving.WovenClassImpl.call(WovenClassImpl.java:129)
 at 
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHookPrivileged(ServiceRegistry.java:1239)
 at 
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHooksPrivileged(ServiceRegistry.java:1222)
 at 
 org.eclipse.osgi.internal.baseadaptor.weaving.WovenClassImpl.callHooks(WovenClassImpl.java:154)
 at 
 org.eclipse.osgi.internal.baseadaptor.weaving.WeavingHookConfigurator.processClass(WeavingHookConfigurator.java:68)
 at 
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:596)
 at 
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
 at 
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
 at 
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
 at 
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
 at 
 org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
 at 
 org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
 at 
 org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
 at 
 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
 at 
 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
 at 
 org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 at 
 org.apache.openjpa.util.Serialization.deserialize(Serialization.java:86)
 at 
 org.apache.openjpa.jdbc.sql.DBDictionary.getBlobObject(DBDictionary.java:623)
 at 
 org.apache.openjpa.jdbc.sql.ResultSetResult.getObjectInternal(ResultSetResult.java:402)
 at 
 org.apache.openjpa.jdbc.sql.AbstractResult.getObject(AbstractResult.java:696)
 at 
 org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadDataStore(HandlerStrategies.java:222)
 at 
 org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(HandlerFieldStrategy.java:187)
 at 
 org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:928)
 at 
 org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1123)
 at 
 org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1067)
 at 
 org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:438)
 at 
 org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:333)
 at 
 org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112)
 at 
 org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
 at 
 

[jira] [Created] (ARIES-699) Apache Aries repo generation tool - default file name typo

2011-07-04 Thread Emily Jiang (JIRA)
Apache Aries repo generation tool - default file name typo
--

 Key: ARIES-699
 URL: https://issues.apache.org/jira/browse/ARIES-699
 Project: Aries
  Issue Type: Bug
  Components: Application
Affects Versions: 0.4
Reporter: Emily Jiang
Assignee: Emily Jiang
Priority: Trivial


The default repository file name if no name is specified should be 
repository.xml instead of reporsitory.xml:o

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (ARIES-699) Apache Aries repo generation tool - default file name typo

2011-07-04 Thread Emily Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARIES-699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emily Jiang resolved ARIES-699.
---

   Resolution: Fixed
Fix Version/s: 0.4

 Apache Aries repo generation tool - default file name typo
 --

 Key: ARIES-699
 URL: https://issues.apache.org/jira/browse/ARIES-699
 Project: Aries
  Issue Type: Bug
  Components: Application
Affects Versions: 0.4
Reporter: Emily Jiang
Assignee: Emily Jiang
Priority: Trivial
 Fix For: 0.4


 The default repository file name if no name is specified should be 
 repository.xml instead of reporsitory.xml:o

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




Jenkins build is back to normal : Aries #1073

2011-07-04 Thread Apache Jenkins Server
See https://builds.apache.org/job/Aries/1073/changes




[jira] [Commented] (ARIES-681) JPA Container BundleDelegatingClassLoader should look for classes in the provider bundle, too

2011-07-04 Thread Balazs Zsoldos (JIRA)

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

Balazs Zsoldos commented on ARIES-681:
--

Hi,

I will upload a sample application soon that will show my problem. I do not use 
the OSGI capabilities of EclipseLink due to the following reason:
- I would like to use aries blueprint and jpa:context tag.
- I am afraid that if I use the standard Eclipselink solution (persistence.xml 
into META-INF library) I will face many problems with transaction management 
and aries blueprint

So my solution was that I defined the Meta-Persistence in the manifest 
header. As EclipseLink does not register the PersistenceProvider as an OSGI 
service (Aries needs it based on the OSGI 4.2 specification I think) I created 
a jar file that does nothing else but the service registration.

I tried to register the osgi based PersistenceProvider of EclipseLink but I got 
an exception that createContainerEntityManagerFactory function cannot be called 
in an OSGI environment (Aries JPA container calls it). Due to this reason I 
registered the ordinary PersistenceProvider of EclipseLink and that is where 
this bug came from. Aries JPA container uses ordinary Eclipselink persistence 
provider. Aries creates the Persistence Unit as well, Eclipselink does not do 
anything automatically.

Regards,
Balazs

 JPA Container BundleDelegatingClassLoader should look for classes in the 
 provider bundle, too
 -

 Key: ARIES-681
 URL: https://issues.apache.org/jira/browse/ARIES-681
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 0.3
 Environment: Glassfish 3.0 (EclipseLink 2.0.2), Glassfish 3.1 
 (EclipseLink 2.2)
Reporter: Balazs Zsoldos
 Attachments: classloadingFromMultipleProviderDuringQuery.0.3.patch


 Currently the BundleDelegatingClassLoader in JPA container only looks for 
 classes in the bundle of the entitymanager. However the JPA implementation 
 Eclipselink needs some classes from itself. The reason is that in entity 
 classes the properties that hold mapping of One-To-Many are converted to 
 EclipseLink list type. See the following exception stacktrace:
 Internal Exception: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.eclipse.persistence.exceptions.ValidationException.classNotFoundWhileConvertingClassNames(ValidationException.java:2317)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:123)
   at 
 org.eclipse.persistence.mappings.CollectionMapping.convertClassNamesToClasses(CollectionMapping.java:788)
   at 
 org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1458)
   at 
 org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:362)
   at 
 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:322)
   ... 83 more
 Caused by: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
   at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
   at 
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at 
 org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:604)
   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1487)
   at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:897)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:50)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:47)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:47)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at 
 org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:120)
   ... 87 more

--
This message is automatically generated by JIRA.
For more information on 

[jira] [Commented] (ARIES-681) JPA Container BundleDelegatingClassLoader should look for classes in the provider bundle, too

2011-07-04 Thread Valentin Mahrwald (JIRA)

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

Valentin Mahrwald commented on ARIES-681:
-

Under ARIES-691 I have checked in some tests and integration code to make 
EclipseLink work the whole way (including using managed contexts). There is 
some more cleanup to be done under that JIRA to move more of the integration 
into the adapter bundle. 

The code prereqs the latest (as yet unreleased) JPA code but my help in your 
scenario :)

 JPA Container BundleDelegatingClassLoader should look for classes in the 
 provider bundle, too
 -

 Key: ARIES-681
 URL: https://issues.apache.org/jira/browse/ARIES-681
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 0.3
 Environment: Glassfish 3.0 (EclipseLink 2.0.2), Glassfish 3.1 
 (EclipseLink 2.2)
Reporter: Balazs Zsoldos
 Attachments: classloadingFromMultipleProviderDuringQuery.0.3.patch


 Currently the BundleDelegatingClassLoader in JPA container only looks for 
 classes in the bundle of the entitymanager. However the JPA implementation 
 Eclipselink needs some classes from itself. The reason is that in entity 
 classes the properties that hold mapping of One-To-Many are converted to 
 EclipseLink list type. See the following exception stacktrace:
 Internal Exception: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.eclipse.persistence.exceptions.ValidationException.classNotFoundWhileConvertingClassNames(ValidationException.java:2317)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:123)
   at 
 org.eclipse.persistence.mappings.CollectionMapping.convertClassNamesToClasses(CollectionMapping.java:788)
   at 
 org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1458)
   at 
 org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:362)
   at 
 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:322)
   ... 83 more
 Caused by: java.lang.ClassNotFoundException: 
 org.eclipse.persistence.indirection.IndirectList
   at 
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
   at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
   at 
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at 
 org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:604)
   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1487)
   at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:897)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:50)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader$1.run(BundleDelegatingClassLoader.java:47)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
 org.apache.aries.jpa.container.unit.impl.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:47)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at 
 org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
   at 
 org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:120)
   ... 87 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira