About Tomcat running

Source: Internet
Author: User
Tags xms apache tomcat

About Tomcat running problems ....
Reward score: 50-resolution time:
I cannot display it when running my website. The following error message is displayed. What can I do ....

Type exception report

Message

Description the server encountered an internal error () that prevented it from fulfilling this request.

Exception

Org. Apache. Jasper. jasperexception:/index. jsp (2, 0) the value for the usebean class attribute mybean. Fun is invalid.
Org. Apache. Jasper. servlet. jspservletwrapper. handlejspexception (jspservletwrapper. Java: 512)
Org. Apache. Jasper. servlet. jspservletwrapper. Service (jspservletwrapper. Java: 377)
Org. Apache. Jasper. servlet. jspservlet. servicejspfile (jspservlet. Java: 314)
Org. Apache. Jasper. servlet. jspservlet. Service (jspservlet. Java: 264)
Javax. servlet. http. httpservlet. Service (httpservlet. Java: 802)

Root Cause

Org. Apache. Jasper. jasperexception:/index. jsp (2, 0) the value for the usebean class attribute mybean. Fun is invalid.
Org. Apache. Jasper. compiler. defaulterrorhandler. jsperror (defaulterrorhandler. Java: 39)
Org. Apache. Jasper. compiler. errordispatcher. Dispatch (errordispatcher. Java: 405)
Org. Apache. Jasper. compiler. errordispatcher. jsperror (errordispatcher. Java: 146)
Org. Apache. Jasper. compiler. Generator $ generatevisitor. Visit (generator. Java: 1174)
Org. Apache. Jasper. compiler. node $ usebean. Accept (node. Java: 1116)
Org. Apache. Jasper. compiler. node $ nodes. Visit (node. Java: 2163)
Org. Apache. Jasper. compiler. node $ vismonitor. visitbody (node. Java: 2213)
Org. Apache. Jasper. compiler. node $ visitor. Visit (node. Java: 2219)
Org. Apache. Jasper. compiler. node $ root. Accept (node. Java: 456)
Org. Apache. Jasper. compiler. node $ nodes. Visit (node. Java: 2163)
Org. Apache. Jasper. compiler. generator. Generate (generator. Java: 3320)
Org. Apache. Jasper. compiler. compiler. generatejava (compiler. Java: 198)
Org. Apache. Jasper. compiler. compiler. Compiler (compiler. Java: 295)
Org. Apache. Jasper. compiler. compiler. Compiler (compiler. Java: 276)
Org. Apache. Jasper. compiler. compiler. Compiler (compiler. Java: 264)
Org. Apache. Jasper. jspcompilationcontext. Compile (jspcompilationcontext. Java: 563)
Org. Apache. Jasper. servlet. jspservletwrapper. Service (jspservletwrapper. Java: 305)
Org. Apache. Jasper. servlet. jspservlet. servicejspfile (jspservlet. Java: 314)
Org. Apache. Jasper. servlet. jspservlet. Service (jspservlet. Java: 264)
Javax. servlet. http. httpservlet. Service (httpservlet. Java: 802)

Note the full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
Question added: I am really anxious and eager to answer the question right away.
If I solve it for me, I will continue to add points ....
Questioner: Nicholas _ Qj-Jianghu rookie level 4
Best Answer
What should I add ~~~

I want to answer your question ~ 'There may be a rescue solution in a similar situation (maybe not in my own mind)

1. The environment variable java_home is not set in Tomcat configuration file. bash_profile. The specific setting method is as follows:
Java_home =/home/tomcat/j2sdk1.4.2 _ 08 (the actual JDK installation path shall prevail)
Export java_home
Classpath =/home/tomcat/j2sdk1.4.2 _ 08/lib/tools. jar:/home/tomcat/j2sdk1.4.2 _ 08/lib/dt. Jar
Export classpath

2. In the tomcat configuration file. bash_profile, there is a space after the equal sign "=" of the java_home and classpath variable values, which makes the path unrecognizable.

3. in the bin directory of Tomcat, Catalina. the Tomcat memory parameter configuration in the sh file is too large and exceeds the total available memory of the machine. modify it to the appropriate value. The modified parameter is java_opts = "-xms50m-xmx60m"

4. Port ing is performed on the firewall so that the backend login port is not the real server publishing port. Correct: When the login information is published to the backend management, use the originally set port number on the server.

5. Modify the i18n file under/etc/sysconfig/. The two lines are as follows:
Lang = "zh_cn.gb18030"
Language = "zh_cn.gb18030: zh_cn.gb2312: zh_cn"
To:
Lang = "zh_cn.gbk"
Language = "zh_cn.gbk: zh_cn.gb18030: zh_cn.gb2312: zh_cn"

6.
6.1. Open the doscommand window
6.22. Enter the bin path of Tomcat (the Tomcat path should not contain Chinese characters or spaces)
6.3. Execute service. Bat install. Note: There is no vertical line in the middle of the space. The service is installed.
6.4.go to the Tomcat directory and double-click at5w.exe.
6.5. In the pop-up management interface, click the Java tab to view:
A: Does the Java Virtual Machine Column Record the path of the Java Virtual Machine (JVM. dll path). If not, click the select button on the right to find/JRE/bin/Server/JVM In the JDK path. DLL
B: whether the class path has been recorded in the Java classpath column, which includes two aspects: one is the Tomcat startup package, which should point to the bin/Bootstrap under tomcat. jar, the second is the JDK toolkit, pointing to/lib/tools in the JDK installation path. jar. If the two paths are not complete, enter the actual installation path of Tomcat and JDK. Otherwise, the Tomcat service cannot be started successfully.
NOTE: If JDK has been correctly installed in advance, all the above parameters will work properly.
6.6 The Tomcat service can be stopped and started in both Windows Service Management and tomcat5w.exe.
6.7. to uninstall the Tomcat service, open the DOS command window, go to the bin path of Tomcat (the Tomcat path should not contain Chinese characters or spaces), and run the service. bat remove. Note: There is no vertical line in the middle of a space. The service is uninstalled.

8.
. Installation documentation on: http://java.sun.com/j2se/1.4.2/install-solaris.html
8.2. Be sure to install the Solaris SDK with a dedicated patch package in the http://sunsolve.sun.com/pub-cgi/show.pl? Target = patches/j2se download patch.
8.3 install the patch: unzip j2se_solaris_9_recommended.zip to/var/SADM/patch
8. 4. Run:./install_cluster
8.5.zcat j2sdk-1_4_2_08-solaris-sparc.tar.Z | tar-xf-
8. 6. Remove j2sdk1.3: pkgrm sunwj3dmo sunwj3man sunwj3dev sunwj3rt
8.7.pkgadd-D. sunwj3cfg sunwj3dev sunwj3dmo sunwj3jmp sunwj3man
Sunwj3rt
8.8. Note that you must install the 32-bit JDK before installing the 64-bit JDK.

9
Tomcat requires the Tomcat user to have the corresponding permissions on some directories and files. All directories should have the permission to read, write, and execute (Browse). jsp and class files should have at least the read permission, some files require write permissions. The following lists known files that require read and write permissions:
$ Catalina_home/logs all files
$ Catalina_home/work all files
$ Catalina_home/publish/main/count.txt File
$ Catalina_home/publish/chatroom/resource all. xml files
Write permission is required for all uploaded image directories.
How to change the file directory permission: execute the following command to set all the files and directories under tomcat installation to ensure execution, but not very secure.
9.1. Set Tomcat parent directory/opt to allow all users to read and write:
Chmod 777 [parent directory of Tomcat]
9.2. Set Tomcat as the owner of all files in the Tomcat 5.0.28 directory:
Chown-r Tomcat [tomcat installation directory]
9.3. Set the owner (Tomcat) of all files and directories under Tomcat 5.0.28 to have read and write permissions.
Chmod 700-r/opt/tomcat5.0.28

10. All. Sh files in the bin directory should be set with the execution permission. The command is:
Chmod 777 [file name]

11. it may be the previous execution. /shutdown. when the sh file closes tomcat, The started Java Process is not stopped, and the process is still listening to the port used by Tomcat, or another tomcat is running, server. the listening port in the XML file conflicts with the current tomcat.
Run the following command to check whether the current system has a listening port (8080 -- webcache, 90 -- www or HTTP ).
11.1. list all ports being monitored by the system and the bound address netstat-l
11.2. Find all processes in the current system, and the MPs queue symbol filters the output to display rows containing Java strings
PS-A | grep Java
Output: PID tty time proc
1021? 00:00:00 Java
11.3. End a specified process:
Kill [process number]
11.4. Force a process to be killed:
Kill-9 [process number]
If it is determined that it is not a conflict caused by other Tomcat operations or there is no Java Process running, you can run the startup. Sh file again to start Tomcat.

12
12.1. Edit the server. xml file in the conf directory under the tomcat installation directory
VI server. xml
12.2. A line of user name parameters of the Tomcat database is found:
/Username
Set
Username
Vcmtest
The value of a segment changes the valid account of the database.
12. 3. Find the Tomcat database user name parameter line:
/Password
Set
Password
Vcmtest
Change the logon password of the database
12. 4. Find the Tomcat database user name parameter line:
/URL
Set
Username
JDBC: oracle_clob: thin: @ // 192.168.9.6: 1521/orcl.tcl.com
The value of a segment changes the IP address of the database and the service name of the Oracle database to a correct value.

12.5. Edit the Catalina. Sh file in the bin directory under the tomcat installation directory.
VI Catalina. Sh
12.6 find the Tomcat memory Parameter Line:/java_opts
12.7. Change the two parameters in the java_opts = "-XMS 1024 M-xmx 1520 M" line based on the actual memory size of the server:
-XMS is the initial memory for Tomcat startup. Generally, the idle memory is available after the server is started, minus 100 MB.
-Xmx indicates the maximum memory usage of Tomcat. Generally, it indicates that the idle memory is available after the server is started, minus 50 MB.
Note: The preceding two parameters are related to the access performance of Tomcat, but must be set based on the actual memory of the server.

12. 8. Edit the server. xml file in the conf directory under the tomcat installation directory.
VI server. xml
12.9. Find the Tomcat memory parameter segment:
/Maxthreads
12.10. Change the three parameters in the maxthreads = "450" minsparethreads = "100" maxsparethreads = "300" section based on the actual memory size of the server:
Maxthreads is the maximum number of Tomcat threads, which can be set to 400 ~ 800
Minsparethreads is the minimum number of Tomcat shared threads. It can be set to 100.
Maxsparethreads is the maximum number of Tomcat shared threads. Generally, it can be set to the maximum number of threads minus 50.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.