You need to make changes to the portal-ext.properties file to enable UTF-8 support for MySQL. The WebSynergy evaluation bundle has a portal-ext.properties file in the GlassFish install-dir/domains/domain1/applications/j2ee-modules/websynergy/WEB-INF/classes. When you are using a WebSynergy bundle which is not including samples, you have to create a portal-ext.properties file. This task describes the process to create a portal-ext.properties file, and making changes to it to enable UTF-8 support for MySQL.
Create a temporary folder. In this example, name the folder as test.
Equivalent step in the command prompt or in the terminal window of a UNIX like OS:
mkdir /tmp/test
Copy the portal-impl.jar file to the temp folder.
Equivalent step in the command prompt or in the terminal window of a UNIX like OS:
cp GlassFish install-dir/domains/domain1/application/j2ee-modules/websynergy/WEB-INF/lib/portal-impl.jar /tmp/test
Change directory to temp.
Equivalent step in the command prompt or in the terminal window of SOLARIS or any UNIX like OS:
cd /tmp/test
Extract the portal-impl.jar file.
Equivalent step in the command prompt or in the terminal window of a UNIX like OS:
jar -xvf portal-impl.jar
After unjar it will have portal.properties file in the same directory.
Open portal.properties and copy the "JDBC" property.
Create a text file (using any text editor) and name it as portal-ext.properties, and paste the "JDBC" property into it.
# # Hypersonic # jdbc.default.driverClassName=org.hsqldb.jdbcDriver jdbc.default.url=jdbc:hsqldb:lportal jdbc.default.username=sa jdbc.default.password= # # MySQL # #jdbc.default.driverClassName=com.mysql.jdbc.Driver #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding= UTF-8&useFastDateParsing=false #jdbc.default.username= #jdbc.default.password=
Comment Hypersonic (HSQL) and uncomment MySQL.
Save the portal-ext.properties file.
Copy the portal-ext.properties file and paste it to GlassFish install-dir/domains/domain1/applications/j2ee-modules/websynergy/WEB-INF/classes.
Restart GlassFish server.