Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Tomcat under 10.2

Tomcat under 10.2
Thread Tools
Fresh-Faced Recruit
Join Date: Aug 2002
Location: Tokyo
Status: Offline
Reply With Quote
Aug 30, 2002, 06:49 PM
 
Has anyone experienced trouble with Tomcat under OSX 10.2. When I startup Tomcat everything looks find, but I find that it is not running. When I try a stop/start (=restart), I get the following error message.

~/bin/stop_tomcat
Using CLASSPATH: /usr/local/jakarta-tomcat-4.0.1/bin/bootstrap.jar
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.0.1
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.0.1
Using JAVA_HOME: /usr
dyld: /usr/bin/java multiple definitions of symbol _JNI_OnLoad
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjava.jnilib(java.o) definition of _JNI_OnLoad
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libnet.jnilib(net.o) definition of _JNI_OnLoad
/usr/local/jakarta-tomcat-4.0.1/bin/catalina.sh: line 234: 507 Trace/BPT trap $JAVA_HOME/bin/java $CATALINA_OPTS -classpath $CP -Dcatalina.base=$CATALINA_BASE -Dcatalina.home=$CATALINA_HOME org.apache.catalina.startup.Bootstrap "$@" stop
     
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Sep 3, 2002, 09:24 AM
 
Tomcat works fine for me. What you are seeing are problems with a native binary which is compiled against the java runtime. Why is your java home /usr? My java home is:

/System/Library/Frameworks/JavaVM.framework/Home

...

Nevermind. I just started my tomcat (4.0.4) and it says the same thing, despite the fact that the variable is explicitly set to something else.

Did you use the instructions at Apple's dev site for this? I just noticed that they point you to /usr in the start_tomcat.sh script. Doesn't seem to make sense, but it works anyway.
     
Fresh-Faced Recruit
Join Date: Aug 2002
Location: Tokyo
Status: Offline
Reply With Quote
Sep 4, 2002, 08:19 AM
 
Originally posted by absmiths:
Tomcat works fine for me. What you are seeing are problems with a native binary which is compiled against the java runtime. Why is your java home /usr? My java home is:

/System/Library/Frameworks/JavaVM.framework/Home

...

Nevermind. I just started my tomcat (4.0.4) and it says the same thing, despite the fact that the variable is explicitly set to something else.

Did you use the instructions at Apple's dev site for this? I just noticed that they point you to /usr in the start_tomcat.sh script. Doesn't seem to make sense, but it works anyway.
Thanks for the response!! I was beginning to feel a bit alone on this problem! I've looked everywhere, and no one seems to be running into trouble. At least if they are they are not posting it.

In answer to your question, yes I did follow Apple's example posted at http://developer.apple.com/internet/java/tomcat1.html . I suspected that this /usr bit might be the problem at first, and I did actually try resetting things:

JAVA_HOME=/Library/Java/Home
and/or
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home

I just got more of the same funky messages.
     
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Sep 4, 2002, 11:28 AM
 
Can you give more details? Can you run any other Java software? Do you have any webapps installed? If so, does it start without the webapps installed.
     
Fresh-Faced Recruit
Join Date: Aug 2002
Location: Tokyo
Status: Offline
Reply With Quote
Sep 5, 2002, 06:55 AM
 
Originally posted by absmiths:
Can you give more details? Can you run any other Java software? Do you have any webapps installed? If so, does it start without the webapps installed.
Good question! I had not thought of trying any of my other java appli. I have this simple little appli for checking out urls to see if they exist or not. I've listed it below. It used to work under pre-10.2. It now throws the same error as tomcat! Great! My other apps also go nuts on me, giving me similar dyld error.

######### EXAMPLE SCRIPT #######
import java.net.*;
import java.io.*;

public class urlSearch {
public static void main(String argv[]) throws Exception{
try{
URL url = new URL("http://www.takashimaya.co.jp/mapiece/index.html");

BufferedReader bin = new BufferedReader( new InputStreamReader( url.openStream() ) );

String line;
while( ( line = bin.readLine() ) != null) {
System.out.println ( line );
}
}
catch(Exception e) {
System.out.println( e);
}
}
}


############ ERROR FROM APPLI/SCRIPT #######
dyld: java multiple definitions of symbol _JNI_OnLoad
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjava.jnilib(java.o) definition of _JNI_OnLoad
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libnet.jnilib(net.o) definition of _JNI_OnLoad
Trace/BPT trap

As for webapps, does not matter if they exist or not. I get the same result - tomcat will not startup.

My guess would be that Apple has again messed around with the way things are linked. I know that going from 10.04 to the next upgrade - whatever that version was I forget - really messed things up. I could not recompile my postgresql, php, etc. I kept getting compile errors telling me things about two-level namespace. Thanks to this trouble, I learned a bit more about flat namespace, and dynamic vs static linking.
     
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Sep 5, 2002, 10:21 AM
 
I hate to say it, but it sounds like you need to reinstall your system - maybe the Jaguar upgrade didn't go so smoothly? It really isn't as painful as it sounds, you can just do an Archive System install and preserve your users and network settings and it works pretty well.
     
Fresh-Faced Recruit
Join Date: Oct 2001
Status: Offline
Reply With Quote
Sep 5, 2002, 04:25 PM
 
Yeah, I second that, your system or java install is borked. Works fine here with 10.2
     
Fresh-Faced Recruit
Join Date: Aug 2002
Location: Tokyo
Status: Offline
Reply With Quote
Sep 10, 2002, 07:45 AM
 
Originally posted by absmiths:
I hate to say it, but it sounds like you need to reinstall your system - maybe the Jaguar upgrade didn't go so smoothly? It really isn't as painful as it sounds, you can just do an Archive System install and preserve your users and network settings and it works pretty well.
Perhaps you may be correct in your opinion, but I am getting the feeling that it is not so much a matter of needing to reinstall, as it is more a matter of Apple having screwed things around.

From what I am seeing here and there on all sort of different Mac posting forums, this dyld issue goes beyond tomcat. I've seen it in mysql and postgres just to name a few other applications running into problems that come to mind at present.
     
Fresh-Faced Recruit
Join Date: Aug 2002
Location: Tokyo
Status: Offline
Reply With Quote
Sep 21, 2002, 12:32 AM
 
Originally posted by mntamago:


Perhaps you may be correct in your opinion, but I am getting the feeling that it is not so much a matter of needing to reinstall, as it is more a matter of Apple having screwed things around.

From what I am seeing here and there on all sort of different Mac posting forums, this dyld issue goes beyond tomcat. I've seen it in mysql and postgres just to name a few other applications running into problems that come to mind at present.
Just a final update on the TC/dyld-multiple definitions error that I was getting when I went to start/stop TC - today I downloaded and installed OS X 10.2.1, along with the 2002-09-20 security update. And what do I find but to my surprise TC now mysteriously works again without a hitch!

I had been wondering whether an update might just fix my problem!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:43 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2