remote db

I’ trying to run the examples contained in TaminoApiEx.jar, but my db isn’t local and so
i have changed the variable DATABASE_URI from localhost to the IP address on the machine on
which Tamino is, but i get always Tamino connection error!!!Why?
What’s wrong? Is it neccessary others changes to run tamino from remote?
Can be a problem of users rights?
If i have a server and with the Administrator passdw i can enter in TaminoManager,but out of my server who can
see what?Can anyone access to my xml data?i think no…i hope so… can explain it to me?

BRGS
@nto

Can you please try the following:

1) From a Command Prompt on your client machine, “ping” the server machine’s IP Address. If the result is like this

Reply from <ip address>: bytes=32 time<10ms TTL=128

then the server is reachable from the client. Otherwise you might have a real tcp/ip connection problem.

2) Start a browser such as IE on the client and type a URL of http://<server ip address>/tamino/?_diagnose=ping and see if you get back a “Server is Alive” response. This establishes that a http connection to the server is OK. If security is active on the web server, you should get a prompt asking for a userid and password. Enter values that are valid on the server. If you need to specify a userid and password for this test, then you need to set them in the API before making a connection (see here for details). This indicates you have activated web server security.

3) If both of the above tests work OK, please check your classpath on the client machine just before running the example. Make sure that the API jars are all available.

4) Unless you have deliberately activated Tamino security, that probably isn’t the cause of your problem, but for a full description of Tamino Security, please refer to the Documentation, starting at Tools; Tamino Manager; Tamino Security from the main Documentation menu.

If none of this helps, let us know.

HTH

[This message was edited by Bill Leeney on 11 Dec 2002 at 09:57.]

test 1 result
Esecuzione di Ping 10.50.5.9 con 32 byte di dati:

Risposta da 10.50.5.9: byte=32 durata<10ms TTL=128
Risposta da 10.50.5.9: byte=32 durata<10ms TTL=128
Risposta da 10.50.5.9: byte=32 durata<10ms TTL=128
Risposta da 10.50.5.9: byte=32 durata<10ms TTL=128

Statistiche Ping per 10.50.5.9:
Pacchetti: Trasmessi = 4, Ricevuti = 4, Persi = 0 (0% persi),
Tempo approssimativo percorsi andata/ritorno in millisecondi:
Minimo = 0ms, Massimo = 0ms, Medio = 0ms

It’s in italian, but it seems all OK.The host is reachable and i can make queries on the remote DB via http from the browser


test 2 result
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“XQL FAQ (XML Query Language - Frequently Asked Questions)”>
- ino:request
<ino:diagnose ino:request-type=“ping” />
</ino:request>
- ino:message
<ino:messageline ino:subject=“Server”>is alive</ino:messageline>
</ino:message>
</ino:response>

test3 result
to compile i use:
C:\j2sdk1.4.0\bin>javac -classpath c:\myclasses\TaminoAPI4J.jar;c:\myclasses;c:<BR>myclasses\jdom.jar C:\myclasses\prova.java

to run i use

C:\j2sdk1.4.0\bin>java -classpath c:\myclasses\TaminoAPI4J.jar;c:\myclasses;c:\m
yclasses\jdom.jar prova
and i get
error derived from TConnectionException


test 4 result
On tamino manager under the db i’m trying to connect on security manager the Users,User Groups and
Access Control Lists fields are blanks…
i try also to create the new connection with domain\username, password.


All tests fail, what can i do now?

Regards @nto

So Test1 works (Ping), and Test2 works (http connection to server from client) but the API doesn’t work. It looks as if you have caught an exception and processed it resulting in message:
“error derived from TConnectionException”?

Your runtime classpath doesn’t look correct for TaminoAPI4J. Can you please set your CLASSPATH environment variable so that it includes all the .jar files contained in the directory /lib and rerun the test. It would also help if you could change your code to print a stack trace for the original exception using

e.printStackTrace();


Also please make sure that programs of the Java Runtime Environment such as the compiler javac or the interpreter java are of version 1.3.x. You can check the version by entering “java -version”.

Many thanks.

With printstacktrace i get:

er exception
NestedException:HTTP error 403 Forbidden ( The ISA Server denies the specified U
niform Resource Locator (URL). )
at com.softwareag.tamino.db.API.invocation.http.THTTPInvocation.checkAva
ilableServer(THTTPInvocation.java:273)
at com.softwareag.tamino.db.API.invocation.http.THTTPInvocation.(T
HTTPInvocation.java:79)
at com.softwareag.tamino.db.API.invocation.http.THTTPInvocation.(T
HTTPInvocation.java:93)

i think something goes wrong with server…how is possible??if i do the queries via browser it works…i don’t understand…@nto

however my javac says:


C:\j2sdk1.4.0\bin>java -version
java version “1.4.0”
Java™ 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot™ Client VM (build 1.4.0-b92, mixed mode)

is it ok,or must it be of the series 1.3.x?
@nto

In the /lib there are
TaminoAPI4j.jar,jdom.jar,xerces.jar and log4j-core.jar…now compiling looks like:

C:\j2sdk1.4.0\bin>javac -classpath c:\myclasses\TaminoAPI4J.jar;c:\myclasses;c:<BR>myclasses\log4j-core.jar;c:;c:\myclasses\jdom.jar;c:\myclasses\xerces.jar c:\pr
ova.java
the run time execution…

