NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Derby Error Starting Glassfish
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    NetBeans Forums -> SOA Users
View previous topic :: View next topic  
Author Message
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 4:16 pm    Post subject: Derby Error Starting Glassfish Reply with quote

If you are looking for a workaround - Since this seems to be Derby issue, you can bypass using derby and point timer service to any other external data source you have.


Setting property
Back to top
jsexton0
Posted via mailing list.





PostPosted: Fri May 01, 2009 4:20 pm    Post subject: Derby Error Starting Glassfish Reply with quote

Hello -

I unloaded some SAs, shutdown everything on my computer, restarted Glassfish
(it looked OK), and then reloaded the SAs one at a time and everything came
up and runs normally.

So it doesn't appear to be corrupted at least, it's just a problem with the
general start up process, when everything is loaded.

Thanks


Manfred Riem wrote:
Quote:

The only other thing I could recommend is to connect
to the EJB timer database yourself and see if the
database itself is not corrupted in anyway.

Manfred

Quote:
-------- Original Message --------
Subject: Re: [entpack] Derby Error Starting Glassfish
From: jsexton0 <address-removed>
Date: Fri, May 01, 2009 9:49 am
To: address-removed


Hello -

I tried changing the max connections to 64, and the timeout to 90000 on
each
pool..

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Still unable to startup Glassfish correctly, no change. I do not know
were/how to set other Derby properties. My server is
as-originally-installed with respect to the __TimerPool settings.

I guess I'll have to try pointing it at a different database server
altogether. I'd like to understand why this started happening however,
and
I hate having to make such a drastic change to the way Glassfish comes
"out
of the box".

I do have one timer bean in my application, but it's been working fine
for
months as other development has progressed. Nothing in particular seems
to
have caused this error to begin happening, except the application has
grown.

Thanks


OpenXGroup Inc. wrote:
Quote:

Another thing to try- change connection-validation-method="auto-commit"
to
Quote:
be "table"?
Can you change javax.sql.ConnectionPoolDataSource to
javax.sql.DataSource?
Quote:
Or use XA datasource altogether?

When you use a timer, it comes with the XA datasource access because
the
Quote:
timer instances are stored in the database. When you call your method
directly, it uses a single (non-XA) connection. And that is a big
difference.

More information about *how to diagnose a deadlock situation in Derby /
Java
DB*.
http://wiki.apache.org/db-derby/LockDebugging
http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html

Note that lock ordering as part of the application is important (e.g.
locking in same order) and that a table being accessed without an index
could lead to a Table-level lock, affecting the lock granularity quite
significantly and the risk of deadlocks as part of the applications. It
seemed like some index might have been missing for some of the columns
being
searched as part of some queries.


On Fri, May 1, 2009 at 10:59 AM, jsexton0 <address-removed> wrote:

Quote:

Hello -

This is interesting...
This error is happening on the Derby database, very early in
Glassfish's
Quote:
Quote:
startup. I am not (directly) using the Derby database in any of my
code.
Quote:
Quote:
Are you suggesting a change to Glassfish's default setup for its Derby
pool?
I can certainly try that...

Thanks


OpenXGroup Inc. wrote:
Quote:

Take a look at wrong XA state as well...

Can you change javax.sql.ConnectionPoolDataSource to
javax.sql.DataSource?
Quote:
Or use XA datasource altogether?
I increased the "Initial and Minimum Pool Size" from 32 (default) to
64.
Quote:
The
error vanished, but I don't know if it just depends on how many
times
Quote:
Quote:
per
Quote:
timer event a connection is requested. May be the error will occure
again
Quote:
with more connection requests. Do you now what the maximal possible
value
Quote:
is
for the Initial and Minimum Pool Size? The value of 128 seemed not
to
Quote:
Quote:
be
Quote:
accepted.

I was able to resolve my problem by changing the resource type to
java.sql.ConnectionPoolDataSource.

Do you need transactional capability. If not, you can set your pool
to
Quote:
Quote:
Quote:
return non-transactional-connections.

