急!!!各位大神帮帮忙看看这是怎么个错法?

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

2016-8-30 8:01:04 org.hibernate.annotations.common.Version <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

2016-8-30 8:01:04 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.1.4.Final}

2016-8-30 8:01:04 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

2016-8-30 8:01:04 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

2016-8-30 8:01:04 org.hibernate.cfg.Configuration configure

INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml

2016-8-30 8:01:04 org.hibernate.cfg.Configuration getConfigurationInputStream

INFO: HHH000040: Configuration resource: /hibernate.cfg.xml

2016-8-30 8:01:04 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: fz/po/sjzdxx.hbm.xml

%%%% Error Creating SessionFactory %%%%

org.hibernate.InvalidMappingException: Unable to read XML

at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:109)

at org.hibernate.cfg.Configuration.add(Configuration.java:478)

at org.hibernate.cfg.Configuration.add(Configuration.java:474)

at org.hibernate.cfg.Configuration.add(Configuration.java:647)

at org.hibernate.cfg.Configuration.addResource(Configuration.java:730)

at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2109)

at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2081)

at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2061)

at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2014)

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

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

at fz.crmsessionfactory.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:32)

at fz.dao.BaseHibernateDAO.getSession(BaseHibernateDAO.java:15)

at fz.dao.sjzdflDAO.findAll(sjzdflDAO.java:105)

at fz.test.Test1.main(Test1.java:11)

Caused by: org.dom4j.DocumentException: http://hibernate.org/dtd/hibernate-mapping-3.0.dtd%20 Nested exception: http://hibernate.org/dtd/hibernate-mapping-3.0.dtd%20

at org.dom4j.io.SAXReader.read(SAXReader.java:484)

at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:78)

... 14 more

2016-8-30 8:01:06 org.hibernate.cfg.Configuration configure

INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml

2016-8-30 8:01:06 org.hibernate.cfg.Configuration getConfigurationInputStream

INFO: HHH000040: Configuration resource: /hibernate.cfg.xml

2016-8-30 8:01:06 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: fz/po/sjzdxx.hbm.xml

%%%% Error Creating SessionFactory %%%%

org.hibernate.InvalidMappingException: Unable to read XML

at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:109)

at org.hibernate.cfg.Configuration.add(Configuration.java:478)

at org.hibernate.cfg.Configuration.add(Configuration.java:474)

at org.hibernate.cfg.Configuration.add(Configuration.java:647)

at org.hibernate.cfg.Configuration.addResource(Configuration.java:730)

at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2109)

at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2081)

at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2061)

at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2014)

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

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

at fz.crmsessionfactory.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:71)

at fz.crmsessionfactory.HibernateSessionFactory.getSession(HibernateSessionFactory.java:55)

at fz.dao.BaseHibernateDAO.getSession(BaseHibernateDAO.java:15)

at fz.dao.sjzdflDAO.findAll(sjzdflDAO.java:105)

at fz.test.Test1.main(Test1.java:11)

Caused by: org.dom4j.DocumentException: http://hibernate.org/dtd/hibernate-mapping-3.0.dtd%20 Nested exception: http://hibernate.org/dtd/hibernate-mapping-3.0.dtd%20

at org.dom4j.io.SAXReader.read(SAXReader.java:484)

at org.hibernate.internal.util.xml.MappingReader.readMappingDocument(MappingReader.java:78)

... 15 more

Exception in thread "main" java.lang.NullPointerException

at fz.dao.sjzdflDAO.findAll(sjzdflDAO.java:105)

at fz.test.Test1.main(Test1.java:11)


疯子520520
浏览 2510回答 2
2回答

阿旭_

Test1中的main方法内有代码空指针异常。建议把代码贴上来瞧瞧
打开App,查看更多内容
随时随地看视频慕课网APP