[Hibernate-JIRA] Issue Comment Edited: (HHH-969) InformixDialect uses wrong sql for substring function
by Martin Heitz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-969?page=co... ]
Martin Heitz edited comment on HHH-969 at 7/20/11 3:30 AM:
-----------------------------------------------------------
The fix suggested by Scott works fine for me. Anyway a fix in the Hibernate InformixDialect would be much better.
Best regards, Mattin
P.S. Note that I'm using 3.6.5.Final and the issue is still open.
was (Author: mattin):
The fix suggested by Scott works fine for me. Anyway a fix in the Hibernate InformixDialect would be much better.
Best regards, Mattin
> InformixDialect uses wrong sql for substring function
> -----------------------------------------------------
>
> Key: HHH-969
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-969
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.0.5
> Environment: Hibernate 3.0.5, Informix 9.4
> Reporter: Scott Russell
>
> InformixDialect inherits function definitions from its parent Dialect. However, the default sql syntax for substring, substring(str, start, len) is not supported in Informix. Rather, Informix uses the following syntax: substring(str FROM start FOR len)
> The following line needs to be added to the InformixDialect constructor in order for this function to work correctly:
> registerFunction( "substring", new SQLFunctionTemplate(Hibernate.STRING, "substring(?1 FROM ?2 FOR ?3)" ));
> -Scott
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[Hibernate-JIRA] Commented: (HHH-969) InformixDialect uses wrong sql for substring function
by Martin Heitz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-969?page=co... ]
Martin Heitz commented on HHH-969:
----------------------------------
The fix suggested by Scott works fine for me. Anyway a fix in the Hibernate InformixDialect would be much better.
Best regards, Mattin
> InformixDialect uses wrong sql for substring function
> -----------------------------------------------------
>
> Key: HHH-969
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-969
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.0.5
> Environment: Hibernate 3.0.5, Informix 9.4
> Reporter: Scott Russell
>
> InformixDialect inherits function definitions from its parent Dialect. However, the default sql syntax for substring, substring(str, start, len) is not supported in Informix. Rather, Informix uses the following syntax: substring(str FROM start FOR len)
> The following line needs to be added to the InformixDialect constructor in order for this function to work correctly:
> registerFunction( "substring", new SQLFunctionTemplate(Hibernate.STRING, "substring(?1 FROM ?2 FOR ?3)" ));
> -Scott
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[Hibernate-JIRA] Created: (HHH-6458) AbstractPersistentCollection throws NullPointerException in highly concurrent situation
by Yiming Du (JIRA)
AbstractPersistentCollection throws NullPointerException in highly concurrent situation
---------------------------------------------------------------------------------------
Key: HHH-6458
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6458
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Websphere + AIX + DB2 9.7.4
Reporter: Yiming Du
Lately when doing stress test, a NullPointerException was sometimes being thrown within Hibernate class AbstractPersistentCollection. The excpetion happened only in highly concurrent situation.
We're using Websphere, here's the stack trace in Webshpere's log.
[7/19/11 12:31:59:679 EDT] 00000039 SystemErr R java.lang.NullPointerException
[7/19/11 12:31:59:680 EDT] 00000039 SystemErr R at org.hibernate.collection.AbstractPersistentCollection.isConnectedToSession(AbstractPersistentCollection.java:196)
[7/19/11 12:31:59:680 EDT] 00000039 SystemErr R at org.hibernate.collection.AbstractPersistentCollection.setCurrentSession(AbstractPersistentCollection.java:429)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.OnLockVisitor.processCollection(OnLockVisitor.java:61)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:124)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:84)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:78)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractVisitor.process(AbstractVisitor.java:146)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:102)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:82)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:611)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:603)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at com.silanis.idmgr.request.ConfigurationCache.shouldRefresh(ConfigurationCache.java:99)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at com.silanis.idmgr.request.ConfigurationCache.getConfiguration(ConfigurationCache.java:59)
Further investigation revealed the line of code in our application that caused the exception:
session.lock( config, LockMode.READ);
It's certain that neither session nor config object is null when the call is made. config is a persistent object which has associations and collections of other entity instances. We use lock function to perform a version check.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months