-
1. Re: Database tables not automatically generated
louise_za Feb 14, 2006 1:42 AM (in response to louise_za)expanded error report:
08:29:06,812 INFO [Environment] Hibernate 3.1
08:29:06,843 INFO [Environment] hibernate.properties not found
08:29:06,875 INFO [Environment] using CGLIB reflection optimizer
08:29:06,921 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
08:29:07,359 INFO [STDOUT] [Server@3c33d3]: Database [index=0, id=0, db=file:C:\jboss-portal-2.2.0-bundled\server\default\data\hypersonic\default, alias=] opened sucessfully in 734 ms.
08:29:07,375 INFO [STDOUT] [Server@3c33d3]: Startup sequence completed in 1266 ms.
08:29:07,390 INFO [STDOUT] [Server@3c33d3]: 2006-02-14 08:29:07.390 HSQLDB server 1.8.0 is online
08:29:07,406 INFO [STDOUT] [Server@3c33d3]: To close normally, connect and execute SHUTDOWN SQL
08:29:07,406 INFO [STDOUT] [Server@3c33d3]: From command line, use [Ctrl]+[C] to abort abruptly
08:29:07,437 INFO [Configuration] configuring from url: file:/C:/jboss-portal-2.2.0-bundled/server/default/deploy/jboss-portal.sar/conf/hibernate/user/hibernate.cfg.xml
08:29:07,468 INFO [Configuration] Reading mappings from resource: conf/hibernate/user/domain.hbm.xml
08:29:07,562 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.user.UserImpl -> jbp_users
08:29:07,625 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.user.UserImpl.dynamic -> jbp_user_prop
08:29:07,656 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.user.UserImpl.roles -> jbp_role_membership
08:29:07,656 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.user.PreferencesGroupImpl -> jbp_user_prefs_group
08:29:07,671 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.user.PreferencesImpl -> jbp_user_pref_set
08:29:07,687 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.user.PreferenceImpl -> jbp_user_pref
08:29:07,703 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.user.PreferenceImpl.strings -> jbp_user_pref_value
08:29:07,750 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.role.RoleImpl -> jbp_roles
08:29:07,781 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.role.RoleImpl.users -> jbp_role_membership
08:29:07,812 INFO [Configuration] Configured SessionFactory: null
08:29:07,843 INFO [Configuration] configuring from url: file:/C:/jboss-portal-2.2.0-bundled/server/default/deploy/jboss-portal.sar/conf/hibernate/instance/hibernate.cfg.xml
08:29:07,875 INFO [Configuration] Reading mappings from resource: conf/hibernate/instance/domain.hbm.xml
08:29:07,921 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.model.instance.InstanceImpl -> JBP_INSTANCE
08:29:07,984 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.model.instance.PreferenceImpl -> JBP_INSTANCE_PREF
08:29:08,000 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.model.instance.PreferenceImpl.strings -> JBP_INSTANCE_PREF_VALUE
08:29:08,015 INFO [Configuration] Configured SessionFactory: null
08:29:08,046 INFO [Configuration] configuring from url: file:/C:/jboss-portal-2.2.0-bundled/server/default/deploy/jboss-portal.sar/conf/hibernate/portal/hibernate.cfg.xml
08:29:08,078 INFO [Configuration] Reading mappings from resource: conf/hibernate/portal/domain.hbm.xml
08:29:08,140 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.model.portal.ObjectNode -> JBP_OBJECT_NODE
08:29:08,390 INFO [HbmBinder] Mapping class: org.jboss.portal.core.impl.model.portal.PortalObjectImpl -> JBP_PORTAL_OBJECT
08:29:08,406 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.model.portal.PortalObjectImpl.declaredProperties -> JBP_PORTAL_OBJECT_PROPS
08:29:08,531 INFO [HbmBinder] Mapping joined-subclass: org.jboss.portal.core.impl.model.portal.ContextImpl -> JBP_CONTEXT
08:29:08,546 INFO [HbmBinder] Mapping joined-subclass: org.jboss.portal.core.impl.model.portal.PortalImpl -> JBP_PORTAL
08:29:08,546 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.model.portal.PortalImpl.modes -> JBP_PORTAL_MODE
08:29:08,562 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.impl.model.portal.PortalImpl.windowStates -> JBP_PORTAL_WINDOW_STATE
08:29:08,593 INFO [HbmBinder] Mapping joined-subclass: org.jboss.portal.core.impl.model.portal.PageImpl -> JBP_PAGE
08:29:08,593 INFO [HbmBinder] Mapping joined-subclass: org.jboss.portal.core.impl.model.portal.WindowImpl -> JBP_WINDOW
08:29:08,609 INFO [Configuration] Configured SessionFactory: null
08:29:08,750 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=PortalDS' to JNDI name 'java:PortalDS'
08:29:08,765 INFO [JCRCMS] Starting JCR CMS.
08:29:08,812 INFO [RepositoryUtil] Repository 'repotest' Name Not Found
08:29:11,281 INFO [Configuration] configuring from url: file:/C:/jboss-portal-2.2.0-bundled/server/default/deploy/jboss-portal.sar/conf/hibernate/security/hibernate.cfg.xml
08:29:11,312 INFO [Configuration] Reading mappings from resource: conf/hibernate/security/domain.hbm.xml
08:29:11,343 INFO [HbmBinder] Mapping class: org.jboss.portal.core.security.store.SecurityPolicy -> JBP_SECURITY_POLICY
08:29:11,359 INFO [HbmBinder] Mapping class: org.jboss.portal.core.security.store.HbmSecurityConstraint -> JBP_SECURITY_CONSTRAINT
08:29:11,390 INFO [Configuration] Configured SessionFactory: null
08:29:14,265 INFO [Configuration] processing extends queue
08:29:14,265 INFO [Configuration] processing collection mappings
08:29:14,281 INFO [HbmBinder] Mapping collection: org.jboss.portal.core.security.store.SecurityPolicy.constraints -> JBP_SECURITY_CONSTRAINT
08:29:14,296 INFO [Configuration] processing association property references
08:29:14,312 INFO [Configuration] processing foreign key constraints
08:29:14,359 INFO [NamingHelper] JNDI InitialContext properties:{}
08:29:14,390 INFO [DatasourceConnectionProvider] Using datasource: java:PortalDS
08:29:14,421 INFO [SettingsFactory] RDBMS: MySQL, version: 4.0.18-max-debug
08:29:14,437 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.0.11-stable ( $Date: 2004/02/04 02:47:36 $, $Revision: 1.27.2.34 $ )
08:29:14,468 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
08:29:14,484 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
08:29:14,515 INFO [NamingHelper] JNDI InitialContext properties:{}
08:29:14,531 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
08:29:14,531 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
08:29:14,546 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
08:29:14,578 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
08:29:14,578 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
08:29:14,593 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
08:29:14,609 INFO [SettingsFactory] JDBC batch size: 15
08:29:14,625 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
08:29:14,640 INFO [SettingsFactory] Scrollable result sets: enabled
08:29:14,640 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
08:29:14,671 INFO [SettingsFactory] Connection release mode: auto
08:29:14,671 INFO [SettingsFactory] Maximum outer join fetch depth: 2
08:29:14,687 INFO [SettingsFactory] Default batch fetch size: 1
08:29:14,718 INFO [SettingsFactory] Generate SQL with comments: disabled
08:29:14,718 INFO [SettingsFactory] Order SQL updates by primary key: disabled
08:29:14,734 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
08:29:14,750 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
08:29:14,765 INFO [SettingsFactory] Query language substitutions: {}
08:29:14,781 INFO [SettingsFactory] Second-level cache: enabled
08:29:14,781 INFO [SettingsFactory] Query cache: enabled
08:29:14,796 INFO [SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
08:29:14,843 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
08:29:14,875 INFO [SettingsFactory] Structured second-level cache entries: disabled
08:29:14,906 INFO [SettingsFactory] Query cache factory: org.hibernate.cache.StandardQueryCacheFactory
08:29:14,953 INFO [SettingsFactory] Statistics: disabled
08:29:14,968 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
08:29:14,984 INFO [SettingsFactory] Default entity-mode: POJO
08:29:15,359 INFO [SessionFactoryImpl] building session factory
08:29:15,406 WARN [Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/jboss-portal-2.2.0-bundled/server/default/tmp/deploy/tmp156
67ehcache.jar!/ehcache-failsafe.xml
08:29:15,546 WARN [EhCacheProvider] Could not find configuration [org.jboss.portal.core.security.store.SecurityPolicy]; using defaults.
08:29:15,968 WARN [EhCacheProvider] Could not find configuration [org.jboss.portal.core.security.store.HbmSecurityConstraint]; using defaults.
08:29:16,156 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
08:29:16,171 INFO [NamingHelper] JNDI InitialContext properties:{}
08:29:16,187 INFO [UpdateTimestampsCache] starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache
08:29:16,203 WARN [EhCacheProvider] Could not find configuration [org.hibernate.cache.UpdateTimestampsCache]; using defaults.
08:29:16,265 INFO [StandardQueryCache] starting query cache at region: org.hibernate.cache.StandardQueryCache
08:29:16,296 WARN [EhCacheProvider] Could not find configuration [org.hibernate.cache.StandardQueryCache]; using defaults.
08:29:16,328 INFO [SessionFactoryImpl] Checking 0 named queries
08:29:17,703 WARN [JDBCExceptionReporter] SQL Error: 1146, SQLState: S1000
08:29:17,703 ERROR [JDBCExceptionReporter] General error, message from server: "Table 'jbossportal.jbp_security_policy' doesn't exist"
08:29:17,796 WARN [ServiceController] Problem starting service portal:service=TreeCache,type=persistent
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
at org.hibernate.loader.Loader.list(Loader.java:2021)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at org.jboss.portal.core.hibernate.SessionFactoryBinder.doCheck(SessionFactoryBinder.java:327)
at org.jboss.portal.core.hibernate.SessionFactoryBinder.startService(SessionFactoryBinder.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)
at org.jboss.portal.common.system.AbstractJBossService.start(AbstractJBossService.java:73)
at org.jboss.portal.core.security.store.HibernateCacheLoader.startService(HibernateCacheLoader.java:72)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)
at org.jboss.portal.common.system.AbstractJBossService.start(AbstractJBossService.java:73)
at org.jboss.cache.TreeCache.createCacheLoader(TreeCache.java:1320)
at org.jboss.cache.TreeCache.startService(TreeCache.java:1088)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
at $Proxy94.start(Unknown Source)
at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:185)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
at org.jboss.Main.boot(Main.java:187)
at org.jboss.Main$1.run(Main.java:438)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: General error, message from server: "Table 'jbossportal.jbp_security_policy' doesn't exist"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:211)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:137)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1676)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
at org.hibernate.loader.Loader.doList(Loader.java:2147)
... 127 more
Can anyone help? -
2. Re: Database tables not automatically generated
julien1 Feb 14, 2006 5:20 AM (in response to louise_za)is it mysql 5 ?
-
3. Re: Database tables not automatically generated
louise_za Feb 14, 2006 9:51 AM (in response to louise_za)Hi Julien
No - it is mySQL 4.0.18. I feel as if I am missing some sort of configuration setting or file but I'm not sure what. -
4. Re: Database tables not automatically generated
noicangi Feb 14, 2006 10:27 AM (in response to louise_za)-use jdk jboss as instalation documentation says it uses jdk no VM
-check the connector its in the right directory (jboss/server/default/lib)
-check the file portal-mysql-ds.xml its configured to access your database with user and password, dont forget the permisions to the user ;)
-delete portal-hsqldb-ds.xml if you use the bundled.
i remember some days ago that happened to me when i unzip the jboss as and then added the portal........
----------------------
use the bundled:P
----------------------
hope its useful -
5. Re: Database tables not automatically generated
ivanlatysh Feb 14, 2006 11:13 AM (in response to louise_za)From provided error message it is obvious that MySQL driver has been loaded and DataSource has been bounded to JNDI.
Check if jbossportal database has any tables in it. Also check user permission for JBoss connection, and don't forget to `flush privileges` or even `flush all` after user permission has been changed.
As the last resort I would rename current database `jbossportal` or back it up (if there is any valuable data) and run Portal again to se if it will create all tables this time. -
6. Re: Database tables not automatically generated
al_kiev Mar 4, 2006 3:49 AM (in response to louise_za)The roots of the problem are in the Hibernate database dialects.
Some of the dialects does not implement proper Exception translation.
Implement custom dialect for Hibernate which would translate Exceptions with "does not exists" in description to SQLGrammarException.
The code below shows the implementation for PostgreSQL 7.3 dialectpackage org.hibernate.dialect; import org.hibernate.exception.*; public class PostgreSQLDialectWithExceptionTranslator extends PostgreSQLDialect { public PostgreSQLDialectWithExceptionTranslator(){ super(); } public SQLExceptionConverter buildSQLExceptionConverter() { ClassLoader ldr = this.getClass().getClassLoader(); Class clazz; try{ clazz = ldr.loadClass("org.hibernate.dialect.PostgresqlExceptionConverter"); PostgresqlExceptionConverter converter = (PostgresqlExceptionConverter)clazz.newInstance(); return (SQLExceptionConverter)converter; } catch (Exception e){ e.printStackTrace(); } return null; } }
package org.hibernate.dialect; import java.sql.SQLException; import org.hibernate.JDBCException; import org.hibernate.exception.ConstraintViolationException; import org.hibernate.exception.GenericJDBCException; import org.hibernate.exception.JDBCConnectionException; import org.hibernate.exception.JDBCExceptionHelper; import org.hibernate.exception.LockAcquisitionException; import org.hibernate.exception.SQLExceptionConverter; import org.hibernate.exception.SQLGrammarException; import org.hibernate.exception.ViolatedConstraintNameExtracter; public class PostgresqlExceptionConverter implements SQLExceptionConverter { private ViolatedConstraintNameExtracter extracter; public PostgresqlExceptionConverter(){ } public PostgresqlExceptionConverter(ViolatedConstraintNameExtracter extracter) { this.extracter = extracter; } public void setExtracter(ViolatedConstraintNameExtracter extracter) { this.extracter = extracter; } public JDBCException convert(SQLException sqlException, String message, String sql) { String errorMsg = sqlException.getMessage(); if ( errorMsg.endsWith("does not exist\n")){ return new SQLGrammarException( message, sqlException, sql ); } return handledNonSpecificException( sqlException, message, sql ); } protected JDBCException handledNonSpecificException(SQLException sqlException, String message, String sql) { return new GenericJDBCException( message, sqlException, sql ); } }