Set non-transactional-connections="true" in your
<jdbc-connection-pool>
Quote:
Quote:
Quote:
configuration.

There are two type of transactions we can talk about in general
(pertaining
to this thread).

1) There is the transaction that you can write using SQL which you
(the
Quote:
Quote:
Quote:
programmer) write yourself.
2) There is the transaction that java handles at a system level
which
Quote:
Quote:
can
Quote:
apply to any operation or series of operations you require to be
performed
Quote:
from beginning to end without error (including database operations).

By setting non-transactional-connections to true you will not get
the
Quote:
Quote:
Quote:
protection from system failure as described in number 2.




--
View this message in context:

http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
Quote:
Quote:
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.





--
View this message in context:
http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.




--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335749.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 5:20 pm    Post subject: Derby Error Starting Glassfish Reply with quote

The are many properties that could be set for tuning Derby. You can find
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 5:42 pm    Post subject: Derby Error Starting Glassfish Reply with quote

When it comes to MySQL and Derby, I recommend MySQL for production use and Derby for testing purposes only.
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 6:13 pm    Post subject: Derby Error Starting Glassfish Reply with quote

Down in the stack trace is
Back to top
jsexton0
Posted via mailing list.





PostPosted: Fri May 01, 2009 6:31 pm    Post subject: Derby Error Starting Glassfish Reply with quote

The cause of the timer service's failure to start, is the earlier SQL failure
to accessing the timer table in the Derby database.


OpenXGroup Inc. wrote:
Quote:

Down in the stack trace is EJB5108:Unable to initialize EJB Timer Service.
The likely cause is the
database has not been started or the timer database table has not been
created.

http://wiki.glassfish.java.net/Wiki.jsp?page=Ejb

*How do you verify the EJB Timer Service is enabled? Does this work: You
can verify that it was deployed successfully by accessing the following
URL:
**http://localhost:8080/ejb-timer-service-app/timer*<http://localhost:8080/ejb-timer-service-app/timer>
* *

EJB5108 Unable to initialize EJB Timer Service. The likely cause is the
database has not been started or the timer database table has not been
created.Cause:The EJB Timer Service could not be initialized because a
problem occurred while attempting to restore previously registered timers
from the associated data source.Solution:*Double-check the JDBC data
source
(and its associated connection pool) assigned **to** the **EJB** **Timer**
*
*Service.* Common causes are that the database is not running, the timer
table
has not been created within that database, or that the connection pool's
JDBC driver URL information is incorrect.

This is how an older version of WAS did it with Cloudscape/Derby....

What's probably happening is: something is preventing the
timer/scheduler service from starting, back at the time this module (or
some other module that also contains TimedObjects) is started. At the
time an EJB module is started, the WAS EJB container looks to see if any
beans within that module implement TimedObject. If any do, we attempt
to start the scheduler service if it is not already running.

When you see the message, it means that the EJB container is attempting
to call the scheduler service, but the service is not started.* Some
possible causes for the service being unable to start are:

- Scheduler database not present
- Database is present but scheduler tables are not present or are not
defined correctly
- Server does not have access authority to the scheduler database*

*When you install WAS, it comes pre-configured out of the box to use an
internal instance of a Cloudscape/Derby database for its scheduler data. *
However, it is possible to configure the EJB Timer service (which in
turn uses the scheduler service) to use an alternate database or
scheduler instance. It's possible, if the scheduler/timer service
config has been modified, that there could be a config problem that
would prevent the scheduler from starting.

In any case, there should be some messages further up in your system out
log indicating that the scheduler had trouble starting, which should
shed some light as to the cause.

On Fri, May 1, 2009 at 12:20 PM, jsexton0 <address-removed> wrote:

Quote:

Hello -

I unloaded some SAs, shutdown everything on my computer, restarted
Glassfish
(it looked OK), and then reloaded the SAs one at a time and everything
came
up and runs normally.

