0

我部署具有休眠依赖性的应用程序。

Jboss AS 4.2.3.GA 在 server/default/lib 中包含 hibernate3.jar。

试图加载 SessionFactory 并获取。

java.lang.ClassNotFoundException: No ClassLoaders found for: org.hibernate.connection.C3P0ConnectionProvider
    at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
    at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:96)
    at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)
    at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:425)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)

谷歌搜索没有结果。

用 hibernate-3.2.6.ga 替换 hibernate3.jar。

和 SessionFactory 加载挂在某处

    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)

在加载映射时。

 2013-05-21 11:42:27,824 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister]  Insert 0: insert into cb_entity (HOST, response_url, ADM_STATE, PORT, SYSTEM_ID, PASSWD, ADDRESS_RANGE, TON, NPI, LINK_TYPE, BIND_HOST, BIND_PORT, NAME, DESCRIPTION, OWNER, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

 2013-05-21 11:42:27,824 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister]  Update 0: update cb_entity set HOST=?, response_url=?, ADM_STATE=?, PORT=?, SYSTEM_ID=?, PASSWD=?, ADDRESS_RANGE=?, TON=?, NPI=?, LINK_TYPE=?, BIND_HOST=?, BIND_PORT=?, NAME=?, DESCRIPTION=?, OWNER=? where ID=?

 2013-05-21 11:42:27,824 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister]  Delete 0: delete from cb_entity where ID=?

 2013-05-21 11:42:27,835 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister] Static SQL for entity: com.alt1.cbc.core.BaseStationSubsystem

 2013-05-21 11:42:27,835 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister]  Version select: select id from bss where id =?

 2013-05-21 11:42:27,835 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister]  Snapshot select: select basestatio_.id, basestatio_.parent_id as parent2_0_, basestatio_.type as type0_, basestatio_.name as name0_, basestatio_.description as descript5_0_, basestatio_.bsc_admin_state as bsc6_0_, basestatio_.bsc_id as bsc7_0_, basestatio_.OWNER as OWNER0_, basestatio_.PARAMS as PARAMS0_, basestatio_.operator as operator0_ from bss basestatio_ where basestatio_.id=?

 2013-05-21 11:42:27,835 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister]  Insert 0: insert into bss (parent_id, type, name, description, bsc_admin_state, bsc_id, OWNER, PARAMS, operator, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
4

1 回答 1

0

数据模型类文件依赖于在构建期间复制到 WEB-INF/classes 而不是 jar 的类。

于 2013-05-21T13:59:37.567 回答