Vote count:
0
i use JPA-eclipseLink 2.5.0, Glassfish 4.1, MySQL, Eclipse Luna 4.4.0, Java8
i already create mydatabase and create entity
everything work fine
then i change some table, and some attribut in database, then problem happen
when i start to run my application it give me this error
cannot Deploy monsterpuzzle deploy is failing=Error occurred during deployment: Exception while deploying the app [monsterpuzzle] : Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Deployment of PersistenceUnit [MonsterPuzzle] failed. Close all factories for this PersistenceUnit. Internal Exception: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.IntegrityException Descriptor Exceptions:
Exception [EclipseLink-48] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DescriptorException Exception Description: Multiple writable mappings exist for the field [PRICE.ITEMID]. Only one may be defined as writable, all others must be specified read-only. Mapping: org.eclipse.persistence.mappings.OneToOneMapping[item] Descriptor: RelationalDescriptor(model.Price --> [DatabaseTable(PRICE)])
based on the error i think the error is the mapping relation for table 'PRICE',
but i already delete table 'PRICE' and the entity, so i think my application didn't know that i already change some data..
i already check my entity many time, i think there's no problem with it.
i think the problem is .. my project still use the old connection and i need to refresh it
i already clean, build, re-publish my project, flush connection pool, create new connection pool, restart glassfish, restart my pc. but it still give me the same error
any help?
forgive my english thanks
Eclipse - JPA and MySQL not syncron after database change
Aucun commentaire:
Enregistrer un commentaire