0
私は、hibernate 3.0から4.1に移行しています。 私は、アプリケーションでhibernateの初期化のためのコードスニペットを持っています。Hibernate 4.1.0最終:初期設定に失敗しました
ServiceRegistryBuilder srBuilder = new ServiceRegistryBuilder();
srBuilder.configure();
ServiceRegistry serviceRegistry = srBuilder.buildServiceRegistry();
// Initializes the session factory.
sessionConfiguration = new Configuration().configure();
sessionFactory = sessionConfiguration.buildSessionFactory(serviceRegistry);
sessionSettings = sessionConfiguration.buildSettings(serviceRegistry);
srBuilder.confiugre()で例外が発生します。 例外のスタックトレース: 例外は「タイムアウト」、これについては何かわからないが言うけれども:
Caused by: org.hibernate.internal.util.config.ConfigurationException: Unable to perform unmarshalling at line number 0 and column 0 in RESOURCE hibernate.cfg.xml. Message: null
at org.hibernate.service.internal.JaxbProcessor.unmarshal(JaxbProcessor.java:120)
at org.hibernate.service.internal.JaxbProcessor.unmarshal(JaxbProcessor.java:69)
at org.hibernate.service.ServiceRegistryBuilder.configure(ServiceRegistryBuilder.java:162)
at org.hibernate.service.ServiceRegistryBuilder.configure(ServiceRegistryBuilder.java:147)
at com.vmware.vim.vcenter.das.dao.impl.HibernateUtils.init(HibernateUtils.java:76)
... 24 more
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[com.ctc.wstx.exc.WstxIOException: Connection timed out: connect]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(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.service.internal.JaxbProcessor.unmarshal(JaxbProcessor.java:108)
... 28 more
Caused by: com.ctc.wstx.exc.WstxIOException: Connection timed out: connect
at com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:683)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(Unknown Source)
... 31 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
あなたの** hibernate.cfg.xmlファイルを投稿してください – ManuPK