hi,
I am getting this error while logging into my application.
I have 2 tables. Facility and Runway. One FACILITY can have many RUNWAY.
Below is Runway.hbm.xml file:
<hibernate-mapping>
<class name="hdpt.Runway" table="RUNWAY" schema="dbo" catalog="Employ">
<id name="runwayId" type="integer">
<column name="RUNWAY_ID" />
<generator class="assigned" /> //CHANGED TO NATIVE
</id>
<many-to-one name="facility" class="hdpt.Facility" fetch="select" cascade="none" >
<column name="FACILITY_ID" not-null="true" />
</many-to-one>
generator class for Runway is "assigned". I need to add a new record to Runway table and it throws "ids cannot be assigned manually".
So i changed the generator class to "native" in Runway table . When i try to login to application itself after changing the generator class,
it is throwing the below error.
javax.faces.FacesException: #{controller.control}: javax.faces.el.EvaluationException: java.lang.ExceptionInInitializerError
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
Truncated. see log file for complete stacktrace
javax.faces.el.EvaluationException: java.lang.ExceptionInInitializerError
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
Truncated. see log file for complete stacktrace
java.lang.ExceptionInInitializerError
at gov.gdot.ooit.asm.util.HibernateUtil.<clinit>(HibernateUtil.java:22)
at gov.gdot.ooit.asm.trans.LoginTransaction.begin(LoginTransaction.java:21)
at gov.gdot.ooit.asm.model.Login.logIn(Login.java:43)
at gov.gdot.ooit.asm.command.SignInCommand.execute(SignInCommand.java:28)
at gov.gdot.ooit.asm.control.ASMController.control(ASMController.java:91)
Truncated. see log file for complete stacktrace
org.hibernate.InstantiationException: could not instantiate test objecthdpt..Runway
at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:25)
at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:44)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:114)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:424)
Truncated. see log file for complete stacktrace
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:22)
Truncated. see log file for complete stacktrace
Any suggestions. why is failing to login to application itself after changing the generator class of Runway.
|