So it doesn't appear to be corrupted at least, it's just a problem with
the
general start up process, when everything is loaded.

Thanks


Manfred Riem wrote:
Quote:

The only other thing I could recommend is to connect
to the EJB timer database yourself and see if the
database itself is not corrupted in anyway.

Manfred

Quote:
-------- Original Message --------
Subject: Re: [entpack] Derby Error Starting Glassfish
From: jsexton0 <address-removed>
Date: Fri, May 01, 2009 9:49 am
To: address-removed


Hello -

I tried changing the max connections to 64, and the timeout to 90000
on
Quote:
Quote:
each
pool..

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Still unable to startup Glassfish correctly, no change. I do not know
were/how to set other Derby properties. My server is
as-originally-installed with respect to the __TimerPool settings.

I guess I'll have to try pointing it at a different database server
altogether. I'd like to understand why this started happening
however,
Quote:
Quote:
and
I hate having to make such a drastic change to the way Glassfish comes
"out
of the box".

I do have one timer bean in my application, but it's been working fine
for
months as other development has progressed. Nothing in particular
seems
Quote:
Quote:
to
have caused this error to begin happening, except the application has
grown.

Thanks


OpenXGroup Inc. wrote:
Quote:

Another thing to try- change
connection-validation-method="auto-commit"
Quote:
Quote:
to
Quote:
be "table"?
Can you change javax.sql.ConnectionPoolDataSource to
javax.sql.DataSource?
Quote:
Or use XA datasource altogether?

When you use a timer, it comes with the XA datasource access because
the
Quote:
timer instances are stored in the database. When you call your
method
Quote:
Quote:
Quote:
directly, it uses a single (non-XA) connection. And that is a big
difference.

More information about *how to diagnose a deadlock situation in
Derby
/
Quote:
Quote:
Quote:
Java
DB*.
http://wiki.apache.org/db-derby/LockDebugging
http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html

Note that lock ordering as part of the application is important
(e.g.
Quote:
Quote:
Quote:
locking in same order) and that a table being accessed without an
index
Quote:
Quote:
Quote:
could lead to a Table-level lock, affecting the lock granularity
quite
Quote:
Quote:
Quote:
significantly and the risk of deadlocks as part of the applications.
It
Quote:
Quote:
Quote:
seemed like some index might have been missing for some of the
columns
Quote:
Quote:
Quote:
being
searched as part of some queries.


On Fri, May 1, 2009 at 10:59 AM, jsexton0 <address-removed>
wrote:
Quote:
Quote:
Quote:

Quote:

Hello -

This is interesting...
This error is happening on the Derby database, very early in
Glassfish's
Quote:
Quote:
startup. I am not (directly) using the Derby database in any of my
code.
Quote:
Quote:
Are you suggesting a change to Glassfish's default setup for its
Derby
Quote:
Quote:
Quote:
Quote:
pool?
I can certainly try that...

Thanks


OpenXGroup Inc. wrote:
Quote:

Take a look at wrong XA state as well...

Can you change javax.sql.ConnectionPoolDataSource to
javax.sql.DataSource?
Quote:
Or use XA datasource altogether?
I increased the "Initial and Minimum Pool Size" from 32 (default)
to
Quote:
Quote:
Quote:
Quote:
64.
Quote:
The
error vanished, but I don't know if it just depends on how many
times
Quote:
Quote:
per
Quote:
timer event a connection is requested. May be the error will
occure
Quote:
Quote:
Quote:
Quote:
again
Quote:
with more connection requests. Do you now what the maximal
possible
Quote:
Quote:
Quote:
Quote:
value
Quote:
is
for the Initial and Minimum Pool Size? The value of 128 seemed
not
Quote:
Quote:
to
Quote:
Quote:
be
Quote:
accepted.

I was able to resolve my problem by changing the resource type to
java.sql.ConnectionPoolDataSource.

Do you need transactional capability. If not, you can set your
pool
Quote:
Quote:
to
Quote:
Quote:
Quote:
return non-transactional-connections.