C:\j2sdk1.4.0\bin>java -classpath c:\myclasses\TaminoAPI4J.jar;c:\myclasses;c:\m
yclasses\log4j-core.jar;c:;c:\myclasses\xerces.jar;c:\myclasses\jdom.jar prova

but the error was always the same.I report it completely.
Nested Exception (com.softwareag.tamino.db.API.invocation.TInvocationException)
stacktrace:

Nested Exception (java.lang.reflect.InvocationTargetException) stacktrace:

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.softwareag.tamino.db.API.invocation.TInvocationFactory.newInvocat
ion(TInvocationFactory.java:79)
at com.softwareag.tamino.db.API.invocation.TInvocationFactory.newInvocat
ion(TInvocationFactory.java:43)
at com.softwareag.tamino.db.API.connection.TConnectionFactory.newConnect
ion(TConnectionFactory.java:50)
at prova.(prova.java:43)
at prova.main(prova.java:63)
Caused by: com.softwareag.tamino.db.API.invocation.TCommunicationException
Server not available for http://62.110.204.10/tamino/UMTSUsers because of a deep
er exception
NestedException:HTTP error 403 Forbidden ( The ISA Server denies the specified U
niform Resource Locator (URL). )
at com.softwareag.tamino.db.API.invocation.http.THTTPInvocation.checkAva
ilableServer(THTTPInvocation.java:273)
at com.softwareag.tamino.db.API.invocation.http.THTTPInvocation.(T
HTTPInvocation.java:79)
at com.softwareag.tamino.db.API.invocation.http.THTTPInvocation.(T
HTTPInvocation.java:93)
… 9 more

i have no more ideas.
Please help me.
@nto

This error (403 forbidden) usually means the web server refuses to service your request. Did you specify any web server addresses and ports in the Tamino Manager and link them to your database in the Web Servers section? You don’t need to do this - I just want to know whether you did or not.

What database URI are you attempting to use in your java program, and what web server is serving that URI (Apache or IIS)? Is the URI in your java code exactly the same as the one you used for the ?_diagnose=ping operation?

The problem is defined that your browser can ping the database but your java code can’t see it. Are you running the browser (for the _diagnose=ping operation) on the same client machine where you run the java code? If so, can you try to purge the browser cache and reload the page (for IE, Tools, Internet Options, Delete Files (in the Temporary Internet files section)).

If anyone else has other ideas please feel free to comment.

[This message was edited by Bill Leeney on 11 Dec 2002 at 16:23.]

The error appears to come from Microsoft’s ISA Server:

The ISA Server denies the specified Uniform Resource Locator (URL).

I guess you are using ISA Server as a firewall and you blocked access somehow, but I’m sorry I don’t know more about the subject of ISA Server.

HTH

To login into remote machine i wrote:
http://ipaddress:9991 but in my java code i have variable DATABASE_URI=“http://ipaddress/tamino/dbname” and is apache and the ipaddress is the same i use with diagnose command
>Areyou running the browser (for the _diagnose=ping operation) on the same client machine where you run the java code?

YES, i have tryed also to delete temp ie files without success.
The strange is that if i do a query like the following http://ipaddress/tamino/dbname/collectioname?_xql=some query from browser i get the right response!!!

HLP PLZ
@nto

you say that the error appears to come from Microsoft’s ISA Server, but i continue to not understand the difference between the query created by myself and the query created via the tamino API…
If anyone has ideas…

@nto

Hello @nto,

there are some differences (on the HTTP level) between the same query sent from a web browser or the Java API.
The first one that comes to mind is the agent header - the Java API sends this:
   User-Agent: Java/1.4.1_01
whereas IE6 sends this:
   User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

I don’t know anything about ISA Server so this is only an idea, but: could it be that your ISA Server is configured to refuse/ignore HTTP requests from certain applications (such as: anything that isn’t Internet Explorer)?

Cheers,
Trevor.

In addition to Trevor’s suggestion (Thanks Trevor), do you have any proxy set for Internet Explorer on the working client machine (where you do the diagnose=ping successfully)? You can find the proxy setting at Tools, Internet Options, Connections, LAN Settings. It could be that connecting via proxy somehow affects the ISA Server restrictions? Test this by removing the client browser proxy setting, restarting the browser and re-running the browser ping request. If this is the cause, you will need to specify the same proxy settings for the java runtime environment when you run your API programs.

The API’s first http request is to send “_diagnose=version” to the database URL you specify. This has two effects - it checks that the database is available and returns the database version. You could try the same request from your browser just to be sure it works.

I think too that is a problem of proxy setting, but i didn’t never believe that ISA server could reject packet with ua different from ie.
Another bad thing by Micro$oft… :mad:

@nto

Thinking at the problem i realize that my connection to the remote tamino db is via IP, so there isn’t reason to call the isa server proxy that is to go outside in internet.
The db is in a local lan.
Last chance would be modify the packet http…anyone know how can do it?

@nto

The problem is caused by ISA Server - we know that from the exception stack trace:

NestedException:HTTP error 403 Forbidden ( The ISA Server denies the specified Uniform Resource Locator (URL). )


Do the articles >here< or >here< help at all?