HELP with catalina.policy

2003-01-07 Thread Arthur Chan
Hi.
I use j2sdk1.4.0 + Apache2 + Tomcat4.0.4 + mod_jk
My applets access tomcat servlets to query an Ora9i database.
Most of the client W98, NT4 and W-XP can access my applet to query the servlets with 
the exception of 2.
One client uses java 1.3.1_03 and when he tries to use applet over www , java console 
throws these error :
[code]
RemotedemoClient : set URL to http://my site :   
java.security.AccessControlException access denied (java.nt.SocketPermission proxy-iap 
resolve)
 at java.security.AccessControlContext.checkPermission(Unknown Source)
 at java.security.AccessController.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkConnect(Unknown Source)
 at java.net.InetAddress.getAllByName0(Unknown Source)
 at java.net.InetAddress.getAllByName0(Unknown Source)
 at java.net.InetAddress.getByName(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getHttpProxyAuthentication(Unknown 
Source)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
 at com.developer.Tunnel.QueryCollection.retrieveQueries(QueryCollection.java:62)
 at com.developer.Tunnel.QueryCollection.run(QueryCollection.java:38)
 at java.lang.Thread.run(Unknown Source)
java.security.AccessControlException: access denied (java.net.SocketPermission 
proxy-iap resolve)
 at java.security.AccessControlContext.checkPermission(Unknown Source)
 at java.security.AccessController.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkConnect(Unknown Source)
 at java.net.InetAddress.getAllByName0(Unknown Source)
 at java.net.InetAddress.getAllByName0(Unknown Source)
 at java.net.InetAddress.getByName(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getHttpProxyAuthentication(Unknown 
Source)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
 at 
com.developer.Tunnel.client.BaseTunnelClient._invokeMethod(BaseTunnelClient.java:193)
 at com.developer.Tunnel.client.BaseTunnelClient._initialize(BaseTunnelClient.java:89)
 at com.developer.Tunnel.RemotedemoClient.init(RemotedemoClient.java:28)
 at com.developer.Tunnel.demoApplet.init(demoApplet.java:80)
 at sun.applet.AppletPanel.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
java.security.AccessControlException: access denied (java.net.SocketPermission 
proxy-iap resolve)
 at java.security.AccessControlContext.checkPermission(Unknown Source)
 at java.security.AccessController.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkConnect(Unknown Source)
 at java.net.InetAddress.getAllByName0(Unknown Source)
 at java.net.InetAddress.getAllByName0(Unknown Source)
 at java.net.InetAddress.getByName(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getHttpProxyAuthentication(Unknown 
Source)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unknown Source)
 at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
 at com.developer.Tunnel.QueryCollection.retrieveQueries(QueryCollection.java:62)
 at com.developer.Tunnel.QueryCollection.run(QueryCollection.java:38)
 at java.lang.Thread.run(Unknown Source)
[/code]


Is this a firewall problem from their end ???
Is this a catalina.policy problem from my end ???



JDBC Blob Prob

2002-11-08 Thread Arthur Chan
Hi.
I use JDBC to retrieve an Oracle BLOB of either gif or jpg or tif
Some of the BLOBs are fairly big e.g. 40+KBytes.
However most are smaller, around 10+KBytes.
I found that I can retrieve and display the big blobs or write it to a file in a 
temp dir, but I cannot display the smaller blobs.
When I try writing the small blobs to a temp dir, the file handle will be created, but 
the file length is zero !
Can anyone help ???
Any hints, tips, suggestions ???



Re: Using -Xmx128m cause BindException Error ???

2002-11-07 Thread Arthur Chan
Well, Yoav, it is very much the same defaults when I installed it...

- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 01:56 PM
Subject: RE: Using -Xmx128m cause BindException Error ???


Howdy,
Your error is in putting JAVA_OPTS in the wrong place.  They shouldn't
be inside any of the commands in Catalina.sh, e.g. start / run / stop.
Post your whole Catalina.sh...

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:achana;saysit.com]
Sent: Wednesday, November 06, 2002 9:54 PM
To: [EMAIL PROTECTED]
Subject: Using -Xmx128m cause BindException Error ???

Hi all.
I am trying to use JAVA_OPTS=-Xmx128m and it causes these erros on
starting Tomcat.
If I remove that line, Tomcat starts without errors again.
Can someone tell me where I might have erred please ?


Starting service Default Tomcat-Apache-mod_jk
Apache Tomcat/4.0.4
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
at java.net.ServerSocket.bind(ServerSocket.java:308)
at java.net.ServerSocket.bind(ServerSocket.java:266)
at java.net.ServerSocket.init(ServerSocket.java:182)
at java.net.ServerSocket.init(ServerSocket.java:138)

--
To unsubscribe, e-mail:   mailto:tomcat-user-
[EMAIL PROTECTED]
For additional commands, e-mail: mailto:tomcat-user-
[EMAIL PROTECTED]








 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.








 --
 To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org

Starting service Default Tomcat-Apache-mod_jk
Apache Tomcat/4.0.4
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
at java.net.ServerSocket.bind(ServerSocket.java:308)
at java.net.ServerSocket.bind(ServerSocket.java:266)
at java.net.ServerSocket.init(ServerSocket.java:182)
at java.net.ServerSocket.init(ServerSocket.java:138)
at 
org.apache.catalina.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:118)
at org.apache.ajp.tomcat4.Ajp13Connector.open(Ajp13Connector.java:797)
at org.apache.ajp.tomcat4.Ajp13Connector.start(Ajp13Connector.java:1013)
at org.apache.catalina.core.StandardService.start(StandardService.java:395)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
java.lang.NullPointerException
at org.apache.ajp.tomcat4.Ajp13Connector.run(Ajp13Connector.java:841)
at java.lang.Thread.run(Thread.java:536)
java.lang.IllegalThreadStateException
at java.lang.ThreadGroup.add(ThreadGroup.java:798)
at java.lang.Thread.init(Thread.java:303)
at java.lang.Thread.init(Thread.java:440)
at org.apache.ajp.tomcat4.Ajp13Processor.threadStart(Ajp13Processor.java:576)
at org.apache.ajp.tomcat4.Ajp13Processor.start(Ajp13Processor.java:666)
at org.apache.ajp.tomcat4.Ajp13Connector.newProcessor(Ajp13Connector.java:769)
at org.apache.ajp.tomcat4.Ajp13Connector.start(Ajp13Connector.java:1025)
at org.apache.catalina.core.StandardService.start(StandardService.java:395)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at 

