Subject | GDS Exception. 335544849. Malformed string - using Hibernate/ |
---|---|
Author | Jesper B. Kiær |
Post date | 2009-11-18T13:42:11Z |
Hi
When my Play Framework web application tries to submit and save the Danish
letters "æøå" I get the error below.
Play uses Hibernate/JPA and Play uses UTF8 for all strings. So I also
used UTF8 on the Firebird database.
I have tried and changed char set to iso 8859-1 but that did not change
anything
What can I do to fix the problem?
/Jesper Kiaer
http://nevermind.dk
14:32:09,234 DEBUG ~ insert into UserData (age, created, education, email,
firstName, lastModified, lastName, pword, uuid, id) values (?, ?, ?, ?, ?,
?, ?, ?, ?, ?)
14:32:09,328 WARN ~ SQL Error: 335544849, SQLState: HY000
14:32:09,328 ERROR ~ GDS Exception. 335544849. Malformed string
14:32:09,328 ERROR ~ Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not insert:
[models.UserData]
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2285)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2678)
at
org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:312)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
at
org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:304)
at play.db.jpa.JPASupport.save(JPASupport.java:167)
at
controllers.Registration.registrationCreate(Registration.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at play.utils.Java.invokeStatic(Java.java:129)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:127)
at
play.server.HttpHandler$MinaInvocation.execute(HttpHandler.java:471)
at play.Invoker$Invocation.run(Invoker.java:176)
at
play.server.HttpHandler$MinaInvocation.run(HttpHandler.java:459)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544849.
Malformed string
at
org.firebirdsql.jdbc.AbstractPreparedStatement.internalExecute(AbstractPreparedStatement.java:730)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.executeUpdate(AbstractPreparedStatement.java:190)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at
org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2265)
... 28 more
14:32:09,328 ERROR ~ Mail error
javax.persistence.PersistenceException: insert into UserData (age,
created, education, email, firstName, lastModified, lastName, pword, uuid,
id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
at play.db.jpa.JPASupport.save(JPASupport.java:170)
at
controllers.Registration.registrationCreate(Registration.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at play.utils.Java.invokeStatic(Java.java:129)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:127)
at
play.server.HttpHandler$MinaInvocation.execute(HttpHandler.java:471)
at play.Invoker$Invocation.run(Invoker.java:176)
at
play.server.HttpHandler$MinaInvocation.run(HttpHandler.java:459)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
[Non-text portions of this message have been removed]
When my Play Framework web application tries to submit and save the Danish
letters "æøå" I get the error below.
Play uses Hibernate/JPA and Play uses UTF8 for all strings. So I also
used UTF8 on the Firebird database.
I have tried and changed char set to iso 8859-1 but that did not change
anything
What can I do to fix the problem?
/Jesper Kiaer
http://nevermind.dk
14:32:09,234 DEBUG ~ insert into UserData (age, created, education, email,
firstName, lastModified, lastName, pword, uuid, id) values (?, ?, ?, ?, ?,
?, ?, ?, ?, ?)
14:32:09,328 WARN ~ SQL Error: 335544849, SQLState: HY000
14:32:09,328 ERROR ~ GDS Exception. 335544849. Malformed string
14:32:09,328 ERROR ~ Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not insert:
[models.UserData]
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2285)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2678)
at
org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:312)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
at
org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:304)
at play.db.jpa.JPASupport.save(JPASupport.java:167)
at
controllers.Registration.registrationCreate(Registration.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at play.utils.Java.invokeStatic(Java.java:129)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:127)
at
play.server.HttpHandler$MinaInvocation.execute(HttpHandler.java:471)
at play.Invoker$Invocation.run(Invoker.java:176)
at
play.server.HttpHandler$MinaInvocation.run(HttpHandler.java:459)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544849.
Malformed string
at
org.firebirdsql.jdbc.AbstractPreparedStatement.internalExecute(AbstractPreparedStatement.java:730)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.executeUpdate(AbstractPreparedStatement.java:190)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at
org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2265)
... 28 more
14:32:09,328 ERROR ~ Mail error
javax.persistence.PersistenceException: insert into UserData (age,
created, education, email, firstName, lastModified, lastName, pword, uuid,
id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
at play.db.jpa.JPASupport.save(JPASupport.java:170)
at
controllers.Registration.registrationCreate(Registration.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at play.utils.Java.invokeStatic(Java.java:129)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:127)
at
play.server.HttpHandler$MinaInvocation.execute(HttpHandler.java:471)
at play.Invoker$Invocation.run(Invoker.java:176)
at
play.server.HttpHandler$MinaInvocation.run(HttpHandler.java:459)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
[Non-text portions of this message have been removed]