1

当我对 H2 数据库运行 create-sym-tables 命令时,我得到下面的堆栈跟踪。

我尝试过 SymmetricDS 3.6.1 和 3.5.19。

当调用 sysadmin 命令时,我将对称核心添加到我的类路径中,但我仍然没有运气。

谁能告诉我我在这里可能做错了什么?

-------------------------------------------------------------------------------
An exception occurred.  Please see the following for details:
-------------------------------------------------------------------------------
org.h2.jdbc.JdbcSQLException: Class "org.jumpmind.symmetric.db.EmbeddedDbFunctions" not     found; SQL statement:
CREATE ALIAS IF NOT EXISTS SYM_BASE64_ENCODE for "org.jumpmind.symmetric.db.EmbeddedDbFunctions.encodeBase64";  [90086-175]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
at org.h2.message.DbException.get(DbException.java:161)
at org.h2.util.Utils.loadUserClass(Utils.java:659)
at org.h2.engine.FunctionAlias.loadClass(FunctionAlias.java:146)
at org.h2.engine.FunctionAlias.load(FunctionAlias.java:122)
at org.h2.engine.FunctionAlias.init(FunctionAlias.java:107)
at org.h2.engine.FunctionAlias.newInstance(FunctionAlias.java:78)
at org.h2.command.ddl.CreateFunctionAlias.update(CreateFunctionAlias.java:49)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:253)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:340)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:156)
at java.lang.Thread.run(Thread.java:695)
Caused by: java.lang.ClassNotFoundException: org.jumpmind.symmetric.db.EmbeddedDbFunctions
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)
at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:89)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at org.h2.util.Utils.loadUserClass(Utils.java:654)
... 10 more

at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
at org.h2.message.DbException.get(DbException.java:161)
at org.h2.util.Utils.loadUserClass(Utils.java:659)
at org.h2.engine.FunctionAlias.loadClass(FunctionAlias.java:146)
at org.h2.engine.FunctionAlias.load(FunctionAlias.java:122)
at org.h2.engine.FunctionAlias.init(FunctionAlias.java:107)
at org.h2.engine.FunctionAlias.newInstance(FunctionAlias.java:78)
at org.h2.command.ddl.CreateFunctionAlias.update(CreateFunctionAlias.java:49)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:253)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:340)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:156)
at java.lang.Thread.run(Thread.java:695)
[wrapped] org.jumpmind.db.sql.SqlException: Class "org.jumpmind.symmetric.db.EmbeddedDbFunctions" not found; SQL statement:
CREATE ALIAS IF NOT EXISTS SYM_BASE64_ENCODE for "org.jumpmind.symmetric.db.EmbeddedDbFunctions.encodeBase64";  [90086-176]
at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:288)
at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:279)
at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:421)
at org.jumpmind.db.sql.JdbcSqlTemplate.update(JdbcSqlTemplate.java:289)
at org.jumpmind.db.sql.AbstractSqlTemplate.update(AbstractSqlTemplate.java:212)
at org.jumpmind.symmetric.db.AbstractSymmetricDialect.install(AbstractSymmetricDialect.java:167)
at org.jumpmind.symmetric.db.h2.H2SymmetricDialect.createRequiredDatabaseObjects(H2SymmetricDialect.java:94)
at org.jumpmind.symmetric.db.AbstractSymmetricDialect.initTablesAndDatabaseObjects(AbstractSymmetricDialect.java:150)
at org.jumpmind.symmetric.AbstractSymmetricEngine.setupDatabase(AbstractSymmetricEngine.java:371)
at org.jumpmind.symmetric.SymmetricAdmin.createSymTables(SymmetricAdmin.java:471)
at org.jumpmind.symmetric.SymmetricAdmin.executeWithOptions(SymmetricAdmin.java:285)
at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:132)
at org.jumpmind.symmetric.SymmetricAdmin.main(SymmetricAdmin.java:126)
4

1 回答 1

2

您将 H2 作为独立的数据库引擎运行?如果是这样,您需要在类路径中包含 symmetric-client-xxxjar。

@java -cp "h2-1.4.181.jar;**symmetric-client-3.6.5.jar**;%H2DRIVERS%;%CLASSPATH%" org.h2.tools.Console %*
@if errorlevel 1 pause
于 2014-08-22T08:19:31.007 回答