Set non-transactional-connections="true" in your
<jdbc-connection-pool>
Quote:
Quote:
Quote:
configuration.

There are two type of transactions we can talk about in general
(pertaining
to this thread).

1) There is the transaction that you can write using SQL which
you
Quote:
Quote:
(the
Quote:
Quote:
Quote:
programmer) write yourself.
2) There is the transaction that java handles at a system level
which
Quote:
Quote:
can
Quote:
apply to any operation or series of operations you require to be
performed
Quote:
from beginning to end without error (including database
operations).
Quote:
Quote:
Quote:
Quote:
Quote:

By setting non-transactional-connections to true you will not get
the
Quote:
Quote:
Quote:
protection from system failure as described in number 2.




--
View this message in context:


http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
Quote:
Quote:
Quote:
Quote:
Sent from the NetBeans - EntPack mailing list archive at
Nabble.com.
Quote:
Quote:

--
View this message in context:

http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
Quote:
Quote:
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.




--
View this message in context:
http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335749.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.





--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23337729.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 6:32 pm    Post subject: Derby Error Starting Glassfish Reply with quote

The EJB Container timer service potentially can get corrupted if the Derby database files that store timer data get out of sync. To avoid this problem, use MySQL to store the timer data.
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 6:46 pm    Post subject: Derby Error Starting Glassfish Reply with quote

Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested

access - database corrupt
access - table issue (timer database table) - Indexing issue?
access - security issue
access - resource contention/management optimization issue (app has grown)
access - data
Back to top
jsexton0
Posted via mailing list.





PostPosted: Fri May 01, 2009 7:00 pm    Post subject: Derby Error Starting Glassfish Reply with quote

I did not set any of this up, the DB and pool are as originally installed
with Netbeans/Glassfish for its EJB timer support. And it can sometimes
work, so a security issue, a corruption issue, and a table/schema issue can
be ruled out.

It could very well be related to resource contention, but I don't know how I
can control this.
The JDBC driver for Derby is whatever Glassfish comes with.

I'm not sure what EJB Timer Service settings are available in the server,
but I have not changed anything. I have not specificly looked for a timer
section in the Glassfish console. I'll do that. I did try increasing the
time out and the max connections on __TimerPool, but it did not change the
problem.

It would be really nice if we did not has to change out the database
provided. That would greatly complicate the install process...

Thanks


OpenXGroup Inc. wrote:
Quote:

Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could
not
be obtained within the time requested
access - database corrupt
access - table issue (timer database table) - Indexing issue?
access - security issue
access - resource contention/management optimization issue (app has grown)
access - data source must be configured with an XA JDBC driver

EJB Timer Service settings

Timer DataSource - Specifies the database used by the EJB Timer Service.
The
default isjdbc/__TimerPool

Derby Bug? I am very interested if this indeed is a Derby bug.

On Fri, May 1, 2009 at 2:30 PM, jsexton0 <address-removed> wrote:
Quote:
The cause of the timer service's failure to start, is the earlier SQL
failure
to accessing the timer table in the Derby database.


OpenXGroup Inc. wrote:
Quote:

Down in the stack trace is EJB5108:Unable to initialize EJB Timer
Service.
Quote:
The likely cause is the
database has not been started or the timer database table has not been
created.

http://wiki.glassfish.java.net/Wiki.jsp?page=Ejb

*How do you verify the EJB Timer Service is enabled? Does this work:
You
Quote:
can verify that it was deployed successfully by accessing the following
URL:
**http://localhost:8080/ejb-timer-service-app/timer*<
http://localhost:8080/ejb-timer-service-app/timer>
Quote:
* *

EJB5108 Unable to initialize EJB Timer Service. The likely cause is the
database has not been started or the timer database table has not been
created.Cause:The EJB Timer Service could not be initialized because a
problem occurred while attempting to restore previously registered
timers
Quote:
from the associated data source.Solution:*Double-check the JDBC data
source
(and its associated connection pool) assigned **to** the **EJB**
**Timer**
Quote:
*
*Service.* Common causes are that the database is not running, the
timer
Quote:
table
has not been created within that database, or that the connection
pool's
Quote:
JDBC driver URL information is incorrect.

