Quercus FAQ

From Resin 3.0

Revision as of 00:25, 4 February 2008 by Ferg (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

java.io.CharConversionException: illegal utf8 encoding at 0x64

java.io.CharConversionException: illegal utf8 encoding at 0x64
  at com.caucho.vfs.i18n.UTF8Reader.read(UTF8Reader.java:109)
  at com.caucho.vfs.i18n.UTF8Reader.read(UTF8Reader.java:177)
  at com.caucho.quercus.env.StringBuilderValue.append(StringBuilderValue.java:8\
04)

Quercus defaults to UTF-8 encoding for php applications. Some PHP applications use another encoding, often ISO-8859-1.

To configure the web application to use ISO-8859-1 encoding, add a res\ in-web.xml file in the ${resin.home}/webapps/WEBAPPNAME/WEB-INF directory. The resin-web.xml file configures QuercusServlet to parse .php files using ISO-8859-1 encoding, and to use ISO--8859-1 when converting binary \ data to strings.


${resin.home}/webapps/ROOT/WEB-INF/resin-web.xml

<web-app xmlns="http://caucho.com/ns/resin">
  <servlet-mapping url-pattern="*.php"
                   servlet-class="com.caucho.quercus.servlet.QuercusServlet">
    <init>
      <script-encoding>iso-8859-1</script-encoding>
      <php-ini>
        <unicode.runtime_encoding>iso-8859-1</unicode.runtime_encoding\
>
      </php-ini>
    </init>
  </servlet-mapping>
</web-app>

java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource

A link to the server could not be established
... java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource

This message is an indication that the php application is using a MySQL databas\ e, but the database driver has not been installed. The <a href="http://caucho.com/resin/doc/quercus-overview.xtp#databases">Using databases</a> section of the documentation contains download links and installation instructions for MySQL.

Personal tools