---
title: "EMS6.0配置存储到数据库过程中遇到的问题"
author: "zhb8015"
date: "2011-11-09T11:12:00Z"
tags: []
slug: "ems6-0"
draft: false
lastmod: "2013-10-10T12:14:57Z"
id: 1954213
url: "https://peter8015.iteye.com/blog/1954213"
---

配置过程：

1[Enable the database store feature in the]() tibemsd.conf by setting the parameters

2[Setup and configure stores in the]() stores.conf file

3

[Associate destinations with the configured stores.]()

4[Export database tables]()

[（具体过程参见user guide和sample--config--tibemsd-db.conf）]()

[]()

具体文件：

tibemsd.conf:

dbstore\_classpath=c:\\lib\\antlr-2.7.6.jar;c:\\lib\\c3p0-0.9.1.jar;c:\\lib\\commons-collections-3.1.jar;c:\\lib\\commons-logging.jar;c:\\lib\\dom4j-1.6.1.jar;c:\\lib\\hibernate3.jar;c:\\lib\\hibernate-cglib-repack-2.1\_3.jar;c:\\lib\\javassist-3.4.GA.jar;c:\\lib\\jta-1.1.jar;c:\\lib\\oscache-2.1.jar;c:\\lib\\ojdbc6.jar;c:\\lib\\ojdbc14.jar;c:\\lib\\slf4j-api-1.5.6.jar;slf4j-log4j12-1.5.6.jar;c:\\lib\\slf4j-nop-1.5.6.jar  
dbstore\_driver\_name = oracle.jdbc.driver.OracleDriver  
dbstore\_driver\_dialect = org.hibernate.dialect.Oracle10gDialect  
jre\_library="C:\\Program Files\\Java\\jdk1.6.0\_27\\jre\\bin\\server\\jvm.dll"

stores.conf:

\[$sys.meta]  
type=dbstore  
dbstore\_driver\_url=jdbc:oracle:thin:@10.60.109.12:1521:tibcodev  
dbstore\_driver\_username=test  
dbstore\_driver\_password=1234

\[$sys.failsafe]  
type=dbstore  
dbstore\_driver\_url=jdbc:oracle:thin:@10.60.109.12:1521:tibcodev  
dbstore\_driver\_username=test  
dbstore\_driver\_password=1234

配置过程中的问题：

1 报错：Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/HibernateException

对比以上的包，如不缺少包，检查一下分隔符，window---";" linux---":",我就忘记了。

2 报错：Exception in thread "main" java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

参考文章：

[http://hi.baidu.com/fif%B7%E7%D4%C6/blog/item/840b12ef234504272df534ad.html](http://hi.baidu.com/fif%B7%E7%D4%C6/blog/item/840b12ef234504272df534ad.html)

[http://www.blogjava.net/zeroline/archive/2010/11/21/338622.html](http://www.blogjava.net/zeroline/archive/2010/11/21/338622.html)

在类路径先将slf4j-api.jar删除，再导入同版本的slf4j-api-1.5.6.jar和slf4j-log4j12-1.5.6.jar，问题可解决

心得 ：多多查看文档和资料，和相关的人士请教经验，以免走弯路。