If you get "javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Value '0000-00-00' can not be represented as java.sql.Date" error
or just "Value '0000-00-00' can not be represented as java.sql.Date" error,
you have to add "zeroDateTimeBehavior=convertToNull" to your connection URI.
In jboss admin console, open “Profile > Connector > Datasources > Properties” and add this property:
key: zeroDateTimeBehavior – value: convertToNull
Open “jboss-as-x.x.x.Final\standalone\configuration\standalone.xml” and add
When starting glassfish server, if you get "Unable to start server due following issues: java.lang.NullPointerException" exception, it is probably because of the localization settings of eclipse. To change eclipse’s localization settings:
Open eclipse.ini file which is located in your eclipse installation directory (in the same folder with eclipse.exe).
Add -Duser.language=en in the bottom of your eclipse.ini.
Step #1: Increase memory by configuring “domain.xml”
In linux, it is located under /usr/share/glassfish3/glassfish/domains/domain1/config
(in windows C:\glassfish3\glassfish\domains\domain1\config)
There are two configs in domain.xml, server-config and default-config. Search for "-XX:MaxPermSize=" in server-config and set its value to 256m or higher.
Because, from the Glassfish 3.1.1 doc:
The default-config configuration is a special configuration that acts as a template for creating named configurations. Clusters and instances cannot refer to the default-config configuration. The default-config configuration can only be copied to create configurations.)
Step #2: Restart server
Navigate to /usr/share/glassfish3/bin
and run ” ./asadmin restart-domain domain1 ”
or first ” ./asadmin stop-domain domain1 ” then “./asadmin start-domain“.
If the server not responding to these commands, first kill the glassfish process to free the port on which it was running (say 8080).
For linux based os:
– open terminal and type ” -sudo netstat -npl | grep 8080 ”
– this will result in something like ” tcp6 0 0 :::8686 :::* LISTEN 10241/java ”
– then use ” kill -9 10241 ” to kill that process (10241 in this case)
– Now try to start glassfish, it should start.