【发布时间】:2011-08-07 19:47:32
【问题描述】:
我正在尝试让datanucleus REST service (2.0.1) 与HBASE (0.90.2) 一起运行。
但是,当访问 servlet(注册工作)时,我得到一个 503:
HTTP 错误 503
访问 /dn/ 时出现问题。原因:
org.datanucleus.exceptions.NucleusUserException: There is no available StoreManager of type "rdbms". Make sure that you have put the relevant DataNucleus store plugin in your CLASSPATH and if defining a connection via JNDI or DataSource you also need to provide persistence property "datanucleus.storeManagerType"
我的 persistence.xml 如下所示:
<persistence-unit name="test">
<provider>org.datanucleus.api.jdo.JDOPersistenceManagerFactory</provider>
<class>com.bla.MyClass</class>
<exclude-unlisted-classes />
<properties>
<property name="datanucleus.storeManagerType" value="hbase" />
<property name="datanucleus.ConnectionURL" value="hbase" />
<property name="datanucleus.ConnectionUserName" value="" />
<property name="datanucleus.ConnectionPassword" value="" />
<property name="datanucleus.autoCreateTables" value="true" />
<property name="datanucleus.autoCreateColumns" value="true" />
<property name="datanucleus.Multithreaded" value="true" />
</properties>
</persistence-unit>
但我不确定
的值- 提供者
- datanucleus.storeManagerType
谁能给我一个提示我可能错的地方或指向我一些关于此的文档?
【问题讨论】:
-
尤其是
的值在所有示例中似乎都是“org.datanucleus.api.jpa.PersistenceProviderImpl”。 -
Provider 必须是:org.datanucleus.api.jpa.PersistenceProviderImpl 并且不需要 datanucleus.storeManagerType。也不要忘记使持久性单元名称属性与 web.xml 中指定的相同
标签: java hbase datanucleus