Rename or remove of an entity collection property causes an error when rebuilding with cache.

The following error is shown when a browser request is made:

[12:02:01 qa] FATAL
java.lang.ExceptionInInitializerError
        at utils.HibernateUtilConfigured.<clinit>(HibernateUtilConfigured.java:75)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at utils.HibernateUtil.getSessionFactoryUsingReflection(HibernateUtil.java:28)
        at utils.HibernateUtil.<clinit>(HibernateUtil.java:23)
        at utils.DispatchServlet.tryLoadGlobalsAndPerformInit(DispatchServlet.java:19)
        at utils.DispatchServlet.init(DispatchServlet.java:38)
        at javax.servlet.GenericServlet.init(GenericServlet.java:160)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NullPointerException
        at utils.HibernateUtilConfigured.<clinit>(HibernateUtilConfigured.java:63)
        ... 24 more

The NullPointerException line refers to the removed property, which indicates a code generation cache bug:

    annotationConfiguration.getCollectionMapping("webdsl.generated.domain.Answer._upvoters").setTypeName("webdsl.generated.domain.AnswerUpvotersOwnedSetType");
Submitted by Danny Groenewegen on 10 December 2012 at 18:00

On 10 December 2012 at 18:00 Danny Groenewegen tagged 1.3.0

On 10 December 2012 at 18:01 Danny Groenewegen commented:

fixed in r5553


On 10 December 2012 at 18:01 Danny Groenewegen closed this issue.

Log in to post comments