[ https://issues.apache.org/jira/browse/OPENEJB-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Romain Manni-Bucau resolved OPENEJB-2110.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.0-Milestone-1
Assignee: Romain Manni-Bucau
> ClassCastException in JNDIContext.lookup() (line 465)
> -----------------------------------------------------
>
> Key: OPENEJB-2110
> URL: https://issues.apache.org/jira/browse/OPENEJB-2110
> Project: OpenEJB
> Issue Type: Bug
> Components: tomee
> Affects Versions: 4.7.1
> Environment: TomEE+ 1.7.1, JDBC, JNDI. I don't think OS matters in this case,
nor would the fact that we're using DB2
> Reporter: Chris Kujawa
> Assignee: Romain Manni-Bucau
> Priority: Critical
> Labels: CONTEXT, JNDI
> Fix For: 5.0.0-Milestone-1
>
>
> A bit esoteric, but I defined a datasource in TomEE (using tomee.xml) and deployed my
app along with the datasource. I then wrote a quick throwaway app (as a test to prove out
an issue I was troubleshooting) that grabbed an org.apache.openejb.client.RemoteInitialContextFactory
and attempted to look the datasource up. When I ran this, I get the following:
> Exception in thread "main" java.lang.ClassCastException: org.apache.openejb.client.ThrowableArtifact
cannot be cast to java.lang.Error
> at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:465)
> at javax.naming.InitialContext.lookup(InitialContext.java:411)
> A bit of debugging through the source showed that the original error generated was this:
> JNDI_ERROR:java.lang.NoSuchMethodException: org.apache.openejb.resource.jdbc.managed.local.ManagedDataSource.getDriverClass().
> Of course, the NoSuchMethodException implements Throwable, which is implemented by Error.
Perhaps casting the return of getResult() to Throwable might be a better approach?
> I can *try* to take a look at this if you want...just let me know.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
|