By establish to connect to the server: http://localhost/tamino/testDB i get the following error:
Nested Exception (com.softwareag.tamino.db.API.invocation.TCommunicationException) stacktrace:
Nested Exception (com.softwareag.tamino.db.API.invocation.TCommunicationException) stacktrace:
Server not available for http://localhost/tamino/testDB because of wrong response
at com.softwareag.tamino.db.API.invocation.TAbstractInvocation.checkServerAvailabilityAndVersion(Unknown Source)
at com.softwareag.tamino.db.API.invocation.TInvocationFactory.initialize(Unknown Source)
at com.softwareag.tamino.db.API.invocation.TInvocationFactory.newInvocation(Unknown Source)
at com.softwareag.tamino.db.API.connection.TConnectionFactory.newConnection(Unknown Source)
at com.jaxfront.wipo.ui.editor.TestConnection.getConnection(TestConnection.java:41)
at com.jaxfront.wipo.ui.editor.TestConnection.connectionTest(TestConnection.java:58)
at com.jaxfront.wipo.ui.editor.TestConnection.(TestConnection.java:33)
at com.jaxfront.wipo.ui.editor.TestConnection.main(TestConnection.java:36)
Tamino: 4.1.4.1
JRE: 1.4.1_03
The following test was ok:
http://localhost/tamino/testDB/ino:collection?_xql=/xs:schema
The java code looks like this:
public class TestConnection {
private TConnection _connection;
private static final String CONNECTION_URL = “http://localhost/tamino/testDB”;
public TestConnection(){
connectionTest(“/testRoot/@Inno”);
}
public static void main(String args){
new TestConnection();
}
private TConnection getConnection() {
if (_connection == null) {
try {
_connection = TConnectionFactory.getInstance().newConnection(CONNECTION_URL);
}
catch (TConnectionException e) {
e.printStackTrace();
}
}
return _connection;
}
private void connectionTest(String xql) {
TResponse response = null;
TAccessLocation location;
TXMLObjectAccessor accessor;
TLocalTransaction cursorTransaction;
getConnection().setLockwaitMode(TLockwaitMode.YES);
try {
getConnection().setIsolationLevel(TIsolationLevel.UNPROTECTED);
cursorTransaction = getConnection().useLocalTransactionMode();
}
catch (TTransactionModeChangeException e) {
try {
getConnection().close();
}
catch (TException f) {
System.err.println("close after TException failed: " + f);
// fall through
}
}
location = TAccessLocation.newInstance(“TEST”);
accessor = getConnection().newXMLObjectAccessor(location, TDOMObjectModel.getInstance());
try {
TQuery query = TQuery.newInstance(xql);
response = accessor.query(query, 25);
}
catch (TException e) {
}
System.out.println(response.getQueryContentAsString());
}
}
From the first view, I can’t see anything wrong with your program. The exception you get indicates that the Tamino Server can’t be reached.
Try a “http://localhost/tamino/welcome_4_1_4?_diagnose=ping” in the browser on the same machine you are executing the Java program on?
If this succeeds then try “http://localhost/tamino/testDB?_diagnose=ping” on that same machine.
Hello abdullah,
could you please also tell us which schema(s) you have defined in your “TEST” collection, and what documents are stored in it?
Thanks,
Trevor.
This works fine (Internet Explorer 6.0):
If this succeeds then try “http://localhost/tamino/testDB?_diagnose=ping” on that same machine
But i can’t get a connection from the java application!
I receive this message, when i call my methode getConnection()…
Nested Exception (com.softwareag.tamino.db.API.invocation.TCommunicationException) stacktrace:
Nested Exception (com.softwareag.tamino.db.API.invocation.TCommunicationException) stacktrace:
Server not available for http://localhost/tamino/testDB because of wrong response
at com.softwareag.tamino.db.API.invocation.TAbstractInvocation.checkServerAvailabilityAndVersion(Unknown Source)
at com.softwareag.tamino.db.API.invocation.TInvocationFactory.initialize(Unknown Source)
at com.softwareag.tamino.db.API.invocation.TInvocationFactory.newInvocation(Unknown Source)
at com.softwareag.tamino.db.API.connection.TConnectionFactory.newConnection(Unknown Source)
at com.jaxfront.wipo.ui.editor.TestConnection.getConnection(TestConnection.java:41)
at com.jaxfront.wipo.ui.editor.TestConnection.connectionTest(TestConnection.java:58)
at com.jaxfront.wipo.ui.editor.TestConnection.(TestConnection.java:33)
at com.jaxfront.wipo.ui.editor.TestConnection.main(TestConnection.java:36)
I have the newest jar apis from the tamino version 4.1.4.1
Java Version: 1.4.1_03
What is the problem, that i’m not able to connnect to the Tamino DB from the java application?
Hello abdullah,
could you please tell us which webserver you are using to access Tamino?
This situation reminds me of a problem we saw a few months ago…
Could you please have a look at this posting: remote db and see if there is anything helpful in there?
Thanks,
Trevor.