java.lang.NullPointerException

Hibernate JIRA | Janario Oliveira | 2 years ago
  1. 0

    When I have a custom type in a Map relation it thows an exception. exception: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:514) at org.hibernate.cfg.annotations.SimpleValueBinder.fillSimpleValue(SimpleValueBinder.java:516) at org.hibernate.cfg.annotations.SimpleValueBinder.make(SimpleValueBinder.java:414) at org.hibernate.cfg.annotations.MapBinder.bindKeyFromAssociationTable(MapBinder.java:305) at org.hibernate.cfg.annotations.MapBinder.access$000(MapBinder.java:76) at org.hibernate.cfg.annotations.MapBinder$1.secondPass(MapBinder.java:111) at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:70) at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1697) at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1426) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1373) at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.afterConstructAndConfigureConfiguration(BaseCoreFunctionalTestCase.java:162) at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.buildSessionFactory(BaseCoreFunctionalTestCase.java:126) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.hibernate.testing.junit4.TestClassMetadata.performCallbackInvocation(TestClassMetadata.java:205) ... 15 more e.g. mapping: @ElementCollection @MapKeyType(@Type(type = "org.hibernate.test.annotations.enumerated.custom_types.FirstLetterType")) Map<FirstLetter, String> firstLetterMap = new HashMap<FirstLetter, String>();

    Hibernate JIRA | 2 years ago | Janario Oliveira
    java.lang.NullPointerException
  2. 0

    When I have a custom type in a Map relation it thows an exception. exception: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:514) at org.hibernate.cfg.annotations.SimpleValueBinder.fillSimpleValue(SimpleValueBinder.java:516) at org.hibernate.cfg.annotations.SimpleValueBinder.make(SimpleValueBinder.java:414) at org.hibernate.cfg.annotations.MapBinder.bindKeyFromAssociationTable(MapBinder.java:305) at org.hibernate.cfg.annotations.MapBinder.access$000(MapBinder.java:76) at org.hibernate.cfg.annotations.MapBinder$1.secondPass(MapBinder.java:111) at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:70) at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1697) at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1426) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1373) at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.afterConstructAndConfigureConfiguration(BaseCoreFunctionalTestCase.java:162) at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.buildSessionFactory(BaseCoreFunctionalTestCase.java:126) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.hibernate.testing.junit4.TestClassMetadata.performCallbackInvocation(TestClassMetadata.java:205) ... 15 more e.g. mapping: @ElementCollection @MapKeyType(@Type(type = "org.hibernate.test.annotations.enumerated.custom_types.FirstLetterType")) Map<FirstLetter, String> firstLetterMap = new HashMap<FirstLetter, String>();

    Hibernate JIRA | 2 years ago | Janario Oliveira
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Setting -nomanifest results in multiple NPEs

    GitHub | 3 years ago | njbartlett
    java.lang.NullPointerException
  5. 0

    NPE in LDAP search

    Stack Overflow | 3 years ago | Peter Penzov
    java.lang.reflect.InvocationTargetException

  1. davidvanlaatum 1 times, last 4 weeks ago
  2. kjhdofjosvs 4 times, last 4 weeks ago
  3. Justin 2 times, last 5 months ago
  4. poroszd 8 times, last 8 months ago
6 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.util.Hashtable.put()
  2. Java RT
    Hashtable.put
    1. java.util.Hashtable.put(Hashtable.java:514)
    1 frame
  3. Hibernate
    Configuration.buildMappings
    1. org.hibernate.cfg.annotations.SimpleValueBinder.fillSimpleValue(SimpleValueBinder.java:516)
    2. org.hibernate.cfg.annotations.SimpleValueBinder.make(SimpleValueBinder.java:414)
    3. org.hibernate.cfg.annotations.MapBinder.bindKeyFromAssociationTable(MapBinder.java:305)
    4. org.hibernate.cfg.annotations.MapBinder.access$000(MapBinder.java:76)
    5. org.hibernate.cfg.annotations.MapBinder$1.secondPass(MapBinder.java:111)
    6. org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:70)
    7. org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1697)
    8. org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1426)
    9. org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1373)
    9 frames
  4. A Hibernate O/RM Module
    BaseCoreFunctionalTestCase.buildSessionFactory
    1. org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.afterConstructAndConfigureConfiguration(BaseCoreFunctionalTestCase.java:162)
    2. org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.buildSessionFactory(BaseCoreFunctionalTestCase.java:126)
    2 frames
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  6. A Hibernate O/RM Module
    TestClassMetadata.performCallbackInvocation
    1. org.hibernate.testing.junit4.TestClassMetadata.performCallbackInvocation(TestClassMetadata.java:205)
    1 frame