Где я могу установить auto-import = "false" для hyperjaxb? - PullRequest
0 голосов
/ 20 марта 2012

Знаете ли вы, где я могу установить auto-import = "false" при работе с hyperjaxb ?.У меня есть это исключение при вызове Persistence.createEntityManagerFactory ().

Предполагая, что этот автоматический импорт решает мою проблему, я бы предположил, что вместо этого мне придется выполнить импорт вручную.Куда мне обратиться за поиском такой информации?

Спасибо.

Исключение в потоке "main" javax.persistence.PersistenceException: [PersistenceUnit: com.sun.java.xml.ns.постоянство: org.jvnet.hyperjaxb3.ejb.schemas.customizations: com.sun.java.xml.ns.persistence.orm: генерируется] Невозможно настроить EntityManagerFactory в org.hibernate.ejb.Ejb3Configuration.configure (Ejb3Configuration.java:265) в org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory (HibernatePersistence.java:125) в javax.persistence.Persistence.createEntityManagerFactory (Persistence.java:52) в PropertiesTest.Test1 (PropertiesTest.Tava.t):.java: 121) Вызывается: org.hibernate.AnnotationException: использование одного и того же имени объекта дважды: базовый в org.hibernate.cfg.annotations.EntityBinder.bindEntity (EntityBinder.java:304) в org.hibernate.cfg.AnnotationBinder..bindClass (AnnotationBinder.java:567) в org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfВведите (AnnotationConfiguration.java:546) в org.hibernate.cfg.AnnotationConfiguration.secondPassCompile (AnnotationConfiguration.java:291) в org.hibernate.cfg.Configuration.buildMappings (Configuration.java:1148) в org.hibernatejbФайлыEjb3Configuration.configure (Ejb3Configuration.java:191) в org.hibernate.ejb.Ejb3Configuration.configure (Ejb3Configuration.java:253) ... еще 4 Причины: org.hibernate.DuplicateMappingException: duplicate import: Basic ссылается на оба илиjvnet.hyperjaxb3.ejb.schemas.customizations.Basic и com.sun.java.xml.ns.persistence.orm.Basic (попробуйте использовать auto-import = "false") в org.hibernate.cfg.Mappings.addImport (сопоставления).java: 164) в org.hibernate.cfg.annotations.EntityBinder.bindEntity (EntityBinder.java:297) ... еще 13

...