[Hibernate-JIRA] Created: (HHH-6487) SchemaExport with Configuration creates NPE
by Leon Blakey (JIRA)
SchemaExport with Configuration creates NPE
-------------------------------------------
Key: HHH-6487
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6487
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 4.0.0.next
Environment: Hibernate-Core-4.0.0-SNAPSHOT (20110726.122837-98), MySQL 5.1.41
Reporter: Leon Blakey
When using SchemaExport with the (now depreciated) Configuration class, an NPE is raised. Pretty much any configuration will do
My code is essentially this:
new SchemaExport(new Configuration().configure()).create(true, true);
Reported exception:
java.lang.NullPointerException: null
at org.hibernate.tool.hbm2ddl.DatabaseExporter.<init>(DatabaseExporter.java:54) ~[hibernate-core-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:346) ~[hibernate-core-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:283) ~[hibernate-core-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:279) ~[hibernate-core-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.quackbot.dao.hibernate.GenericHbTest.setUp(GenericHbTest.java:53) ~[test-classes/:na]
...
Just because Cofiguration is depreciated doesn't mean it isn't used. This broke all of my test code and the only other option (new SchemaExport(MetadataImplementor)) I can't use since I can't figure out how to get a MetadataImplementor.
--
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-5909) SybaseASE15Dialect getMaxAliasLength() cause SQL exception
by Yang Li (JIRA)
SybaseASE15Dialect getMaxAliasLength() cause SQL exception
----------------------------------------------------------
Key: HHH-5909
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5909
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.1, 3.6.0
Environment: Sybase ASE 15.5 with Sybase JDBC 3 (jconn3.jar)
Hibernate 3.6.0 final
JDK 1.6.0_23
Reporter: Yang Li
Priority: Critical
After upgrade Hibernate from 3.2.0 to 3.6.0, I got following exception with following SQL (converted from HQL):
select defaultwdo1_.displayDescriptionTemplate as displayDescriptionTemplate30_1_ from WJob wjob0_, WDocDist defaultwdo1_
Caused by: com.sybase.jdbc3.jdbc.SybSQLException: The identifier that starts with 'displayDescriptionTemplate30_1' is too long. Maximum length is 30.
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.queryLoop(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.executeQuery(Unknown Source)
at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
The same SQL can be executed in native Sybase ISQL environment without any error.
The workaround using Sybase11Dilect or modify getMaxAliasLength() inside SybaseASE15Dialect to return a smaller number(e.g. 20)
--
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
14 years, 8 months