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 57187 - 'Use Database' action doesn't create DataSource resource
Summary: 'Use Database' action doesn't create DataSource resource
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: DD Editor (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords: REGRESSION
Depends on: 57104 63408
Blocks:
  Show dependency tree
 
Reported: 2005-03-30 13:13 UTC by Petr Blaha
Modified: 2005-11-07 16:07 UTC (History)
2 users (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 Petr Blaha 2005-03-30 13:13:21 UTC
[Build 20050329]
Steps:
1) create new J2EE application
2) in web module create servlet
3) in editor invoke Enterprise Resource - Use database
getMethod is generated but JDBC resource and pool resource aren't.
Comment 1 _ ludo 2005-03-30 17:11:23 UTC
Cannot reproduce, same scenario as
http://www.netbeans.org/issues/show_bug.cgi?id=57187

I see the server resources in my project.

So we need to know your environment.
Comment 2 _ ludo 2005-03-30 19:28:11 UTC
seems to be a j2eeserver bug not calling our impl for ensureResourceDefined()
sometimes... Not sure why, but not a plugin bug for sure...
Comment 3 Petr Blaha 2005-03-31 12:22:59 UTC
I'm sorry, my description of the bug is a little bit missleading. The issue
causes that Sun Resources (connection pool, JDBC datasource) aren't created in
project. Therefore, resources can't be registered in App server during
deployment. And connection to the database doesn't work. 
It seems this is issue in appserver module.
Comment 4 Sherold Dev 2005-03-31 12:55:56 UTC
The cause of this issue is the same as of issue 57188. J2eeserver is not getting
dd change events. It is most likely caused by a ClonnableEditorSupport issue.
Reassinging to Milan.
Comment 5 Milan Kuchtiak 2005-03-31 13:54:26 UTC
This also depends on issue 57104.
Comment 6 Milan Kuchtiak 2005-04-01 12:30:37 UTC
Waiting on 57104 fix.
Comment 7 Milan Kuchtiak 2005-04-02 08:30:21 UTC
57104 fix helped.
I've changed the way how deployment descriptor changes are implemented.
See :
http://web.netbeans.org/source/browse/web/project/src/org/netbeans/modules/web/project/WebContainerImpl.java?r1=1.11&r2=1.12
Comment 8 Petr Blaha 2005-09-08 10:05:41 UTC
I am able to reproduce the issue in build 20050907. The issue can be caused by
issue #63408
Comment 9 Petr Blaha 2005-09-08 14:25:33 UTC
This is regresion from NetBeans 4.1. Marking as Beta stopper
Comment 10 Petr Blaha 2005-09-12 10:02:59 UTC
I am able to reproduce the issue in daily build 20050911 even the bug #63408 is
already fixed. It seems that it's not related to this issue.
Comment 11 Milan Kuchtiak 2005-09-12 10:09:12 UTC
63408 fix didn't help.
I guess this is a problem in appserver. Otherwise, reasign the issue to web
project (or j2eeserver).
Comment 12 _ pcw 2005-09-13 01:51:01 UTC
Investigating...
Comment 13 _ pcw 2005-09-13 07:14:39 UTC
I cannot reproduce this.  I tried twice in same session, the first time, it took
a while for the resources to appear (I didn't see them at first, popped over
this report to read steps again, and they were there when I went back to the
IDE).  The second time they were created almost immediately, so the first delay
must have been due to required services being initialized as well.

This problem MAY have been caused by the same problem that caused Bug #63217 in
which there situations where there were duplicate DConfigBeans in the cache.

Since I fixed that bug today, that would explain why I can no longer reproduce
this. Please reverify against nightly build.
Comment 14 Petr Blaha 2005-09-13 08:58:41 UTC
I was able to reproduce this issue with these steps in build 20050912:
1) create only web project
2) add servlet
3) invoke 'Use database' action
Sun Resources aren't created. I realized when the web project is part of J2EE
app (new Enterprise application with EJB and web project) then the creation is
working.
Comment 15 _ pcw 2005-09-13 22:38:06 UTC
Ok, confirmed this behavour still exists for vanilla web app.  It works fine for
Ears.  The problem is that no events are being propagated from the DD's to our
DDBean/DConfigBean tree, so while the resource-ref is created in web.xml, it is
not created in sun-web.xml and so the resources are never created.  This problem
is actually more widespread in that any item added to web.xml that has a
corresponding entry in sun-web.xml is not being created (e.g service-ref for web
service client for example.)

Reassigning to web team.
Comment 16 Petr Jiricka 2005-09-14 10:08:16 UTC
Pavle, could you please look at this? Thanks.
Comment 18 Petr Blaha 2005-11-04 12:42:42 UTC
I can reproduce the issue in build 20051103
Comment 19 Pavel Fiala 2005-11-05 20:25:15 UTC
I think the issue should be assigned to Sun AppServer plugin as 
the WebApp fires appropriate property change.
Comment 20 Petr Blaha 2005-11-07 15:49:38 UTC
Milane, it's working for me. I didn't realize that in Choose Database dialog is
new checkbox 'Create server resources' that is unchecked by default. When I
checked this one and then used DB Sun resources were created successfully.
Comment 21 Milan Kuchtiak 2005-11-07 16:07:05 UTC
I changed the resolution to WORKSFORME then.