FileNotFound and Problem connecting - where to start to debug ?

2002-10-18 Thread Arthur Chan
Hi all.
I have Apache talking with Tomcat. Using http://ServerName/com/ServletName I can get 
data from the db-server to display in the browser, but this is only in a company 
intranet environment. On the intranet, any changes to the db can be displayed on the 
browser with only a slight delay.
Now I need to establish an HTTP session to the applet and use the applet to tunnel 
to Tomcat.
Although I manage to throw up the screens e.g. a math caculator, JAVA console throws 
these error messages :
***
Record Sent
java.io.FileNotFoundException: http://cacophonix/demo.jar
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
  at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
  ...etc
java.io.FileNotFoundException: http://cacophonix//RemotedemoServer
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
...etc
com.developer.Tunnel.client.BaseTunnelClient$TunnelException: 
http://cacophonix//RemotedemoServer
  at 
com.developer.Tunnel.client.BaseTunnelClient._invokeMethod(BaseTunnelClient.java:216)
  ...etc

The supposedly missing files are present (I have copied them everywhere).
The CLASSPATH has been patched and extended.
To no avail.
I was told that it could be my policy files. 
But over the intranet I could access the db ?
Hints, tips and even comments are most welcome at this stage




java.io.IOException: Server returned HTTP response code: 500 for URL

2002-10-15 Thread Arthur Chan

