[JBoss Seam] - Re: Seam and Hibernate
by sradford
Anyone have an answer to this. I'm trying to simple take one of the example applications (seam-messages) and use MySql instead of HQL, but in the log on server start-up I get:
...
23:46:53,140 INFO [Version] Hibernate EntityManager 3.2.0.CR1
23:46:53,140 INFO [Version] Hibernate Annotations 3.2.0.CR1
23:46:53,187 INFO [Ejb3Configuration] found EJB3 Entity bean: org.jboss.seam.example.messages.Message
23:46:53,187 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceU
nitInfo.getNewTempClassLoader() is null.
23:46:53,250 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
23:46:53,250 INFO [Ejb3Configuration] [PersistenceUnit: messageDatabase] no META-INF/orm.xml found
23:46:53,281 INFO [AnnotationBinder] Binding entity from annotated class: org.jboss.seam.example.messages.Message
23:46:53,375 INFO [EntityBinder] Bind entity org.jboss.seam.example.messages.Message on table Message
23:46:53,484 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSo
urceConnectionProvider
23:46:53,484 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
23:46:54,078 INFO [SettingsFactory] RDBMS: MySQL, version: 5.0.20-nt
23:46:54,078 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.12 ( $Date: 2005-1
1-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ )
23:46:54,093 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
23:46:54,093 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFac
tory
23:46:54,093 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBoss
TransactionManagerLookup
23:46:54,093 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
23:46:54,093 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
23:46:54,093 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
23:46:54,093 INFO [SettingsFactory] JDBC batch size: 15
23:46:54,093 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
23:46:54,093 INFO [SettingsFactory] Scrollable result sets: enabled
23:46:54,093 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
23:46:54,093 INFO [SettingsFactory] Connection release mode: auto
23:46:54,093 INFO [SettingsFactory] Maximum outer join fetch depth: 2
23:46:54,093 INFO [SettingsFactory] Default batch fetch size: 1
23:46:54,093 INFO [SettingsFactory] Generate SQL with comments: disabled
23:46:54,093 INFO [SettingsFactory] Order SQL updates by primary key: disabled
23:46:54,093 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
23:46:54,093 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
23:46:54,093 INFO [SettingsFactory] Query language substitutions: {}
23:46:54,093 INFO [SettingsFactory] Second-level cache: enabled
23:46:54,093 INFO [SettingsFactory] Query cache: disabled
23:46:54,093 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
23:46:54,093 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
23:46:54,093 INFO [SettingsFactory] Structured second-level cache entries: disabled
23:46:54,093 INFO [SettingsFactory] Echoing all SQL to stdout
23:46:54,093 INFO [SettingsFactory] Statistics: disabled
23:46:54,093 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
23:46:54,093 INFO [SettingsFactory] Default entity-mode: pojo
23:46:54,093 INFO [SessionFactoryImpl] building session factory
23:46:54,109 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
23:46:54,109 INFO [SchemaExport] Running hbm2ddl schema export
23:46:54,109 INFO [SchemaExport] exporting generated schema to database
23:46:54,125 ERROR [SchemaExport] Unsuccessful: create table Message (id bigint not null auto_increment, read bit not null,
text text not null, title varchar(100) not null, datetime datetime not null, primary key (id))
23:46:54,125 ERROR [SchemaExport] You have an error in your SQL syntax; check the manual that corresponds to your MySQL serv
er version for the right syntax to use near 'read bit not null, text text not null, title varchar(100) not null, datetime da
t' at line 1
23:46:54,125 INFO [SchemaExport] Executing import script: /import.sql
23:46:54,125 ERROR [SchemaExport] schema export unsuccessful
org.hibernate.JDBCException: Error during import script execution
at org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:256)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:190)
Any help MUCH appreciated,
Sean
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964203#3964203
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964203
19 years, 9 months
[JBoss Seam] - Synchronizing to DataModels
by urswag
I need a mechanism to synchronize the inner dataTable with the outer one.
anonymous wrote :
| <h:dataTable var="assort" value="#{assortments}">
| <h:column>
| <h:outputLink value="">
| <h:outputText value="#{assort.description}" />
| </h:outputLink>
| <h:dataTable var="category" value="#{assortmentCategories}">
| <h:column>
| <h:outputLink value="">
| <h:outputText value="#{category.description}" />
| </h:outputLink>
| </h:column>
| </h:dataTable>
| </h:column>
| </h:dataTable>
|
|
The list assortmentCategories is depended from the current element in the assortments list. I need a mechanism to update it.
Assortment Session Bean code part
anonymous wrote :
|
| @DataModel
| private List assortments;
|
| ....
|
| @Factory("assortments")
| public void findAssortments() {
|
| .....
| }
|
|
AssortmentCategory Session Bean code part
anonymous wrote :
|
| @DataModel
| private List assortmentCategories;
|
| ....
|
| @Factory("assortmentCategories")
| public void findCategories() {
|
| ....
| }
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964199#3964199
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964199
19 years, 9 months