MySQL's XA problem

2006-02-12 Thread Jack Wang

  I hava done a test to use the MySQL XADataSource. For MySQL has no 
MYSQLXADataSourceFactory
class, so I coded one to produce MysqlXADataSource. MysqlXADataSource is 
configured in tomcat 5.5
server.xml. I can get the MysqlXADataSource instance xaDs by which I can get 
XAConnection and
XAResource. I also configured a UserTransaction which was produced by
org.objectweb.jotm.UserTransactionFactory. The following is the action's code 
in a test web
application. This action runs correctly the first time, but in the second time, 
it runs very slow,
then reports Lock wait timeout exceeded; try restarting transaction error.

  The first question is that it seems the action did not update the table 
testdata's data. Did the
UserTransaction ut have some error not participate in the database transaction?

  The second question is that I have searched this error, but don't know how to 
solve it. Please
give me some tips. Must I not use MySQL's XA in Kandula ? Thanks.


The java code (JOTM example):

UserTransaction ut = null;
try{
Context ctx = new InitialContext();
MysqlXADataSource xaDs = 
(MysqlXADataSource)ctx.lookup(java:comp/env/jdbc/myXADB);
ut = (UserTransaction)ctx.lookup(java:comp/env/UserTransaction);

XAConnection xCon = xaDs.getXAConnection();
java.sql.Connection conn = xCon.getConnection();

System.out.println( beginning the transaction  xa con =  + conn);
ut.begin();

// JDBC statements
Statement stmt = conn.createStatement();
ResultSet rst =  stmt.executeQuery(select id, foo from testdata);
if(rst.next()) {
foo=rst.getInt(2);
}
System.out.println(foo = + foo + (before completion));

String sql = update testdata set foo= + (++foo) +  where id=1;
stmt.executeUpdate(sql);// === The program will wait here, and then report 
the error message
!

ut.commit();
System.out.println( committing the transaction );

conn.close();
System.out.println( done );
}catch(Exception e) {
System.out.print(DBTest  );
e.printStackTrace();
System.out.println( rolling back the transaction );
try { 
ut.rollback(); 
System.out.println(rollback ok.); 
}catch(Exception e1){ 
System.out.println(rollback Error  + e1); 
} 
System.out.println(rollback end); 
}
}



The error message:

== xaDataSource = [EMAIL PROTECTED] ==
 beginning the transaction  xa con = [EMAIL PROTECTED]
foo = 29 (before completion)
 committing the transaction 
 done 
 beginning the transaction  xa con = [EMAIL PROTECTED]
foo = 29 (before completion)
- set rollback only (tx=bb14:38:0:01777d30dfc9556034...986c02:)
DBTest  java.sql.SQLException: Lock wait timeout exceeded; try restarting 
transaction
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2822)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1536)
at 
com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1159)
at
com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:684)
at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1184)
at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1101)
at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1086)
at
com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:840)
at foo.XADBTest.init(XADBTest.java:92)
at 
org.apache.jsp.testJotm_jsp._jspService(org.apache.jsp.testJotm_jsp:55)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   

install tomcat under linux (java problem)

2006-02-12 Thread Hannes Hein

Hi,

I'm trying to install Tomcat 5.5.15 on a linux machine (debian 3.1 r0a).
I installed Java 5.0 already.

According to java and tomcat /etc/environment contains the following two
lines:
JAVA_HOME=/usr/java/jdk1.5.0_06
CATALINA_HOME=/srv/apache-tomcat-5.5.15

I try to install tomcat in the way it is described here:
http://tomcat.apache.org/tomcat-5.5-doc/setup.html

My problem is:
if I call ./configure everithing runs fine until the following error
message:

checking for javac... /usr/java/jdk1.5.0_06/bin/javac
checking wether the Java compiler (/usr/java/jdk1.5.0_06/bin/javac)
works... no
configure: error: installation or configuration problem: javac cannot
compile


Can someone help me? I don't know what's wrong!

thanks
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/m2/

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



Re: install tomcat under linux (java problem)

2006-02-12 Thread [EMAIL PROTECTED]
Hi Hannes, 

in my humildy opinion the question is you do not have 1.5 in your profile. 

if you put: 

java -version 

could not find your java 1.5 

try to add to your .profile in the user \\ 

then put java -version to be sure that is the 1.5 version. 



and then try to be sure if is in the setenv.sh and in the startup.sh 

Be living, 


Ruben
Hannes Hein writes: 

Hi, 


I'm trying to install Tomcat 5.5.15 on a linux machine (debian 3.1 r0a).
I installed Java 5.0 already. 


According to java and tomcat /etc/environment contains the following two
lines:
JAVA_HOME=/usr/java/jdk1.5.0_06
CATALINA_HOME=/srv/apache-tomcat-5.5.15 


I try to install tomcat in the way it is described here:
http://tomcat.apache.org/tomcat-5.5-doc/setup.html 


