各位朋友,
我在连接/创建 mysql 数据库/表到 ws02 而不是 h2 时遇到问题
ws02@ws02:/usr/bin/wso2/wso2emm-2.0.1/bin$ sudo -E ./wso2server.sh -Dsetup
[sudo] wachtwoord voor ws02:
JAVA_HOME environment variable is set to /usr/java/jdk1.8.0_91/
CARBON_HOME environment variable is set to /usr/bin/wso2/wso2emm-2.0.1
Using Java memory options: -Xms256m -Xmx1024m
[2016-05-07 13:26:19,159] INFO {org.wso2.carbon.appmgt.impl.internal.AppDiscoveryComponent} - WebApp Discovery component activated
[2016-05-07 13:26:19,173] INFO {org.wso2.carbon.appmgt.mobile.internal.AppManagerMobileComponent} - WSO2MDM_INTERNAL MDM is bound to App Manager
[2016-05-07 13:26:19,174] INFO {org.wso2.carbon.appmgt.mobile.internal.AppManagerMobileComponent} - App Manger Mobile Component activated
[2016-05-07 13:26:19,343] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Starting WSO2 Carbon...
[2016-05-07 13:26:19,344] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Operating System : Linux 4.4.0-21-generic, amd64
[2016-05-07 13:26:19,344] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Home : /usr/java/jdk1.8.0_91/jre
[2016-05-07 13:26:19,344] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Version : 1.8.0_91
[2016-05-07 13:26:19,345] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java VM : Java HotSpot(TM) 64-Bit Server VM 25.91-b14,Oracle Corporation
[2016-05-07 13:26:19,345] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Carbon Home : /usr/bin/wso2/wso2emm-2.0.1
[2016-05-07 13:26:19,345] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Temp Dir : /usr/bin/wso2/wso2emm-2.0.1/tmp
[2016-05-07 13:26:19,345] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - User : root, nl-NL, Europe/Amsterdam
[2016-05-07 13:26:19,614] WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} - Maximum PermGen space (MB) :0 of the running JVM is set below the recommended minimum size :256
[2016-05-07 13:26:19,615] WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} - Carbon is configured to use the default keystore (wso2carbon.jks). To maximize security when deploying to a production environment, configure a new keystore with a unique password in the production server profile.
Activating org.wso2.jaggery.scxml with RealmService enabled
[2016-05-07 13:26:23,367] ERROR {org.wso2.carbon.user.core.internal.Activator} - Cannot start User Manager Core bundle
java.lang.Exception: Error in creating the database
at org.wso2.carbon.user.core.common.DefaultRealmService.initializeDatabase(DefaultRealmService.java:338)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:88)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:112)
at org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:68)
at org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.Exception: Error occurred while executing : CREATE TABLE IF NOT EXISTS REG_RESOURCE ( REG_PATH_ID INTEGER NOT NULL, REG_NAME VARCHAR(256), REG_VERSION INTEGER NOT NULL AUTO_INCREMENT, REG_MEDIA_TYPE VARCHAR(500), REG_CREATOR VARCHAR(31) NOT NULL, REG_CREATED_TIME TIMESTAMP NOT NULL DEFAULT 0, REG_LAST_UPDATOR VARCHAR(31), REG_LAST_UPDATED_TIME TIMESTAMP NOT NULL DEFAULT 0, REG_DESCRIPTION VARCHAR(1000), REG_CONTENT_ID INTEGER, REG_TENANT_ID INTEGER DEFAULT 0, REG_UUID VARCHAR(100) NOT NULL, CONSTRAINT PK_REG_RESOURCE PRIMARY KEY(REG_VERSION, REG_TENANT_ID) )ENGINE INNODB
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQL(DatabaseCreator.java:169)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQLScript(DatabaseCreator.java:325)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:61)
at org.wso2.carbon.user.core.common.DefaultRealmService.initializeDatabase(DefaultRealmService.java:328)
... 19 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'REG_CREATED_TIME'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQL(DatabaseCreator.java:139)
... 22 more
[2016-05-07 13:26:52,933] INFO {org.apache.catalina.startup.TaglibUriRule} - TLD skipped. URI: http://tiles.apache.org/tags-tiles is already defined
希望得到一些帮助。
附加文件:
答案1
检查您的数据库,因为看起来您已经定义了键“REG_PATH_IND_BY_PATH_VALUE”,并且在执行创建索引“REG_PATH_IND_BY_PATH_VALUE”时尝试再次创建它。这可能是因为当您第一次尝试运行查询时,该部分成功了,然后它在其他方面失败了,现在又失败了,因为创建第一次就成功了。检查您的数据库表,因为如果您已经使用过该键,则可能需要将其命名为其他名称。
希望这可以帮助。