[Hibernate-JIRA] Commented: (HHH-1754) Sequence support for DB2400Dialect
by etienne massip (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1754?page=c... ]
etienne massip commented on HHH-1754:
-------------------------------------
Can't use a 'sequence' generator with i5OS v5r4 (hibernate 3.2.4sp1).
It gives a SQL0029 error (missing INTO clause) as using the "values nextval for <..>" when trying to insert a new record !!
I think this should be defined as a major bug ?
> Sequence support for DB2400Dialect
> ----------------------------------
>
> Key: HHH-1754
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1754
> Project: Hibernate3
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1.3
> Environment: Hibernate 3.1.3, IBM DB2 UDB for iSeries on i5/OS V5R3
> Reporter: Carey Evans
> Priority: Minor
> Attachments: DB2400Dialect.java
>
>
> As of i5/OS V5R3 (the operating system previously known as OS/400), DB2 supports sequences, but DB2400Dialect doesn't include support for the new functionality. This support can be modelled on DB2Dialect, except that "values ..." must be written "select ... from sysibm.sysdummy1", and the syssequences view is in the qsys2 schema.
> I don't know what impact this change would have on older versions of OS/400 that don't support sequences.
> The attached DB2400Dialect source includes sequence support, with some additional minor corrections for timestamps on i5/OS.
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (HHH-2939) Fujitsu Interstage TransactionManager Lookup Strategy
by Hideki Hara (JIRA)
Fujitsu Interstage TransactionManager Lookup Strategy
-----------------------------------------------------
Key: HHH-2939
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2939
Project: Hibernate3
Issue Type: New Feature
Components: core
Affects Versions: 3.2.0.ga
Environment: Hibernate 3 or later, Oracle 9i/10g(RDB), Fujitsu Interstage (Application Server), Windows XP/2003 (OS)
Reporter: Hideki Hara
Priority: Critical
Attachments: hiberweb2.zip
Dear Steve,
My name is Hideki Hara, I work for Fujitsu.
Fujitsu is one of IT company which provides application server software product based on J2EE spec.
This is a request about TransactionManagerLookup strategy for Fujitsu Interstage product.
I have made "org.hibernate.transaction.ISTransactionManager" class which implements "org.hibernate.transaction.TransactionManagerLookup" for Fujitsu Interstage.
It's now working well here in our environment according to my test.
Therefore is could you please register this into Hibernate organization somehow officially, if you don't mind?
----------------
package org.hibernate.transaction;
import java.util.Properties;
import javax.transaction.TransactionManager;
import org.hibernate.HibernateException;
/**
* TransactionManager lookup strategy for Fujitsu Interstage
* @author Hideki Hara
*/
public class ISTransactionManagerLookup implements TransactionManagerLookup {
/**
* @see org.hibernate.transaction.TransactionManagerLookup#getTransactionManager(Properties)
*/
public TransactionManager getTransactionManager(Properties props) throws HibernateException {
try {
Class clazz = Class.forName("com.fujitsu.interstage.transaction.ISTransactionManager");
return (javax.transaction.TransactionManager)clazz.newInstance();
}
catch (Exception e){
throw new HibernateException( "Could not obtain Interstage transaction manager instance", e );
}
}
/**
* @see org.hibernate.transaction.TransactionManagerLookup#getUserTransactionName()
*/
public String getUserTransactionName() {
return "java:comp/UserTransaction";
}
}
----------------------------
For your information, I attached a sample J2EE application with Fujitsu Interstage TransactionManagerLookup Strategy.
Please see attached.
This is for your information.
- Prerequisite:
- This is a simple Servlet (J2EE) application
- it is using Hibernate 3 on Fujitsu Interstage.
- I have removed all the JAR files under WEB-INF/lib directory considering file size.
- Data base is Oracle 9i/10g.
- JDBC Data Source name is "aaa".
- RDB Table name is "aaa" as well.
- column 1: column name "no", data type "number" nullable no, primary key
- column 2: column name "name", data type varchar2(256), nullable yes
- How to get started.
- Please extract the attached file.
- Put every single required JAR file into under WEB-INF/lib direcoty.
- antlr-2.7.6.jar
- ojdbc14.jar
- commons-collections-2.1.1.jar
- commons-logging-1.0.4.jar
- dom4j-1.6.1.jar
- hibernate3.jar
- jta.jar
- archive it with JAR command to make sample.war file.
- Deploy it into your any Workunit on Interstage.
- Access to http://localhost/sample/index.html.
- Click "submit".
- How it works.
- Fujitsu Interstage provides "com.fujitsu.interstage.transaction.ISTransactionManager" to create a new instance of TransactionManager.
- Fujitsu Interstage provides "org.hibernate.transaction.ISTransactionManagerLookup" for Fujitsu Interstage TM Lookup strategy, instead of Hibernate organization. Note that I am currently asking Hibernate organization to officially register this into your site. I want to know what to do to move forward.
- Specify "org.hibernate.transaction.ISTransactionManagerLookup" in "hibernate.transaction.manager_lookup_class" property in either hibernate.cfg.xml or hibernate.properties file.
It would be very much appreciated if you tell me what I should do to officially register this to your site. I will follow an appropreate procedure based on your requirement.
I will be waiting for your reply.
Thank you so much indeed in advance for your cooperation.
Best regards,
Hideki Hara
Sorry for inconvenience, I don't want to disturb you, but I need your help and assistance.
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (EJB-322) TransactionManager lookup for Fujitsu Interstage Application Server product
by Hideki Hara (JIRA)
TransactionManager lookup for Fujitsu Interstage Application Server product
---------------------------------------------------------------------------
Key: EJB-322
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-322
Project: Hibernate Entity Manager
Issue Type: New Feature
Components: EntityManager
Environment: Hibernate 3 or later
Reporter: Hideki Hara
Priority: Critical
Dear Sirs,
My name is Hideki Hara. I work for Fujitsu.
Fujitsu is one of biggest IT company which provides a various products including servers, PCs, middleware, network devices, etc for customers all over the world. Dare to say Fujitsu is like IBM.
I am in charge of Fujitsu Interstage Application Server product.
It's an application server product which is completely comatible with J2EE.
We have 8,000 customers in the world, and we've got 4th position in the application server market according to Gartner's report.
We have a request on Hibernate.
There are a lot of customers which would like to use Hibernate with Interstage.
But it seems that Hibernate doesn't provide TransactionManagerLookup method for Interstage product at this moment, even though you've covered rest of application server products such as JBOSS, Weblogic, Websphere, etc.
See the following URL.
http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/or...
So I need you help and assistance so that we can give it to customers.
How should I do this?
If you don't mind, please let me know.
Actually we have a pottential customer now, but we have a problem with getting instance of TransactionManager, so we are working on it to try to do something for this.
For your information, the followings are our product information.
http://www.fujitsu.com/global/services/software/interstage/appserver/
http://www.fujitsu.com/downloads/INTSTG/ApServer/APSV8-DS.pdf
- We are currently using the followings.
- Interstage Application Server V9.0 Windows
- Java EE 1.4
- Java SE 5 (JDK1.5)
- Hibernate 3 or later
Best regards,
Hideki Hara
--
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
16 years, 6 months
[Hibernate-JIRA] Commented: (HHH-1650) specific criteria generates incorrect SQL command (missing join)
by Alex Borshik (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1650?page=c... ]
Alex Borshik commented on HHH-1650:
-----------------------------------
I managed to work around this issue by setting FetchMode.JOIN on the associations:
session.createCriteria(Message.class)
.add(Restrictions.eq("language", language))
.setFetchMode("messageKey", FetchMode.JOIN)
.createCriteria("messageKey")
.add(Restrictions.isNotNull("key"))
.list();
> specific criteria generates incorrect SQL command (missing join)
> ----------------------------------------------------------------
>
> Key: HHH-1650
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1650
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.3
> Environment: 3.1.3, Oracle 9.1
> Reporter: Martin Zdila
> Priority: Minor
>
> Hello
> Mapping:
> <hibernate-mapping>
> <class name="MessageKey" table="KFE_MESSAGE_KEY">
> <id name="id" column="MESSAGE_KEY_ID" node="@id">
> <generator class="native">
> <param name="sequence">KFE_MESSAGE_KEY_ID_SEQ</param>
> </generator>
> </id>
>
> <property name="key" column="MESSAGE_KEY" not-null="false" />
>
> <map name="messages" cascade="all" inverse="true" order-by="LANGUAGE_ID" embed-xml="false">
> <key column="MESSAGE_KEY_ID" />
> <map-key type="java.lang.String" formula="LANGUAGE_ID" />
> <one-to-many class="Message" />
> </map>
> </class>
> <class name="Message" table="KFE_MESSAGE">
> <composite-id>
> <key-many-to-one name="language" column="LANGUAGE_ID" class="Language" />
> <key-many-to-one name="messageKey" column="MESSAGE_KEY_ID" class="MessageKey" />
> </composite-id>
> <property name="value" column="MESSAGE_VALUE" length="255" />
> </class>
> </hibernate-mapping>
> This doesn't work:
> session.createCriteria(Message.class) .add(Restrictions.eq("language", language)).createCriteria("messageKey").add(Restrictions.isNotNull("key")).list();
> Generated incorrect SQL command:
> select this_.LANGUAGE_ID as LANGUAGE1_2_0_, this_.MESSAGE_KEY_ID as MESSAGE2_2_0_, this_.MESSAGE_VALUE as MESSAGE3_2_0_ from KFE_MESSAGE this_ where this_.LANGUAGE_ID=? and messagekey1_.MESSAGE_KEY is not null
> Error: java.sql.SQLException: ORA-00904: "MESSAGEKEY1_"."MESSAGE_KEY": invalid identifier
> Workaround using HQL works:
> session.createQuery("FROM Message AS msg WHERE msg.messageKey.key IS NOT NULL AND msg.language = :lang").setParameter("lang", language).list();
> Tanks in advance for fixing
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (HHH-2949) StatelessSession should have an isOpen() method
by Bjørn Skogseth (JIRA)
StatelessSession should have an isOpen() method
-----------------------------------------------
Key: HHH-2949
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2949
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5, 3.1.3
Environment: Hibernate 3.1.3 (also affects 3.2.5 i believe), DB2 version 8
Reporter: Bjørn Skogseth
Priority: Minor
StatelessSession.close() throws an exception if called multiple times on the same instance, just as Session.close() does. However, as the interface does not have an isOpen() method, there is no way to check if the call is safe. This means that in code where you don't know if the session has been closed properly, but just want to make sure it is closed, you have to wrap the close() call in a try/catch block and then ignore any SessionException that is thrown by the close method. Alternatively one can cast the instance to StatelessSessionImpl and then call the isOpen method there, which is public. Neither of these solutions are satisfactory.
To resolve this, I suggest that the isOpen() method is added to the StatelessSession interface.
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (HHH-2945) SELECT COUNT(*) fails on Linux but not on Windows XP
by Thom Hehl (JIRA)
SELECT COUNT(*) fails on Linux but not on Windows XP
----------------------------------------------------
Key: HHH-2945
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2945
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Environment: Windows XP/Redhat Linux
Reporter: Thom Hehl
While working with an Informix database hosting on Linux, I tested my web application running on my windows XP workstation with the following query genereated by hibernate:
(From P6 spy)
select count(*) as col_0_0_ from POOL poolinfo0_ where poolinfo0_.DEF_DATE='2008-02-11 00:00:00.0' and poolinfo0_.DIVISION_CODE='3'
When I run this against my database, it returns the proper number every single time.
I moved my web application to our Redhat Linux environment (platform for client) and ran the application and this same query against the same database returns 0 every single time.
When I run the same query from SQuirreL on the Redhat Linux box using the same JDBC driver as the webapp uses, it returns the proper values. To me, this points to hibernate as the issue.
Here is the debugs:
64854 DEBUG org.hibernate.jdbc.AbstractBatcher | preparing statement
64856 DEBUG org.hibernate.type.CalendarType | binding '2008-02-11 00:00:00' to parameter: 1
64856 DEBUG org.hibernate.type.StringType | binding '3' to parameter: 2
64899 DEBUG org.hibernate.jdbc.AbstractBatcher | about to open ResultSet (open ResultSets: 0, globally: 0)
64899 DEBUG org.hibernate.loader.Loader | processing result set
64899 DEBUG org.hibernate.loader.Loader | result set row: 0
64899 DEBUG org.hibernate.loader.Loader | result row:
64899 DEBUG org.hibernate.type.LongType | returning '0' as column: col_0_0_
64899 DEBUG org.hibernate.loader.Loader | done processing result set (1 rows)
64899 DEBUG org.hibernate.jdbc.AbstractBatcher | about to close ResultSet (open ResultSets: 1, globally: 1)
64899 DEBUG org.hibernate.jdbc.AbstractBatcher | about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
Thanks.
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (HHH-2799) Default Scale value doesn't right
by Bliznets Roman (JIRA)
Default Scale value doesn't right
---------------------------------
Key: HHH-2799
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2799
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.0.ga
Environment: Name and version of the database you are using:MySQL 5.0.37
Reporter: Bliznets Roman
In my Mapping documents:
...
<property name="goodsNumeric" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger">
<column not-null="false" unique="false" name="`goodsnumeric`" precision="5"/>
</property>
...
>From MySQL documentation
In standard SQL, the syntax DECIMAL(M) is equivalent to DECIMAL(M,0).
But In log and in database scale=2, it's have to be exactly 0.
Debug level Hibernate log excerpt:
12484 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate - create table `goodsitembasetype` (e_id bigint not null auto_increment, e_version integer not null, `goodsnumeric` numeric(5,2), `grossweightquantity` numeric(19,6), `netweightquantity` numeric(19,6), `invoicedcost` numeric(16,2), `customscost` numeric(16,2), `statisticalcost` numeric(16,2), primary key (e_id))
--
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
16 years, 6 months