My problem is:
if I call ./configure everithing runs fine until the following error
message: 


checking for javac... /usr/java/jdk1.5.0_06/bin/javac
checking wether the Java compiler (/usr/java/jdk1.5.0_06/bin/javac)
works... no
configure: error: installation or configuration problem: javac cannot
compile 



Can someone help me? I don't know what's wrong! 


thanks
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/m2/ 


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





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



jdbc with tomcat5 and mysql - fedora core4

2006-02-12 Thread Medha Parathasarathy
Hi,

I am trying to migrate my application from fedora core 3 to 4. tomcat 5
is working, mysql is working.  I had downloaded the latest version of
jdbc driver from mysql.com.
mysql-connector-java-3.1.12-bin.jar.

I had copied the same to lib directory of webapps/ROOT where the
application was copied to make it work.

I had taken help from a site to create jdbc.java file to compile and run
to see whether the connection is working.
http://www.dantullis.com/howtos/rh9_apache2_tomcat5_mysql413_howto6.html

While compiling [ java as it is coming with fc4 ] no error is given but
tried to run, it gives the following error.

[EMAIL PROTECTED] ROOT]# java ./jdbc
Exception in thread main java.lang.NoClassDefFoundError: ./jdbc
   at gnu.java.lang.MainThread.run() (/usr/lib64/libgcj.so.6.0.0)
Caused by: java.lang.ClassNotFoundException: ./jdbc
   at java.lang.Class.forName(java.lang.String, boolean,
   java.lang.ClassLoader) (/usr/lib64/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib64/libgcj.so.6.0.0)
[EMAIL PROTECTED] ROOT]#

can some body help me.

Regards


Sarathy

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html


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



Re: Desperate for help with isapi_redirect.dll

