cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Iterative Development and static method caching?

rpatrick00
Contributor

I am building a relatively complex custom snap. As part of the snappack, I am bundling some helper classes that contain only static methods. I am seeing weirdness as I make changes and redeploy my snap. The problem is that the configure() method is failing because one of the helper methods was expecting integer properties to be returned as an java.lang.Integer instead of a java.math.BigInteger. I have corrected my code and added a try/catch block and redeployed a couple of times (incrementing the version number each time). However, the configure() method is still failing at exactly the same spot (with the same line number) which is no longer accurate. For example, the stack trace says the error was at line 30 in a specific Java file. After the first deployment, line 30 was a blank line between methods.

What do I need to do to get SnapLogic to reload these classes properly?

4 REPLIES 4

ptaylor
Employee
Employee

Can you say more specifically how exactly the version number is changing and how youโ€™re redeploying it? Are you using โ€œmvn snappack:deployโ€ to redeploy?

rpatrick00
Contributor

I have been changing the version number from 1-0001 to 1-0002, 1-0003, etc. and yes, I am โ€œmvn clean install snappack:deployโ€ to redeploy.

I was accidentally using the Cloud Snaplex but when I switched back to my EC2-based snaplex, now I am getting a different errorโ€ฆ

rpatrick00
Contributor

I finally just deleted the snappack, shutdown the snaplex, removed the directory created on the snapplex, restarted, and redeployed and things appear to be back to normal. Hoping that I donโ€™t have to do that every timeโ€ฆ

rpatrick00
Contributor

This turned out to be user error on my part. The problem is that the new archetype generates a POM with the version number if two places: the normal Maven version tag and the sl_build property. I changed the version number in one place but not the other. Can we please make this version handling more Maven-like so that only needs to be changed in one place?