Re: Problems Increassing -Xmx
2012/10/2, Konstantin Kolinko knst.koli...@gmail.com: 2012/10/2 Caldarale, Charles R chuck.caldar...@unisys.com: From: joel badia escolà [mailto:basto...@gmail.com] Subject: Problems Increassing -Xmx if [ -z $JAVA_OPTS ]; then JAVA_OPTS=-Djava.awt.headless=true -Xmx2000m RELEVANT fi And what happens if you don't put quotation marks around the values? Quotes are OK. It is shell scripting, not Windows one. Correct ! What is not OK: 1. The statement inside of if executes only if $JAVA_OPTS is empty. Is it empty? 2. Learn the difference between JAVA_OPTS and CATALINA_OPTS variables. You should not put such a value into JAVA_OPTS. You should not put it info both variables at the same time. And i tried to modify /usr/share/tomcat6/bin/catalina.sh like this: Don't do that; create a setenv.sh script to hold any environment variables you need to set. This solves the problem, i defined export JAVA_OPTS=$JAVA_OPTS -Xmx2000m in setenv.sh and i restarted the server. This has fixed the problem ;) Thanks a lot, Joel Badia Escolà - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problems Increassing -Xmx
Hi all, I'm trying to set up my max heap size in 2Gb but my tomcat installation ignores me :( . I'm working with GNU/Linux Debian Squeeze (Current Stable), and my tomcat version it's 6. I tried to modify my /etc/init.d/tomcat6 file adding this (I add some context for non Debian users): # Default Java options # Set java.awt.headless=true if JAVA_OPTS is not set so the # Xalan XSL transformer can work without X11 display on JDK 1.4+ # It also looks like the default heap size of 64M is not enough for most cases # so the maximum heap size is set to 128M if [ -z $JAVA_OPTS ]; then JAVA_OPTS=-Djava.awt.headless=true -Xmx2000m RELEVANT fi And i tried to modify /usr/share/tomcat6/bin/catalina.sh like this: if [ -z $JPDA_OPTS ]; then JPDA_OPTS=-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND fi CATALINA_OPTS=$CATALINA_OPTS $JPDA_OPTS -Xmx2000m In two cases i can't obtain favorable results, and it seems that tomcat ignores me (YES I RESTART THE SERVER) and i get java.lang.OutOfMemoryError: Java heap space error. Can you help me, Thanks, Joel Badia Escolà - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problems loading external jar in my app !
I tried all the things that you expose, but without results :( Is it possible that the Debian installation disable tomcat auto WEB-INF checking? If it's possible, can you tell me where I can find this magic configuration file? I have another theory, Is it possible that the jar i'm using needs some extra configuration for tomcat recognition? I'm working with weka if this can help you ! Greetings, Joel 2012/9/13, Christopher Schultz ch...@christopherschultz.net: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vishwanath, On 9/13/12 10:04 AM, Vishwanath Washimkar wrote: Joel, At first look it seemed to me odd, but I google search I got this link. It seems that you have not provided ' ; ' at the end of your import. That's not how it is supposed to work. Either there is a bug in Tomcat or there is something else wrong. I would be very surprised if adding a ; after the last import fixed this problem. Also test it out putting the jar in the webapps/lib or tomcat-root/lib. That first one is the right solution. I need to research on aptitude installation though. Aptitude is a package manager for Debian-based OSs. The following link might help. http://stackoverflow.com/questions/1858463/java-error-only-a-type-can-be-imported-xyz-resolves-to-a-package I think the ; is a red herring. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBSUCUACgkQ9CaO5/Lv0PAoygCfckVCwmJvMuhSEpgPWqOdQggP 20MAn0LeFCrswdcu6vI0zXzA8VbbHYZE =s0oX -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problems loading external jar in my app !
The placement it's correct i'm using Debian and my app it's deployed in /var/lib/tomcat6/webapps/ROOT/DiseaseDiscovery (where $CATALINA_BASE=/var/lib/tomcat6). This is the full tree of my webapp: . |-- disease_discover.jsp |-- disease_discover.jsp~ |-- disease_simpts.jsp |-- disease_simpts.jsp~ |-- get_diseases.jsp |-- get_diseases.jsp~ |-- get_simpts.jsp |-- get_simpts.jsp~ |-- images | |-- icona.png | |-- icona.xcf | |-- menu_background.png | `-- menu_background.xcf |-- index.html |-- index.html~ |-- make_completions.jsp |-- make_completions.jsp~ |-- make_diagnosis.jsp |-- make_diagnosis.jsp~ |-- make_disease_completions.jsp |-- make_disease_completions.jsp~ |-- prediction_data | |-- rt-test-nonoise-20.model | `-- tmp_test.arff |-- scripts | |-- diseasediscover.js | |-- diseasediscover.js~ | |-- disease_simpts.js | |-- disease_simpts.js~ | |-- jquery.js | |-- main.js | |-- main.js~ | |-- simpt_diseases.js | `-- simpt_diseases.js~ |-- simpt_diseases.jsp |-- simpt_diseases.jsp~ |-- styles | |-- basic_style.css | `-- basic_style.css~ `-- WEB-INF |-- classes `-- lib `-- weka.jar Spelling matters. WEB-INF is in uppercase and lib is in lowercase [...] I think that it's correct. As you can see i respect the lower and upper cases ! Thank's and best regards, Joel Badia Escolà 2012/9/18, Konstantin Kolinko knst.koli...@gmail.com: 2012/9/18 joel badia escolà basto...@gmail.com: I tried all the things that you expose, but without results :( Is it possible that the Debian installation disable tomcat auto WEB-INF checking? If it's possible, can you tell me where I can find this magic configuration file? 1. It is not possible to disable loading libraries from WEB-INF/lib and classes from WEB-INF/classes, as that is required by the Servlet specification. Spelling matters. WEB-INF is in uppercase and lib is in lowercase, and the full path is ${CATALINA_BASE}/webapps/${web application name}/WEB-INF/lib The mapping between web application names and their URLs is explained in the Context chapter of the Configuration Reference. 2. How do you deploy your application into Tomcat? 3. Note that the examples application that is included with the official Apache Tomcat distributive has several libraries in it: jstl.jar, standard.jar. 4. http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problems loading external jar in my app !
1. The ROOT web application is the wrong place for your files. All web applications are independent. The ROOT application is just one of them. Perfect with this i solve the problem ;) 2. You have not read the wikipedia article I'm not sure if I understand completely the full article, because as you notice my english skills are some limited (sorry i'm working too for fix it :P). But I think that one response like that, if I understood, it's correct? Best Regards and thanks everyone that helps me, Joel Badia Escolà - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fwd: Problems loading external jar in my app !
Hello everyone, i have a problem with my jsp app for adding external jars. First of all I have tried the same code and app directory structure in netbeans ide built-in tomcat and works fine, but when i try to serve my app in my tomcat installation (installed using aptitude) it seems that it's impossible to locate the external jar. Only with this code: %@page import=weka.classifiers.trees.RandomTree % % RandomTree t = new RandomTree(); out.println(); out.println(It works); % I get this error message: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 6 in the generated java file Only a type can be imported. weka.classifiers.trees.RandomTree resolves to a package An error occurred at line: 6 in the jsp file: /DiseaseDiscover/make_diagnosis.jsp RandomTree cannot be resolved to a type 3: %@page import=weka.classifiers.trees.RandomTree % 4: 5: % 6: RandomTree t = new RandomTree(); 7: out.println(); 8: out.println(It works); 9: % I tried to put weka.jar in all this directories my-app/WEB-INF/lib/ /var/lib/tomcat6/common/ /var/lib/tomcat6/server/ /usr/share/tomcat6/lib/ In all directories I get the same error message. Greetings, Joel - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org