У меня есть веб-приложение на netbeans и glassfi sh. у меня есть сущность, сопоставленная с таблицей, столбец даты которой сопоставлен в моей сущности, используя:
@Temporal(javax.persistence.TemporalType.DATE)
private Date datecreation;
, когда я перечисляю свою сущность на фасаде, используя findAll из AbstractFacade.
у меня плохой исключение формата
Caused by: java.sql.SQLException: Bad format for DATE '2018-05-23' in column 2.
Call: SELECT ID, DATECREATION, NOM, PENALIT`enter code here`E, STOCKMAX, STOCKMIN, TAILLEGRAINS, SITE_ID, USER_ID FROM INPUTS
Query: ReadAllQuery(referenceClass=Inputs sql="SELECT ID, DATECREATION, NOM, PENALITE, STOCKMAX, STOCKMIN, TAILLEGRAINS, SITE_ID, USER_ID FROM INPUTS")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:1337)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.fetchRow(DatabaseAccessor.java:1083)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processResultSet(DatabaseAccessor.java:775)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:664)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:567)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2096)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:603)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:275)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:261)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:332)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:728)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2773)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2726)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:584)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1224)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:914)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1183)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:485)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1271)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2981)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1895)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1877)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1842)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:262)
... 122 more
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.ResultSetRow.getDateFast(ResultSetRow.java:296)
at com.mysql.jdbc.ByteArrayRow.getDateFast(ByteArrayRow.java:238)
at com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:2211)
at com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:2173)
at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:5052)
at org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getObjectFromResultSet(DatabasePlatform.java:1424)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:1308)
... 145 more
Caused by: java.lang.IllegalStateException: This web container has not yet been started
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1472)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1430)
at com.mysql.jdbc.ResultSetImpl.fastDateCreate(ResultSetImpl.java:1041)
at com.mysql.jdbc.ResultSetRow.getDateFast(ResultSetRow.java:292)
... 151 more
|#]
спасибо за помощь