This is how an older version of WAS did it with Cloudscape/Derby....

What's probably happening is: something is preventing the
timer/scheduler service from starting, back at the time this module (or
some other module that also contains TimedObjects) is started. At the
time an EJB module is started, the WAS EJB container looks to see if
any
Quote:
beans within that module implement TimedObject. If any do, we attempt
to start the scheduler service if it is not already running.

When you see the message, it means that the EJB container is attempting
to call the scheduler service, but the service is not started.* Some
possible causes for the service being unable to start are:

- Scheduler database not present
- Database is present but scheduler tables are not present or are not
defined correctly
- Server does not have access authority to the scheduler database*

*When you install WAS, it comes pre-configured out of the box to use an
internal instance of a Cloudscape/Derby database for its scheduler
data.
*
Quote:
However, it is possible to configure the EJB Timer service (which in
turn uses the scheduler service) to use an alternate database or
scheduler instance. It's possible, if the scheduler/timer service
config has been modified, that there could be a config problem that
would prevent the scheduler from starting.

In any case, there should be some messages further up in your system
out
Quote:
log indicating that the scheduler had trouble starting, which should
shed some light as to the cause.

On Fri, May 1, 2009 at 12:20 PM, jsexton0 <address-removed> wrote:

Quote:

Hello -

I unloaded some SAs, shutdown everything on my computer, restarted
Glassfish
(it looked OK), and then reloaded the SAs one at a time and everything
came
up and runs normally.

So it doesn't appear to be corrupted at least, it's just a problem
with
Quote:
Quote:
the
general start up process, when everything is loaded.

Thanks


Manfred Riem wrote:
Quote:

The only other thing I could recommend is to connect
to the EJB timer database yourself and see if the
database itself is not corrupted in anyway.

Manfred

Quote:
-------- Original Message --------
Subject: Re: [entpack] Derby Error Starting Glassfish
From: jsexton0 <address-removed>
Date: Fri, May 01, 2009 9:49 am
To: address-removed


Hello -

I tried changing the max connections to 64, and the timeout to
90000
Quote:
Quote:
on
Quote:
Quote:
each
pool..

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Still unable to startup Glassfish correctly, no change. I do not
know
Quote:
Quote:
Quote:
Quote:
were/how to set other Derby properties. My server is
as-originally-installed with respect to the __TimerPool settings.

I guess I'll have to try pointing it at a different database server
altogether. I'd like to understand why this started happening
however,
Quote:
Quote:
and
I hate having to make such a drastic change to the way Glassfish
comes
Quote:
Quote:
Quote:
Quote:
"out
of the box".

I do have one timer bean in my application, but it's been working
fine
Quote:
Quote:
Quote:
Quote:
for
months as other development has progressed. Nothing in particular
seems
Quote:
Quote:
to
have caused this error to begin happening, except the application
has
Quote:
Quote:
Quote:
Quote:
grown.

Thanks


OpenXGroup Inc. wrote:
Quote:

Another thing to try- change
connection-validation-method="auto-commit"
Quote:
Quote:
to
Quote:
be "table"?
Can you change javax.sql.ConnectionPoolDataSource to
javax.sql.DataSource?
Quote:
Or use XA datasource altogether?

When you use a timer, it comes with the XA datasource access
because
Quote:
Quote:
Quote:
Quote:
the
Quote:
timer instances are stored in the database. When you call your
method
Quote:
Quote:
Quote:
directly, it uses a single (non-XA) connection. And that is a big
difference.

More information about *how to diagnose a deadlock situation in
Derby
/
Quote:
Quote:
Quote:
Java
DB*.
http://wiki.apache.org/db-derby/LockDebugging

http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html
Quote:
Quote:
Quote:
Quote:
Quote:

