File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes problem in integrating Apache with Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "problem in integrating Apache with Tomcat" Watch "problem in integrating Apache with Tomcat" New topic
Author

problem in integrating Apache with Tomcat

Radhika Reddy
Ranch Hand

Joined: Oct 31, 2002
Posts: 30
I am using Apache 1.3 and Tomcat 5.0.19 on Solaris 5.8 sparc.
I am trying to do integration using mod_jk2.
Tomcat is running fine as standalone.
Apache is running fine with default settings.
I built apache using --enable-module=so
I got mod jk2 source from apache site and built it as per documents.
Finally I got mod_jk2.so file in /jk/build/jk2/apache13/mod_jk2.so.
Then copied mod_jk2.so into apache/libexec folder. added LoadModule jk2_module libexec/mod_jk2.so line and AddModule mod_jk2.c in httpd.conf file. Then tried to start apache server. Its throwing this error.

Cannot load /usr/local/apache/libexec/mod_jk2.so into server: ld.so.1: /usr/local/apache/bin/httpd: fatal libgcc_s.so.1: Open failed: No such file or directory /usr/local/apache/bin/apachectl start: httpd could not be started. I know still I have to do workers2.properties configs. But first I want to make sure mod_jk2.so is loaded fine into http server.

I don't know what I am missing. I will appreciate if somebody help me out in this.

Thanks,
Radhika
Scott Dunbar
Ranch Hand

Joined: Sep 23, 2004
Posts: 245
Where is your GCC installed, /usr/local? You will probably want /usr/local/lib on your LD_LIBRARY_PATH. If your GCC is in a different place (and specifically the directory where libgcc_s.so.1 is installed) put that directory on your LD_LIBRARY_PATH environment variable instead.


<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
Radhika Reddy
Ranch Hand

Joined: Oct 31, 2002
Posts: 30
my GCC is installed at different place so I added libgcc_s.so.1 path to LD_LIBRARY_PATH. Now I am getting different error saying
Cannot load /usr/local/apache/libexec/mod_jk2.so into server: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file /usr/local/apache/libexec/mod_jk2.so: symbol ap_server_root: referenced symbol not found
/usr/local/apache/bin/apachectl start: httpd could not be started


Thanks,
Radhika
Vani Bhat
Greenhorn

Joined: Oct 28, 2004
Posts: 15
Hello Radhika,

What is the JK2 source file u loaded. Give me full name of that package. Also there is binary for JK2 avaiable for Solaris. So please install the binary and try it. It will work. Even I had the same problem and I struggled a lot. But after installing the binary file. everything worked perfect.

Thanks,
Vani
Radhika Reddy
Ranch Hand

Joined: Oct 31, 2002
Posts: 30
Hi,

The source tar I got from apache site is jakarta-tomcat-connectors-jk2-src-current.tar. The package name is jakarta-tomcat-connectors-jk2-2.0.4-src. If you are sure that binary for Solaris works can I get URL for that? I think I tried even that but still I got some issues even with that. As everybody is saying that getting source and building is better so I started working with source.
I will appreciate if you list the steps to follow to work with binary. May be I missed something when I worked with that.

Thanks,
Radhika
Vani Bhat
Greenhorn

Joined: Oct 28, 2004
Posts: 15
its in the same sight. check ths. this is for apache 1.3
http://mirrors.isc.org/pub/apache/jakarta/tomcat-connectors/jk/binaries/solaris/

and download the native.so one donot go for EAPI.ok.
let me know if u get the problem..

Reg,
Vani
Radhika Reddy
Ranch Hand

Joined: Oct 31, 2002
Posts: 30
I got the jakarta-tomcat-connectors-jk-1.2.6-solaris8-sparc-apache-1.3.31_native.so and placed in apache/libexec folder.

added following line in httpd.conf file
LoadModule jk_module libexec/jakarta-tomcat-connectors-jk-1.2.6-solaris8-sparc-apache-1.3.31_native.so

saved the file and tried to start the server. it throwed following error.

Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/jakarta-tomcat-connectors-jk-1.2.6-solaris8-sparc-apache-1.3.31_native.so into server: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file /usr/local/apache/libexec/jakarta-tomcat-connectors-jk-1.2.6-solaris8-sparc-apache-1.3.31_native.so: symbol ap_null_cleanup: referenced symbol not found

Thanks,
Radhika
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in integrating Apache with Tomcat