RedHatLinux network server architecture practice (9)

Source: Internet
Author: User
Article Title: RedHatLinux network server architecture practice (9 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Common error 4: Invalid authorization specification
  
500 Servlet Exception
Java. SQL. SQLException: Invalid authorization specification: Access denied
For user: 'hongze @ ns. langkey. loc '(Using password: YES)
At org. gjt. mm. mysql. MysqlIO. init (MysqlIO. java: 330)
At org. gjt. mm. mysql. Connection. connectionInit (Connection. java: 261)
At org. gjt. mm. mysql. jdbc2.Connection. connectionInit (Connection. java: 89)
At org. gjt. mm. mysql. Driver. connect (Driver. java: 167)
At java. SQL. DriverManager. getConnection (DriverManager. java: 517)
At java. SQL. DriverManager. getConnection (DriverManager. java: 177)
At _ cnmysql _ jsp. _ jspService (/cnmysql. jsp: 5)
At com. caucho. jsp. JavaPage. service (JavaPage. java: 74)
At com. caucho. jsp. Page. subservice (Page. java: 485)
At com. caucho. server. http. FilterChainPage. doFilter (FilterChainPage. java: 176)
At com. caucho. server. http. Invocation. service (Invocation. java: 278)
At com. caucho. server. http. CacheInvocation. service (CacheInvocation. java: 129)
At com. caucho. server. http. RunnerRequest. handleRequest (RunnerRequest. java: 338)
At com. caucho. server. http. RunnerRequest. handleConnection (RunnerRequest. java: 270)
At com. caucho. server. TcpConnection. run (TcpConnection. java: 140)
At java. lang. Thread. run (Thread. java: 484)
  
Resin 2.0.5 (built Thu Nov 15 17:56:24 PST 2001)
  
The reason may be:
1. The host name, database name, account, or password entered in the source code is incorrect;
2. If the database name, account, and password are correct, the host name does not match;
3. If you use a data source to connect to the database, check whether the data source settings and source code names are entered correctly.
  
Solution:
1. See Resin install and Server test;
2. Note: The database connection is determined not only by the account and password, but by the host name, database name, user name, and password.
  
Common error 5: Invalid authorization specification
  
500 Servlet Exception
Java. lang. AbstractMethodError
At _ cnmysql _ jsp. _ jspService (/cnmysql. jsp: 11)
At com. caucho. jsp. JavaPage. service (JavaPage. java: 74)
At com. caucho. jsp. Page. subservice (Page. java: 485)
At com. caucho. server. http. FilterChainPage. doFilter (FilterChainPage. java: 176)
At com. caucho. server. http. Invocation. service (Invocation. java: 278)
At com. caucho. server. http. CacheInvocation. service (CacheInvocation. java: 129)
At com. caucho. server. http. RunnerRequest. handleRequest (RunnerRequest. java: 338)
At com. caucho. server. http. RunnerRequest. handleConnection (RunnerRequest. java: 270)
At com. caucho. server. TcpConnection. run (TcpConnection. java: 140)
At java. lang. Thread. run (Thread. java: 484)
  
Resin 2.0.5 (built Thu Nov 15 17:56:24 PST 2001)
  
The reason may be:
  
1. The JDK version you installed is so low that the JDBC version is not 2.0;
2. The larger possibility is that your driver does not support JDBC2.0. JDBC only provides an abstract class interface, which requires the driver to be implemented as the actual body class.
  
Solution:
1. Upgrade JDK. My advice is the is j2sdk-1_3_1_01-linux-i386.bin. See the Jvm install section;
2. Replace the database driver, you are likely to use mysql_comp.jar, replace it with a mm.mysql-2.0.4-bin.jar.zip.
  
Common Error 6: Chinese garbled characters
  
Possible causes:
When installing the operating system, you did not select the i18n simplified package and did not process it in the source file.
Solution:
1. Add the following line to your JSP source code in Html mode:
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
2. JSP Method 1:
<% @ Page contentType = "text/html; charSet = gb2312" %>
3. JSP Method 2:
In general, using Resin as a JSP engine does not require this method, and I have never used it. This tedious method can be used only when using something like Tomcat, however, this method also has its advantages, that is, it improves the portability of the program and won't be garbled without changing the system or engine.
<%
String chs = "this method is certainly acceptable! ";
Byte [] bchs = chs. getBytes ();
Out. print (new String (bchs, "8859_1 "));
%>
  
Related Article

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.