Note that lock ordering as part of the application is important
(e.g.
Quote:
Quote:
Quote:
locking in same order) and that a table being accessed without an
index
Quote:
Quote:
Quote:
could lead to a Table-level lock, affecting the lock granularity
quite
Quote:
Quote:
Quote:
significantly and the risk of deadlocks as part of the
applications.
Quote:
Quote:
It
Quote:
Quote:
Quote:
seemed like some index might have been missing for some of the
columns
Quote:
Quote:
Quote:
being
searched as part of some queries.


On Fri, May 1, 2009 at 10:59 AM, jsexton0 <address-removed>
wrote:
Quote:
Quote:
Quote:

Quote:

Hello -

This is interesting...
This error is happening on the Derby database, very early in
Glassfish's
Quote:
Quote:
startup. I am not (directly) using the Derby database in any of
my
Quote:
Quote:
Quote:
Quote:
code.
Quote:
Quote:
Are you suggesting a change to Glassfish's default setup for its
Derby
Quote:
Quote:
Quote:
Quote:
pool?
I can certainly try that...

Thanks


OpenXGroup Inc. wrote:
Quote:

Take a look at wrong XA state as well...

Can you change javax.sql.ConnectionPoolDataSource to
javax.sql.DataSource?
Quote:
Or use XA datasource altogether?
I increased the "Initial and Minimum Pool Size" from 32
(default)
Quote:
Quote:
to
Quote:
Quote:
Quote:
Quote:
64.
Quote:
The
error vanished, but I don't know if it just depends on how
many
Quote:
Quote:
Quote:
Quote:
times
Quote:
Quote:
per
Quote:
timer event a connection is requested. May be the error will
occure
Quote:
Quote:
Quote:
Quote:
again
Quote:
with more connection requests. Do you now what the maximal
possible
Quote:
Quote:
Quote:
Quote:
value
Quote:
is
for the Initial and Minimum Pool Size? The value of 128 seemed
not
Quote:
Quote:
to
Quote:
Quote:
be
Quote:
accepted.

I was able to resolve my problem by changing the resource type
to
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
java.sql.ConnectionPoolDataSource.

Do you need transactional capability. If not, you can set your
pool
Quote:
Quote:
to
Quote:
Quote:
Quote:
return non-transactional-connections.

Set non-transactional-connections="true" in your
<jdbc-connection-pool>
Quote:
Quote:
Quote:
configuration.

There are two type of transactions we can talk about in
general
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
(pertaining
to this thread).

1) There is the transaction that you can write using SQL which
you
Quote:
Quote:
(the
Quote:
Quote:
Quote:
programmer) write yourself.
2) There is the transaction that java handles at a system
level
Quote:
Quote:
Quote:
Quote:
which
Quote:
Quote:
can
Quote:
apply to any operation or series of operations you require to
be
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
performed
Quote:
from beginning to end without error (including database
operations).
Quote:
Quote:
Quote:
Quote:
Quote:

By setting non-transactional-connections to true you will not
get
Quote:
Quote:
Quote:
Quote:
the
Quote:
Quote:
Quote:
protection from system failure as described in number 2.




--
View this message in context:



http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Sent from the NetBeans - EntPack mailing list archive at
Nabble.com.
Quote:
Quote:

--
View this message in context:


http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
Quote:
Quote:
Quote:
Quote:
Sent from the NetBeans - EntPack mailing list archive at
Nabble.com.
Quote:
Quote:

--
View this message in context:

http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335749.html
Quote:
Quote:
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.





--
View this message in context:
http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23337729.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.





--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23338152.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
Back to top
jsexton0
Posted via mailing list.





PostPosted: Fri May 01, 2009 7:04 pm    Post subject: Derby Error Starting Glassfish Reply with quote

Hello -

Today, I'm working on a Windows machine so no ulimit utility.
I have the same app on a linux though, and have seen the error there too.
It behaves very much the same way.

Where is the derby database file?

Thanks


