[
https://issues.jboss.org/browse/JBIDE-10507?page=com.atlassian.jira.plugi...
]
Dmitry Geraskov commented on JBIDE-10507:
-----------------------------------------
1. Create new SEam Web project.
2. Open created console configuration
3. Change settings:
Database Connection: check DTP connection profile is selected
Property file: <empty>
Earlier in the situation when you expand Session Factory node you got "Session
Factory error: The chosen transaction strategy requires access to JTA Transaction
Manager".
4. Change Database Connection: [Hibernate configured connection]
Earlier in the situation when you expand Session Factory or Database node you got
"Session Factory/ Reading Schema error: Could not find datasource.
Now: "Session Factory error: JDBC URL was not specified by property
hibernate.connection.url" which is much more informative.
As a user to fix this you should provide somehow information about db connection, for
example use hibernate.properties file (note you don't need any more to overwrite
datasource properties there)
Hibernate Console Configurations should try and ensure configurations
does not load JTA and other remote server options
-----------------------------------------------------------------------------------------------------------------------
Key: JBIDE-10507
URL:
https://issues.jboss.org/browse/JBIDE-10507
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: hibernate
Affects Versions: 3.3.0.M5
Reporter: Max Rydahl Andersen
Assignee: Dmitry Geraskov
Priority: Critical
Fix For: 3.3.0.Beta1
Both H3 and H4 will default to use JTA tx managers and load datasources if configured so
- i.e. JPA/EJB3 mode enables it by default.
In Seam 2 we generated a hibernate-console.properties file that sets a few properties to
"convince" H3 to not load these things.
The important properties are:
hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider
hibernate.datasource=
hibernate.transaction.manager_lookup_class=
Here are my recollection of the reasons:
hibernate.connection.provider_class needs to use DriverManager since otherwise it will
load datasources.
hibernate.datasource needs to be overwritten/set to blank to ensure it will not lookup
datasources
hiberante.transaction.manager_lookup_class needs to be overwritten/blank to ensure we
don't get:
org.hibernate.HibernateException: The chosen transaction strategy requires access to the
JTA TransactionManager
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:401)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
at
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:268)
at
org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at
org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:263)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:79)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:55)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:59)
Currently we probably just handle this when the settings are set to blank, but I think it
starts to make sense to set these always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira