hi, I am using Spring Roo to develop a project in GWT. After trying a few samples can not still persist objects in the database. Each time I restart or reload data from the tables, values disappear. This is my log.roo file
Would I be making a wrong configuration in persistence.xml file or HSQLDB Database is not recommended to deposit and maintain persistence.Code:// Spring Roo 1.1.2.RELEASE [rev fbc33bb] log opened at 2011-04-12 14:38:57 project --topLevelPackage com.despesas persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT enum type --class ~.shared.domain.Genero enum constant --name HOMEM enum constant --name MULHER entity --class ~.server.domain.Funcionario --testAutomatically field string --fieldName Nome --notNull field string --fieldName userName --sizeMin 3 --sizeMax 30 --notNull field string --fieldName departmento field reference --type Funcionario supervisor field enum --fieldName sexo --type ~.shared.domain.Genero field boolean --fieldName admin --notNull entity --class ~.server.domain.Report --testAutomatically field string --fieldName proposta field string --fieldName notas field date --fieldName criado --type java.util.Date field string --fieldName departamento field reference --type Funcionario reporter field reference --type Funcionario AprovacaoSupervisor entity --class ~.server.domain.Despesa --testAutomatically field number --type java.lang.Double montante field string --fieldName descricao field reference --type Report report field string --fieldName aprovacao field string --fieldName categoria field date --fieldName criado --type java.util.Date field string --fieldName motivoRecusa gwt setup logging setup --level INFO quit dependency add --groupId com.google.appengine --artifactId appengine-api-1.0-sdk --version 1.4.0 quit perform eclipse quit
This is my persistence.xml file
I´ve changed <property name="hibernate.hbm2ddl.auto" value="create"/> to <property name="hibernate.hbm2ddl.auto" value="update"/> after creation.Code:<?xml version="1.0" encoding="UTF-8" standalone="no"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="persistenceUnit" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> <!-- value="create" to build a new database on each run; value="update" to modify an existing database; value="create-drop" means the same as "create" but also drops tables when Hibernate closes; value="validate" makes no changes to the database --> <property name="hibernate.hbm2ddl.auto" value="update"/> <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy"/> <property name="hibernate.connection.charSet" value="UTF-8"/> <!-- Uncomment the following two properties for JBoss only --> <!-- property name="hibernate.validator.apply_to_ddl" value="false" /--> <!-- property name="hibernate.validator.autoregister_listeners" value="false" /--> </properties> </persistence-unit> </persistence>


Reply With Quote
. Try MySQL or Postgres.