OpenXGroup Inc. wrote:
Quote:

The EJB Container timer service potentially can get corrupted if the Derby
database files that store timer data get out of sync. To avoid this
problem,
use MySQL to store the timer data. So you may need to move the
ejb__timer__tbl from embedded db to an external db


Perhaps delete and re-create JDBC data source.....

When you restart GlassFIsh what is your ulimit set at?

restart GlassFish, type:

*ulimit -n 32768

bin/asadmin start-domain domain1 *

http://thedata.org/guides/installers/maintenance/glassfish/utilities


On Fri, May 1, 2009 at 12:20 PM, jsexton0 <address-removed> wrote:

Quote:

Hello -

I unloaded some SAs, shutdown everything on my computer, restarted
Glassfish
(it looked OK), and then reloaded the SAs one at a time and everything
came
up and runs normally.

So it doesn't appear to be corrupted at least, it's just a problem with
the
general start up process, when everything is loaded.

Thanks


Manfred Riem wrote:
Quote:

The only other thing I could recommend is to connect
to the EJB timer database yourself and see if the
database itself is not corrupted in anyway.

Manfred

Quote:
-------- Original Message --------
Subject: Re: [entpack] Derby Error Starting Glassfish
From: jsexton0 <address-removed>
Date: Fri, May 01, 2009 9:49 am
To: address-removed


Hello -

I tried changing the max connections to 64, and the timeout to 90000
on
Quote:
Quote:
each
pool..

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Still unable to startup Glassfish correctly, no change. I do not know
were/how to set other Derby properties. My server is
as-originally-installed with respect to the __TimerPool settings.

I guess I'll have to try pointing it at a different database server
altogether. I'd like to understand why this started happening
however,
Quote:
Quote:
and
I hate having to make such a drastic change to the way Glassfish comes
"out
of the box".

I do have one timer bean in my application, but it's been working fine
for
months as other development has progressed. Nothing in particular
seems
Quote:
Quote:
to
have caused this error to begin happening, except the application has
grown.

Thanks


OpenXGroup Inc. wrote:
Quote:

Another thing to try- change
connection-validation-method="auto-commit"
Quote:
Quote:
to
Quote:
be "table"?
Can you change javax.sql.ConnectionPoolDataSource to
javax.sql.DataSource?
Quote:
Or use XA datasource altogether?

When you use a timer, it comes with the XA datasource access because
the
Quote:
timer instances are stored in the database. When you call your
method
Quote:
Quote:
Quote:
directly, it uses a single (non-XA) connection. And that is a big
difference.

More information about *how to diagnose a deadlock situation in
Derby
/
Quote:
Quote:
Quote:
Java
DB*.
http://wiki.apache.org/db-derby/LockDebugging
http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html

Note that lock ordering as part of the application is important
(e.g.
Quote:
Quote:
Quote:
locking in same order) and that a table being accessed without an
index
Quote:
Quote:
Quote:
could lead to a Table-level lock, affecting the lock granularity
quite
Quote:
Quote:
Quote:
significantly and the risk of deadlocks as part of the applications.
It
Quote:
Quote:
Quote:
seemed like some index might have been missing for some of the
columns
Quote:
Quote:
Quote:
being
searched as part of some queries.


On Fri, May 1, 2009 at 10:59 AM, jsexton0 <address-removed>
wrote:
Quote:
Quote:
Quote:

Quote:

Hello -

This is interesting...
This error is happening on the Derby database, very early in
Glassfish's
Quote:
Quote:
startup. I am not (directly) using the Derby database in any of my
code.
Quote:
Quote:
Are you suggesting a change to Glassfish's default setup for its
Derby
Quote:
Quote:
Quote:
Quote:
pool?
I can certainly try that...

Thanks


OpenXGroup Inc. wrote:
Quote:

Take a look at wrong XA state as well...

Can you change javax.sql.ConnectionPoolDataSource to
javax.sql.DataSource?
Quote:
Or use XA datasource altogether?
I increased the "Initial and Minimum Pool Size" from 32 (default)
to
Quote:
Quote:
Quote:
Quote:
64.
Quote:
The
error vanished, but I don't know if it just depends on how many
times
Quote:
Quote:
per
Quote:
timer event a connection is requested. May be the error will
occure
Quote:
Quote:
Quote:
Quote:
again
Quote:
with more connection requests. Do you now what the maximal
possible
Quote:
Quote:
Quote:
Quote:
value
Quote:
is
for the Initial and Minimum Pool Size? The value of 128 seemed
not
Quote:
Quote:
to
Quote:
Quote:
be
Quote:
accepted.

I was able to resolve my problem by changing the resource type to
java.sql.ConnectionPoolDataSource.

Do you need transactional capability. If not, you can set your
pool
Quote:
Quote:
to
Quote:
Quote:
Quote:
return non-transactional-connections.

Set non-transactional-connections="true" in your
<jdbc-connection-pool>
Quote:
Quote:
Quote:
configuration.

There are two type of transactions we can talk about in general
(pertaining
to this thread).

1) There is the transaction that you can write using SQL which
you
Quote:
Quote:
(the
Quote:
Quote:
Quote:
programmer) write yourself.
2) There is the transaction that java handles at a system level
which
Quote:
Quote:
can
Quote:
apply to any operation or series of operations you require to be
performed
Quote:
from beginning to end without error (including database
operations).
Quote:
Quote:
Quote:
Quote:
Quote:

By setting non-transactional-connections to true you will not get
the
Quote:
Quote:
Quote:
protection from system failure as described in number 2.




--
View this message in context:


http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
Quote:
Quote:
Quote:
Quote:
Sent from the NetBeans - EntPack mailing list archive at
Nabble.com.
Quote:
Quote:

--
View this message in context:

http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
Quote:
Quote:
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.




--
View this message in context:
http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335749.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.





--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23338191.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 7:13 pm    Post subject: Derby Error Starting Glassfish Reply with quote

Derby database file

DDL files are located ininstall-dir/lib/install/databases.


Short Primer on Where the Heck is My Database on Disk?!?
Here's the first trap.
Back to top
Manfred Riem
Posted via mailing list.





PostPosted: Fri May 01, 2009 7:35 pm    Post subject: Derby Error Starting Glassfish Reply with quote

For domain1 the actual Derby database files would be in

$GLASSFISH_INSTALL/domain1/lib/databases/ejbtimer

Manfred

Quote:
Hello -

Today, I'm working on a Windows machine so no ulimit utility.
I have the same app on a linux though, and have seen the error there too.
It behaves very much the same way.

Where is the derby database file?

Thanks
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 8:02 pm    Post subject: Derby Error Starting Glassfish Reply with quote

Another very good read....think you will like it.

Create in a table using sql scripts that are within
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 10:20 pm    Post subject: Derby Error Starting Glassfish Reply with quote

Resource Contention
Using P6Spy and the GlassFish Connection Pool to Trace Database Operations
http://blogs.sun.com/enterprisetechtips/entry/using_p6spy_and_the_glassfish
Using Custom MBeans to Extend the GlassFish Administration System
http://www.java-tips.org/java-ee-tips/glassfish/using-custom-mbeans-to-extend-the-glassfish-administration-s.html
Free Dev Only Edition
http://www.jinspired.com
JStack


With V3 Prelude you can now use the EJB Timer Service with the
Back to top
David Delivante Gifford
Posted via mailing list.





PostPosted: Fri May 01, 2009 10:48 pm    Post subject: Derby Error Starting Glassfish Reply with quote

Should have added this as well

Glassbox
http://www.javapassion.com/j2ee/glassfish_monitoring.pdf
http://viralpatel.net/blogs/2009/03/performance-monitoring-using-glassbox.html


There is a special program called FishCAT (http://wiki.glassfish.java.net/Wiki.jsp?page=FishCAT) that one can join to become an official GlassFish tester.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> SOA Users All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo