db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nat Gross <natgross.rentalsyst...@verizon.net>
Subject Re: Sun 8.0.1 Appserver pooling
Date Tue, 28 Dec 2004 16:45:30 GMT
myrnap wrote:

> Nat Gross wrote:
>
>> myrnap wrote:
>>
>>> Nat Gross wrote:
>>>
>>>> Hi;
>>>> Although I have no problems connecting to my new Derby, via jdbc, I 
>>>> cannot get a 'ping' when setting up a j2ee pool and jndi connector 
>>>> in the Sun app server. I followed the instructions on the java.net 
>>>> blog,for embedded, the classpath is set, have tried various javax 
>>>> connectors, the xa version and non xa version, to no avail.
>>>> Your help will be appreciated.
>>>> Thanks
>>>> -nat
>>>>
>>> Nat,
>>>
>>> What's the error you see?
>>> What's in the server.log?
>>> Does a derby.log get created? If so, is it where you expect it to be?
>>>
>>> Myrna
>>>
>> Progress.... For some reason the sdk's bin directory wasn't in the 
>> PATH. I didn't dream that the gui admin uses the cmdline stuff behind 
>> the scenes. Anyhow, now there is a new error when pinging.
>> The first exception sais that it couldn't open the database and the 
>> next exception has the details why. But the next exception list some 
>> gui framework error, for the ping button. Here it is.:
>>
> Hm, I like the classnot found problem more - at least then we know 
> it's the classpath, somehow. :-)
> I would've checked whether derby.jar was in the lib, or lib/ext dir...
>
> The 'Failed to start database ...' error can be caused by a number of 
> situations...Unfortunately, I think the app server gobbles up the 
> nested (i.e. 'next') exception...
> Perhaps someone else knows more about the framework error...
>
> The situation I'm thinking you might be hitting is somehow 2 
> jvms/processes trying to get hold of the same database.
>
> In that case, you would see a derby.log that looks completely fine and 
> healthy (because of the first jvm starting the database), but still 
> get this error. And of course, you'd see an extra (java or javaw) 
> process after the ping.
>
> To see more, I suggest you add the following derby.properties file to 
> the derby.system.home dir (practically speaking, that would be where 
> derby.log gets created.):
>    derby.infolog.append=true
>    derby.language.logStatementText=true
>    derby.stream.error.logSeverityLevel=0
>
> If it is the multiple jvm situation, then you will see a neat starting 
> message in derby.log & still get this error. If it's something else, 
> then possibly the database does not get opened at all, and your 
> derby.log would be an empty file even after infolog.append is picked 
> up from derby.properties.
>
> Now, why there would be 2 jvms trying to start the database - I don't 
> know...Does the ping start a second process/jvm?
>
> Another area to look at is the policy files. This is really a wild 
> guess....But make sure the following permissions are set for the derby 
> database:
> grant codeBase "file://<your domain/lib dir>/derby.jar" {
> permission java.lang.RuntimePermission "createClassLoader";
> permission java.util.PropertyPermission "derby.*", "read";
> permission java.io.FilePermission "${derby.system.home}${/} -", 
> "read,write,delete";
>
> I hope this helps any....
>
> Myrna
>
>
Thank you much. I am sure that this is a bug on the Sun Appserver 8.0.1. 
A search of the Sun forum revealed that many users have seen the same 
Sun error with other products (non-Derby, or even db related). So, I 
guess I'll try their RC of the next version, to verify this. I am also 
thinking of using the Jonas (objectweb.org) appserver, but I don't know 
how to embed Derby within it.
If anyone has used Jonas replacing HSQLDB (that comes with it) with 
Derby, please let me know.
TA
-nat

Mime
View raw message