|
Помогите ч настройками. HIBERNATE.CFG.XML
#34508494
Ссылка:
Ссылка на сообщение:
Ссылка с названием темы:
Ссылка на профиль пользователя:
|
Участник
Откуда: Uzbekistan
Сообщения: 199
|
|
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50.
09 : 55 : 11 , 864 INFO Configuration: 909 - configuring from resource: /hibernate.cfg.xml
09 : 55 : 11 , 864 INFO Configuration: 881 - Configuration resource: /hibernate.cfg.xml
09 : 55 : 12 , 239 ERROR XMLHelper: 48 - Error parsing XML: /hibernate.cfg.xml( 3 ) Element type "hibernate-configuration" must be declared.
09 : 55 : 12 , 239 ERROR XMLHelper: 48 - Error parsing XML: /hibernate.cfg.xml( 4 ) Element type "session-factory" must be declared.
09 : 55 : 12 , 255 ERROR XMLHelper: 48 - Error parsing XML: /hibernate.cfg.xml( 5 ) The content of element type "property" must match "(meta*,column*)".
09 : 55 : 12 , 255 ERROR XMLHelper: 48 - Error parsing XML: /hibernate.cfg.xml( 6 ) The content of element type "property" must match "(meta*,column*)".
09 : 55 : 12 , 255 ERROR XMLHelper: 48 - Error parsing XML: /hibernate.cfg.xml( 7 ) The content of element type "property" must match "(meta*,column*)".
09 : 55 : 12 , 270 ERROR XMLHelper: 48 - Error parsing XML: /hibernate.cfg.xml( 8 ) The content of element type "property" must match "(meta*,column*)".
09 : 55 : 12 , 270 ERROR XMLHelper: 48 - Error parsing XML: /hibernate.cfg.xml( 9 ) The content of element type "property" must match "(meta*,column*)".
09 : 55 : 12 , 270 ERROR XMLHelper: 48 - Error parsing XML: /hibernate.cfg.xml( 10 ) The content of element type "property" must match "(meta*,column*)".
09 : 55 : 12 , 270 ERROR Configuration: 971 - problem parsing configuration/hibernate.cfg.xml
net.sf.hibernate.MappingException: invalid configuration
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java: 968 )
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java: 911 )
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java: 897 )
at modernFeed.HibernateUtil.<clinit>(HibernateUtil.java: 14 )
at modernFeed.RetrieveClass.doSelect(RetrieveClass.java: 23 )
at modernFeed.InterfaceClass.doGet(InterfaceClass.java: 188 )
at modernFeed.modernApp.doGet(modernApp.java: 20 )
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 740 )
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 853 )
at oracle.lite.web.JupServlet.service(JupServlet.java: 187 )
at oracle.lite.web.AppServletHandler.handle(AppServletHandler.java: 280 )
at oracle.lite.web.JupApplication.service(JupApplication.java: 301 )
at oracle.lite.web.JupHandler.handle(JupHandler.java: 94 )
at oracle.lite.web.HTTPServer.process(HTTPServer.java: 295 )
at oracle.lite.web.HTTPServer.handleRequest(HTTPServer.java: 162 )
at oracle.lite.web.JupServer.handle(JupServer.java: 280 )
at oracle.lite.web.SocketListener.process(SocketListener.java: 148 )
at oracle.lite.web.SocketListener$ReqHandler.run(SocketListener.java: 199 )
Caused by:
Element type "hibernate-configuration" must be declared.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.err
or(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java: 339 )
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java: 967 )
... 17 more
log3: Initial SessionFactory creation failed.net.sf.hibernate.HibernateException: problem parsing configuration/hibernate.cfg.xml
Ошибка вылезает здесь
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
Вот мой экс-эм-эл
hibernate.cfg.xml
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "hibernate-mapping-2.0.dtd" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<property name="connection.username">root</property>
<property name="connection.url">jdbc:mysql://localhost/feed</property>
<property name="transaction.factory_class">net.sf.hibernate.transaction.JDBCTransactionFactory</property>
<property name="jta.UserTransaction">javax:jts/UserTransaction</property>
</session-factory>
</hibernate-configuration>
with best wishes OmoN.
|
|
|