|
From: Coleman, D. <don...@em...> - 2001-01-25 19:25:34
|
I get a ClassCastException trying to narrow a reference to an EJB home using
JDK1.3 (on Win32). This code works fine with JDK1.2.2 (on Win32). I get
the same problem with jpython-1.1. Am I doing something wrong or is this a
bug?
CODE THAT CAUSES THE PROBLEM
jndiContext = InitialContext()
object = jndiContext.lookup("emax.ContainerManager")
# next line blows up with JDK 1.3 but not JDK1.2.2
managerHome = PortableRemoteObject.narrow(object,
ContainerManagerHome.class)
manager = managerHome.create()
STACK TRACE
File "e:\home\ESM\src\com\emax\container\c.py", line 69, in
getContainerManage
r
java.lang.ClassCastException
at
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Porta
bleRemoteObject.java:296)
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at java.lang.reflect.Method.invoke(Native Method)
at
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java
:158)
at
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java
:166)
at org.python.core.PyObject.__call__(PyObject.java:285)
at org.python.core.PyObject.invoke(PyObject.java:2119)
at
c$py.getContainerManager$4(e:\home\ESM\src\com\emax\container\c.py)
at c$py.call_function(e:\home\ESM\src\com\emax\container\c.py)
at org.python.core.PyTableCode.call(PyTableCode.java:155)
at org.python.core.PyTableCode.call(PyTableCode.java:200)
at org.python.core.PyFunction.__call__(PyFunction.java:93)
at org.python.pycode._pyx6.f$0(<console>)
at org.python.pycode._pyx6.call_function(<console>)
at org.python.core.PyTableCode.call(PyTableCode.java:155)
at org.python.core.Py.runCode(Py.java:1055)
at org.python.core.Py.exec(Py.java:1076)
at
org.python.util.PythonInterpreter.exec(PythonInterpreter.java:145)
at
org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter
.java:87)
at
org.python.util.InteractiveInterpreter.runsource(InteractiveInterpret
er.java:68)
at
org.python.util.InteractiveInterpreter.runsource(InteractiveInterpret
er.java:42)
at
org.python.util.InteractiveConsole.push(InteractiveConsole.java:83)
at
org.python.util.InteractiveConsole.interact(InteractiveConsole.java:6
2)
at org.python.util.jython.main(jython.java:178)
java.lang.ClassCastException: java.lang.ClassCastException
|