2006-02-12 Thread Mark Thomas
David Thielen wrote:
 3.I consistently get the following in the isapi_redirect.log file
 (removed duplicates):
 
 [Fri Jan 27 12:40:39 2006] [error] HttpExtensionProc::jk_isapi_plugin.c
 (1029): could not get a worker for name ajp13
 
 [Fri Jan 27 13:53:06 2006] [info]  ajp_send_request::jk_ajp_common.c (1178):
 Socket 616 is not connected any more (errno=-1)
 
 [Fri Jan 27 13:53:06 2006] [info]  ajp_send_request::jk_ajp_common.c (1225):
 All endpoints are disconnected or dead
 
 [Fri Jan 27 13:53:06 2006] [info]  ajp_service::jk_ajp_common.c (1749):
 Sending request to tomcat failed,  recoverable operation attempt=1
 
 [Fri Jan 27 13:53:07 2006] [info]  jk_open_socket::jk_connect.c (444):
 connect to 127.0.0.1:8009 failed with errno=61
 
 [Fri Jan 27 13:53:07 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
 (889): Failed opening socket to (127.0.0.1:8009) with (errno=61)
 
 [Fri Jan 27 13:53:07 2006] [info]  ajp_send_request::jk_ajp_common.c (1248):
 Error connecting to the Tomcat process.
 
 [Fri Jan 27 13:53:08 2006] [error] ajp_service::jk_ajp_common.c (1758):
 Error connecting to tomcat. Tomcat is probably not started or is listening
 on the wrong port. worker=ajp13w failed 
 
 [Fri Jan 27 13:53:08 2006] [error] HttpExtensionProc::jk_isapi_plugin.c
 (1022): service() failed

Hmm. 61 is connection refused according to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp

Have a look a Mladen's reply to a similar problem:
http://marc.theaimsgroup.com/?l=tomcat-userm=102553922207529w=2

It essentially says, set
worker.ajp13.cachesize=100

Looking at the docs
(http://tomcat.apache.org/connectors-doc/config/workers.html) the
default cachesize value for IIS is ten. I am pretty sure this is
because non-server versions of windows limit the number of incoming
connections to 10. On a server edition of Windows there is no limit so
 this will need to be higher.

Mark


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



RE: java.lang.Object cannot be resolved

2006-02-12 Thread Caldarale, Charles R
 From: Sebastian Funk [mailto:[EMAIL PROTECTED] 
 Subject: Re: java.lang.Object cannot be resolved
 
 I set $JAVA_HOME to /usr/lib/jdk, it's a link to /usr/lib/jdk1.5.0_05.

JAVA_HOME has no effect on compilations; the Tomcat startup scripts use
it to find the installed JRE/JDK, but the standard Java launchers (e.g.,
java, javac) don't use it.

 But without rt.jar in -cp it doesn't work. My whole javac-line is:
   'sudo javac -cp 
 /home/tomcat/tomcat/common/lib/servlet-api.jar:/home/ 
 tomcat/mysql-connector-java-3.1.11-bin.jar:/usr/lib/jdk/jre/lib/ 
 rt.jar:.'

Do you really need sudo here?  Perhaps that's creating some issues.

What happens if you try to compile a simple Hello World program,
without anything specified for -cp?  (Try it with and without sudo to
see if that makes a difference.)

What environment variables do you have set?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: install tomcat under linux (java problem)

2006-02-12 Thread Caldarale, Charles R
 From: Hannes Hein [mailto:[EMAIL PROTECTED] 
 Subject: install tomcat under linux (java problem)
 
 I try to install tomcat in the way it is described here:
 http://tomcat.apache.org/tomcat-5.5-doc/setup.html

Note that this section is for running Tomcat as a daemon; does Tomcat
run properly on your system when using the standard script (startup.sh)?
See RUNNING.txt in the Tomcat home directory.

 configure: error: installation or configuration problem: javac cannot
 compile

Can you run javac by itself to compile a simple program?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: install tomcat under linux (java problem)

2006-02-12 Thread Hannes Hein
Initially it was a java installation problem because I used the  
jdk...rpm.bin file from sun that in fact doesn't work with debian ( see:  
http://www.linuxquestions.org/questions/showthread.php?t=108638 ). I had  
to use the jdk...bin file, now java runs correctly.



From: Hannes Hein [mailto:[EMAIL PROTECTED]
Subject: install tomcat under linux (java problem)

I try to install tomcat in the way it is described here:
http://tomcat.apache.org/tomcat-5.5-doc/setup.html


Note that this section is for running Tomcat as a daemon; does Tomcat
run properly on your system when using the standard script (startup.sh)?
See RUNNING.txt in the Tomcat home directory.


I know that this is for running Tomcat as a daemon, and I want Tomcat to  
run as a daemon.



Can you run javac by itself to compile a simple program?


Yes. javac runs correctly.

The problem 'configure: error: installation or configuration problem:  
javac cannot compile' is solved now as java runs correctly, but it still  
doesn't compile the sources and I have absolutely no idea why (see  
attached file for make output).


hannes
callisto:/srv/apache-tomcat-5.5.15/bin/jsvc-src# make
make -C native all
make[1]: Entering directory `/srv/apache-tomcat-5.5.15/bin/jsvc-src/native'
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\i386\ 
-I/usr/local/java/jdk1.5.0_06/include 
-I/usr/local/java/jdk1.5.0_06/include/linux -Wall -Wstrict-prototypes -c 
jsvc-unix.c -o jsvc-unix.o
In Datei, eingefügt von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/stdio.h:34:21: stddef.h: Datei oder Verzeichnis nicht gefunden
In Datei, eingefügt von /usr/include/stdio.h:36,
von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/bits/types.h:31:20: stddef.h: Datei oder Verzeichnis nicht gefunden
In Datei, eingefügt von /usr/include/libio.h:32,
von /usr/include/stdio.h:72,
von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/_G_config.h:14:20: stddef.h: Datei oder Verzeichnis nicht gefunden
In Datei, eingefügt von /usr/include/_G_config.h:24,
von /usr/include/libio.h:32,
von /usr/include/stdio.h:72,
von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/wchar.h:48:20: stddef.h: Datei oder Verzeichnis nicht gefunden
In Datei, eingefügt von /usr/include/gconv.h:28,
von /usr/include/_G_config.h:44,
von /usr/include/libio.h:32,
von /usr/include/stdio.h:72,
von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/wchar.h:48:20: stddef.h: Datei oder Verzeichnis nicht gefunden
In Datei, eingefügt von /usr/include/_G_config.h:44,
von /usr/include/libio.h:32,
von /usr/include/stdio.h:72,
von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/gconv.h:31:20: stddef.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/_G_config.h:44,
 from /usr/include/libio.h:32,
 from /usr/include/stdio.h:72,
 from jsvc.h:20,
 from jsvc-unix.c:17:
/usr/include/gconv.h:72: error: Syntaxfehler before size_t
/usr/include/gconv.h:88: error: Syntaxfehler before size_t
/usr/include/gconv.h:97: error: Syntaxfehler before size_t
/usr/include/gconv.h:174: error: Syntaxfehler before size_t
/usr/include/gconv.h:177: error: Syntaxfehler before '}' token
In file included from /usr/include/libio.h:32,
 from /usr/include/stdio.h:72,
 from jsvc.h:20,
 from jsvc-unix.c:17:
/usr/include/_G_config.h:47: error: field `__cd' has incomplete type
/usr/include/_G_config.h:50: error: field `__cd' has incomplete type
In Datei, eingefügt von /usr/include/stdio.h:72,
von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/libio.h:53:21: stdarg.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/stdio.h:72,
 from jsvc.h:20,
 from jsvc-unix.c:17:
/usr/include/libio.h:351: error: Syntaxfehler before size_t
/usr/include/libio.h:360: error: Syntaxfehler before size_t
/usr/include/libio.h:464: error: Syntaxfehler before __gnuc_va_list
/usr/include/libio.h:466: error: Syntaxfehler before __gnuc_va_list
/usr/include/libio.h:468: error: Syntaxfehler before _IO_sgetn
/usr/include/libio.h:468: error: Syntaxfehler before size_t
In file included from jsvc.h:20,
 from jsvc-unix.c:17:
/usr/include/stdio.h:302: error: Syntaxfehler before size_t
/usr/include/stdio.h:309: error: Syntaxfehler before size_t
/usr/include/stdio.h:337: error: Syntaxfehler before __gnuc_va_list
/usr/include/stdio.h:342: error: Syntaxfehler before __gnuc_va_list
/usr/include/stdio.h:345: error: Syntaxfehler before __gnuc_va_list
/usr/include/stdio.h:351: error: Syntaxfehler before size_t

Re: install tomcat under linux (java problem)

2006-02-12 Thread Hannes Hein

Hi,


From: Hannes Hein [mailto:[EMAIL PROTECTED]
Subject: install tomcat under linux (java problem)

I try to install tomcat in the way it is described here:
http://tomcat.apache.org/tomcat-5.5-doc/setup.html


Note that this section is for running Tomcat as a daemon; does Tomcat
run properly on your system when using the standard script (startup.sh)?
See RUNNING.txt in the Tomcat home directory.


sorry I forgot to tell you that tomcat runs properly if I use the  
startup.sh script.


I have just the daemon compile error problem now.

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



Re: install tomcat under linux (java problem)

2006-02-12 Thread Wolfgang Hackl

Hallo Hannes!

Hannes Hein wrote:


Yes. javac runs correctly.


jsvc is a C program so you don't need a java compiler for building it.

The problem 'configure: error: installation or configuration problem:  
javac cannot compile' is solved now as java runs correctly, but it 
still  doesn't compile the sources and I have absolutely no idea why 
(see  attached file for make output).


[...]



callisto:/srv/apache-tomcat-5.5.15/bin/jsvc-src# make
make -C native all
make[1]: Entering directory `/srv/apache-tomcat-5.5.15/bin/jsvc-src/native'
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\i386\ 
-I/usr/local/java/jdk1.5.0_06/include -I/usr/local/java/jdk1.5.0_06/include/linux -Wall 
-Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o
In Datei, eingefügt von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/stdio.h:34:21: stddef.h: Datei oder Verzeichnis nicht gefunden

[...]

For those who don't speak German: Datei oder Verzeichnis nicht 
gefunden translates to File or directory not found. My guess is that 
something is wrong with your C development tools. Perhaps the 
configure-script could not find your headers as there are no entries in 
the gcc output containing something like -I/usr/include. Are you sure 
you have your libraries set up properly?


Check whether your compiler works by compiling following program:
--
#include stdio.h
int main(){printf(works\n);}
--
Command line: cc -o c-test c-test.c

Try to clean your source tree and rerun ./configure.

Kind regards,
Wolfgang

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



Re: install tomcat under linux (java problem)

2006-02-12 Thread Hannes Hein

Hallo Wolfgang,

there is no longer a java problem (sorry but the thread began with that  
problem).



 callisto:/srv/apache-tomcat-5.5.15/bin/jsvc-src# make
make -C native all
make[1]: Entering directory  
`/srv/apache-tomcat-5.5.15/bin/jsvc-src/native'
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\i386\  
-I/usr/local/java/jdk1.5.0_06/include  
-I/usr/local/java/jdk1.5.0_06/include/linux -Wall -Wstrict-prototypes  
-c jsvc-unix.c -o jsvc-unix.o

In Datei, eingefügt von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/stdio.h:34:21: stddef.h: Datei oder Verzeichnis nicht  
gefunden

[...]

For those who don't speak German: Datei oder Verzeichnis nicht  
gefunden translates to File or directory not found. My guess is that  
something is wrong with your C development tools. Perhaps the  
configure-script could not find your headers as there are no entries in  
the gcc output containing something like -I/usr/include. Are you sure  
you have your libraries set up properly?


Check whether your compiler works by compiling following program:
--
#include stdio.h
int main(){printf(works\n);}
--
Command line: cc -o c-test c-test.c


I tryed your simple code and in fact is seems to be a problem with the  
header files.

That means the libraries aren't set up properly.

But I always used SuSE Linux before, and SuSE is very easy and does  
anything necessary for you, so my problem is now: I don't know which  
libaries I have to install to compile the tomcat daemon.


Hannes

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



Re: install tomcat under linux (java problem)

2006-02-12 Thread Parsons Technical Services
May I suggest you start a new thread (new email) with the appropriate 
subject?
It helps prevent the erroneous replies as well as helps in future searches 
through the achieves. Additionally many list members watch the threads by 
the subject and may be ignoring this thread and yet have the answer to your 
current problem.



- Original Message - 
From: Hannes Hein [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, February 12, 2006 4:10 PM
Subject: Re: install tomcat under linux (java problem)



Hallo Wolfgang,

there is no longer a java problem (sorry but the thread began with that 
problem).



 callisto:/srv/apache-tomcat-5.5.15/bin/jsvc-src# make
make -C native all
make[1]: Entering directory 
`/srv/apache-tomcat-5.5.15/bin/jsvc-src/native'


cc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\i386\  -I/usr/local/java/jdk1.5.0_06/include 
  -I/usr/local/java/jdk1.5.0_06/include/linux -Wall -Wstrict-prototypes  
 -c jsvc-unix.c -o jsvc-unix.o

In Datei, eingefügt von jsvc.h:20,
von jsvc-unix.c:17:
/usr/include/stdio.h:34:21: stddef.h: Datei oder Verzeichnis nicht 
gefunden

[...]

For those who don't speak German: Datei oder Verzeichnis nicht 
gefunden translates to File or directory not found. My guess is that 
something is wrong with your C development tools. Perhaps the 
configure-script could not find your headers as there are no entries in 
the gcc output containing something like -I/usr/include. Are you sure 
you have your libraries set up properly?


Check whether your compiler works by compiling following program:
--
#include stdio.h
int main(){printf(works\n);}
--
Command line: cc -o c-test c-test.c


I tryed your simple code and in fact is seems to be a problem with the 
header files.

That means the libraries aren't set up properly.

But I always used SuSE Linux before, and SuSE is very easy and does 
anything necessary for you, so my problem is now: I don't know which 
libaries I have to install to compile the tomcat daemon.


Hannes

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







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



Suppress Servlet-Engine header info

2006-02-12 Thread Jo Pfeffer
Hi all.

In the Apache config, you can change the ServerTokens directive from
Full to Prod to suppress the amount of information sent with the HTTP
headers - a good idea for a production system to hide the implementation
details. e.g. instead of sending the full info, such as 'Server:
Apache/2.0.49 (Win32) mod_ssl/2.0.49 OpenSSL/0.9.7d mod_jk/1.2.4', with
the Prod setting it only sends 'Server: Apache'.

I was just wondering if there is such an option for tomcat. Currently it
is sending 'Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet
2.2; Java 1.3.1_07; Windows 2000 5.0 x86; java.vendor=Sun Microsystems
Inc.)' - can I change the config so that it just sends something like
'Servlet-Engine: Tomcat Web Server' or similar?

Thanks for your help!
Jo.

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



RE: Suppress Servlet-Engine header info

2006-02-12 Thread Caldarale, Charles R
 From: Jo Pfeffer [mailto:[EMAIL PROTECTED] 
 Subject: Suppress Servlet-Engine header info
 
 can I change the config so that it just sends something like
 'Servlet-Engine: Tomcat Web Server' or similar?

More modern versions of Tomcat support the server attribute on the HTTP
Connector tag, and you can use this to send whatever string you'd
like.  However, the version you're using is over five years old, so I
have no idea if it includes such niceties.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: tomcat + certificate

2006-02-12 Thread Saravana Kumar

Duan, Nick wrote:

 Without knowing the details of your problem (you may want to provide a
 stack trace next time), I think the problem is in the java client.  Did
 you use JSSE to implement the client?  The java sockets for accessing
 http are not the same as https.
 
 ND

Duan,

Thanks for the help.

Below is the stack trace of the java client i use:

javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
at
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
at
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
at ClientRequest.communicateGA(ClientRequest.java:46)
at ClientRequest.main(ClientRequest.java:24)
Caused by: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
to find valid certification path to requested target
at
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
at
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
at sun.security.validator.Validator.validate(Validator.java:203)
at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
at
com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:840)
... 12 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
at
java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
at
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
... 17 more


I got this while i tried to connect with the sample servlet that comes with
tomcat. Is that enough?

Below is the snippet of the code i use:

URL url = new
URL(https://myserver:8443/servlets-examples/servlet/HelloWorldExample);
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(conn 
.getOutputStream());

Where am i doing wrong? I guess the problem is with client(as you pointed
already) but unable to figure out the exact problem. The client and server
both are in the same system.

regds,
SK

 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Saravana Kumar
 Sent: Friday, February 10, 2006 2:29 AM
 To: users@tomcat.apache.org
 Subject: tomcat + certificate
 
 Hi,
 
 I am running a tomcat server running here. We have a servlet container
 hosted in the server. The servlet is called from a java client program
 and
 is working fine(http).
 
 Then i following the instructions from the tomcat documentation page i
 installed a self signed certificate. The site now shows up with the
 certificate from the browser.
 
 The problem is while running the java client and connecting to the
 server(https) the program gives out error(connection timed out/SSL
 handshake ... etc).
 
 Hope i am not raising a dumb question here. What is wrong with my setup?
 Any
 pointers. Some one said we have to install apache also. Is that so? Is
 it
 possible to make tomcat handle the certificates itself and free the
 servlet
 from that.
 
 BTW, i am running on FC4, with tomcat version 5.5.12.
 
 
 TIA,
 SK
 
 
 

Encrypting ajp13 traffic

2006-02-12 Thread Akoulov, Alexandre
Hi all,

I am wondering if there is a way encrypt the traffic between apache and tomcat 
when they talk to each other on ajp13. 

All suggestions are welcome.



Kind regards,

Sasha. 

-Original Message-
From: Ian Buzer [mailto:[EMAIL PROTECTED]
Sent: Saturday, 11 February 2006 2:44 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat - blank page problem


 Webpages seem to be loading then usually blank page 
  comes(totaly blank no error messages) on high traffic.

I suspect this could either be your redirector cachesize is not large enough
(the number of threads that the redirector will accept from IIS) or tomcat
is not able to respond to all the threads that are being passed through to
it.

Both these will show up in the isapi redirector logs.

Cache size is set in /conf/workers.properties

Tomcat threads are set in /conf/server.xml (maxThreads etc. on the AJP
connector)

Ian


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


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



Suggestion for documentation update about jvmRoute

2006-02-12 Thread Fred K
Hi:

(I am not sure if this is the right forum for this message, please let
me know otherwise.)

In the documentation:
http://tomcat.apache.org/tomcat-5.5-doc/config/engine.html

jvmRoute

Identifier which must be used in load balancing scenarios to enable
session affinity. The identifier, which must be unique across all Tomcat
5 servers which participate in the cluster, will be appended to the
generated session identifier, therefore allowing the front end proxy to
always forward a particular session to the same Tomcat 5 instance.

I would suggest an addition alike:

For session affinity when using the JK load balancer, this
identifier must match the corresponding worker's name defined in the JK
workers.properties configuration.

Regards - Fred


Tomcat5.15 basic setup question

2006-02-12 Thread Bob Hartung

Hi all,
  I am new to java and Tomcat.
  I have the following situation:
 FC4 server behind PIX box.  Internal address 10.x.x.x.
 Outside address resolves to mirc.[website].[suffix]

  I have deployed a java application called MIRC and it works fine at 
the server console.
  From the same network, I can access all functions with 
http://10.x.x.x:80.
  From the outside world I can access the main page with 
http://mirc.[website].[suffix]:8080


  The problem is when I select a function on the entry page that sends 
me to another jsp in the application.  Because the application suggested 
that i hard code the local address, 10.x.x.x, when I do try to access 
another page the url is returned as 
http://mirc.10.x.x.x.com:8080/mirc/Login, for instance. 
mirc.10.x.x.x.com:8080 cannot resolve.


  I though of changing the address in server.xml to localhost:8080 but 
that too will not resolve from the outside world.


  My question is were if the mass of documentation for Tomcat should I 
start looking for the answer of how to configure this so it will work 
both from within my office and from the outside world?


Thanks for pointers!

Bob

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



Re: Encrypting ajp13 traffic

2006-02-12 Thread Parsons Technical Services

Sasha,

There are several ways to accomplish this, and I think it has been mentioned 
on the list before but I don't remember a best way if it was decided there 
is one.


Options include:
VPN
IPSec (part of VPN)
ssh
isolated lan segment (if feasible, IE your side of network)

There may already be something out there. If so, someone here will know.

Doug

- Original Message - 
From: Akoulov, Alexandre [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, February 12, 2006 11:01 PM
Subject: Encrypting ajp13 traffic


Hi all,

I am wondering if there is a way encrypt the traffic between apache and 
tomcat when they talk to each other on ajp13.


All suggestions are welcome.



Kind regards,

Sasha.

-Original Message-
From: Ian Buzer [mailto:[EMAIL PROTECTED]
Sent: Saturday, 11 February 2006 2:44 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat - blank page problem



Webpages seem to be loading then usually blank page
 comes(totaly blank no error messages) on high traffic.


I suspect this could either be your redirector cachesize is not large enough
(the number of threads that the redirector will accept from IIS) or tomcat
is not able to respond to all the threads that are being passed through to
it.

Both these will show up in the isapi redirector logs.

Cache size is set in /conf/workers.properties

Tomcat threads are set in /conf/server.xml (maxThreads etc. on the AJP
connector)

Ian


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


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





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



Re: Tomcat5.15 basic setup question

2006-02-12 Thread Parsons Technical Services

Bob,

Not a very good application if they are doing that. Hard coding things such 
as IP addresses is just asking for headaches.


I take it that you have a link or a button with an action that is sending 
you to the desired page.
Remove the http://mirc.10.x.x.x.com:8080/mirc/; and simply leave the 
Login in place. If you need to move up a step on the content you can use 
../ in front of the desire destination or add the folder to move down a 
level.


Now to unravel the confusion.
If at the root of the app:
href=test.jsp will link you to the jsp page test in the root of the app.
href=night/select.jsp will link you to the select jsp in the folder called 
night that is in the root.
Once in the night folder and you need to link to something in the root then 
use:

href=../test.jsp

The same works for actions on forms.

Doug


- Original Message - 
From: Bob Hartung [EMAIL PROTECTED]

To: Tomcat Users users@tomcat.apache.org
Sent: Sunday, February 12, 2006 11:24 PM
Subject: Tomcat5.15 basic setup question



Hi all,
  I am new to java and Tomcat.
  I have the following situation:
 FC4 server behind PIX box.  Internal address 10.x.x.x.
 Outside address resolves to mirc.[website].[suffix]

  I have deployed a java application called MIRC and it works fine at the 
server console.
  From the same network, I can access all functions with 
http://10.x.x.x:80.
  From the outside world I can access the main page with 
http://mirc.[website].[suffix]:8080


  The problem is when I select a function on the entry page that sends me 
to another jsp in the application.  Because the application suggested that 
i hard code the local address, 10.x.x.x, when I do try to access another 
page the url is returned as http://mirc.10.x.x.x.com:8080/mirc/Login, for 
instance. mirc.10.x.x.x.com:8080 cannot resolve.


  I though of changing the address in server.xml to localhost:8080 but 
that too will not resolve from the outside world.


  My question is were if the mass of documentation for Tomcat should I 
start looking for the answer of how to configure this so it will work both 
from within my office and from the outside world?


Thanks for pointers!

Bob

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







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



RE: Desperate for help with isapi_redirect.dll

2006-02-12 Thread David Thielen
Hello;

Ok, I upped the cachesize and now have a new problem

First, it seems to not write all of the log entries. The final line is:
[Sun Feb 12 21:14:08 2006] [warn]  jk_uri_worker_map.c (42

Second, I am now getting this:
[Sun Feb 12 13:34:23 2006] [error] jk_isapi_plugin.c (1049): could not get a
worker for name ajp13
[Sun Feb 12 14:31:39 2006] [error] jk_isapi_plugin.c (1049): could not get a
worker for name ajp13
[Sun Feb 12 15:29:22 2006] [error] jk_isapi_plugin.c (1049): could not get a
worker for name ajp13
[Sun Feb 12 21:14:01 2006] [warn]  jk_uri_worker_map.c (429): Uri
http://www.page2stage.com is invalid. Uri must start with /
[Sun Feb 12 21:14:02 2006] [warn]  jk_uri_worker_map.c (429): Uri
http://www.page2stage.com/reviews/index.htm is invalid. Uri must start with
/
... more page2stage.com pages listed ...

Which is not in my properties file at all. I just tried
http://www.page2stage.com/reviews/index.htm and other pages and it comes up
ok. But it looks like it is having a problem with this.

This is with Mark's latest version - not the official release.

Uriworkermap.properties is:
/store/*=ajp13w
/store=ajp13w
/track/*=ajp13w
/forums/*=ajp13w
/forums=ajp13w
/WindwardReportsServlet/*=ajp13w
/WindwardReportsJsp/*=ajp13w
/*.jsp=ajp13w
/*.faces=ajp13w

Any ideas?

Thanks - dave


 
David Thielen
www.windwardreports.com
303-499-2544

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 12, 2006 11:43 AM
To: Tomcat Users List
Subject: Re: Desperate for help with isapi_redirect.dll

David Thielen wrote:
 3.I consistently get the following in the isapi_redirect.log file
 (removed duplicates):
 
 [Fri Jan 27 12:40:39 2006] [error] HttpExtensionProc::jk_isapi_plugin.c
 (1029): could not get a worker for name ajp13
 
 [Fri Jan 27 13:53:06 2006] [info]  ajp_send_request::jk_ajp_common.c
(1178):
 Socket 616 is not connected any more (errno=-1)
 
 [Fri Jan 27 13:53:06 2006] [info]  ajp_send_request::jk_ajp_common.c
(1225):
 All endpoints are disconnected or dead
 
 [Fri Jan 27 13:53:06 2006] [info]  ajp_service::jk_ajp_common.c (1749):
 Sending request to tomcat failed,  recoverable operation attempt=1
 
 [Fri Jan 27 13:53:07 2006] [info]  jk_open_socket::jk_connect.c (444):
 connect to 127.0.0.1:8009 failed with errno=61
 
 [Fri Jan 27 13:53:07 2006] [info]
ajp_connect_to_endpoint::jk_ajp_common.c
 (889): Failed opening socket to (127.0.0.1:8009) with (errno=61)
 
 [Fri Jan 27 13:53:07 2006] [info]  ajp_send_request::jk_ajp_common.c
(1248):
 Error connecting to the Tomcat process.
 
 [Fri Jan 27 13:53:08 2006] [error] ajp_service::jk_ajp_common.c (1758):
 Error connecting to tomcat. Tomcat is probably not started or is listening
 on the wrong port. worker=ajp13w failed 
 
 [Fri Jan 27 13:53:08 2006] [error] HttpExtensionProc::jk_isapi_plugin.c
 (1022): service() failed

Hmm. 61 is connection refused according to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/win
sock/windows_sockets_error_codes_2.asp

Have a look a Mladen's reply to a similar problem:
http://marc.theaimsgroup.com/?l=tomcat-userm=102553922207529w=2

It essentially says, set
worker.ajp13.cachesize=100

Looking at the docs
(http://tomcat.apache.org/connectors-doc/config/workers.html) the
default cachesize value for IIS is ten. I am pretty sure this is
because non-server versions of windows limit the number of incoming
connections to 10. On a server edition of Windows there is no limit so
 this will need to be higher.

Mark


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



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



Re: Tomcat5.15 basic setup question

2006-02-12 Thread Bob Hartung

Doug,
 Think I have it.  I'll test it out tomorrow.

Bob

Parsons Technical Services wrote:

Bob,

Not a very good application if they are doing that. Hard coding things 
such as IP addresses is just asking for headaches.


I take it that you have a link or a button with an action that is 
sending you to the desired page.
Remove the http://mirc.10.x.x.x.com:8080/mirc/; and simply leave the 
Login in place. If you need to move up a step on the content you can 
use ../ in front of the desire destination or add the folder to move 
down a level.


Now to unravel the confusion.
If at the root of the app:
href=test.jsp will link you to the jsp page test in the root of the app.
href=night/select.jsp will link you to the select jsp in the folder 
called night that is in the root.
Once in the night folder and you need to link to something in the root 
then use:

href=../test.jsp

The same works for actions on forms.

Doug


- Original Message - From: Bob Hartung [EMAIL PROTECTED]
To: Tomcat Users users@tomcat.apache.org
Sent: Sunday, February 12, 2006 11:24 PM
Subject: Tomcat5.15 basic setup question



Hi all,
  I am new to java and Tomcat.
  I have the following situation:
 FC4 server behind PIX box.  Internal address 10.x.x.x.
 Outside address resolves to mirc.[website].[suffix]

  I have deployed a java application called MIRC and it works fine at 
the server console.
  From the same network, I can access all functions with 
http://10.x.x.x:80.
  From the outside world I can access the main page with 
http://mirc.[website].[suffix]:8080


  The problem is when I select a function on the entry page that sends 
me to another jsp in the application.  Because the application 
suggested that i hard code the local address, 10.x.x.x, when I do try 
to access another page the url is returned as 
http://mirc.10.x.x.x.com:8080/mirc/Login, for instance. 
mirc.10.x.x.x.com:8080 cannot resolve.


  I though of changing the address in server.xml to localhost:8080 but 
that too will not resolve from the outside world.


  My question is were if the mass of documentation for Tomcat should I 
start looking for the answer of how to configure this so it will work 
both from within my office and from the outside world?


Thanks for pointers!

Bob

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







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





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



Tomcat5 - Postgres-Datasource - SSL

2006-02-12 Thread FEZ (Felix Kratzer)

Hi list!

It's driving me crazy!

I need to connect to a postgres db using SSL!

This is is how i daclare the datasource:
ResourceParams name=ScharfeStoccerDb
parameter
nameurl/name
valuejdbc:postgresql://111.22.3.44/myWorkingDb?ssl/value
/parameter
parameter
namepassword/name
valuemyWorkingPassword/value
/parameter
parameter
namemaxActive/name
value4/value
/parameter
parameter
namemaxWait/name
value5000/value
/parameter
parameter
namedriverClassName/name
valueorg.postgresql.Driver/value
/parameter
parameter
nameusername/name
valuemyWorkingUser/value
/parameter
parameter
namemaxIdle/name
value2/value
/parameter
/ResourceParams

Up to now (on my test-server using jboss) I could declare a special (so 
called NonValidatin~) SSL Factory.

Now I want to drop this concecpt and really use SSL!
So I:
- got the certificate of 111.22.3.44
- created a keystore at conf/keystore
- imported the crtificate with the alias 111.22.3.44
- Added
  -Djavax.net.ssl.trustStore=sys:/myWorkingPath/conf/keystore \
  -Djavax.net.ssl.trustStorePassword=myWorkingKeystorePassword \
  to my catalina.sh

when I access my servlet I get a LOT of exception wich all have the cause:
Caused by: java.security.InvalidAlgorithmParameterException: the 
trustAnchors parameter must be non-empty
at 
java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183)



So, what did I do wrong?
OR: How can I tell tomcat to use the NonValidatingSSLFactory?

FEZ
(Felix Kratzer)


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