You can translate the question and the replies:

getElementDatabase() not working for Denodo 8.0/ Java 11

I'm creating a custom policy but getting an error when trying to use the Denodo method getElementDatabase(); The other methods DO work from my library imports (getQuery(), getElementName(), getCurrentUserName()) - but NOT getElementDatabase(). I was getting an error in Eclipse, and decided to just deploy it to Denodo even though there was an error in the IDE, but even on the log file in Denodo mentioned the issue about the method. Using Java 11, Denodo 8.0. Below are my imports (some may be repetivive since I'm trying to get getElementDatabase() to work) - import com.denodo.common.custom.annotations.CustomContext; import com.denodo.common.custom.annotations.CustomElement; import com.denodo.common.custom.annotations.CustomElementType; import com.denodo.common.custom.annotations.CustomExecutor; import com.denodo.common.custom.policy.CustomRestrictionPolicyContext; import com.denodo.common.custom.policy.CustomRestrictionPolicyFilterType; import com.denodo.common.custom.policy.CustomRestrictionPolicyType; import com.denodo.common.custom.policy.CustomRestrictionPolicyValue; import com.denodo.common.custom.policy.CustomRestrictionPolicyContext.*; import com.denodo.common.custom.policy.CustomRestrictionPolicyFilterType.*; import com.denodo.common.custom.policy.CustomRestrictionPolicyType.*; import com.denodo.common.custom.policy.CustomRestrictionPolicyValue.*; How I'm getting the value: object_schema = context.getElementDatabase();
user
05-04-2021 22:06:36 -0400

1 Answer

Issue was resolved. Here is my answer to a Denodo specialist about this: I've used the demo policy as a template in building our custom policy, so I went back to it and was still getting the issue. I tried adding the JAR to both the ModulePath and ClassPath, but that didn't work. I eventually began to wonder if it would work if I use the JAR file from our installation of 8.0 that went on to our company's Linux server, instead of using the JAR file that I got when I locally installed Virtual DataPort Admin Tool. I applied the new JAR to the ModulePath by "adding external JAR" and the error suddenly vanished. I went ahead and tested it inside Denodo and works great now. Seems like the denodo-commons-custom.jar that I was initially using was missing the logic/class/etc for getElementDatabase().
user
07-04-2021 09:26:45 -0400
You must sign in to add an answer. If you do not have an account, you can register here