Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Fedora+Tomcat+MySQL java.io.CharConversionException

Posted on 2006-06-17
4
Medium Priority
?
1,047 Views
Last Modified: 2011-10-03
Hi, I create a database connection successfully in Window but it causes "java.io.CharConversionException" in Linux.
Do I need to correct my code or install something on my server?

Here is the detail error log:

EXCEPTION

org.apache.jasper.JasperException: Exception in JSP: /scripts/appMysqlConn.jsp:4

1: <%@ page import = "java.sql.*"%>
2: <%
3:       Class.forName("org.gjt.mm.mysql.Driver").newInstance();
4:       Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/hkc?useUnicode=true&characterEncoding=UTF-8", "user", "password");
5: %>


STACKTRACE:
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(jasper5-compiler-5.5.15.jar.so)
      org.apache.jasper.servlet.JspServletWrapper.service(jasper5-compiler-5.5.15.jar.so)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(jasper5-compiler-5.5.15.jar.so)
      org.apache.jasper.servlet.JspServlet.service(jasper5-compiler-5.5.15.jar.so)
      javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.15.jar.so)

ROOT CAUSE:

javax.servlet.ServletException: Error during query: Unexpected Exception: java.io.CharConversionException message given: null

Nested Stack Trace:


** BEGIN NESTED EXCEPTION **

java.io.CharConversionException

STACKTRACE:

java.io.CharConversionException
   at gnu.gcj.convert.Input_iconv.read(libgcj.so.7)
   at java.lang.String.init(libgcj.so.7)
   at java.lang.String.<init>(libgcj.so.7)
...
0
Comment
Question by:ddlam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:pablomorales
ID: 16934455
It looks like the problem is related to the GNU gcj (Java compiler). It seems like it may not work for your application due to the use of unicode or JDK version:

http://gcc.gnu.org/onlinedocs/gcj/Limitations.html#Limitations

If you make sure that your Tomcat instance uses Sun's compiler you should not have this problem.

0
 
LVL 9

Author Comment

by:ddlam
ID: 16940073
Could you suggest any way to slove the problem?
0
 
LVL 4

Accepted Solution

by:
pablomorales earned 2000 total points
ID: 16942980
The version of Tomcat that comes with Fedora is compiled for GCJ and is compiled to native code:

http://www.webweavertech.com/costin/archives/000340.html

You will need to download Tomcat and the JDK. You can look here for the instructions:

http://tarundua.net/fc3java

Another option is to use Centos instead of Fedora.
0
 
LVL 9

Author Comment

by:ddlam
ID: 16971006
thanks a lot, It works nicely. It should be a solution for solving the fedora tomcat's limitation
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The online market is growing at an unprecedented rate and retail eCommerce sales are expected to reach $4 trillion by 2020. Yet, the profit is not just there for the taking because you have to set yourself apart from the competition.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question