IBM Data Studio Connection error SQL1035N - connection

I have been searching in IBM forums/documentation, Google, and StackOverflow topics about this error, but I can't manage to find the solution.
Situation
Installed DB2 for test and education purposes, since I'm a student and I have to do a manual about the usage of this DB.
Installation of DB2 and graphical administration through Data Studio.
OS: Debian 7.7 Wheezy
DB2 Version: 10.5 FixPack 4 (Cancuun Release)
IBM Data Studio Version: 4.1.1
Installed DB2 and Data Studio as root.
I can execute commands in terminal like:
db2start
db2stop
db2_kill
db2
Also I can execute commands in db2 Command Line Processor like:
I can create a database: db2 => CREATE DATABASE SAMPLE
also it connects correctly: db2 => CONNECT TO SAMPLE
and I can query to connected database: db2=> SELECT COUNT(COL) FROM TABLE
DB2 is working good, sometimes it hangs and I have to command db2_kill and restart with db2start
It's weird that it hangs everytime I create a new DB. But anyways, it's able to connect and execute commands like above.
Data Studio installation is correct. The application is opened without problem.
I created a new database named example through:
db2inst1#debian:$ db2 CREATE DATABASE EXAMPLE
I installed both products twice, and in two different machines. And the problem still exists.
I also have to add that I tried running Data Studio as Debian user and root, returning the same error.
Problem
In Data Studio when I open the window/dialog of creating a new Connection, I configure the database connection settings:
Database Name: EXAMPLE
Server: localhost
Port: 50000
Username: db2inst1
Password: password
And when I click Next or Test Connection, the problem appears:
Hand-translated Spanish to English translation:
Not successful conecction attempt
Summary: SQL1035N A connection attempt has failed and a SQL exception has been generated.
Explanation: The connection attempt has generated a SQL Exception. The SQL Exception content is: null
Check the SQL code associated to the SQL Exception to determinate the cause of the problem.
SQLSTATE: 57019
Error is SQL1035N
IBM documents that SQL1035N is caused because:
There are remaining open connections to the database.
It is not this one because I have command db2_kill and db2start and command: db2 list active databases returns no data.
The database has been activated explicitly
I have tried ACTIVATE and DEACTIVATE commands, and still not working it returns the same error as Data Studio, SQL1035N
db2 => ACTIVATE DATABASE EJEMPLO
SQL1035N La operación ha fallado porque la base de datos especificada no
puede conectarse en la modalidad solicitada. SQLSTATE=57019
SQL1035N The operation has failed because the specified database cannot connect in the requested mode. SQLSTATE=57019
The database is in WRITE SUSPEND mode.
I tried fixing this by commanding SET WRITE RESUME FOR DATABASE, and it returns:
SQL1024 There are no connections to the database. SQL=08003
This is not the problem because there are no connections to the database
Now, if I click the copy to clipboard it copies the complete error trace, or stack trace.
Here it is, but written in spanish. Anyways, it shouldn't be a problem to understand it, since most information is technical, and there is not many spanish words.
Thanks for your help.
Explicación
<b>Explicación:</b><br/><br/>el intento de conexión ha generado una excepción de SQL. El contenido de la excepción de SQL es: null
<br/><b>Respuesta del usuario:</b><br/><br/>inspeccione el código SQL asociado a la excepción de SQL para determinar la causa del problema.
SQLSSTATE: 57019
Soporte
Propiedades de conexión
Base de datos: EJEMPLO
URL: jdbc:db2://localhost:50000/EJEMPLO:retrieveMessagesFromServerOnGetMessage=true;
Nombre de usuario: db2inst1
Contraseña: (No se muestra)
Entorno
Nombre de clase de controlador = com.ibm.db2.jcc.DB2Driver
Versión de controlador = 4.18.60
Vía de acceso al archivo JAR del controlador = /opt/IBM/SDPShared/plugins/com.ibm.datatools.db2_2.2.100.v20140708_0755/driver/db2jcc4.jar:/opt/IBM/SDPShared/plugins/com.ibm.datatools.db2_2.2.100.v20140708_0755/driver/db2jcc_license_cisuz.jar
Nombre de sistema operativo = Linux
Arquitectura del sistema operativo = amd64
Versión del sistema operativo = 3.2.0-4-amd64
Proveedor de implementación de JVM = IBM Corporation
Tiempo de ejecución de JVM = Java(TM) SE Runtime Environment
Versión Java = JRE 1.7.0 IBM J9 2.7 Linux amd64-64 Compressed References 20140410_195893 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR1_20140410_1931_B195893
JIT - tr.r13.java_20140410_61421
GC - R27_Java727_SR1_20140410_1931_B195893_CMPRSS
J9CL - 20140410_195893
Lanzador = /opt/IBM/DS4.1.1/eclipse
Rastreo de pila
com.ibm.db2.jcc.am.SqlExceptioncom.ibm.db2.jcc.am.kd.a(Unknown Source)
com.ibm.db2.jcc.am.kd.a(Unknown Source)
com.ibm.db2.jcc.am.kd.a(Unknown Source)
com.ibm.db2.jcc.am.Connection.completeSqlca(Unknown Source)
com.ibm.db2.jcc.t4.z.q(Unknown Source)
com.ibm.db2.jcc.t4.z.p(Unknown Source)
com.ibm.db2.jcc.t4.z.l(Unknown Source)
com.ibm.db2.jcc.t4.z.d(Unknown Source)
com.ibm.db2.jcc.t4.b.k(Unknown Source)
com.ibm.db2.jcc.t4.b.b(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.b(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.<init>(Unknown Source)
com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(Unknown Source)
org.eclipse.datatools.connectivity.DriverConnectionBase.open(Unknown Source)
org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(Unknown Source)
org.eclipse.datatools.enablement.ibm.db2.internal.luw.JDBCLUWConnectionFactory.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage.handleTestConnection(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage.access$6(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage$10.handleEvent(Unknown Source)
org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
org.eclipse.jface.window.Window.runEventLoop(Unknown Source)
org.eclipse.jface.window.Window.open(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.actions.NewDBConnectionHandler.execute(Unknown Source)
org.eclipse.ui.internal.handlers.HandlerProxy.execute(Unknown Source)
org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.eclipse.e4.core.internal.di.MethodRequestor.execute(Unknown Source)
org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(Unknown Source)
org.eclipse.e4.core.internal.di.InjectorImpl.invoke(Unknown Source)
org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(Unknown Source)
org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(Unknown Source)
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(Unknown Source)
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(Unknown Source)
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(Unknown Source)
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(Unknown Source)
org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(Unknown Source)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(Unknown Source)
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(Unknown Source)
org.eclipse.ui.internal.Workbench$5.run(Unknown Source)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
org.eclipse.ui.internal.ide.application.IDEApplication.start(Unknown Source)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
org.eclipse.equinox.launcher.Main.run(Unknown Source)
org.eclipse.equinox.launcher.Main.main(Unknown Source)
I will also copy and paste this topic to IBM forum, just to address them this error directly.
Thanks again.

The problem is solved.
I will answer my own question:
How did I solve it?
I downgraded from V10.5 to V9.7 FixPack 6
Also, I checked Linux platforms supported by DB2, and I chose to install 9.7 Express FP6 in Ubuntu 12.04.5, and right now, after installing the overall system, Ubuntu and DB2, I am using the Control Center, allowing me to create DB and query the DB successfully.
Classic works
Thank you
Edit at 18 January 2015
I reinstalled DB2 V10.5 and this time the DB creation worked. And I'm remarking time, because I had to wait 5 minutes for the DB to be created. This is the main issue I think I had previously, as it was answered in IBM official forum, since I was trying to create it in a VM and the proccess takes a bit longer.

Related

Cannot connect with a backup of a derby database using Netbeans or ij

I back up regularly a derby database, that is on another server, simply by copying the location of the Derby database. So I have many backups depending on the date.
Now I am trying to connect to one of those backups from my computer, after installing Netbeans and Java 1.6 (becuase the app runs on this verion) and also installing derby.
The app connects with Java DB Network (clientDriver) and the connection URL is:
jdbc:derby://localhost:1527/C:Derby.DB
The error that I get is: Unable to connect. Cannot establish a connection to database using org.apache.derby.jdbc.ClientDriver (DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ040, SQLERRMC: fail to start database with class loader sun.misc.Launcher$AppClassLoader#610455d6, see the next exception for details.::SQLSTATE:X0Y32
The error message associated with SQLSTATE:X0Y32 is of the form '' already exists in ''
Ive investigated a lot and tried many options with no solution.
Please help!
Thank you
Ive already tried to connect from ij and get the exact same error.
Ive tried to connect from the server and re-direct to the back database and get the exact same error.
Also, when I try to connect through the Embedded Driver, I get this error:
ij> connect 'jdbc:derby:C:/database';
---------------------------------------------------------------- Tue Apr 02 08:39:43 COT 2019: Iniciando instancia
f81e0010-0169-dae4-8f03-00000e572d50 de Derby, versi¾n The Apache
Software Foundation - Apache Derby - 10.12.1.1 - (1704137): in the
database directory using sun.misc.Launcher$AppClassLoader#66d3c617
Loaded from
file:/C:/db-derby-10.12.1.1-bin/db-derby-10.12.1.1-bin/lib/derby.jar
java.vendor=Oracle Corporation java.runtime.version=1.8.0_201-b09
user.dir=C:\ os.name=Windows 10 os.arch=amd64 os.version=10.0
derby.system.home=null Cargador de clases de base de datos iniciado -
derby.database.classpath=''
---------------------------------------------------------------- Tue Apr 02 08:39:43 COT 2019: Cerrando la instancia
f81e0010-0169-dae4-8f03-00000e572d50 en el directorio de base de datos
C:\database con cargador de clases
sun.misc.Launcher$AppClassLoader#66d3c617 Tue Apr 02 08:39:43 COT 2019
Thread[main,5,main] Cleanup action starting java.sql.SQLException:
Cannot establish a connection to database using
sun.misc.Launcher$AppClassLoader#66d3c617, consulte la excepci¾n
siguiente para obtener mßs informaci¾n.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown
Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
at org.apache.derby.tools.ij.main(Unknown Source) Caused by: ERROR XJ040: Cannot establish a connection to database using
sun.misc.Launcher$AppClassLoader#66d3c617, consulte la excepci¾n
siguiente para obtener mßs informaci¾n.
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown
Source)
... 23 more Caused by: ERROR X0Y32: Statement 'getUDTs' already exists in Schema 'SYS'.
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addSPSDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSPSSet(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSystemSps(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateMetadataSPSes(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DD_Version.handleMinorRevisionChange(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DD_Version.upgradeIfNeeded(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.loadDictionaryTables(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown
Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unknown
Source)
... 20 more
============= begin nested exception, level (1) =========== java.sql.SQLException: Statement 'getUDTs' already exists in Schema
'SYS'.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown
Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
at org.apache.derby.tools.ij.main(Unknown Source) Caused by: ERROR X0Y32: Statement 'getUDTs' already exists in Schema 'SYS'.
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addSPSDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSPSSet(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSystemSps(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateMetadataSPSes(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DD_Version.handleMinorRevisionChange(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DD_Version.upgradeIfNeeded(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.loadDictionaryTables(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown
Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unknown
Source)
... 20 more
============= end nested exception, level (1) ===========
============= begin nested exception, level (2) =========== ERROR X0Y32: Statement 'getUDTs' already exists in Schema 'SYS'.
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addSPSDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSPSSet(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSystemSps(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateMetadataSPSes(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DD_Version.handleMinorRevisionChange(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DD_Version.upgradeIfNeeded(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.loadDictionaryTables(Unknown
Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown
Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown
Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
at org.apache.derby.tools.ij.main(Unknown Source)
============= end nested exception, level (2) =========== Cleanup action completed ERROR XJ040: Cannot establish a connection to
database using sun.misc.Launcher$AppClassLoader#66d3c617, consulte la
excepcion siguiente para obtener mas informacion. ERROR X0Y32:
Statement 'getUDTs' already exists in Schema 'SYS'.
Im posting this because finally I could recover the corrupted table and for somenone that would find this helpful.
What I did after replacing these files: c230.dat, c241.dat and c251.dat
I investigated how to recover corrupted tables and found this great page:
https://givemethechills.com/recovering-a-corrupted-embedded-apache-derby-database-after-an-error-xj040-or-if-you-get-an-error-xsdg2/
That basically gave these steps:
Download the latest derby bin.
Add DerbyRecovery-0.0.1-SNAPSHOT.jar to the ij classpath
Run dataFileVTI.sql (remember to change the route to the database in the connect string)
Enter ij and connect to the database using upgrade=true
Use call SYSCS_UTIL.SYSCS_REGISTER_TOOL('customTool',true,'RawDBReader', 'CONTROL','RAW_','c:db','','APP',null); -> change the db route, password, bootpassword and schema
Check with select * from raw_app.table1;
I only got the 3rd step and then decided to restore the database with this command in ij:
jdbc:derby:sample;restoreFrom=c:\Derby.DB
and this worked. After this I could access the table that I needed, with all the records.
So probably only running this command in ij worked after replacing the files, but I'm posting everything I did just in case.
Thanks to all that helped!
Karina S.
[This is not really a solution, but is too long to post as a comment.]
Someone else had the same problem as you (ERROR X0Y32: Statement 'getUDTs' already exists...). See Bug Report DERBY-5371: Database fails to boot, complaining that the getProcedureColumns() system procedure already exists
The final comment in the thread states:
I had a customer who was also hit by this problem on an old database,
with the same error that Andreas reported.
Caused by: java.sql.SQLException: Statement 'getUDTs' already exists
in Schema 'SYS'.
Running the command:
values syscs_util.syscs_get_database_property( 'DataDictionaryVersion'
)
returned 10.5.
I used the same trick of loading fresh c230.dat, c241.dat and c251.dat files in order to get the database to boot.
I'm not sure what exactly has to be done to load "fresh c230.dat, c241.dat and c251.dat files in order to get the database to boot", but if that makes sense to you it might be worth trying.

Unable to start docker container from arquillian cube on windows 10

I have a junit test that have to start a docker container.
This is the code i use
#ClassRule
public static ContainerDslRule mysql = new ContainerDslRule(TestConfigConstants.DOCKER_IMAGE)
.withPortBinding(TestConfigConstants.PORT)
.withEnvironment("MYSQL_ROOT_PASSWORD", TestConfigConstants.PASSWORD,
"MYSQL_DATABASE", TestConfigConstants.DB,
"MYSQL_USER", TestConfigConstants.USERNAME,
"MYSQL_PASSWORD", TestConfigConstants.PASSWORD);
When i start the test on a windows 7 pc with docker toolbox installed it's all ok. But when i start it on a windows 10 pc i have the follwing exception
java.lang.ExceptionInInitializerError
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
at java.lang.reflect.Field.get(Unknown Source)
at org.junit.runners.model.FrameworkField.get(FrameworkField.java:73)
at org.junit.runners.model.TestClass.getAnnotatedFieldValues(TestClass.java:230)
at org.junit.runners.ParentRunner.classRules(ParentRunner.java:255)
at org.junit.runners.ParentRunner.withClassRules(ParentRunner.java:244)
at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:194)
at org.junit.runners.ParentRunner.run(ParentRunner.java:362)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.arquillian.spacelift.execution.ExecutionException: Execution of a task failed. Execution of a task failed. Unable to execute task SpawnProcessTask
at org.arquillian.spacelift.execution.ExecutionException.prependMessage(ExecutionException.java:70)
at org.arquillian.spacelift.execution.impl.FutureBasedExecution.unwrapException(FutureBasedExecution.java:173)
at org.arquillian.spacelift.execution.impl.FutureBasedExecution.await(FutureBasedExecution.java:101)
at org.arquillian.spacelift.task.os.ProcessBasedExecution.await(ProcessBasedExecution.java:149)
at org.arquillian.cube.docker.impl.util.CommandLineExecutor.execCommandAsArray(CommandLineExecutor.java:21)
at org.arquillian.cube.docker.impl.util.CommandLineExecutor.execCommand(CommandLineExecutor.java:13)
at org.arquillian.cube.docker.impl.util.AbstractCliInternetAddressResolver.getIp(AbstractCliInternetAddressResolver.java:29)
at org.arquillian.cube.docker.impl.util.AbstractCliInternetAddressResolver.ip(AbstractCliInternetAddressResolver.java:23)
at org.arquillian.cube.docker.impl.client.CubeDockerConfigurationResolver.resolveBoot2Docker(CubeDockerConfigurationResolver.java:317)
at org.arquillian.cube.docker.impl.client.CubeDockerConfigurationResolver.resolveServerIp(CubeDockerConfigurationResolver.java:209)
at org.arquillian.cube.docker.impl.client.CubeDockerConfigurationResolver.resolve(CubeDockerConfigurationResolver.java:66)
at org.arquillian.cube.docker.junit.rule.ContainerDslRule.initializeDockerClient(ContainerDslRule.java:74)
at org.arquillian.cube.docker.junit.rule.ContainerDslRule.<init>(ContainerDslRule.java:50)
at org.arquillian.cube.docker.junit.rule.ContainerDslRule.<init>(ContainerDslRule.java:44)
at it.advansys.gestionalebdf.server.controller.contact.customer.CustomerContactControllerTest.<clinit>(CustomerContactControllerTest.java:66)
... 19 more
Caused by: java.io.IOException: Cannot run program "boot2docker": CreateProcess error=2, Impossibile trovare il file specificato
at java.lang.ProcessBuilder.start(Unknown Source)
at org.arquillian.spacelift.task.os.SpawnProcessTask.process(SpawnProcessTask.java:107)
at org.arquillian.spacelift.task.os.SpawnProcessTask.process(SpawnProcessTask.java:34)
at org.arquillian.spacelift.task.Task.run(Task.java:98)
at org.arquillian.spacelift.task.Task$1.call(Task.java:70)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=2, Impossibile trovare il file specificato
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 9 more
Any idea?
I think there are something related with docker machine but not sure exactly the problem now, how many docker machines do you have installed in that machine? If it is only one, can you try to start it manually (i.e docker-machine start dev)
If it works then there is a bug when docker-machine is not started yet.

Connecting Jenkins slave agent fails from Windows

I have Jenkins installed on a unix server.
I am trying to install a slave on a windows machine.
I tried first on Windows 2008 server, and failed and then I tried on my machine which is Widows 7 and failed.
The URL of the Jenkins server is http://unixserver:9997
I opened port 9997 on my machine through the firewall with no success.
I go to the server, and under the logs, there is a directory with my slave name; inside there is a log file called slave.log
I tried to launch the slave from the web launcher or from the command line:
java -jar slave.jar -jnlpUrl http://unixserver:9997/computer/slave1/slave-agent.jnlp -secret xxxxxxxxxxxxxxxxxxxxx
The error given there is:
java.io.IOException: Remote call on ghas1 failed
at hudson.remoting.Channel.call(Channel.java:723)
at org.jenkinsci.modules.slave_installer.impl.ComputerListenerImpl.onOnline(ComputerListenerImpl.java:32)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:505)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:347)
at jenkins.slaves.JnlpSlaveAgentProtocol$Handler.jnlpConnect(JnlpSlaveAgentProtocol.java:122)
at jenkins.slaves.JnlpSlaveAgentProtocol2$Handler2.run(JnlpSlaveAgentProtocol2.java:100)
at jenkins.slaves.JnlpSlaveAgentProtocol2.handle(JnlpSlaveAgentProtocol2.java:44)
at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:154)
Caused by: java.lang.NoClassDefFoundError: org/jvnet/localizer/Localizable
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at java.io.ObjectStreamClass.getPrivateMethod(Unknown Source)
at java.io.ObjectStreamClass.access$1700(Unknown Source)
at java.io.ObjectStreamClass$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(Unknown Source)
at java.io.ObjectStreamClass.lookup(Unknown Source)
at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
at hudson.remoting.UserRequest.perform(UserRequest.java:98)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:63)
at java.lang.Thread.run(Unknown Source)
I had the same exact problem - the slave would connect but then immediately fail; the error in the server log was the same. The slave was behind a firewall so I was starting the slave manually, but I got the same error when starting the slave on the same machine as the Jenkins master process using either ssh or jnlp.
The problem went away when we restarted the Jenkins process on the server.

Unable to run backup script shipped with Neo4j Enterprise 1.8.2

Operating System: Windows 2012
Neo4j Version: 1.8.2 Enterprise
I am having trouble using the Neo4jBackup.bat script to backup the Neo4j server. I am running the following command from an Administrator command prompt:
.\Neo4jBackup.bat -full -from single://127.0.0.1 -to E:\Neo4j-Backup
When I run this command, I receive the following output and stack trace:
Performing full backup from 'single://127.0.0.1'
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at org.neo4j.index.impl.lucene.LuceneDataSource.newIndexWriter(LuceneDataSource.java:685)
at org.neo4j.index.impl.lucene.LuceneDataSource.syncGetIndexSearcher(LuceneDataSource.java:574)
at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:540)
at org.neo4j.index.impl.lucene.LuceneDataSource.makeSureAllIndexesAreInstantiated(LuceneDataSource.java:893)
at org.neo4j.index.impl.lucene.LuceneDataSource.listStoreFiles(LuceneDataSource.java:833)
at org.neo4j.com.ServerUtil.rotateLogsAndStreamStoreFiles(ServerUtil.java:129)
at org.neo4j.backup.BackupImpl.fullBackup(BackupImpl.java:41)
at org.neo4j.backup.BackupClient$BackupRequestType$1.call(BackupClient.java:73)
at org.neo4j.backup.BackupClient$BackupRequestType$1.call(BackupClient.java:69)
at org.neo4j.com.Server$4.run(Server.java:427)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Unknown Source)
at java.io.File.getCanonicalPath(Unknown Source)
at org.apache.lucene.store.FSDirectory.getCanonicalPath(FSDirectory.java:129)
at org.apache.lucene.store.FSDirectory.<init>(FSDirectory.java:143)
at org.apache.lucene.store.MMapDirectory.<init>(MMapDirectory.java:93)
at org.apache.lucene.store.FSDirectory.open(FSDirectory.java:180)
at org.apache.lucene.store.FSDirectory.open(FSDirectory.java:172)
at org.neo4j.index.impl.lucene.LuceneDataSource$DirectoryGetter$1.getDirectory(LuceneDataSource.java:914)
at org.neo4j.index.impl.lucene.LuceneDataSource.newIndexWriter(LuceneDataSource.java:664)
... 15 more
What am I doing wrong? The Neo4j settings related to backup are set to:
online_backup_enabled=true
online_backup_port=6362
Your assistance is appreciated. Thank you.
Amir.
Could you try using valid URI syntax for the backup location, like
.\Neo4jBackup.bat -full -from single://127.0.0.1 -to /E:/Neo4j-Backup
Does that work?
Try running the command like this
Neo4jBackup.bat -full -from single://127.0.0.1 -to E:/Neo4j-Backup

How can I get Jenkins to upgrade automatically on Windows64?

I am setting up Jenkins on a Windows 64 bit machine. It's configured to run as a windows service.
Jenkins 1.482
I have another issue with using svn with jenkins and in trying to solve that issue i am trying to upgrade jenkins.
The upgrade fails with:
Checking internet connectivity Checking update center connectivity
java.net.SocketException: Permission denied: connect at
java.net.DualStackPlainSocketImpl.connect0(Native Method) at
java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at
java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at
java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at
java.net.AbstractPlainSocketImpl.connect(Unknown Source) at
java.net.PlainSocketImpl.connect(Unknown Source) at
java.net.SocksSocketImpl.connect(Unknown Source) at
java.net.Socket.connect(Unknown Source) at
and
hudson.util.IOException2: Failed to download from
http://updates.jenkins-ci.org/download/war/1.484/jenkins.war at
hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:716)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1052)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1031)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
I am not sure what is wrong.
This fails when running as a service and when running as an exe in my user space.
Can anyone explain how to fix this issue so i can upgrade jenkins and then fix the svn plugin?

Resources