Invalid configuration `x86ITeye - 千亿集团

Invalid configuration `x86ITeye

2019年02月22日09时40分10秒 | 作者: 夏真 | 标签: 文档,语法,目标 | 浏览: 3053

报错:rnSLF4J: Class path contains multiple SLF4J bindings.rnSLF4J: Found binding in [jar:file:/D:/Documents/Downloads/%e6%96%b0%e5%bb%ba%e6%96%87%e4%bb%b6%e5%a4%b9/%e5%ae%89%e8%a3%85%e6%96%87%e4%bb%b6/hibernate-anno-jar/hibernate-core/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]rnSLF4J: Found binding in [jar:file:/D:/Documents/Downloads/%e6%96%b0%e5%bb%ba%e6%96%87%e4%bb%b6%e5%a4%b9/%e5%ae%89%e8%a3%85%e6%96%87%e4%bb%b6/slf4j-1.7.7/slf4j-1.7.7/slf4j-nop-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]rnSLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.rnlog4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).rnlog4j:WARN Please initialize the log4j system properly.rnlog4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.rnException in thread main org.hibernate.MappingException: invalid configurationrn at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1521)rn at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)rn at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)rn at test.StudentTest.main(StudentTest.java:17)rnCaused by: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 25; 文档无效: 找不到语法。rn at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)rn at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)rn at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)rn at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)rn at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)rn at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:227)rn at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:604)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3130)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)rn at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)rn at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)rn at org.dom4j.io.SAXReader.read(SAXReader.java:465)rn at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)rn ... 3 morernrn-rnStudentTest.java:rnpackage test;rnrnimport org.hibernate.Session;rnimport org.hibernate.SessionFactory;rnimport org.hibernate.cfg.Configuration;rnrnimport com.bjsxt.hibernate.model.Student;rnrnpublic class StudentTest rn public static void main(String[] args)rn Student s = new Student();//创立一个student目标rn s.setId(1);rn s.setName( s1 rn s.setAge(1);rn rn Configuration cfg = new Configuration();//用来读配置文件的rn SessionFactory sf = cfg.configure().buildSessionFactory();rn Session session = sf.openSession();//翻开一个新的sessionrn session.beginTransaction();rn session.save(s);rn session.getTransaction().commit();rn session.close();rn sf.close();rn rn rnrn-rn第17行:rnSessionFactory sf = cfg.configure().buildSessionFactory();rn-rn一直说我的第17行有错,实在是找不出来原因rn请各位路过的兄弟姐妹点拨。。。rn[img=/uploads/allimg/190111/20190111143059jhlyfywwbgn29698.gif][/img][img=/uploads/allimg/190111/20190111143059jhlyfywwbgn29698.gif][/img]

版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表千亿集团立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章

阅读排行

  • 1

    Invalid configuration `x86ITeye

    文档,语法,目标
  • 2
  • 3
  • 4
  • 5

    linuxso库的深化了解ITeye

    程序,途径,运转
  • 6
  • 7

    Linux操作笔记千亿集团

    目录,文件,体系
  • 8

    squid更新缓存csdn

    服务器,地址
  • 9

    几个有用的开源镜像环球

    体系,探究,总结
  • 10