Ich brauche ein wenig Hilfe beim Installieren/Verbinden einer Anwendung mit einer MySQL-Datenbank. Beim ersten Mal hatte ich viele Probleme/Fehler, die meisten davon sind verschwunden und das ist das Ergebnis, immer noch nichts, haha ... Kennt jemand den richtigen Weg? Unten finden Sie das Protokoll.
ws02@ws02:/usr/bin/wso2/wso2emm-2.0.1/bin$ sudo -E ./wso2server.sh -Dsetup
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-08 03:18:17,379] INFO {org.wso2.carbon.appmgt.impl.internal.AppDiscoveryComponent} - WebApp Discovery component activated
[2016-05-08 03:18:17,424] INFO {org.wso2.carbon.appmgt.mobile.internal.AppManagerMobileComponent} - WSO2MDM_INTERNAL MDM is bound to App Manager
[2016-05-08 03:18:17,424] INFO {org.wso2.carbon.appmgt.mobile.internal.AppManagerMobileComponent} - App Manger Mobile Component activated
[2016-05-08 03:18:18,083] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Starting WSO2 Carbon...
[2016-05-08 03:18:18,084] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Operating System : Linux 4.4.0-21-generic, amd64
[2016-05-08 03:18:18,084] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Home : /usr/java/jdk1.8.0_91/jre
[2016-05-08 03:18:18,085] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Version : 1.8.0_91
[2016-05-08 03:18:18,085] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java VM : Java HotSpot(TM) 64-Bit Server VM 25.91-b14,Oracle Corporation
[2016-05-08 03:18:18,085] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Carbon Home : /usr/bin/wso2/wso2emm-2.0.1
[2016-05-08 03:18:18,085] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Temp Dir : /usr/bin/wso2/wso2emm-2.0.1/tmp
[2016-05-08 03:18:18,086] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - User : root, nl-NL, Europe/Amsterdam
[2016-05-08 03:18:18,494] 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-08 03:18:18,495] 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-08 03:18:24,330] 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-08 03:21:29,785] INFO {org.apache.catalina.startup.TaglibUriRule} - TLD skipped. URI: http://tiles.apache.org/tags-tiles is already defined
Hoffe, dass mir jemand dabei helfen kann, ich bin kein Linux-Profi.
Antwort1
Wie von Ihnen beigefügt, stammt es aus dem Protokoll:
Verursacht durch: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Ungültiger Standardwert für „REG_CREATED_TIME“
Demnach gibt es kein Problem mit Ubuntu oder Linux. Es ist ein Java-Problem und das Protokoll ist ein Java-Stacktrace.
Aktualisieren:
OK, ich habe ein paar Nachforschungen angestellt und ausprobiert, ob Sie einen Enterprise Service Bus ESB-Server installieren möchten, der in Java geschrieben ist. Wenn Sie das Skript ausführen, versucht es, die Datenbank mit einem Standardwert zu initialisieren. Aber es kann nicht abgeschlossen werden, weil dieser Fehler auftritt (siehe oben).
Ich denke, dass dieser Fehler durch unterschiedliche MySQL-Versionen oder durch Versionsunterschiede im JDBC-Connector verursacht wird.
Dies sollten Sie befolgenDokumentoder nehmen Sie Kontakt mit den Entwicklern auf.
Antwort2
Dies ist ein bekanntes Problem mit MySql 5.7. Ein Workaround wird hier beschrieben[1].
Problemumgehung:
Setzen Sie GLOBAL sql_mode = "ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION";