TaminoAPI4J-SAX-Sample.zip

Hello!

I tried to compile and use tamino & sax example (TaminoAPI4J-SAX-Sample.zip).

TaminoAPI4J-SAX-Sample.zip includes:
1. Message.java
2. MessageDefaultHandler.java
3. ElementDefaultHandler.java
4. DocumentDefaultHandler.java
5. ProcessMessage.java

I removed one line from each above file:
package com.softwareag.tamino.db.API.examples.message;


Then I created bat file:
javac Message.java
javac MessageDefaultHandler.java
javac ElementDefaultHandler.java
javac DocumentDefaultHandler.java
javac ProcessMessage.java

Four first java files were compiled successfully. Unfortunately the last file ProcessMessage.java I couldn’t compile. I got the following error message:

----------------------------------------
ProcessMessage.java:144: reference to TAccessFailureMessage is ambiguous, both class com.softwareag.tamino.db.API.common.TAccessFailureMessage in com.softwareag.tamino.db.API.common and class com.softwareag.tamino.db.API.accessor.TAccessfailureMessage in com.softwareag.tamino.db.API.accessor match
TAccessFailureMessage accessFailure = accessorException.getAccessfailureMessage();

Note: ProcessMessage.java uses or overrides a depreciated API.
Note: Recompile with -deprecation for details.
1 error
----------------------------------------

How can I solve this problem?

Any help will be appreciated.

Thanks a lot in advance.

Best regards,
Dariusz Baumann

Add an explicit import statement to get TAccessFailureMessage from the “common” package.
However I wonder why the class appears in two locations in your compile environment … ?

The reason the TAccessFailureMessage appears in two locations is because there has been a change in the latest downloadable TaminoAPI4J API.

If you do a jar tf TaminoAPI4J.jar, TAccessFailureMessaage appears in two packages:
com/softwareag/tamino/db/API/accessor
com/softwareag/tamino/db/API/common

However the updated documentation that comes with the latest downloadable API reflects this. It says for the TAccessFailureMessage in com.softwareag.tamino.db.API.accessor package that this class is deprecated and moved to com.softwareag.tamino.db.API.common and has become an interface.

So, how can I should compile the last file ProcessMessage.java?

I tried javac ProcessMessage.java, however I got error message which I wrote in the first my post (in this topic).

Please help me.

Regards,
Dariusz Baumann

Did you try the import statement (see my post from 18. September)?