You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Richard Ellis (Created) (JIRA)" <ji...@apache.org> on 2011/10/27 18:22:32 UTC
[jira] [Created] (ARIES-769) ClassCastException during JNDI lookup
from WAB inside EBA
ClassCastException during JNDI lookup from WAB inside EBA
---------------------------------------------------------
Key: ARIES-769
URL: https://issues.apache.org/jira/browse/ARIES-769
Project: Aries
Issue Type: Bug
Components: JNDI
Affects Versions: 0.3
Reporter: Richard Ellis
I was trying to perform a JNDI lookup from a WAB inside an EBA and I hit this problem.
java.lang.ClassCastException: org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl incompatible with org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
at org.apache.aries.jndi.Utils$4.run(Utils.java:197)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at org.apache.aries.jndi.Utils.getServicePrivileged(Utils.java:195)
at org.apache.aries.jndi.ContextHelper.getInitialContextUsingBuilder(ContextHelper.java:206)
at org.apache.aries.jndi.ContextHelper.getContextProvider(ContextHelper.java:140)
at org.apache.aries.jndi.ContextHelper.getInitialContext(ContextHelper.java:118)
at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:225)
at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:318)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:348)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (ARIES-769) ClassCastException during JNDI lookup
from WAB inside EBA
Posted by "Alasdair Nottingham (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alasdair Nottingham resolved ARIES-769.
---------------------------------------
Resolution: Fixed
> ClassCastException during JNDI lookup from WAB inside EBA
> ---------------------------------------------------------
>
> Key: ARIES-769
> URL: https://issues.apache.org/jira/browse/ARIES-769
> Project: Aries
> Issue Type: Bug
> Components: JNDI
> Affects Versions: 0.3
> Reporter: Richard Ellis
> Assignee: Alasdair Nottingham
> Attachments: Aries-769-patch.txt
>
>
> I was trying to perform a JNDI lookup from a WAB inside an EBA and I hit this problem.
> java.lang.ClassCastException: org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl incompatible with org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
> at org.apache.aries.jndi.Utils$4.run(Utils.java:197)
> at java.security.AccessController.doPrivileged(AccessController.java:202)
> at org.apache.aries.jndi.Utils.getServicePrivileged(Utils.java:195)
> at org.apache.aries.jndi.ContextHelper.getInitialContextUsingBuilder(ContextHelper.java:206)
> at org.apache.aries.jndi.ContextHelper.getContextProvider(ContextHelper.java:140)
> at org.apache.aries.jndi.ContextHelper.getInitialContext(ContextHelper.java:118)
> at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:225)
> at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:318)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:348)
> at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:411)
> at javax.naming.InitialContext.lookup(InitialContext.java:436)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (ARIES-769) ClassCastException during JNDI
lookup from WAB inside EBA
Posted by "Alasdair Nottingham (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200577#comment-13200577 ]
Alasdair Nottingham commented on ARIES-769:
-------------------------------------------
Hi,
I've committed this patch down since it looked good. I did make one minor modification. It NPEd in our junit tests, so I added a null check that is only required in our unit tests.
Thanks Richard.
> ClassCastException during JNDI lookup from WAB inside EBA
> ---------------------------------------------------------
>
> Key: ARIES-769
> URL: https://issues.apache.org/jira/browse/ARIES-769
> Project: Aries
> Issue Type: Bug
> Components: JNDI
> Affects Versions: 0.3
> Reporter: Richard Ellis
> Assignee: Alasdair Nottingham
> Attachments: Aries-769-patch.txt
>
>
> I was trying to perform a JNDI lookup from a WAB inside an EBA and I hit this problem.
> java.lang.ClassCastException: org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl incompatible with org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
> at org.apache.aries.jndi.Utils$4.run(Utils.java:197)
> at java.security.AccessController.doPrivileged(AccessController.java:202)
> at org.apache.aries.jndi.Utils.getServicePrivileged(Utils.java:195)
> at org.apache.aries.jndi.ContextHelper.getInitialContextUsingBuilder(ContextHelper.java:206)
> at org.apache.aries.jndi.ContextHelper.getContextProvider(ContextHelper.java:140)
> at org.apache.aries.jndi.ContextHelper.getInitialContext(ContextHelper.java:118)
> at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:225)
> at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:318)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:348)
> at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:411)
> at javax.naming.InitialContext.lookup(InitialContext.java:436)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ARIES-769) ClassCastException during JNDI lookup
from WAB inside EBA
Posted by "Richard Ellis (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Ellis updated ARIES-769:
--------------------------------
Attachment: Aries-769-patch.txt
Patch that checks the equality of the BundleContext class of the caller to that of the JNDI bundle. If the caller was not a peer of the JNDI bundle then it is assumed to be an isolated framework and the JNDI bundle BundleContext is used instead.
> ClassCastException during JNDI lookup from WAB inside EBA
> ---------------------------------------------------------
>
> Key: ARIES-769
> URL: https://issues.apache.org/jira/browse/ARIES-769
> Project: Aries
> Issue Type: Bug
> Components: JNDI
> Affects Versions: 0.3
> Reporter: Richard Ellis
> Attachments: Aries-769-patch.txt
>
>
> I was trying to perform a JNDI lookup from a WAB inside an EBA and I hit this problem.
> java.lang.ClassCastException: org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl incompatible with org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
> at org.apache.aries.jndi.Utils$4.run(Utils.java:197)
> at java.security.AccessController.doPrivileged(AccessController.java:202)
> at org.apache.aries.jndi.Utils.getServicePrivileged(Utils.java:195)
> at org.apache.aries.jndi.ContextHelper.getInitialContextUsingBuilder(ContextHelper.java:206)
> at org.apache.aries.jndi.ContextHelper.getContextProvider(ContextHelper.java:140)
> at org.apache.aries.jndi.ContextHelper.getInitialContext(ContextHelper.java:118)
> at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:225)
> at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:318)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:348)
> at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:411)
> at javax.naming.InitialContext.lookup(InitialContext.java:436)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (ARIES-769) ClassCastException during JNDI lookup
from WAB inside EBA
Posted by "Alasdair Nottingham (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alasdair Nottingham reassigned ARIES-769:
-----------------------------------------
Assignee: Alasdair Nottingham
> ClassCastException during JNDI lookup from WAB inside EBA
> ---------------------------------------------------------
>
> Key: ARIES-769
> URL: https://issues.apache.org/jira/browse/ARIES-769
> Project: Aries
> Issue Type: Bug
> Components: JNDI
> Affects Versions: 0.3
> Reporter: Richard Ellis
> Assignee: Alasdair Nottingham
> Attachments: Aries-769-patch.txt
>
>
> I was trying to perform a JNDI lookup from a WAB inside an EBA and I hit this problem.
> java.lang.ClassCastException: org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl incompatible with org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
> at org.apache.aries.jndi.Utils$4.run(Utils.java:197)
> at java.security.AccessController.doPrivileged(AccessController.java:202)
> at org.apache.aries.jndi.Utils.getServicePrivileged(Utils.java:195)
> at org.apache.aries.jndi.ContextHelper.getInitialContextUsingBuilder(ContextHelper.java:206)
> at org.apache.aries.jndi.ContextHelper.getContextProvider(ContextHelper.java:140)
> at org.apache.aries.jndi.ContextHelper.getInitialContext(ContextHelper.java:118)
> at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:225)
> at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:318)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:348)
> at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:411)
> at javax.naming.InitialContext.lookup(InitialContext.java:436)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira