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 ArtemGr <ar...@gmail.com> on 2009/04/14 16:26:39 UTC

Weird

I got the following exception: http://gist.github.com/95205
which is triggered by the following code:
rs = conn.getMetaData().getIndexInfo(catalogName, schemaName, tableName, false,
true);

What can this possibly mean?


Re: Weird

Posted by Kristian Waagan <Kr...@Sun.COM>.
John Whitt wrote:
> please remove me from this group

Please see http://db.apache.org/derby/derby_mail.html


Regards,
-- 
Kristian

> ]
[ snip ]

Re: Weird

Posted by John Whitt <j....@insightbb.com>.
please remove me from this group
]
----- Original Message ----- 
From: "Knut Anders Hatlen" <Kn...@Sun.COM>
To: "Derby Discussion" <de...@db.apache.org>
Sent: Wednesday, April 15, 2009 4:58 AM
Subject: Re: Weird


> ArtemGr <ar...@gmail.com> writes:
>
>> Knut Anders Hatlen <Kn...@...> writes:
>>> There should be another exception linked to the main exception. Look for
>>> the string "Caused by:". If you could post that exception too, it would
>>> be easier to see exactly where in the Derby code the error happens.
>>
>> Oh, maybe this one?
>> http://gist.github.com/95679
>
> Thanks, that's it! It would be great if you could log a bug report at
> https://issues.apache.org/jira/browse/DERBY and post the stack trace
> there.
>
>> For some reason I can no longer reproduce the bug.
>> I don't think I have changed anything,
>> except switching to "db-derby-10.4.2.0-lib-debug.tar.gz"
>> in order to produce a better stack trace.
>>
>> (Then I've tried switching back to db-derby-10.4.2.0-lib.zip
>> but still no bug).
>>
>> Could it be I accidentally had a wrong version of Derby?
>
> It looks like it happens during the first compilation of a meta-data
> statement. The compiled query plan is stored in the database, so if you
> first get it compiled and stored, you'll probably not see the problem
> again. Maybe you need to start with a fresh database to reproduce it. Or
> perhaps it's related to database upgrade (I noticed that your code
> mentioned upgrade=true in one of the comments).
>
> -- 
> Knut Anders 


Re: Weird

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
ArtemGr <ar...@gmail.com> writes:

> Knut Anders Hatlen <Kn...@...> writes:
>> ArtemGr <ar...@...> writes:
>> > Oh, maybe this one?
>> > http://gist.github.com/95679
>> 
>> Thanks, that's it! It would be great if you could log a bug report at
>> https://issues.apache.org/jira/browse/DERBY and post the stack trace
>> there.
>
> Like this?
> https://issues.apache.org/jira/browse/DERBY-4160

Yes. Thanks!

-- 
Knut Anders

Re: Weird

Posted by ArtemGr <ar...@gmail.com>.
Knut Anders Hatlen <Kn...@...> writes:
> ArtemGr <ar...@...> writes:
> > Oh, maybe this one?
> > http://gist.github.com/95679
> 
> Thanks, that's it! It would be great if you could log a bug report at
> https://issues.apache.org/jira/browse/DERBY and post the stack trace
> there.

Like this?
https://issues.apache.org/jira/browse/DERBY-4160

> It looks like it happens during the first compilation of a meta-data
> statement. The compiled query plan is stored in the database, so if you
> first get it compiled and stored, you'll probably not see the problem
> again. Maybe you need to start with a fresh database to reproduce it.

Right, I've got it now with the debug version of the libs,
the stack trace is updated: http://gist.github.com/95679




Re: Weird

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
ArtemGr <ar...@gmail.com> writes:

> Knut Anders Hatlen <Kn...@...> writes:
>> There should be another exception linked to the main exception. Look for
>> the string "Caused by:". If you could post that exception too, it would
>> be easier to see exactly where in the Derby code the error happens.
>
> Oh, maybe this one?
> http://gist.github.com/95679

Thanks, that's it! It would be great if you could log a bug report at
https://issues.apache.org/jira/browse/DERBY and post the stack trace
there.

> For some reason I can no longer reproduce the bug.
> I don't think I have changed anything,
> except switching to "db-derby-10.4.2.0-lib-debug.tar.gz"
> in order to produce a better stack trace.
>
> (Then I've tried switching back to db-derby-10.4.2.0-lib.zip
> but still no bug).
>
> Could it be I accidentally had a wrong version of Derby?

It looks like it happens during the first compilation of a meta-data
statement. The compiled query plan is stored in the database, so if you
first get it compiled and stored, you'll probably not see the problem
again. Maybe you need to start with a fresh database to reproduce it. Or
perhaps it's related to database upgrade (I noticed that your code
mentioned upgrade=true in one of the comments).

-- 
Knut Anders

Re: Weird

Posted by ArtemGr <ar...@gmail.com>.
Knut Anders Hatlen <Kn...@...> writes:
> There should be another exception linked to the main exception. Look for
> the string "Caused by:". If you could post that exception too, it would
> be easier to see exactly where in the Derby code the error happens.

Oh, maybe this one?
http://gist.github.com/95679

For some reason I can no longer reproduce the bug.
I don't think I have changed anything,
except switching to "db-derby-10.4.2.0-lib-debug.tar.gz"
in order to produce a better stack trace.

(Then I've tried switching back to db-derby-10.4.2.0-lib.zip
but still no bug).

Could it be I accidentally had a wrong version of Derby?


Re: Weird

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
ArtemGr <ar...@gmail.com> writes:

> I got the following exception: http://gist.github.com/95205
> which is triggered by the following code:
> rs = conn.getMetaData().getIndexInfo(catalogName, schemaName, tableName, false,
> true);
>
> What can this possibly mean?

There should be another exception linked to the main exception. Look for
the string "Caused by:". If you could post that exception too, it would
be easier to see exactly where in the Derby code the error happens.

Thanks,

-- 
Knut Anders

Re: Weird

Posted by Rick Hillegas <Ri...@Sun.COM>.
ArtemGr wrote:
> Rick Hillegas <Ri...@...> writes:
>   
>> ArtemGr wrote:
>>     
>>> I got the following exception: http://gist.github.com/95205
>>>       
>> Hard to say but it looks like a bug. Can you provide some more information:
>>
>> 1) what are the versions of Derby running client-side and server-side?
>>     
>
> 10.4.2.0, embedded.
>
>   
>> 2) can you provide a little standalone program which triggers this bug?
>>     
>
> It happens from inside the DataNucleus JDO,
> I have a small test program in Scala: http://gist.github.com/95253
> but if you need I might try making one in Java.
>   
Thanks, that would help. The following test program runs fine for me on 
10.4.2.0:

import java.sql.*;

public class z
{
    public  static  void    main( String[] args ) throws Exception
    {
        z   me =new z();

        me.execute( args );
    }
   
    private void    execute( String[] args )
        throws Exception
    {
        Class.forName( "org.apache.derby.jdbc.EmbeddedDriver" );
        Class.forName( "org.apache.derby.jdbc.ClientDriver" );
        Connection conn = DriverManager.getConnection( 
"jdbc:derby:derbyDB;create=true" );
        ResultSet rs =  conn.getMetaData().getIndexInfo( "", "", "", 
false, true);

        rs.close();
    }


}


Thanks,
-Rick
>   
>> Thanks,
>> -Rick
>>     
>
>   


Re: Weird

Posted by ArtemGr <ar...@gmail.com>.
Rick Hillegas <Ri...@...> writes:
> ArtemGr wrote:
> > I got the following exception: http://gist.github.com/95205
> 
> Hard to say but it looks like a bug. Can you provide some more information:
> 
> 1) what are the versions of Derby running client-side and server-side?

10.4.2.0, embedded.

> 2) can you provide a little standalone program which triggers this bug?

It happens from inside the DataNucleus JDO,
I have a small test program in Scala: http://gist.github.com/95253
but if you need I might try making one in Java.

> Thanks,
> -Rick


Re: Weird

Posted by Rick Hillegas <Ri...@Sun.COM>.
ArtemGr wrote:
> I got the following exception: http://gist.github.com/95205
> which is triggered by the following code:
> rs = conn.getMetaData().getIndexInfo(catalogName, schemaName, tableName, false,
> true);
>
> What can this possibly mean?
>
>   
Hard to say but it looks like a bug. Can you provide some more information:

1) what are the versions of Derby running client-side and server-side?

2) can you provide a little standalone program which triggers this bug?

Thanks,
-Rick