habe jetzt mittlerweile eine andere fehlermeldung....
vielleicht kann mir da ja jemadn bei helfen...
Code:
exception
javax.servlet.ServletException: could not insert: [beans.Maschinendaten]
javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
root cause
org.hibernate.exception.ConstraintViolationException: could not insert: [beans.Maschinendaten]
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:40)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2158)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2638)
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495)
beans.MaschinendatenHandler.processAction(MaschinendatenHandler.java:34)
javax.faces.event.ActionEvent.processListener(ActionEvent.java:51)
javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:487)
javax.faces.component.UICommand.broadcast(UICommand.java:78)
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
root cause
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'betriebsmittel' cannot be null
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)
org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:33)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2158)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2638)
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495)
beans.MaschinendatenHandler.processAction(MaschinendatenHandler.java:34)
javax.faces.event.ActionEvent.processListener(ActionEvent.java:51)
javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:487)
javax.faces.component.UICommand.broadcast(UICommand.java:78)
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
ich habe eine SQL-DB angelegt. Die Spalten der Tabelle sond so eingestellt, das sie nicht null sein können. Wenn ich not null rausnehme, dann wird in alle Spalten der Tabelle der wert null eingetragen....
beim mappen dürfte eigentlich kein fehler aufgetereten sein. constarint hat ja eigentlich was mit wertebeschränkung zu tun. Da steht ja column betriebsmittel cannot be null. soll sie ja auch nicht...
kann da jemand was zu sagen?