configutation 创建错误

来源:-

喜欢的昵称都不能用

2016-05-02 19:33

五月 02, 2016 7:31:41 下午 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {5.1.0.Final}

五月 02, 2016 7:31:41 下午 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

五月 02, 2016 7:31:41 下午 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

Exception in thread "main" java.lang.ClassCastException: com.sun.xml.internal.stream.events.EntityReferenceEvent cannot be cast to javax.xml.stream.events.Characters

at com.sun.xml.internal.stream.events.DummyEvent.asCharacters(Unknown Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXEventConnector.handleCharacters(Unknown Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXEventConnector.bridge(Unknown Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source)

at org.hibernate.boot.cfgxml.internal.JaxbCfgProcessor.unmarshal(JaxbCfgProcessor.java:126)

at org.hibernate.boot.cfgxml.internal.JaxbCfgProcessor.unmarshal(JaxbCfgProcessor.java:65)

at org.hibernate.boot.cfgxml.internal.ConfigLoader.loadConfigXmlResource(ConfigLoader.java:57)

at org.hibernate.boot.registry.StandardServiceRegistryBuilder.configure(StandardServiceRegistryBuilder.java:163)

at org.hibernate.cfg.Configuration.configure(Configuration.java:259)

at org.hibernate.cfg.Configuration.configure(Configuration.java:245)

at test.main(test.java:20)


写回答 关注

2回答

  • 僻人
    2018-08-04 19:09:56

    亲吻这个问题解决了吗

  • 高恒博
    2016-06-08 09:39:47

    打错了吧,这些都是固定的语法,

Hibernate初探之单表映射

Java持久化框架Hibernate入门教程,掌握Hibernate基本概念

74810 学习 · 793 问题

查看课程

相似问题