Hi, Apache-Tomcat warriors!
I have one web-server (Apache2) ; one app-server (Tomcat4.0.4) ; and one 
database-server. 
I am trying to get the browser to open an HTTP connection to Apache and tunnel the 
request to Tomcat to get some data from the database server. 
Todate, it has been a frustrating experience, and I am getting this 500 for URL.
Searching the web, I find this cryptic description :
Internal Error 500: The server encountered an unexpected condition which prevented it 
from fulfilling the request. 
The output in $CATALINA_HOME/logs/caco_access_log.2002-10-15.txt is also very crytic  
eg
192.168.0.2 --[15/Oct/2002:18:36:57 1] POST /com/RemoteLiteHelperServer HTTP/1.1 
500 3385
**
By the way, if I do not tunnel and use the straightforward 
http://localhost/com/AllEmployees, it works well.
The 500 for URL arises only when I embed the .HTML in the web page and start the 
applet from the web page.
**
Fresh out of ideas for today... so please help :-(
TIA



JAVA accessing Ora CLOB's and BLOB's

2002-09-29 Thread Arthur Chan

Hi All.
This is a bit out of context, please do not take offence.
I managed to stream documents of various docFlavour into and out of BLOBs e.g .doc, 
.gif, .jpg etc but have difficulties getting Ora's CLOB to write the content from the 
database to a file. Both BLOB and CLOB fields are in the same db record !
It is the simplest text file, just a few lines. I inserted following codes for sanity 
checks...
...
// get the row containing the LOB locator
ResultSet clobResultSet = thisStatement.executeQuery
( SELECT ATxtMsg + 
  FROM ...  +
  WHERE...
);
clobResultSet.next();
CLOB thisClob = ((OracleResultSet) clobRS).getClob(ATxtMsg);
int chunkSize = thisClob.getChunkSize();
System.out.println(chunkSize is  + chunkSize);
...
The outputs are :
chunkSize = 8132 (this is the default, and a good one at that...)
clobLength = 0 (it most certainly is not...)
Read clob and saved file /home/arthur/./TargetFolder/retrievedCLOB_test.txt

BUT the text file in targetDirectory is empty !?!
Where could I have gone wrong - this is the simplest case ?






Re: How to use Port 80?

2002-09-21 Thread Arthur Chan

Could you have assigned 80 to HTTP requests already ???

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:03 PM
Subject: How to use Port 80?


 Hi

 Im running Tomcat 4.1.10 on Red Hat 7.3.

 Im trying to change the port to 80 from 8080.

 I made the following change in my server.xml

 From:

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8080 minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=10 debug=0 connectionTimeout=2
useURIValidationHack=false /

 to:

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=80 minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=10 debug=0 connectionTimeout=2
useURIValidationHack=false /

 then I restart Tomcat4 with the Service Configuration utility and I get
 the following message in the browser when I go to http://localhost

 An error occured while loading http://localhost/:

 Could not connect to host localhost

 Thanks in advance for any help
 Hal Haig






 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: How to use Port 80?

2002-09-21 Thread Arthur Chan

Normally that's the default - Apache  (not Tomcat) uses it.
Look at httpd.conf , the Listen directive, should read something like
192.168.4.5:80 ie the ip-addr:port
In default RH  u will find that under /etc/httpd/conf
To look at a static list of port assignments : /etc/services
I am not sure what u r tyring to do , but I hope that's helpful.

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:36 PM
Subject: Re: How to use Port 80?


 not intentionally, how would I know if I did that?

 -- Original Message --
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 From: Arthur Chan [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: How to use Port 80?
 Date: Sat, 21 Sep 2002 23:34:53 -0400
 
 
 Could you have assigned 80 to HTTP requests already ???
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, September 21, 2002 11:03 PM
 Subject: How to use Port 80?
 
 
  Hi
 
  Im running Tomcat 4.1.10 on Red Hat 7.3.
 
  Im trying to change the port to 80 from 8080.
 
  I made the following change in my server.xml
 
  From:
 
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
 port=8080 minProcessors=5 maxProcessors=75
 enableLookups=true redirectPort=8443
 acceptCount=10 debug=0 connectionTimeout=2
 useURIValidationHack=false /
 
  to:
 
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
 port=80 minProcessors=5 maxProcessors=75
 enableLookups=true redirectPort=8443
 acceptCount=10 debug=0 connectionTimeout=2
 useURIValidationHack=false /
 
  then I restart Tomcat4 with the Service Configuration utility and I get
  the following message in the browser when I go to http://localhost
 
  An error occured while loading http://localhost/:
 
  Could not connect to host localhost
 
  Thanks in advance for any help
  Hal Haig
 
 
 
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 


 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: How to use Port 80?

2002-09-21 Thread Arthur Chan

No, don't change /etc/services because u r waiting for HTTP requests on port
80. That's the default.
I cannot help because I have not used Tomcat as a web-server ! Most use
Apache as a web server.

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:56 PM
Subject: Re: How to use Port 80?


 I looked in /etc/services and found
 ...
 ttp80/tcp  www www-http# WorldWideWeb HTTP
 http   80/udp  www www-http# HyperText Transfer
Protocol
 ...

 I'm not sure how got there unless it was just part of RedHat 7.3.  Im not
 running Apache or any other web server.  Im trying to use Tomcat4 as my
 Web server.  Should I change /etc/services and if so how?

 thanks again

 -- Original Message --
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 From: Arthur Chan [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: How to use Port 80?
 Date: Sat, 21 Sep 2002 23:50:41 -0400
 
 
 Normally that's the default - Apache  (not Tomcat) uses it.
 Look at httpd.conf , the Listen directive, should read something like
 192.168.4.5:80 ie the ip-addr:port
 In default RH  u will find that under /etc/httpd/conf
 To look at a static list of port assignments : /etc/services
 I am not sure what u r tyring to do , but I hope that's helpful.
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Saturday, September 21, 2002 11:36 PM
 Subject: Re: How to use Port 80?
 
 
  not intentionally, how would I know if I did that?
 
  -- Original Message --
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  From: Arthur Chan [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: Re: How to use Port 80?
  Date: Sat, 21 Sep 2002 23:34:53 -0400
  
  
  Could you have assigned 80 to HTTP requests already ???
  
  - Original Message -
  From: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, September 21, 2002 11:03 PM
  Subject: How to use Port 80?
  
  
   Hi
  
   Im running Tomcat 4.1.10 on Red Hat 7.3.
  
   Im trying to change the port to 80 from 8080.
  
   I made the following change in my server.xml
  
   From:
  
   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8080 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=8443
  acceptCount=10 debug=0 connectionTimeout=2
  useURIValidationHack=false /
  
   to:
  
   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=80 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=8443
  acceptCount=10 debug=0 connectionTimeout=2
  useURIValidationHack=false /
  
   then I restart Tomcat4 with the Service Configuration utility and
 I
 get
   the following message in the browser when I go to http://localhost
  
   An error occured while loading http://localhost/:
  
   Could not connect to host localhost
  
   Thanks in advance for any help
   Hal Haig
  
  
  
  
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 


 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]