Issue1096

classification
Title: Strange Java message jython2.5 / oracle
Type: crash Severity: normal
Components: zxjdbc Versions: 2.5alpha1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: leosoto, mboersma, shoyu, zyasoft
Priority: Keywords:

Created on 2008-08-04.10:25:20 by shoyu, last changed 2009-03-12.08:27:54 by zyasoft.

Messages
msg3393 (view) Author: Stéphane JULIEN (shoyu) Date: 2008-08-04.10:25:19
Hello,

When I try to connect to Oracle using ojdbc6.jar on Java 1.6u7, with the
program:
{{{
from com.ziclix.python.sql import zxJDBC
...
dbora = zxJDBC.connect(dora,uora,pora,vora)
...
}}}

I have the message:

[oracle@vbh-app-ptd01 jython]$ bin/jython testenv.py
4 août 2008 12:20:40 oracle.jdbc.driver.OracleDriver registerMBeans
GRAVE: Error while registering Oracle JDBC Diagnosability MBean.
java.lang.NullPointerException
        at
oracle.jdbc.driver.OracleDriver.registerMBeans(OracleDriver.java:304)
        at oracle.jdbc.driver.OracleDriver$1.run(OracleDriver.java:213)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.jdbc.driver.OracleDriver.<clinit>(OracleDriver.java:209)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.ziclix.python.sql.connect.Connect.__call__(Connect.java:87)
        at org.python.core.PyObject.__call__(PyObject.java:251)
        at org.python.core.PyObject.invoke(PyObject.java:3358)
        at org.python.pycode._pyx0.f$0(testenv.py)
        at org.python.pycode._pyx0.call_function(testenv.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:182)
        at org.python.core.PyCode.call(PyCode.java:14)
        at org.python.core.Py.runCode(Py.java:1200)
        at
org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:155)
        at org.python.util.jython.main(jython.java:224)

But it seems that the connection is OK and the python program doesn't
crash. I don't have this problem with jython 2.3+. I use the last
version of ojdbc6.jar.

Best regards.

Stéphane.
msg3520 (view) Author: Matt Boersma (mboersma) Date: 2008-09-13.18:39:34
This boils down to this line failing in oracle.jdbc.driver.OracleDriver:
       Class class1 =
Class.forName("oracle.as.jmx.framework.PortableMBeanFactory");

Running jython with the "--verify" flag silences the error.  Without
that flag, jython loads itself in the system classpath, which causes
problems with dynamic class loading from elsewhere in the CLASSPATH
heirarchy.  

So this is a much bigger issue.  In this particular case, the failure is
relatively benign because Oracle continues if it isn't able to register
the driver as an MBean, but the general problem will crop up elsewhere.
msg3525 (view) Author: Leonardo Soto (leosoto) Date: 2008-09-13.18:49:46
I opened #1127 describing the general issue which is causing this problem.
msg4245 (view) Author: Jim Baker (zyasoft) Date: 2009-03-12.08:27:54
Boot path problem, should be fine now
History
Date User Action Args
2009-03-12 08:27:54zyasoftsetstatus: open -> closed
resolution: fixed
messages: + msg4245
nosy: + zyasoft
2008-09-13 18:49:46leosotosetnosy: + leosoto
messages: + msg3525
2008-09-13 18:39:35mboersmasetnosy: + mboersma
messages: + msg3520
2008-08-04 10:25:20shoyucreate