Menu

java.sql.SQLSyntaxErrorException: ORA-00904

Bruce Tran
2014-04-23
2014-04-28
  • Bruce Tran

    Bruce Tran - 2014-04-23

    Hello,

    I am new to proguard or any obfuscator. I used proguard to obfuscate a jar which is a db api jar. After obfuscated it breaks the old code. This is the error it’s generating:

    java.sql.SQLSyntaxErrorException: ORA-00904: "B"."FIPS": invalid identifier

    I ran the sql statement in SQL Developer and it works fine. Also, I just found that it works fine in a desktop app but not in a webapp. The webapp is on a Tomcat server. Does it have something to do with Tomcat?

    Another update - It's working now. It was due to not fully qualifying the schema name. Can someone explain why it's doing that? Is there something I can do when configuring proguard?

    Thanks
    Bruce

     

    Last edit: Bruce Tran 2014-04-23
    • 1234

      1234 - 2014-04-24

      Bruce,
      I have used Proguard against a DB jar in the past, HSQLDB. My primary purpose was to reduce it's size, since both inline server and network based server was in the same jar.

      I am taking ORA as a clue that you are doing something with Oracle. Regardless, Proguard is best suited to code which you both wrote and control. I had to make a multi-day study of HSQLDB, then make a handful of source code changes, and include a few keeps in the proguard control file. You should at the least keep the class specified in the Class.forName("org.hsqldb.jdbc.JDBCDriver") used to load the driver, e.g. -keep class org.hsqldb.jdbc.JDBCDriver

      You could also just switch the jar from an injar in the config file to a libraryjar. This would mean it would have to be distributed separately as well, of course.

      Jeff Palmer

      On Apr 23, 2014, at 7:52 AM, Bruce Tran wrote:

      Hello,

      I am new to proguard or any obfuscator. I used proguard to obfuscate a jar which is a db api jar. After obfuscated it breaks the old code. This is the error it’s generating:

      java.sql.SQLSyntaxErrorException: ORA-00904: "B"."FIPS": invalid identifier

      I ran the sql statement in SQL Developer and it works fine. I have a proguard config file. How do I attach it?

      Thanks
      Bruce

      java.sql.SQLSyntaxErrorException: ORA-00904

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/proguard/discussion/182455/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Bruce Tran

    Bruce Tran - 2014-04-28

    Thanks Jeff. I updated the post twice but it does not seem to show up. Anyway, I finally got it to work by fully qualifying the schema name. The funny thing it works fine in a desktop app but it does not work in a webapp. I thought it must be a web server issue but I will try your suggestions.

    Thanks
    Bruce