You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by RAPPAZ Francois <fr...@unifr.ch> on 2020/09/10 10:09:08 UTC

database in a jar : conglomerate does not exists

Hi
I have a one table database embedded in a jar file. I tried to access it from ij with
java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p ij.properties

ij.properties is
derby.ui.codeset=utf8
ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/autconv.jar)docentries

I can see that my table (authors) is in the the database with SHOW TABLES;
I can see the columns
ij> DESCRIBE authors;
COLUMN_NAME         |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
NAME1               |VARCHAR  |NULL|NULL|20    |NULL      |40        |NO
NAME2               |VARCHAR  |NULL|NULL|20    |NULL      |40        |NO
DATA                |VARCHAR  |NULL|NULL|50    |NULL      |100       |YES
AUTHOR_ID           |INTEGER  |0   |10  |10    |AUTOINCRE&|NULL      |NO

4 rows selected
But I can't run a select statement:
ij> select * from authors;
ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
ij> exit;

I have derby 10.8.2.2
Thanks for any help.

François

RE: database in a jar : conglomerate does not exists

Posted by RAPPAZ Francois <fr...@unifr.ch>.
Hi Davide,

My versions are
U:\docs\OA\derby>java --version
java 9
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

U:\docs\OA\derby>jar --version
jar 9

U:\docs\OA\derby>ant -version
Apache Ant(TM) version 1.10.1 compiled on February 2 2017

My ant task to build the jar file
<property name="db.name" value="docentries"/>
<target name="jar" depends="getstuff">
	<genjar jarfile="${target.dir}/${proj.dir}/${jar.file}">	
	<classpath refid="class.path" />

	 <!-- include main class and all its dependencies -->
	 <class name="${main.class}" />
	     
	     <resource package="docentries">
		     <fileset dir="U:\docs\OA\derby" includes="${db.name}/*.properties" />
		     <!-- <fileset dir="derby" includes="U:\docs\jprogarchives\${db.name}/*.properties" /> -->
	    </resource>	     
	     <resource package="docentries/log">
		     <fileset dir="U:\docs\OA\derby" includes="${db.name}/log/" />
		 </resource>
 	     <resource package="docentries/seg0">
		     <fileset dir="U:\docs\OA\derby" includes="${db.name}/seg0/" />
             </resource>

    <!-- define the manifest -->
    <manifest>
	    <attribute name="Main-Class" value="${main.class}" />
	    <!-- http://mindprod.com/jgloss/jar.html -->
	    <attribute name="Class-Path" value="derby.jar" />
    </manifest>
    </genjar>
  
</target>

I add derby.jar in the manifest of the jar I'm building since I use it from my own classes. The derby.jar and my app.jar are in the same folder.
Just one more point: A Jar file made 2 years ago (2018)  still works correctly.

Cheers 

François
-----Original Message-----
From: Davide Grandi <da...@email.it> 
Sent: 11 September 2020 14:18
To: derby-user@db.apache.org
Subject: Re: database in a jar : conglomerate does not exists

Hello,

maybe the steps you follow are decisive :
- ".jar" files are only .zip files, but zip files have too many internal formats
- maybe the jar generation defaults are changed from what your derby "expects"

if you gives the usual details (JDK, jva -version, commands, ...) one could replicate the environment and your specific situation.

Bye,

     Davide Grandi

On 11/09/2020 09:33, RAPPAZ Francois wrote:
> If I start from a new database (named docentries), I packed it in a jar, I can connect with ij and run a select command.
>
> If I run the code from my java classe, I get the error
>
> ----- SQLException -----
>    SQL State:  XJ040
>    Error Code: 40000
>    Message:    Failed to start database 'classpath:docentries', see the next exception for details.
>
> ----- SQLException -----
>    SQL State:  XCL20
>    Error Code: 20000
>    Message:    Catalogs at version level 'null' cannot be upgraded to version level '10.4'.
>
> I connect with db = new 
> DBConnector("jdbc:derby:classpath:docentries");
>
> François
>
> -----Original Message-----
> From: Rick Hillegas <ri...@gmail.com>
> Sent: 11 September 2020 00:49
> To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois 
> <fr...@unifr.ch>
> Subject: Re: database in a jar : conglomerate does not exists
>
> Also, look inside the jar file for a directory called docentries/seg0.
> Does it contain a file called c560.dat?
>
> On 9/10/20 8:53 AM, Rick Hillegas wrote:
>> Sorry. Make that query:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 1376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>>> Hi François,
>>>
>>> Do you have any information or theories about how your database 
>>> became corrupted? I have never encountered this situation before. A 
>>> database in a jar file should be read-only, so the only theory I 
>>> have is that the jar file itself was corrupted by some process outside Derby.
>>>
>>> Please run the following query in order to find out what table/index 
>>> is corrupted:
>>>
>>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>>
>>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>>
>>> WHERE c.conglomerateNumber = 376
>>>
>>> AND c.tableID = t.tableID
>>>
>>> AND t.schemaID = s.schemaID
>>>
>>> ;
>>>
>>>
>>> Thanks,
>>> -Rick
>>>
>>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>>> Hi
>>>> I have a one table database embedded in a jar file. I tried to 
>>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij 
>>>> -p ij.properties
>>>>
>>>> ij.properties is
>>>> derby.ui.codeset=utf8
>>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/
>>>> a
>>>> utconv.jar)docentries
>>>>
>>>>
>>>> I can see that my table (authors) is in the the database with SHOW 
>>>> TABLES; I can see the columns
>>>> ij> DESCRIBE authors;
>>>> COLUMN_NAME
>>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>>> -------------------------------------------------------------------
>>>> -
>>>> ----------
>>>>
>>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO 
>>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       
>>>> |YES AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL
>>>> |NO
>>>>
>>>> 4 rows selected
>>>> But I can't run a select statement:
>>>> ij> select * from authors;
>>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>>> ij> exit;
>>>>
>>>> I have derby 10.8.2.2
>>>> Thanks for any help.
>>>>
>>>> François
>>>>
>>>
>>
--
Ing. Davide Grandi
email    : davide.grandi@email.it
mobile   : +39 339 7468 778
linkedin : http://linkedin.com/in/davidegrandi


