Hello,

I have been struggling figuring out several things at a time and this is one of them. The Yawl external DB example posted, worked with me. However, I tried to create a simple Exaternal db gateway but for some reason I keep getting unexpected token error. Please can someone help me.

Error is:
"XQuery syntax error in ##:
Unexpected token "<eof>" in path expression"

I saw another posting suggesting to copy sql.jar to tomcat. In my case I am using h2 and I did copy h2.jar to tomcat but still it did not work. I the example I have works when I run it but if I needed to make any changes, I see the same error.

I tried copying the exact same xquery then deleting it and pasting it again, that also resulting in getting the error. This means I cannot even add an input variable to a task that uses myexternaldbgateway.

I also though maybe something is wrong with my db connection but it has been working fine with no issues.

I hope someone can help me.

thank you.

the attachment is the same as from someone post.

Hi,

I have updated the tutorial on database gateways.

I have rechecked it and it's working fine.

I am using the following configuration for a Postgres DBMS:

***

    private boolean configure() {
        if (!configured) {
            configureSession("org.hibernate.dialect.PostgreSQLDialect",
                    "org.postgresql.Driver", "jdbc:postgresql:CustomerDB",
                    "custdb", "custdb", null);
            configured = true;
        }
        System.out.println("configured");
        return configured;
    }

***

But you have said that the example was working. Does the standard example also work for the h2 DBMS?

The next difference that I saw is that in your YAWL specification you use the data gateway at the net level whereas in my example I use it at the task level.

My suggestion would be to change the running standard example step by step to the one you need checking each time where it goes wrong.
 

 

Thank you very much Ahense. The standard example worked with the customerDB, which I copied from your example provided on this forum. I had to adjust it as I am using h2 database but it worked when I ran it on yawl engine.

The problem is that when I go into YAWL editor and delete xQuery from the task, and regenerate it or repaste the original xQuery --> I get that error. This is an issue because when I tried to create my own yawl specification with external gateway, I couldn't get YAWL to accept the xQuery even though it was correct. I could not click "Ok" button to try and run it in the engine.

I saw another posting stating the copy the sqljdbc.jar file to tomcat. I copied my h2*.jar to tomcat but still it did not work. I have been struggling so much with it as I am not a great debugger but still learning.

I hope you can help me.

Thank you,