- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2018 09:22 AM
I've built a fairly simple JAR file that will be used to pull external credentials. This all works locally on development workstations, but deploying the JAR to a MID Server will fail to retrieve a credential.
Are there any methods that can be used to debug what is going on, even to just log output anywhere?
I've attempted to write to a file on the MID Server, but it's not being written to. Any suggestions on debugging?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2018 10:54 AM
That all sounds fine. Did you compile the new JAR under the same environment as the MID (32bit, 64bit, etc)...? Did you check it appears in "extlib" directory?
Also, checked the MID logs themselves to see what it's reported when attempting to use the JAR? I think if it uses standard Java logging (log4j?) then something will be passed through to platform or MID logs.
I'll agree that it's a pain no drivers/struts are provided for a test harness for this particular JAR file. I really ought to knock one up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2018 09:32 AM
You would need to hook in eclipse, netbeans or similar in order to properly debug a JAR.
java - Debugging jar file with source code attached in eclipse - Stack Overflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2018 09:45 AM
I've built a fairly simple JAR file that will be used to pull external credentials.
How does it compare to the example JAR file that's used for Discovery's external credential storage?
deploying the JAR to a MID Server will fail to retrieve a credential.
The MID expects specific behaviour from the JAR. How did you deploy it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2018 10:02 AM
The JAR is similar to the example one at External credential storage configuration. The resolve() method has the same signature, as the example one, but the main change made is to the loadProps() method to retrieve from an encrypted file.
The JAR was deployed via the MID Server > JAR Files module.
The example JAR setup works fine, just not sure how to feasibly debug the custom one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2018 10:54 AM
That all sounds fine. Did you compile the new JAR under the same environment as the MID (32bit, 64bit, etc)...? Did you check it appears in "extlib" directory?
Also, checked the MID logs themselves to see what it's reported when attempting to use the JAR? I think if it uses standard Java logging (log4j?) then something will be passed through to platform or MID logs.
I'll agree that it's a pain no drivers/struts are provided for a test harness for this particular JAR file. I really ought to knock one up.