RE: database in a jar : conglomerate does not exists

Posted by RAPPAZ Francois <fr...@unifr.ch>.
I setup a repository for my code and data here
https://sourceforge.net/p/java-autconv/mercurial/ci/default/tree/
(sorry I'm not a Git user)

from the proj/autconv folder you may run the ant tasks
ant compile
ant jar

These were working on my pc at least...

and the results should be placed in a target folder (to be created)

the derby database is in proj/autconv/stuff/derby/docentries

in proj/autconv/stuff
there are sql commands to create the table and to place data into it

I hope there are not too many files missing

To test: run the jar file
java -jar autconv.jar
There should be no error message...
In the upper Text area, type "A Weis1" (without ")
Click on split
And the last line from the message displayed in the bottom text area should be
***Weis, Antoine 123*** (the number is not correct) but that's the message that count.

You may also get a zip file with my code and a jar file.

Cheers

François

-----Original Message-----
From: Davide Grandi <da...@email.it> 
Sent: 11 September 2020 14:18
To: derby-user@db.apache.org
Subject: Re: database in a jar : conglomerate does not exists

Hello,

maybe the steps you follow are decisive :
- ".jar" files are only .zip files, but zip files have too many internal formats
- maybe the jar generation defaults are changed from what your derby "expects"

if you gives the usual details (JDK, jva -version, commands, ...) one could replicate the environment and your specific situation.

Bye,

     Davide Grandi

On 11/09/2020 09:33, RAPPAZ Francois wrote:
> If I start from a new database (named docentries), I packed it in a jar, I can connect with ij and run a select command.
>
> If I run the code from my java classe, I get the error
>
> ----- SQLException -----
>    SQL State:  XJ040
>    Error Code: 40000
>    Message:    Failed to start database 'classpath:docentries', see the next exception for details.
>
> ----- SQLException -----
>    SQL State:  XCL20
>    Error Code: 20000
>    Message:    Catalogs at version level 'null' cannot be upgraded to version level '10.4'.
>
> I connect with db = new 
> DBConnector("jdbc:derby:classpath:docentries");
>
> François
>
> -----Original Message-----
> From: Rick Hillegas <ri...@gmail.com>
> Sent: 11 September 2020 00:49
> To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois 
> <fr...@unifr.ch>
> Subject: Re: database in a jar : conglomerate does not exists
>
> Also, look inside the jar file for a directory called docentries/seg0.
> Does it contain a file called c560.dat?
>
> On 9/10/20 8:53 AM, Rick Hillegas wrote:
>> Sorry. Make that query:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 1376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>>> Hi François,
>>>
>>> Do you have any information or theories about how your database 
>>> became corrupted? I have never encountered this situation before. A 
>>> database in a jar file should be read-only, so the only theory I 
>>> have is that the jar file itself was corrupted by some process outside Derby.
>>>
>>> Please run the following query in order to find out what table/index 
>>> is corrupted:
>>>
>>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>>
>>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>>
>>> WHERE c.conglomerateNumber = 376
>>>
>>> AND c.tableID = t.tableID
>>>
>>> AND t.schemaID = s.schemaID
>>>
>>> ;
>>>
>>>
>>> Thanks,
>>> -Rick
>>>
>>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>>> Hi
>>>> I have a one table database embedded in a jar file. I tried to 
>>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij 
>>>> -p ij.properties
>>>>
>>>> ij.properties is
>>>> derby.ui.codeset=utf8
>>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/
>>>> a
>>>> utconv.jar)docentries
>>>>
>>>>
>>>> I can see that my table (authors) is in the the database with SHOW 
>>>> TABLES; I can see the columns
>>>> ij> DESCRIBE authors;
>>>> COLUMN_NAME
>>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>>> -------------------------------------------------------------------
>>>> -
>>>> ----------
>>>>
>>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO 
>>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       
>>>> |YES AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL
>>>> |NO
>>>>
>>>> 4 rows selected
>>>> But I can't run a select statement:
>>>> ij> select * from authors;
>>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>>> ij> exit;
>>>>
>>>> I have derby 10.8.2.2
>>>> Thanks for any help.
>>>>
>>>> François
>>>>
>>>
>>
--
Ing. Davide Grandi
email    : davide.grandi@email.it
mobile   : +39 339 7468 778
linkedin : http://linkedin.com/in/davidegrandi


Re: database in a jar : conglomerate does not exists

Posted by Davide Grandi <da...@email.it>.
Hello,

maybe the steps you follow are decisive :
- ".jar" files are only .zip files, but zip files have too many internal 
formats
- maybe the jar generation defaults are changed from what your derby 
"expects"

if you gives the usual details (JDK, jva -version, commands, ...) one 
could replicate
the environment and your specific situation.

Bye,

     Davide Grandi

On 11/09/2020 09:33, RAPPAZ Francois wrote:
> If I start from a new database (named docentries), I packed it in a jar, I can connect with ij and run a select command.
>
> If I run the code from my java classe, I get the error
>
> ----- SQLException -----
>    SQL State:  XJ040
>    Error Code: 40000
>    Message:    Failed to start database 'classpath:docentries', see the next exception for details.
>
> ----- SQLException -----
>    SQL State:  XCL20
>    Error Code: 20000
>    Message:    Catalogs at version level 'null' cannot be upgraded to version level '10.4'.
>
> I connect with db = new DBConnector("jdbc:derby:classpath:docentries");
>
> François
>
> -----Original Message-----
> From: Rick Hillegas <ri...@gmail.com>
> Sent: 11 September 2020 00:49
> To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois <fr...@unifr.ch>
> Subject: Re: database in a jar : conglomerate does not exists
>
> Also, look inside the jar file for a directory called docentries/seg0.
> Does it contain a file called c560.dat?
>
> On 9/10/20 8:53 AM, Rick Hillegas wrote:
>> Sorry. Make that query:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 1376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>>> Hi François,
>>>
>>> Do you have any information or theories about how your database
>>> became corrupted? I have never encountered this situation before. A
>>> database in a jar file should be read-only, so the only theory I have
>>> is that the jar file itself was corrupted by some process outside Derby.
>>>
>>> Please run the following query in order to find out what table/index
>>> is corrupted:
>>>
>>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>>
>>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>>
>>> WHERE c.conglomerateNumber = 376
>>>
>>> AND c.tableID = t.tableID
>>>
>>> AND t.schemaID = s.schemaID
>>>
>>> ;
>>>
>>>
>>> Thanks,
>>> -Rick
>>>
>>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>>> Hi
>>>> I have a one table database embedded in a jar file. I tried to
>>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p
>>>> ij.properties
>>>>
>>>> ij.properties is
>>>> derby.ui.codeset=utf8
>>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/a
>>>> utconv.jar)docentries
>>>>
>>>>
>>>> I can see that my table (authors) is in the the database with SHOW
>>>> TABLES; I can see the columns
>>>> ij> DESCRIBE authors;
>>>> COLUMN_NAME
>>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>>> --------------------------------------------------------------------
>>>> ----------
>>>>
>>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       |YES
>>>> AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL
>>>> |NO
>>>>
>>>> 4 rows selected
>>>> But I can't run a select statement:
>>>> ij> select * from authors;
>>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>>> ij> exit;
>>>>
>>>> I have derby 10.8.2.2
>>>> Thanks for any help.
>>>>
>>>> François
>>>>
>>>
>>
-- 
Ing. Davide Grandi
email    : davide.grandi@email.it
mobile   : +39 339 7468 778
linkedin : http://linkedin.com/in/davidegrandi


