[Hibernate-JIRA] Created: (HHH-7198) SQLServer2005Dialect.getLimitString turns tablenames to lowercase -> SQLGrammarException: when mapping tables with capital letters
by Guenther Demetz (JIRA)
SQLServer2005Dialect.getLimitString turns tablenames to lowercase -> SQLGrammarException: when mapping tables with capital letters
-----------------------------------------------------------------------------------------------------------------------------------
Key: HHH-7198
URL: https://hibernate.onjira.com/browse/HHH-7198
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.1.1
Environment: Hibernate4, SQLServer2008
Reporter: Guenther Demetz
Priority: Minor
Usually when annotating entity classes without the @Table.name attribute, then the default mapped tablenames begin with a capital letter.
When using the paging feature, SQLServer2005Dialect.getLimitString turns the whole sql to lowercase
{code:title=SQLServer2005Dialect.java|borderStyle=solid}
@Override
public String getLimitString(String querySqlString, boolean hasOffset) {
StringBuilder sb = new StringBuilder(querySqlString.trim().toLowerCase());
...
return sb.toString();
}
{code}
thus also the included tablenames are all converted to lowercase,
this leads to following schema mismatch exception, when using the original SQLServerDriver:
org.hibernate.exception.SQLGrammarException: Invalid object name 'mytable'
This bug was introduced with HHH-2655 (ROW_NUMBER for Paging).
Testcase:
{code}
Query query = session.createQuery("from C"); // C is an arbitrary entity class mapped to a table with uppercase characters in the tablename
query.setMaxResults(10);
query.iterate().next(); // -> Exception
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[Hibernate-JIRA] Created: (HHH-6960) NullPointerException in PreCollectionRemove Listener
by Kevin Jordan (JIRA)
NullPointerException in PreCollectionRemove Listener
----------------------------------------------------
Key: HHH-6960
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6960
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 4.0.0.Final
Environment: Hibernate 4.0.0 to MySQL
Reporter: Kevin Jordan
I'm getting a NullPointerException on line 47 of EnversPreCollectionRemoveEventListenerImpl very consistently. I wasn't sure if it was due to lazy collections or not, but it seems that it fails if they're eagerly fetched or lazily fetched. I'm guessing it has something to do with getLoadedPersister() returning a null value since the comments for it say "This is only available late during the flush cycle". The stack trace is
Quote:
java.lang.NullPointerException
at org.hibernate.envers.event.EnversPreCollectionRemoveEventListenerImpl.onPreRemoveCollection(EnversPreCollectionRemoveEventListenerImpl.java:47)
at org.hibernate.action.internal.CollectionRemoveAction.preRemove(CollectionRemoveAction.java:143)
at org.hibernate.action.internal.CollectionRemoveAction.execute(CollectionRemoveAction.java:104)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:273)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:265)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:188)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:323)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1081)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:315)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:73)
... 120 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[Hibernate-JIRA] Created: (HHH-6962) java.util.zip.ZipException: error in opening zip file
by Jakub Białek (JIRA)
java.util.zip.ZipException: error in opening zip file
-----------------------------------------------------
Key: HHH-6962
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6962
Project: Hibernate ORM
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.6.9
Environment: hibernate 3.6.9, spring 3.0.7.RELEASE, jboss 5.1, java 1.6.0_30 (sun), debian 64 bit
Reporter: Jakub Białek
Priority: Minor
After moving from hibernate 3.6.8 to 3.6.9 below stacktrace has appeared in logs when application is deployed:
{code}
WARN [org.hibernate.ejb.packaging.FileZippedJarVisitor] (HDScanner) Unable to find file (ignored): vfszip:/srv/jboss-5.1.0.GA/server/debugprfile/deploy/mywar.war/WEB-INF/lib/domain.jar/
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:65)
at org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:146)
at org.hibernate.ejb.packaging.NativeScanner.getFilesInJar(NativeScanner.java:192)
at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:497)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:594)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
......
{code}
Application deploys correctly but this error didn't appear in 3.6.8.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months