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 (JDBC driver 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( at oracle.jdbc.driver.T4CStatement.executeForRows( at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout( at oracle.jdbc.driver.OracleStatement.executeInternal( at oracle.jdbc.driver.OracleStatement.execute( at oracle.jdbc.driver.OracleStatementWrapper.execute( at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at com.onseven.dbvis.g.B.B.ā(Z:104) at com.onseven.dbvis.g.B.F$ at at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at
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: 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