java.lang.NullPointerException

Hibernate JIRA | Matt Todd | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY, targetEntity = SolutionProvider.class) @Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE) private T provider; This mapping is unable to be handled by the AnnotationConfiguration session factory builder. It throws the following error: java.lang.NullPointerException at org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:212) at org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:124) at org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:60) at org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:900) at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:868) at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:717) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:547) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:276) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:210) at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:647) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:96) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:64) at uk.co.iizuka.common.hibernate.AbstractHibernateTest.setUp(AbstractHibernateTest.java:48) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) It worked fine in annotations version beta7.

    Hibernate JIRA | 1 decade ago | Matt Todd
    java.lang.NullPointerException
  2. 0

    Hibernate / Mailing Lists

    sourceforge.net | 1 year ago
    java.lang.NullPointerException
  3. 0

    @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY, targetEntity = SolutionProvider.class) @Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE) private T provider; This mapping is unable to be handled by the AnnotationConfiguration session factory builder. It throws the following error: java.lang.NullPointerException at org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:212) at org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:124) at org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:60) at org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:900) at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:868) at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:717) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:547) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:276) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:210) at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:647) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:96) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:64) at uk.co.iizuka.common.hibernate.AbstractHibernateTest.setUp(AbstractHibernateTest.java:48) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) It worked fine in annotations version beta7.

    Hibernate JIRA | 1 decade ago | Matt Todd
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Creating DDL file with Hibernate

    Stack Overflow | 1 year ago | Chiara Di Nardo
    java.lang.NullPointerException
  6. 0

    very similar to that addressed in the following JIRA using hibernate annotations 3.2.0.CR2 http://opensource.atlassian.com/projects/hibernate/browse/ANN-95 The super class contains the members we are using for defining the constraint. The Super class: ---------------------------------------------------- @Entity(name="xpmComponent") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public abstract class Component... @NotNull @Length(max=40) @Index(name="manufacturerPartNumber") public String getManufacturerPartNumber() { return manufacturerPartNumber; } @ManyToOne @NotNull @JoinColumn(name="manufacturerId") public Manufacturer getManufacturer() { return manufacturer; } ... The Entity w/ Unique Constraint: ---------------------------------------------------- @Entity @Name("xpmProduct") @Table(name = "xPM_Product", uniqueConstraints={@UniqueConstraint( columnNames={"manufacturerPartNumber", "manufacturerId"})}) public class PersistentProduct extends Component... The Exception which occurs upon deployment ---------------------------------------------------- java.lang.NullPointerException at org.hibernate.mapping.UniqueKey.sqlConstraintString(UniqueKey.java:20) at org.hibernate.mapping.Table.sqlCreateString(Table.java:436) at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:779) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:74) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:311) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:688) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264) at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source) at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start()V(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) runnable testcase attached.

    Hibernate JIRA | 1 decade ago | Anthony Patricio
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.hibernate.cfg.PropertyInferredData.extractType()
    2. Hibernate
      SchemaExport.<init>
      1. org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:212)
      2. org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:124)
      3. org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:60)
      4. org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:900)
      5. org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:868)
      6. org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:717)
      7. org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:547)
      8. org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:276)
      9. org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:210)
      10. org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:647)
      11. org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:96)
      12. org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:64)
      12 frames
    3. uk.co.iizuka
      AbstractHibernateTest.setUp
      1. uk.co.iizuka.common.hibernate.AbstractHibernateTest.setUp(AbstractHibernateTest.java:48)
      1 frame
    4. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runBare(TestCase.java:125)
      2. junit.framework.TestResult$1.protect(TestResult.java:106)
      3. junit.framework.TestResult.runProtected(TestResult.java:124)
      4. junit.framework.TestResult.run(TestResult.java:109)
      5. junit.framework.TestCase.run(TestCase.java:118)
      6. junit.framework.TestSuite.runTest(TestSuite.java:208)
      7. junit.framework.TestSuite.run(TestSuite.java:203)
      7 frames
    5. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      3 frames