Hibernate JIRA | manoj kochhar | 1 decade ago
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Running the auction example in the eg directory. Have 3 suggested improvements and found a bug that stopped it from working: Suggested improvements: 1. BID column called datetime in the database. This is a bad name for a column. Perhaps biddatetime would be better 2. DDL that is generated has some column names in upper case and some in lower case. Suggest all upper case 3. In AuctionItem.hbm.xml the <import class="AuctionInfo"> appears to have no significance. Perhaps remove this The main issue I had: In method "public void createTestAuctions() throws Exception" I get the stack trace below because of this line: bidder2.setName( new Name("Steve", null, "Ebersole") ); The initial is null and is of type java.lang.Character. This products the following stack trace:] [java] java.lang.NullPointerException [java] at org.hibernate.type.PrimitiveType.toString( ) [java] at org.hibernate.type.NullableType.nullSafeSet( 9) [java] at org.hibernate.type.NullableType.nullSafeSet( 3) [java] at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.ja :261) [java] at org.hibernate.persister.entity.AbstractEntityPersister.dehydr e( [java] at org.hibernate.persister.entity.AbstractEntityPersister.dehydr e( [java] at org.hibernate.persister.entity.AbstractEntityPersister.insert [java] at org.hibernate.persister.entity.AbstractEntityPersister.insert [java] at org.hibernate.action.EntityInsertAction.execute(EntityInsertA [java] at org.hibernate.engine.ActionQueue.execute( [java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.j a:227) [java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.j a:140) [java] at org.hibernate.event.def.AbstractFlushingEventListener.perform ecutions( [java] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(Def [java] at org.hibernate.impl.SessionImpl.flush( [java] at org.hibernate.impl.SessionImpl.managedFlush( 3) [java] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransact [java] at [java] at The initial that is set to null is converted to a String and not a Character causing the error. Can get around it by: 1. bidder2.setName( new Name("Steve", new Character('R'), "Ebersole") ); 2. Changing db table column auctionuser.initial to a VARCHAR2 I think the real problem appears to in the mapping of java.lang.Character if the value is null.

    Hibernate JIRA | 1 decade ago | manoj kochhar

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.hibernate.type.PrimitiveType.toString()
    2. Hibernate
      1. org.hibernate.type.PrimitiveType.toString(
      2. org.hibernate.type.NullableType.nullSafeSet(NullableType.java9)
      3. org.hibernate.type.NullableType.nullSafeSet(NullableType.java3)
      4. org.hibernate.type.ComponentType.nullSafeSet(ComponentType.ja:261)
      5. org.hibernate.persister.entity.AbstractEntityPersister.dehydre(
      6. org.hibernate.persister.entity.AbstractEntityPersister.dehydre(
      6 frames