I have a
thread which reads a file, parse the data line by line, and write the field values to the database.
There are some German characters in the file.
The thread runs on
JBoss application server.
When the file resides at Windows file system and JBoss also runs on Windows OS, I can see the German characters on a web page after I do a search against the database. But when the file resides at Linux file system and JBoss runs on Linux OS, the follwoing exception is thrown.
How can I fix this problem?
Any advices will help. Thank you.
12:25:38,979 ERROR [STDERR] java.io.CharConversionException: Not an ISO 8859-1 character: ���
12:25:38,980 ERROR [STDERR] at javax.servlet.ServletOutputStream.print(ServletOutputStream.java:133)
12:25:38,980 ERROR [STDERR] at javax.servlet.ServletOutputStream.println(ServletOutputStream.java:286)
12:25:38,980 ERROR [STDERR] at com.liq.contacts.COCompanyListServlet.doPost(Unknown Source)
12:25:38,980 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
12:25:38,980 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
12:25:38,980 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
12:25:38,980 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:332)
12:25:38,980 ERROR [STDERR] at com.liq.diagnostics.DiagnosticsFilter.doFilter(Unknown Source)
12:25:38,980 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:324)
12:25:38,980 ERROR [STDERR] at com.liq.login.MultiLoginFilter.doFilter(Unknown Source)
12:25:38,980 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:324)
12:25:38,980 ERROR [STDERR] at com.liq.login.WelcomePageFilter.doFilter(Unknown Source)
12:25:38,980 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:324)
12:25:38,980 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:276)
12:25:38,980 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
12:25:38,980 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1674)
12:25:38,980 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:544)
12:25:38,980 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1624)
12:25:38,981 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:875)
12:25:38,981 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:541)
12:25:38,981 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:785)
12:25:38,981 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:935)
12:25:38,981 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:802)
12:25:38,981 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:200)
12:25:38,981 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:294)
12:25:38,981 ERROR [STDERR] at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
12:25:38,981 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534)