Start a new topic

NPE when saving a Package Body in Oracle

[This topic is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

I'm using Oracle 10.0.2.0.4 (JDBC driver 11.1.0.7.0) and DbVisualizer 9.1.1. When I click the "Save" button in the Package Body, I get a Null Pointer Exception. This seems to be caused by having a certain character sequence in the package body. This also occurs for Functions and Procedures. Steps to reproduce: 1. Start DbVisualizer 2. Connect to the Oracle database 3. Navigate to a Package Body, Function, or Procedure via the Objects Tree. 4. Anywhere in the editor, add a comment containing either '{' or '}' (or both). 5. Click Save. 5. Get the following NPE: 09:21:10 [DEBUG pool-2-thread-4 B.ā] RootConnection: EXCEPTION -> java.lang.NullPointerException: null java.lang.NullPointerException at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:1153) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:948) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1770) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1739) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:299) at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.onseven.dbvis.g.B.B.ā(Z:104) at com.onseven.dbvis.g.B.F$A.call(Z:1474) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)
1 Comment

[This reply is migrated from our old forums.]

Re: NPE when saving a Package Body in Oracle
Hi Jason, This is caused by a bug in the 11.1 driver. Upgrading to the 11.2 driver solves the problem, see this page for where to get the driver: http://www.dbvis.com/doc/oracle-database-drivers/ As noted on that page, the 11.2 driver has some problems with XML data that you need to be aware of, which is why we bundle the 11.1 driver instead. Hopefully that is not an issue in your case. Best Regards, Hans