[Hibernate-JIRA] Created: (HHH-6890) Persisting an entity containing a Boolean field fails on DB2 v9.7
by Robert Reimann (JIRA)
Persisting an entity containing a Boolean field fails on DB2 v9.7
-----------------------------------------------------------------
Key: HHH-6890
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6890
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 4.0.0.CR7
Reporter: Robert Reimann
Calling persist on an entity that contains a Boolean field throws the following exception:
{noformat}
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: [jcc][10271][10296][4.0.100] unrecognized JDBC-Type: 16. ERRORCODE=-4228, SQLSTATE=null
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1356)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1284)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1290)
at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:973)
at com.innoq.jpa.JPATest.testClearRemoved(JPATest.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.hibernate.exception.GenericJDBCException: [jcc][10271][10296][4.0.100] unrecognized JDBC-Type: 16. ERRORCODE=-4228, SQLSTATE=null
at org.hibernate.exception.internal.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:148)
at org.hibernate.exception.internal.SQLStateConverter.convert(SQLStateConverter.java:136)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at $Proxy27.setNull(Unknown Source)
at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:79)
at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:305)
at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:300)
at org.hibernate.type.AbstractSingleColumnStandardBasicType.nullSafeSet(AbstractSingleColumnStandardBasicType.java:57)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2593)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2846)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3290)
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80)
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:186)
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.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:970)
... 28 more
Caused by: com.ibm.db2.jcc.a.SqlException: [jcc][10271][10296][4.0.100] unrecognized JDBC-Type: 16. ERRORCODE=-4228, SQLSTATE=null
at com.ibm.db2.jcc.a.yc.a(yc.java:55)
at com.ibm.db2.jcc.a.yc.a(yc.java:102)
at com.ibm.db2.jcc.a.db.j(db.java:1234)
at com.ibm.db2.jcc.a.xk.b(xk.java:631)
at com.ibm.db2.jcc.a.xk.setNull(xk.java:603)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
... 45 more
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-6892) persist() prior to getTransaction().begin() fails when using orphanRemoval = true
by George Armhold (JIRA)
persist() prior to getTransaction().begin() fails when using orphanRemoval = true
---------------------------------------------------------------------------------
Key: HHH-6892
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6892
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.8
Environment: Hibernate 3.6.8.Final
Mac OSX Lion
JDK 1.6.0_29
H2 and MySQL
Reporter: George Armhold
Attachments: hibernate-bug.tar.gz
I have a Sport entity referencing a @OneToMany list of Players, specifying orphanRemoval = true.
The following sequence fails with "Don't change the reference to a collection with cascade=all-delete-orphan":
em.persist(sport);
em.getTransaction().begin();
em.flush();
em.getTransaction().commit();
while this works just fine:
em.getTransaction().begin();
em.persist(sport);
em.flush();
em.getTransaction().commit();
I have attached a JUnit testcase.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-6888) Cannot connect to an Oracle DB using a schema/user specified in lowercase
by Vincent Massol (JIRA)
Cannot connect to an Oracle DB using a schema/user specified in lowercase
-------------------------------------------------------------------------
Key: HHH-6888
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6888
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.7
Environment: Oracle 10g 10.2.0.1.0 with JDBC Driver 10.2.0.2 and Oracle10gDialect
Reporter: Vincent Massol
I have an Oracle user with lowercase letters ("xwiki"). When I use the following in my hibernate.cfg.xml:
{noformat}
<property name="connection.url">jdbc:oracle:thin:@<ip>:1521:XE</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">pass</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
{noformat}
Hibernate fails to connect.
The reason, I believe, is because Hibernate passes the username *as is* to Oracle without escaping it in quotes. Since Oracle converts users passed to it to uppercase (unless they're escaped with quotes) it fails to connect.
I found the following in a forum post (https://forums.oracle.com/forums/thread.jspa?threadID=732373&tstart=1500 ):
{noformat}
The username is passed to the ConnectionPool by the Properties attribute:
Properties="user=scott;portNumber=1521;SID=MYDB;serverName=myserver"
So, it's true that the username is not quoted.
{noformat}
Thanks
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HV-438) Call to TraversableResolver.isReachable() threw an exception
by Denis Chapligin (JIRA)
Call to TraversableResolver.isReachable() threw an exception
------------------------------------------------------------
Key: HV-438
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-438
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Affects Versions: 4.2.0.Beta1, 4.1.0.Final
Environment: hibernate 3.6.1.Final and hibernate validator 4.1.0.Final, GlassFish Server Open Source Edition 3.0.1, Spring 3.0.5
Reporter: Denis Chapligin
I have a problem with custom class level constraint. When i try to validate a simple entity, like:
@Entity
@Table(name="users")
@Unique //My custom constraint
public class User implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="id")
private Integer id;
}
using a spring validation helper:
User u = new User();
Errors result = new BindException(u,"User");
validator.validate(u,result);
It throws a NullPointer exception:
#
Caused by: java.lang.NullPointerException
#
at java.lang.Class.searchFields(Class.java:2599)
#
at java.lang.Class.getDeclaredField(Class.java:1880)
#
at org.hibernate.ejb.util.PersistenceUtilHelper$MetadataCache.findMember(PersistenceUtilHelper.java:190)
#
at org.hibernate.ejb.util.PersistenceUtilHelper$MetadataCache.getMember(PersistenceUtilHelper.java:178)
#
at org.hibernate.ejb.util.PersistenceUtilHelper.get(PersistenceUtilHelper.java:91)
#
at org.hibernate.ejb.util.PersistenceUtilHelper.isLoadedWithReference(PersistenceUtilHelper.java:83)
#
at org.hibernate.ejb.HibernatePersistence$1.isLoadedWithReference(HibernatePersistence.java:93)
#
at javax.persistence.Persistence$PersistenceUtilImpl.isLoaded(Persistence.java:120)
#
at org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:33)
#
at org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:112)
#
at org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:47)
#
at org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:764)
Some investigation revealed, that in PersistenceUtil calls the 'property' parameter value is null and in the validator.engine functions 'name' var in value of the first and single entry of propertyPath.nodeList is null too.
Mot interested thing, is that when i try validation code, shown above, in JUnit environment, it works well.
I've attached a simple webapp, that reproduces the issue. It is too big, to be uploaded here, so i put it to the dropbox: http://dl.dropbox.com/u/17691684/hvbug.tar.gz Initial report was on hibernate forums: https://forum.hibernate.org/viewtopic.php?f=9&t=1009612&start=0
--
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, 3 months
[Hibernate-JIRA] Created: (HV-539) Modify how MANIFESTs are generated
by Kevin Pollet (JIRA)
Modify how MANIFESTs are generated
----------------------------------
Key: HV-539
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-539
Project: Hibernate Validator
Issue Type: Improvement
Components: build
Affects Versions: 4.2.0.Final
Reporter: Kevin Pollet
Priority: Minor
Fix For: 4.3.0.next
Entries added to the {{MANIFEST.MF}} are defined in the parent pom. By doing that, all entries are automatically added to child projects. For example the AP manifest file has the {{Implementation-Title}}, {{Specification-Title}} entries which seems not relevant.
BTW, the {{MANIFEST.MF}} file in the {{hibernate-validator}} project resources is not used and should be removed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months