[Hibernate-JIRA] Updated: (HHH-1368) Transaction Manager LookUP class for Apache Geronimo Application server
by Jonas Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1368?page=c... ]
Jonas Andersen updated HHH-1368:
--------------------------------
Attachment: GeronimoTransactionManagerLookup.java
Here is a transaction lookup class for Geronimo. I have only done very limited testing so far on Geronimo 2.0.2 and the Hibernate CMTTransactionFactory behind an EJB3 SLSB with CMT.
The JNDI names should be the same for Geronimo 2.1. I have not checked earlier versions.
The names used seems to be identical to those used in the JRun4TransactionManagerLookup, so if you don't mind the name being different, at least resolving the UserTransaction and TransactionManager should be possible with that class as well.
> Transaction Manager LookUP class for Apache Geronimo Application server
> -----------------------------------------------------------------------
>
> Key: HHH-1368
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1368
> Project: Hibernate3
> Issue Type: New Feature
> Components: core
> Affects Versions: 3.0.5
> Environment: All versions, All Database platform
> Reporter: Rakesh Ranjan
> Priority: Minor
> Attachments: GeronimoTransactionManagerLookup.java
>
>
> Hibernate provides TransactionManager Lookup class for most of the J2EE application servers like Bea Weblogic, IBM Websphere, JBoss, Orion, Jrun. But there is no TransactionManager lookup class for Apache Geronimo Application server. Apache Geronimo is an emerging opensource J2EE application server. So we need to provide a TransactionManager lookup class for Apache Geronimo.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years
[Hibernate-JIRA] Created: (HHH-3200) Dialect auto-detection provides misleading error message
by Gino A Melone (JIRA)
Dialect auto-detection provides misleading error message
--------------------------------------------------------
Key: HHH-3200
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3200
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.6, 3.2.5
Environment: I'm testing with 3.2.5.ga, Windows XP SP2, and SQL Server 2000. However, I'm fairly certain this will affect any OS/DB combination.
Reporter: Gino A Melone
If the DB connection is unable to be created in org.hibernate.cfg.SettingsFactory.buildSettings(Properties props), the error message that is returned indicates "Hibernate Dialect must be explicitly set". This message is misleading. The real problem is that auto-detection can not work because the DB connection failed and the metadata could not be retrieved. A warning is issued that explains this, but production environments often disable log4j warnings for third-party packages to maintain reasonable-sized log files.
The failure to create a connection should be used to generate a useful error message. Something like:
//SQL Dialect:
Dialect dialect = determineDialect( props, databaseName, databaseMajorVersion );
settings.setDialect(dialect);
The relevant log entries are below.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years
[Hibernate-JIRA] Created: (EJB-345) compound primary/foreign key problems with nulls and NamedQuery parsing
by Reid Hartenbower (JIRA)
compound primary/foreign key problems with nulls and NamedQuery parsing
-----------------------------------------------------------------------
Key: EJB-345
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-345
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.3.2.GA
Environment: Hibernate core 3.2.6.ga, Hibernate EntityManager 3.3.2.GA, Hibernate Validator 3.0.0.GA, Hibernate Annotations 3.3.1.GA
MySQL 5.0.45 / driver jar mysql-connector-java-3.1.12-bin
Reporter: Reid Hartenbower
Attachments: test-src.zip
Hi. I have Item, Container, and Specification entities that subclass NamedThing. NamedThing uses a compound primary key which is a two-long representation of a UUID. Item has a @ManyToOne with Container and Specification, and Specification has a <String,String> properties map.
Two problems, first:
queries like "select distinct object(i) from Item i where i.specification.properties[:key] = :value" produce parse errors (these are the commented-out NamedQueries in Item); the complaint is '.' character after specification
queries like "select distinct object(i) from Item i, Specification s where i.container is null and i.specification = s and s.properties[:key] is null" in TestItem.java:61 do parse successfully but produce the exception whose stack trace is in TestItemStackTrace.txt. The hibernate sql is in hibernate-sql-output.txt; the complaint is 'java.sql.SQLException: Operand should contain 1 column(s)'
Thanks,
Reid
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years
[Hibernate-JIRA] Created: (ANN-714) @NamedQuery always gives an Exception "unexpected token" no matter what query is used
by VPC (JIRA)
@NamedQuery always gives an Exception "unexpected token" no matter what query is used
-------------------------------------------------------------------------------------
Key: ANN-714
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-714
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.1.GA
Environment: Windows XPP SP2, Weblogic Server wlserver_10.0, jdk150_11, Weblogic Workshop
Reporter: VPC
@Entity
@Table(name="CONTACT")
@NamedQueries({ @NamedQuery(name = "selectall", query = "SELECT * FROM CONTACT") })
public class Contact {
---usual setter getters----
}
@NamedQuery annotation always throws the following exception at the following line: SessionFactory sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
The stack trace of the exception is as follows:
<Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <table found: hibernatetutorial.contact>
<Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <columns: [lastname, firstname, email, id]>
<Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <foreign keys: []>
<Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.TableMetadata> <BEA-000000> <indexes: []>
<Fri Mar 21 15:14:22 EDT 2008> <Info> <org.hibernate.tool.hbm2ddl.SchemaUpdate> <BEA-000000> <schema update complete>
<Fri Mar 21 15:14:22 EDT 2008> <Trace> <org.hibernate.connection.DriverManagerConnectionProvider> <BEA-000000> <returning connection to pool, pool size: 1>
<Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking 1 named HQL queries>
<Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking named query: selectall>
<Fri Mar 21 15:14:22 EDT 2008> <Trace> <org.hibernate.engine.query.QueryPlanCache> <BEA-000000> <unable to locate HQL query plan in cache; generating (SELECT * FROM CONTACT)>
<Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.QueryTranslatorImpl> <BEA-000000> <parse() - HQL: SELECT * FROM CONTACT>
<Fri Mar 21 15:14:22 EDT 2008> <Error> <org.hibernate.hql.PARSER> <BEA-000000> <line 1:8: unexpected token: *>
<Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.ErrorCounter> <BEA-000000> <line 1:8: unexpected token: *>
org.hibernate.HibernateException: Errors in named queries: selectall
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:365)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
at hib.FirstExample.main(FirstExample.java:18)
<Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.hql.ast.AST> <BEA-000000> <--- HQL AST ---
\-[QUERY] 'query'
\-[SELECT_FROM] 'SELECT_FROM'
\-[FROM] 'FROM'
\-[RANGE] 'RANGE'
\-[IDENT] 'CONTACT'
>
<Fri Mar 21 15:14:22 EDT 2008> <Debug> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Checking 0 named SQL queries>
<Fri Mar 21 15:14:22 EDT 2008> <Error> <org.hibernate.impl.SessionFactoryImpl> <BEA-000000> <Error in named query: selectall>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years
[Hibernate-JIRA] Created: (HHH-3196) Dialect auto detection not documented?
by James Roper (JIRA)
Dialect auto detection not documented?
--------------------------------------
Key: HHH-3196
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3196
Project: Hibernate3
Issue Type: Improvement
Components: documentation
Reporter: James Roper
Priority: Trivial
The documentation says:
"You should always set the hibernate.dialect property to the correct org.hibernate.dialect.Dialect subclass for your database. If you specify a dialect, Hibernate will use sensible defaults for some of the other properties listed above, saving you the effort of specifying them manually."
Is that still correct, or is it possible that this is left over from a time when Hibernate didn't support auto detecting dialects? Because I've noticed feature requests in JIRA for auto detecting dialects that were rejected, and I've noticed other JIRA issues that talk about adding dialects to the auto detection map. What is hibernates behavior when the dialect isn't specified?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years