2 Replies Latest reply on Feb 7, 2020 10:21 AM by Volker Heiselmayer

    How can I get better JDBC exception messages than "!csJdbcGenericError"?

    Volker Heiselmayer

      Hi!

       

      I have the problem, that JDBC exceptions just say "!csJdbcGenericError" when the SQL query fails.

      How can I get better information like "Table or view does not exist!" etc.?

       

      I have a class extending "ServiceHandler" which is used as a service in WebCenter Content.

       

      ...

      Provider p = Providers.getProvider(Config.ProviderName);

      Workspace workspace = (Workspace)p.getProvider();

      DataBinder Data;

      ...

      try {

           int num_rows = (int) workspace.executeSQL("QTest", Data);

           // QTest --> SELECT * FROM nonexistingtable

           ...

      }

      catch (final Exception e) {

           // Here e.getMessage() is "!csJdbcGenericError"!

           ...

      }

      ...

       

      It's really annoying. I was looking around but I could not find any other funktion, message or even an additional config in

      the Weblogic data source configuration.

       

      So how can I get clear error messages which are coming from the database?

       

      Thanks!

       

      Best,

          Volker