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:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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:
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