db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: can't remove jar file from database (ERROR X0X13)!!!
Date Mon, 12 May 2008 16:23:47 GMT
Hi Sebastian,

The following query will show you the names of the jar files loaded into 
your database:

select s.schemaname, f.filename
from sys.sysschemas s, sys.sysfiles f
where s.schemaid=f.schemaid

So, for instance, the following script runs like this for me:

ij> call sqlj.install_jar( '/Users/rhillegas/junk/z.txt', 'APP.Foo', 0 );
0 rows inserted/updated/deleted
ij> select s.schemaname, f.filename
from sys.sysschemas s, sys.sysfiles f
where s.schemaid=f.schemaid
;
SCHEMANAME                                                                               
                                      
|FILENAME                                                                                
                                       

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
APP                                                                                      
                                      
|FOO                                                                                     
                                       


1 row selected
ij> call sqlj.remove_jar( 'APP.Foo', 0 );
0 rows inserted/updated/deleted
ij> select s.schemaname, f.filename
from sys.sysschemas s, sys.sysfiles f
where s.schemaid=f.schemaid
;
SCHEMANAME                                                                               
                                      
|FILENAME                                                                                
                                       

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

0 rows selected

Hope this helps,
-Rick

Sebastian Pfaff wrote:
> Hello,
>
> how can i see which jars are included in my database? I want to see
> all jars which are added through a call of 'CALL sqlj.install_jar
> [...]'.
>
> the main problem is:
>
> yesterday i added a jar to my database via the call of:
>
> ij> CALL sqlj.install_jar('/me/netBeansPojects/java/DerbyZeroCheck/dist/DatabaseRoutines.jar',
> 'APP.Sample1', 0);
>
> Notice: [...]Pojects[...] is a typo but that is ok!!!
>
> You can see the jar in the filesystem:
>
> ls DATACENTER/SM_DATA_LAYER/jar/APP/
> SAMPLE1.jar.G1210431624637
>
> today i tried to remove the jar via a call of:
>
> ij> CALL sqlj.remove_jar('APP.Sample1', 0);
>
> The call above always produces this errror:
>
> ERROR X0X13: Jar file 'SAMPLE1' does not exist in schema 'APP'.
>
> here the server side stacktrace:
>
> 2008-05-12 14:44:51.422 GMT Thread[DRDAConnThread_3,5,main] (XID =
> 13623), (SESSIONID = 0), (DATABASE = SM_DATA_LAYER), (DRDAID =
> NF000001.DF1C-1025975079512780256{2}), Cleanup action starting
> 2008-05-12 14:44:51.422 GMT Thread[DRDAConnThread_3,5,main] (XID =
> 13623), (SESSIONID = 0), (DATABASE = SM_DATA_LAYER), (DRDAID =
> NF000001.DF1C-1025975079512780256{2}), Failed Statement is: CALL
> sqlj.remove_jar('APP.Sample1', 0)
> ERROR X0X13: Jar file 'SAMPLE1' does not exist in schema 'APP'.
>         at org.apache.derby.iapi.error.StandardException.newException(Unknown
> Source)
>         at org.apache.derby.impl.sql.execute.JarUtil.drop(Unknown Source)
>         at org.apache.derby.impl.sql.execute.JarUtil.drop(Unknown Source)
>         at org.apache.derby.catalog.SystemProcedures.REMOVE_JAR(Unknown Source)
>         at org.apache.derby.exe.acf81e0010x0119xdd3bxc79bx00001d72cbbd1b.g0(Unknown
> Source)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown
> Source)
>         at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown
> Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
> Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
> Source)
>         at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
> Source)
>         at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown
> Source)
>         at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown
> Source)
>         at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown
> Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown
> Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> Cleanup action completed
>
> If i'm trying to include/install an additional jar file everything works fine:
>
> ij> CALL sqlj.install_jar(
>     '/me/netBeansPojects/java/DerbyZeroCheck/dist/DatabaseRoutines.jar',
> 'APP.Sample1', 0);
>   
>> Statement executed.
>>     
>
> here layout of filesystem before removing:
>
> ls DATACENTER/SM_DATA_LAYER/jar/APP/
> SAMPLE1.jar.G1210431624637  SAMPLE1.jar.G1210597561003
>
> ij> CALL sqlj.remove_jar('APP.Sample1', 0);
> Statement executed.
> ij>
>
> layout just after removing:
>
> ls DATACENTER/SM_DATA_LAYER/jar/APP/
> SAMPLE1.jar.G1210431624637
>
> It seems to be impossible to remove the file named
> 'SAMPLE1.jar.G1210431624637'! It would be nice to know, how to make
> included/installed jars visible and how to remove them if a call of
> sqlj.remove_jar fails.
>
> Is it save to remove the file manually from filesystem (e.g. rm
> SAMPLE1.jar.G1210431624637)?
>
> my environment is:
>
> Linux 2.6.25.1 && java version "1.6.0_06 && derby 10.4
>
>
> If you need additional infos, please let me know. Any help is appreciated.
>
> TNX in advance!
>
> Sebastian
>   


Mime
View raw message