Re: database in a jar : conglomerate does not exists

Posted by Rick Hillegas <ri...@gmail.com>.
Thanks for letting us know how you resolved the issue.

On 9/14/20 11:08 PM, RAPPAZ Francois wrote:
> Thank you all
>
> At the end
> - taking care for  the version of derby to be the same when I build the database or when I search
> - deleting the old database (corrupted) and starting with a new one, then creating the table and populating it
> Solved the problem.
>
> Archiving the database in a jar was not the reason.
>
> Cheers
>
> François
>
>
> -----Original Message-----
> From: Rick Hillegas <ri...@gmail.com>
> Sent: 12 September 2020 18:13
> To: RAPPAZ Francois <fr...@unifr.ch>
> Cc: derby-user@db.apache.org
> Subject: Re: database in a jar : conglomerate does not exists
>
> This error indicates that you are trying to boot a database with a lower version of Derby than the one used to create the database. I believe you said that the database was created by Derby 10.8.2.2. It looks like you are trying to boot it with some version of Derby in the 10.4 family.
>
> -Rick
>
> On 9/11/20 12:33 AM, RAPPAZ Francois wrote:
>> If I start from a new database (named docentries), I packed it in a jar, I can connect with ij and run a select command.
>>
>> If I run the code from my java classe, I get the error
>>
>> ----- SQLException -----
>>     SQL State:  XJ040
>>     Error Code: 40000
>>     Message:    Failed to start database 'classpath:docentries', see the next exception for details.
>>
>> ----- SQLException -----
>>     SQL State:  XCL20
>>     Error Code: 20000
>>     Message:    Catalogs at version level 'null' cannot be upgraded to version level '10.4'.
>>
>> I connect with db = new
>> DBConnector("jdbc:derby:classpath:docentries");
>>
>> François
>>
>> -----Original Message-----
>> From: Rick Hillegas <ri...@gmail.com>
>> Sent: 11 September 2020 00:49
>> To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois
>> <fr...@unifr.ch>
>> Subject: Re: database in a jar : conglomerate does not exists
>>
>> Also, look inside the jar file for a directory called docentries/seg0.
>> Does it contain a file called c560.dat?
>>
>> On 9/10/20 8:53 AM, Rick Hillegas wrote:
>>> Sorry. Make that query:
>>>
>>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>>
>>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>>
>>> WHERE c.conglomerateNumber = 1376
>>>
>>> AND c.tableID = t.tableID
>>>
>>> AND t.schemaID = s.schemaID
>>>
>>> ;
>>>
>>>
>>> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>>>> Hi François,
>>>>
>>>> Do you have any information or theories about how your database
>>>> became corrupted? I have never encountered this situation before. A
>>>> database in a jar file should be read-only, so the only theory I
>>>> have is that the jar file itself was corrupted by some process outside Derby.
>>>>
>>>> Please run the following query in order to find out what table/index
>>>> is corrupted:
>>>>
>>>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>>>
>>>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>>>
>>>> WHERE c.conglomerateNumber = 376
>>>>
>>>> AND c.tableID = t.tableID
>>>>
>>>> AND t.schemaID = s.schemaID
>>>>
>>>> ;
>>>>
>>>>
>>>> Thanks,
>>>> -Rick
>>>>
>>>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>>>> Hi
>>>>> I have a one table database embedded in a jar file. I tried to
>>>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij
>>>>> -p ij.properties
>>>>>
>>>>> ij.properties is
>>>>> derby.ui.codeset=utf8
>>>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/
>>>>> a
>>>>> utconv.jar)docentries
>>>>>
>>>>>
>>>>> I can see that my table (authors) is in the the database with SHOW
>>>>> TABLES; I can see the columns
>>>>> ij> DESCRIBE authors;
>>>>> COLUMN_NAME
>>>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>>>> -------------------------------------------------------------------
>>>>> -
>>>>> ----------
>>>>>
>>>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100
>>>>> |YES AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL
>>>>> |NO
>>>>>
>>>>> 4 rows selected
>>>>> But I can't run a select statement:
>>>>> ij> select * from authors;
>>>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>>>> ij> exit;
>>>>>
>>>>> I have derby 10.8.2.2
>>>>> Thanks for any help.
>>>>>
>>>>> François
>>>>>
>> .
>


RE: database in a jar : conglomerate does not exists

Posted by RAPPAZ Francois <fr...@unifr.ch>.
Thank you all

At the end 
- taking care for  the version of derby to be the same when I build the database or when I search
- deleting the old database (corrupted) and starting with a new one, then creating the table and populating it 
Solved the problem.

Archiving the database in a jar was not the reason.

Cheers 

François


-----Original Message-----
From: Rick Hillegas <ri...@gmail.com> 
Sent: 12 September 2020 18:13
To: RAPPAZ Francois <fr...@unifr.ch>
Cc: derby-user@db.apache.org
Subject: Re: database in a jar : conglomerate does not exists

This error indicates that you are trying to boot a database with a lower version of Derby than the one used to create the database. I believe you said that the database was created by Derby 10.8.2.2. It looks like you are trying to boot it with some version of Derby in the 10.4 family.

-Rick

On 9/11/20 12:33 AM, RAPPAZ Francois wrote:
> If I start from a new database (named docentries), I packed it in a jar, I can connect with ij and run a select command.
>
> If I run the code from my java classe, I get the error
>
> ----- SQLException -----
>    SQL State:  XJ040
>    Error Code: 40000
>    Message:    Failed to start database 'classpath:docentries', see the next exception for details.
>
> ----- SQLException -----
>    SQL State:  XCL20
>    Error Code: 20000
>    Message:    Catalogs at version level 'null' cannot be upgraded to version level '10.4'.
>
> I connect with db = new 
> DBConnector("jdbc:derby:classpath:docentries");
>
> François
>
> -----Original Message-----
> From: Rick Hillegas <ri...@gmail.com>
> Sent: 11 September 2020 00:49
> To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois 
> <fr...@unifr.ch>
> Subject: Re: database in a jar : conglomerate does not exists
>
> Also, look inside the jar file for a directory called docentries/seg0.
> Does it contain a file called c560.dat?
>
> On 9/10/20 8:53 AM, Rick Hillegas wrote:
>> Sorry. Make that query:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 1376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>>> Hi François,
>>>
>>> Do you have any information or theories about how your database 
>>> became corrupted? I have never encountered this situation before. A 
>>> database in a jar file should be read-only, so the only theory I 
>>> have is that the jar file itself was corrupted by some process outside Derby.
>>>
>>> Please run the following query in order to find out what table/index 
>>> is corrupted:
>>>
>>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>>
>>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>>
>>> WHERE c.conglomerateNumber = 376
>>>
>>> AND c.tableID = t.tableID
>>>
>>> AND t.schemaID = s.schemaID
>>>
>>> ;
>>>
>>>
>>> Thanks,
>>> -Rick
>>>
>>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>>> Hi
>>>> I have a one table database embedded in a jar file. I tried to 
>>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij 
>>>> -p ij.properties
>>>>
>>>> ij.properties is
>>>> derby.ui.codeset=utf8
>>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/
>>>> a
>>>> utconv.jar)docentries
>>>>
>>>>
>>>> I can see that my table (authors) is in the the database with SHOW 
>>>> TABLES; I can see the columns
>>>> ij> DESCRIBE authors;
>>>> COLUMN_NAME
>>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>>> -------------------------------------------------------------------
>>>> -
>>>> ----------
>>>>
>>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO 
>>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       
>>>> |YES AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL
>>>> |NO
>>>>
>>>> 4 rows selected
>>>> But I can't run a select statement:
>>>> ij> select * from authors;
>>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>>> ij> exit;
>>>>
>>>> I have derby 10.8.2.2
>>>> Thanks for any help.
>>>>
>>>> François
>>>>
>>>
>>
> .



Re: database in a jar : conglomerate does not exists

Posted by Rick Hillegas <ri...@gmail.com>.
This error indicates that you are trying to boot a database with a lower 
version of Derby than the one used to create the database. I believe you 
said that the database was created by Derby 10.8.2.2. It looks like you 
are trying to boot it with some version of Derby in the 10.4 family.

-Rick

On 9/11/20 12:33 AM, RAPPAZ Francois wrote:
> If I start from a new database (named docentries), I packed it in a jar, I can connect with ij and run a select command.
>
> If I run the code from my java classe, I get the error
>
> ----- SQLException -----
>    SQL State:  XJ040
>    Error Code: 40000
>    Message:    Failed to start database 'classpath:docentries', see the next exception for details.
>
> ----- SQLException -----
>    SQL State:  XCL20
>    Error Code: 20000
>    Message:    Catalogs at version level 'null' cannot be upgraded to version level '10.4'.
>
> I connect with db = new DBConnector("jdbc:derby:classpath:docentries");
>
> François
>
> -----Original Message-----
> From: Rick Hillegas <ri...@gmail.com>
> Sent: 11 September 2020 00:49
> To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois <fr...@unifr.ch>
> Subject: Re: database in a jar : conglomerate does not exists
>
> Also, look inside the jar file for a directory called docentries/seg0.
> Does it contain a file called c560.dat?
>
> On 9/10/20 8:53 AM, Rick Hillegas wrote:
>> Sorry. Make that query:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 1376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>>> Hi François,
>>>
>>> Do you have any information or theories about how your database
>>> became corrupted? I have never encountered this situation before. A
>>> database in a jar file should be read-only, so the only theory I have
>>> is that the jar file itself was corrupted by some process outside Derby.
>>>
>>> Please run the following query in order to find out what table/index
>>> is corrupted:
>>>
>>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>>
>>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>>
>>> WHERE c.conglomerateNumber = 376
>>>
>>> AND c.tableID = t.tableID
>>>
>>> AND t.schemaID = s.schemaID
>>>
>>> ;
>>>
>>>
>>> Thanks,
>>> -Rick
>>>
>>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>>> Hi
>>>> I have a one table database embedded in a jar file. I tried to
>>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p
>>>> ij.properties
>>>>
>>>> ij.properties is
>>>> derby.ui.codeset=utf8
>>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/a
>>>> utconv.jar)docentries
>>>>
>>>>
>>>> I can see that my table (authors) is in the the database with SHOW
>>>> TABLES; I can see the columns
>>>> ij> DESCRIBE authors;
>>>> COLUMN_NAME
>>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>>> --------------------------------------------------------------------
>>>> ----------
>>>>
>>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       |YES
>>>> AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL
>>>> |NO
>>>>
>>>> 4 rows selected
>>>> But I can't run a select statement:
>>>> ij> select * from authors;
>>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>>> ij> exit;
>>>>
>>>> I have derby 10.8.2.2
>>>> Thanks for any help.
>>>>
>>>> François
>>>>
>>>
>>
> .



RE: database in a jar : conglomerate does not exists

Posted by RAPPAZ Francois <fr...@unifr.ch>.
If I start from a new database (named docentries), I packed it in a jar, I can connect with ij and run a select command.

If I run the code from my java classe, I get the error

----- SQLException -----
  SQL State:  XJ040
  Error Code: 40000
  Message:    Failed to start database 'classpath:docentries', see the next exception for details.

----- SQLException -----
  SQL State:  XCL20
  Error Code: 20000
  Message:    Catalogs at version level 'null' cannot be upgraded to version level '10.4'.

I connect with db = new DBConnector("jdbc:derby:classpath:docentries");

François

-----Original Message-----
From: Rick Hillegas <ri...@gmail.com> 
Sent: 11 September 2020 00:49
To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois <fr...@unifr.ch>
Subject: Re: database in a jar : conglomerate does not exists

Also, look inside the jar file for a directory called docentries/seg0. 
Does it contain a file called c560.dat?

On 9/10/20 8:53 AM, Rick Hillegas wrote:
> Sorry. Make that query:
>
> SELECT s.schemaName, t.tableName, c.conglomerateName
>
> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>
> WHERE c.conglomerateNumber = 1376
>
> AND c.tableID = t.tableID
>
> AND t.schemaID = s.schemaID
>
> ;
>
>
> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>> Hi François,
>>
>> Do you have any information or theories about how your database 
>> became corrupted? I have never encountered this situation before. A 
>> database in a jar file should be read-only, so the only theory I have 
>> is that the jar file itself was corrupted by some process outside Derby.
>>
>> Please run the following query in order to find out what table/index 
>> is corrupted:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> Thanks,
>> -Rick
>>
>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>> Hi
>>> I have a one table database embedded in a jar file. I tried to 
>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p 
>>> ij.properties
>>>
>>> ij.properties is
>>> derby.ui.codeset=utf8
>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/a
>>> utconv.jar)docentries
>>>
>>>
>>> I can see that my table (authors) is in the the database with SHOW 
>>> TABLES; I can see the columns
>>> ij> DESCRIBE authors;
>>> COLUMN_NAME 
>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>> --------------------------------------------------------------------
>>> ----------
>>>
>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO 
>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       |YES 
>>> AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL      
>>> |NO
>>>
>>> 4 rows selected
>>> But I can't run a select statement:
>>> ij> select * from authors;
>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>> ij> exit;
>>>
>>> I have derby 10.8.2.2
>>> Thanks for any help.
>>>
>>> François
>>>
>>
>>
>
>


Re: database in a jar : conglomerate does not exists

Posted by Rick Hillegas <ri...@gmail.com>.
I am not an expert on the storage layer, but some cursory reading of the 
code suggests the following:

* When a table is created, a file is created for it in the seg0 
directory having the name cXXX.dat where XXX is the hex representation 
of the table's heap conglomerate number.

* When a table is dropped, the cXXX.dat file is deleted and a stub file 
called dXXX.dat is created in the seg0 directory. I don't understand the 
purpose of the stub file.

So it appears that at some point, some process issued a "DROP TABLE 
authors" command. I don't have a theory about why the system catalogs 
think that the table still exists.

-Rick

On 9/10/20 11:06 PM, RAPPAZ Francois wrote:
> Hi Rick
>
> Thanks for helping !
>
> The query return 11 rows
> SCHEMANAME                                                                                                                      |TABLENAME                                                                                                                       |CONGLOMERATENAME
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> APP                                                                                                                             |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> NULLID                                                                                                                          |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SQLJ                                                                                                                            |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SYS                                                                                                                             |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SYSCAT                                                                                                                          |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SYSCS_DIAG                                                                                                                      |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SYSCS_UTIL                                                                                                                      |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SYSFUN                                                                                                                          |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SYSIBM                                                                                                                          |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SYSPROC                                                                                                                         |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
> SYSSTAT                                                                                                                         |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66
>
> 11 rows selected
> ij>
>
> There is no C560.dat file in docentries/Seg0 directory in the jar file. (there is a d560.dat and a c460.dat).
>
> The thing that has changed (possibly since a long time ago) is the java version himself since it is update automatically on my pc .
>
> But the code I'm using have been made years ago and it went well for a long time without any change from my side.
>
> I did rebuild the table in the database on my disc once in a year, either by deleting + adding new rows, or by dropping the table and creating a new then adding the row.
> The database in the docentries folder is ok, I can run a select again the table.
> Then I build the jar (with an ant task that didn't change for years.)
>
> François
>
> -----Original Message-----
> From: Rick Hillegas <ri...@gmail.com>
> Sent: 11 September 2020 00:49
> To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois <fr...@unifr.ch>
> Subject: Re: database in a jar : conglomerate does not exists
>
> Also, look inside the jar file for a directory called docentries/seg0.
> Does it contain a file called c560.dat?
>
> On 9/10/20 8:53 AM, Rick Hillegas wrote:
>> Sorry. Make that query:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 1376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>>> Hi François,
>>>
>>> Do you have any information or theories about how your database
>>> became corrupted? I have never encountered this situation before. A
>>> database in a jar file should be read-only, so the only theory I have
>>> is that the jar file itself was corrupted by some process outside Derby.
>>>
>>> Please run the following query in order to find out what table/index
>>> is corrupted:
>>>
>>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>>
>>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>>
>>> WHERE c.conglomerateNumber = 376
>>>
>>> AND c.tableID = t.tableID
>>>
>>> AND t.schemaID = s.schemaID
>>>
>>> ;
>>>
>>>
>>> Thanks,
>>> -Rick
>>>
>>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>>> Hi
>>>> I have a one table database embedded in a jar file. I tried to
>>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p
>>>> ij.properties
>>>>
>>>> ij.properties is
>>>> derby.ui.codeset=utf8
>>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/a
>>>> utconv.jar)docentries
>>>>
>>>>
>>>> I can see that my table (authors) is in the the database with SHOW
>>>> TABLES; I can see the columns
>>>> ij> DESCRIBE authors;
>>>> COLUMN_NAME
>>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>>> --------------------------------------------------------------------
>>>> ----------
>>>>
>>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       |YES
>>>> AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL
>>>> |NO
>>>>
>>>> 4 rows selected
>>>> But I can't run a select statement:
>>>> ij> select * from authors;
>>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>>> ij> exit;
>>>>
>>>> I have derby 10.8.2.2
>>>> Thanks for any help.
>>>>
>>>> François
>>>>
>>>
>>


RE: database in a jar : conglomerate does not exists

Posted by RAPPAZ Francois <fr...@unifr.ch>.
Hi Rick

Thanks for helping !

The query return 11 rows
SCHEMANAME                                                                                                                      |TABLENAME                                                                                                                       |CONGLOMERATENAME                                                                                      
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
APP                                                                                                                             |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
NULLID                                                                                                                          |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SQLJ                                                                                                                            |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SYS                                                                                                                             |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SYSCAT                                                                                                                          |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SYSCS_DIAG                                                                                                                      |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SYSCS_UTIL                                                                                                                      |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SYSFUN                                                                                                                          |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SYSIBM                                                                                                                          |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SYSPROC                                                                                                                         |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  
SYSSTAT                                                                                                                         |AUTHORS                                                                                                                         |08264012-0124-bfb9-c84d-ffffa7816d66                                                                  

11 rows selected
ij>

There is no C560.dat file in docentries/Seg0 directory in the jar file. (there is a d560.dat and a c460.dat).

The thing that has changed (possibly since a long time ago) is the java version himself since it is update automatically on my pc .

But the code I'm using have been made years ago and it went well for a long time without any change from my side. 

I did rebuild the table in the database on my disc once in a year, either by deleting + adding new rows, or by dropping the table and creating a new then adding the row.  
The database in the docentries folder is ok, I can run a select again the table.
Then I build the jar (with an ant task that didn't change for years.)

François

-----Original Message-----
From: Rick Hillegas <ri...@gmail.com> 
Sent: 11 September 2020 00:49
To: Derby Discussion <de...@db.apache.org>; RAPPAZ Francois <fr...@unifr.ch>
Subject: Re: database in a jar : conglomerate does not exists

Also, look inside the jar file for a directory called docentries/seg0. 
Does it contain a file called c560.dat?

On 9/10/20 8:53 AM, Rick Hillegas wrote:
> Sorry. Make that query:
>
> SELECT s.schemaName, t.tableName, c.conglomerateName
>
> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>
> WHERE c.conglomerateNumber = 1376
>
> AND c.tableID = t.tableID
>
> AND t.schemaID = s.schemaID
>
> ;
>
>
> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>> Hi François,
>>
>> Do you have any information or theories about how your database 
>> became corrupted? I have never encountered this situation before. A 
>> database in a jar file should be read-only, so the only theory I have 
>> is that the jar file itself was corrupted by some process outside Derby.
>>
>> Please run the following query in order to find out what table/index 
>> is corrupted:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> Thanks,
>> -Rick
>>
>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>> Hi
>>> I have a one table database embedded in a jar file. I tried to 
>>> access it from ij with java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p 
>>> ij.properties
>>>
>>> ij.properties is
>>> derby.ui.codeset=utf8
>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/a
>>> utconv.jar)docentries
>>>
>>>
>>> I can see that my table (authors) is in the the database with SHOW 
>>> TABLES; I can see the columns
>>> ij> DESCRIBE authors;
>>> COLUMN_NAME 
>>> |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>> --------------------------------------------------------------------
>>> ----------
>>>
>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO 
>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       |YES 
>>> AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL      
>>> |NO
>>>
>>> 4 rows selected
>>> But I can't run a select statement:
>>> ij> select * from authors;
>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>> ij> exit;
>>>
>>> I have derby 10.8.2.2
>>> Thanks for any help.
>>>
>>> François
>>>
>>
>>
>
>


Re: database in a jar : conglomerate does not exists

Posted by Rick Hillegas <ri...@gmail.com>.
Also, look inside the jar file for a directory called docentries/seg0. 
Does it contain a file called c560.dat?

On 9/10/20 8:53 AM, Rick Hillegas wrote:
> Sorry. Make that query:
>
> SELECT s.schemaName, t.tableName, c.conglomerateName
>
> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>
> WHERE c.conglomerateNumber = 1376
>
> AND c.tableID = t.tableID
>
> AND t.schemaID = s.schemaID
>
> ;
>
>
> On 9/10/20 8:22 AM, Rick Hillegas wrote:
>> Hi François,
>>
>> Do you have any information or theories about how your database 
>> became corrupted? I have never encountered this situation before. A 
>> database in a jar file should be read-only, so the only theory I have 
>> is that the jar file itself was corrupted by some process outside Derby.
>>
>> Please run the following query in order to find out what table/index 
>> is corrupted:
>>
>> SELECT s.schemaName, t.tableName, c.conglomerateName
>>
>> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>>
>> WHERE c.conglomerateNumber = 376
>>
>> AND c.tableID = t.tableID
>>
>> AND t.schemaID = s.schemaID
>>
>> ;
>>
>>
>> Thanks,
>> -Rick
>>
>> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>>> Hi
>>> I have a one table database embedded in a jar file. I tried to 
>>> access it from ij with
>>> java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p ij.properties
>>>
>>> ij.properties is
>>> derby.ui.codeset=utf8
>>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/autconv.jar)docentries 
>>>
>>>
>>> I can see that my table (authors) is in the the database with SHOW 
>>> TABLES;
>>> I can see the columns
>>> ij> DESCRIBE authors;
>>> COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>>> ------------------------------------------------------------------------------ 
>>>
>>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       |YES
>>> AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL      |NO
>>>
>>> 4 rows selected
>>> But I can't run a select statement:
>>> ij> select * from authors;
>>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>>> ij> exit;
>>>
>>> I have derby 10.8.2.2
>>> Thanks for any help.
>>>
>>> François
>>>
>>
>>
>
>


Re: database in a jar : conglomerate does not exists

Posted by Rick Hillegas <ri...@gmail.com>.
Sorry. Make that query:

SELECT s.schemaName, t.tableName, c.conglomerateName

FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t

WHERE c.conglomerateNumber = 1376

AND c.tableID = t.tableID

AND t.schemaID = s.schemaID

;


On 9/10/20 8:22 AM, Rick Hillegas wrote:
> Hi François,
>
> Do you have any information or theories about how your database became 
> corrupted? I have never encountered this situation before. A database 
> in a jar file should be read-only, so the only theory I have is that 
> the jar file itself was corrupted by some process outside Derby.
>
> Please run the following query in order to find out what table/index 
> is corrupted:
>
> SELECT s.schemaName, t.tableName, c.conglomerateName
>
> FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t
>
> WHERE c.conglomerateNumber = 376
>
> AND c.tableID = t.tableID
>
> AND t.schemaID = s.schemaID
>
> ;
>
>
> Thanks,
> -Rick
>
> On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
>> Hi
>> I have a one table database embedded in a jar file. I tried to access 
>> it from ij with
>> java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p ij.properties
>>
>> ij.properties is
>> derby.ui.codeset=utf8
>> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/autconv.jar)docentries 
>>
>>
>> I can see that my table (authors) is in the the database with SHOW 
>> TABLES;
>> I can see the columns
>> ij> DESCRIBE authors;
>> COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
>> ------------------------------------------------------------------------------ 
>>
>> NAME1               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>> NAME2               |VARCHAR  |NULL|NULL|20    |NULL |40        |NO
>> DATA                |VARCHAR  |NULL|NULL|50    |NULL |100       |YES
>> AUTHOR_ID           |INTEGER  |0   |10  |10 |AUTOINCRE&|NULL      |NO
>>
>> 4 rows selected
>> But I can't run a select statement:
>> ij> select * from authors;
>> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
>> ij> exit;
>>
>> I have derby 10.8.2.2
>> Thanks for any help.
>>
>> François
>>
>
>


Re: database in a jar : conglomerate does not exists

Posted by Rick Hillegas <ri...@gmail.com>.
Hi François,

Do you have any information or theories about how your database became 
corrupted? I have never encountered this situation before. A database in 
a jar file should be read-only, so the only theory I have is that the 
jar file itself was corrupted by some process outside Derby.

Please run the following query in order to find out what table/index is 
corrupted:

SELECT s.schemaName, t.tableName, c.conglomerateName

FROM sys.sysConglomerates c, sys.sysSchemas s, sys.sysTables t

WHERE c.conglomerateNumber = 376

AND c.tableID = t.tableID

AND t.schemaID = s.schemaID

;


Thanks,
-Rick

On 9/10/20 3:09 AM, RAPPAZ Francois wrote:
> Hi
> I have a one table database embedded in a jar file. I tried to access it from ij with
> java -jar %DERBY_HOME%/lib/derbyrun.jar ij -p ij.properties
>
> ij.properties is
> derby.ui.codeset=utf8
> ij.connection.doc=jdbc:derby:jar:(U:/docs/OA/articles/zlib/autconv/autconv.jar)docentries
>
> I can see that my table (authors) is in the the database with SHOW TABLES;
> I can see the columns
> ij> DESCRIBE authors;
> COLUMN_NAME         |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
> ------------------------------------------------------------------------------
> NAME1               |VARCHAR  |NULL|NULL|20    |NULL      |40        |NO
> NAME2               |VARCHAR  |NULL|NULL|20    |NULL      |40        |NO
> DATA                |VARCHAR  |NULL|NULL|50    |NULL      |100       |YES
> AUTHOR_ID           |INTEGER  |0   |10  |10    |AUTOINCRE&|NULL      |NO
>
> 4 rows selected
> But I can't run a select statement:
> ij> select * from authors;
> ERROR XSAI2: Le conglomerat (1,376) demande n'existe pas.
> ij> exit;
>
> I have derby 10.8.2.2
> Thanks for any help.
>
> François
>