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 164835 - Unable to create MDB
Summary: Unable to create MDB
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-11 05:39 UTC by Michal Mocnak
Modified: 2016-07-07 08:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (73.35 KB, image/png)
2009-05-11 05:40 UTC, Michal Mocnak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Mocnak 2009-05-11 05:39:49 UTC
Found in nb6.7 #200905101401

1. create maven enterprise project (ejb and war included)
2. create message driven bean

==> you are unable to create mdb due to server missing failure (see attached screenshot) -> i know it's my fault that i
have no server attached to project but it's very confusing. If i add server target on ear module (it should be
propagated into child modules) the problem still occurs. I have to add server target as well on ejb module.

Possible solutions:
  - set target server in project creation wizard as ant project does
  - if user sets target server on ear propagate it into child modules
Comment 1 Michal Mocnak 2009-05-11 05:40:11 UTC
Created attachment 81873 [details]
screenshot
Comment 2 Milos Kleint 2009-05-13 13:57:57 UTC
none of the outlined solutions is a viable option for maven j2ee support.

1. The setting of app server on project create will not solve anything as the majority (I'd say a vast majority) of
projects are existing projects not bound to NetBeans. That's quite opposite to how our Ant projects are setup. We can
almost certainly assume *all* of them have app server attached because all went through the the creation wizard. In
Maven most projects will be just opened, not created in NetBeans. I find it unacceptable to force people to setup a
server just because some code generators require it. IMHO most features shall not depend on the preset app server. If
really nead it they shall allow people to  select one in place for by that one operation only.

2. inheriting from ear is not possible generally. We might never get the sources and project source locations for all
ear's content. All is driven by repositories and there is no direct connection between projects. I don't want to attempt
any heuristic solutions based  open projects ans that will confuse people amdn make the setup less predictable.
You could set the app server for all projects in simple setups by moving the app server profile/property from the ear's
POM to the aggregator parent pom. then it will be inherited by all child projects. In turn that is up to user
configuratio, not something we can do in the UI.

reassigning to j2ee/ejb support where the dialog probably resides. The problem occurs there and shall be handled there
IMHO. From my point of view as described in item 1. By allowing to use a server of choice for that one code generating
operation.
Comment 3 Petr Jiricka 2009-05-13 17:40:20 UTC
So you are saying that the workaround is to set the target server for both the EJB and EAR project, and then it works? I
think this is really a P3 bug, not a P2. EJB support was never considered a must have for Maven, the fact that it sort
of works is an added bonus, not a P1 requirement. See also the Maven plan:
http://wiki.netbeans.org/MavenSupport67#section-MavenSupport67-J2ee
Comment 4 Petr Jiricka 2009-05-13 17:42:44 UTC
I agree the fix should be on the EJB side.
Comment 5 Petr Jiricka 2009-05-16 10:53:26 UTC
-> P3
Comment 6 Andrey Yamkovoy 2009-11-13 07:48:35 UTC
Not planned for 6.8
Comment 7 Petr Jiricka 2011-10-06 13:52:11 UTC
> - set target server in project creation wizard as ant project does

This is now filed as enhancement #203063.


Another possible improvement would be to warn the user if the server is not set, like we do for JSF or JPA.
Comment 8 Martin Fousek 2011-10-06 14:01:47 UTC
(In reply to comment #7)
> > - set target server in project creation wizard as ant project does
> 
> This is now filed as enhancement #203063.
> 
> 
> Another possible improvement would be to warn the user if the server is not
> set, like we do for JSF or JPA.

Actually, it already warns the user that the server is not set up. The problem is that it warns also when the server is set to the parent EAR application - it's solved somehow for Ant project, I will take a look how to do the same for Maven ones.
Comment 9 Martin Fousek 2012-04-16 07:12:02 UTC
> it's solved somehow for Ant project, I will take a look how to do the same for
> Maven ones.

Actually this last comment from me is wrong. By switching ANT EAR project server nothing happens on it's childs as well. So it behaves identically.

Since nb7.1 where the server can be set for Maven EAR project by its creation (issue #203063) and the fact that this issue was not reported from our community, I'm not sure about the real annoyance now. I'm descreasing the priority to P4 although I would be more for WONTFIX - nobody complained about that for several releases.
Comment 10 Martin Balin 2016-07-07 08:56:30 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss