This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 141933 - Database Explorer = GlassFish Restart
Summary: Database Explorer = GlassFish Restart
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
: 141932 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-28 18:22 UTC by willfarnaby
Modified: 2008-08-26 21:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description willfarnaby 2008-07-28 18:22:46 UTC
6.5 M1 under Windows XP SP3

Still suffering from the problem of the (PostgreSQL, only?) database driver - defined in the Services tab - causing
GlassFish to RESTART (ugh, there goes 10 minutes) immediately after I'm informed that NetBeans / GlassFish is "Checking
for missing JDBC drivers..." (there is no driver missing; the JDBC driver jar file is copied to the active GlassFish
domain's 'lib' directory, where it already exists). I have to delete the driver definition from the NetBeans Services
tab in order to stop the pain.
Comment 1 willfarnaby 2008-07-28 19:56:59 UTC
BTW, "Checking for missing JDBC drivers..." followed by GlassFish RESTART occurs after selecting (at least) the
"Undeploy and Deploy" context menu item of my J2EE Enterprise Application project node.
Comment 2 Petr Jiricka 2008-07-29 09:54:00 UTC
Assigning to GF plugin - could you please evaluate?
Comment 3 willfarnaby 2008-07-29 13:46:16 UTC
I have experienced the same problem once since I deleted my JDBC Connection node in the NetBeans Services tab pane.

So, while this greatly reduces the incidence of the problem, it does not entirely resolve it, apparently.

Note that in my original posting I stated that I deleted the JDBC _Driver_ node (Databases/Drivers/PostgreSQL, in my
setup). In fact, I deleted the _Connection_ node I had created for my PostgreSQL DBMS (Databases/jdbc:<PostgreSQL uri>).
Comment 4 Vince Kraemer 2008-07-29 15:03:18 UTC
the server needs to be restarted after the file is copied to the domains directory... but that should only happen once.  

Does the server restart after you see a message that tells you that the driver file(s) were copied... or after a message
that the ide is checking for missing files....

There might be another issue that is causing the 'tthe server should be restarted' bit to be set.

I will try to replicate the issue
Comment 5 willfarnaby 2008-07-29 21:09:49 UTC
[quote]
Does the server restart after you see a message that tells you that the driver file(s) were copied... or after a message
that the ide is checking for missing files....
[/quote]

I can't remember. The next time this problem occurs, I'll add another comment here.
Comment 6 Vince Kraemer 2008-07-30 00:01:14 UTC
Will

I have been trying to replicate your issue and I must be doing something different/wrong/whatever...

Here is a rough outline of the test that i am doing...

I started with a new userdir and a fresh v2 ur 2 domain.

I started the IDE
I registered the domain
I added a connection to a Postgresql db into my Services explorer
  (the server is running)
I created a web app
I created entity classes from the Postgresql db connection
I deployed the web app to my GF domain
   the driver was copied to the domain's lib directory
   the server restarted
I edited one of the java files in the project
I used the Undeploy and Deploy item to redeploy the app.
   no copy operation fired.
   The server did not restart.
   The deploy was successful.

There have been instances where a project can have a configuration issue that would cause a server restart. Most of the
time, the data that will expose the root cause is in the app server's log file.  There are situation that are detectable
by looking at the domain.xml file for the domain and any sun-resources.xml files that are part of the projects deployed
onto the server.

It looks like I will need to get some of that kind of data from you.

Also... if you are doing something different from the steps that I have described above, please include more detailed
information about the steps you think will allow me to replicate this issue.
Comment 7 Vince Kraemer 2008-07-30 01:05:10 UTC
are you seeing 'ClassFormatError: Truncated class file ' in your server log?

I think I have been able to reproduce your issue.

Select the Properties item from the right-click menu on your project. Select the Run node in the tree control on the
left side of the dialog. uncheck the 'Deploy on Change' checkbox.

Report back on whether that resolves the restart issue.

Note: you may need undeploy your project from the server and clean it...

What I am seeing.  the call to undeploy and deploy may interact with the compile/deploy on change... so you end up with
a couple processes read/writing a file at the same time... BAD.  Some failed deploys set the 'restart the server' bit.
WORSE. Once the file is corrupted, it is not recompiled... since there is just a timestamp check happeneing... WORST.
Comment 8 Vince Kraemer 2008-08-26 00:13:42 UTC
*** Issue 141932 has been marked as a duplicate of this issue. ***
Comment 9 Vince Kraemer 2008-08-26 21:30:57 UTC
I have tried to reproduce this with recent 6.5 builds and cannot. It may have been addressed by other changes.

Please reopen and include more details about the steps necessary to reproduce this issue, if it is still an issue for
you in recent builds of 6.5.