JDBC Provisioning Rule Typed Variable Declaration of connection

Which IIQ version are you inquiring about?

8.3

Please share any images or screenshots, if relevant.



Screenshot 2024-08-02 at 3.08.43 PM

Test Rule


Share all details about your problem, including any error messages you may have received.

Getting this Typed variable declaration error in this code. I’m confused because connection should be getting passed in and I’m pretty sure I’m importing the right java packages. I’ve tested connection within the application configuration, and ran the function in a test rule. Is there something I’m missing here?

Hi @ctrovada,

I have 2 questions:

  1. do you have all the functions in the same file?
  2. Why do you have a return id after closing getId() funcion?
  3. This rule is configured on the connetor and it starts with some operation?

So, if is a rule that you launch from debug for example, you need to managed the connection, open and close it; if its a provising rule launched with resfresh task for example, you dont need managed.
also, remember to close the statment and try to write the rule in this order:

  1. Imports
  2. Functions
  3. Main

Hi @ctrovada,

Can you please check the entire log trace and see if the error is originating from some other source. Also please try to validate the connection before using it in the rule that if there is some other process which is causing this connection closure.

Also, if possible, please share the rule after removing sensitive details.

Thanks

Hi @ctrovada ,

Can you share the rule? Have you declared the connection variable again anywhere?

Thanks

Share the full code so that this can be debugged .

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.