Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Connection mySQL to ws02

Writer Andrew Henderson

Folks,

Im facing a problem with connecting/creating mysql database/tables to ws02 instead of 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: is already defined

Hope to get some help about it.

Additional doc:

,

1 Answer

Check your db as it looks like you already have the key 'REG_PATH_IND_BY_PATH_VALUE' defined and are trying to create it again when you do the create index 'REG_PATH_IND_BY_PATH_VALUE'. This could be that when you first tried to run the query, that part succeeded and then it failed on something else and now is failing because the create worked first time. Check you DB tables as you may have to name the key something different if you have already used it.

Hope this helps.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy