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 218240 - AssertionError at org.netbeans.modules.j2ee.ejbjarproject.EjbJarProjectOperations.notifyDeleting
Summary: AssertionError at org.netbeans.modules.j2ee.ejbjarproject.EjbJarProjectOperat...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB Project (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
: 220961 220962 221009 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-12 15:53 UTC by Lukas Jungmann
Modified: 2012-10-30 13:00 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 192367


Attachments
stacktrace (962 bytes, text/plain)
2012-09-12 15:53 UTC, Lukas Jungmann
Details
stacktrace (962 bytes, text/plain)
2012-10-13 06:17 UTC, viggonavarsete
Details
stacktrace (962 bytes, text/plain)
2012-10-21 21:11 UTC, viggonavarsete
Details
patch with usage of PSP (5.85 KB, patch)
2012-10-23 19:27 UTC, Martin Fousek
Details | Diff
stacktrace (962 bytes, text/plain)
2012-10-27 19:51 UTC, kjozic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2012-09-12 15:53:45 UTC
Build: NetBeans IDE Dev (Build 20120911-bffa77583dc0)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.2-b09, Java(TM) SE Runtime Environment, 1.7.0_06-b24
OS: Windows 7

User Comments:
jungi: deleting EJB module




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.modules.j2ee.ejbjarproject.EjbJarProjectOperations.notifyDeleting(EjbJarProjectOperations.java:169)
   at org.netbeans.spi.project.support.ProjectOperations.notifyDeleting(ProjectOperations.java:129)
   at org.netbeans.modules.project.uiapi.DefaultProjectOperationsImplementation.performDelete(DefaultProjectOperationsImplementation.java:130)
   at org.netbeans.modules.project.uiapi.DefaultProjectOperationsImplementation.access$200(DefaultProjectOperationsImplementation.java:101)
   at org.netbeans.modules.project.uiapi.DefaultProjectOperationsImplementation$1.execute(DefaultProjectOperationsImplementation.java:205)
   at org.netbeans.modules.project.uiapi.DefaultProjectOperationsImplementation$6$1.run(DefaultProjectOperationsImplementation.java:649)
Comment 1 Lukas Jungmann 2012-09-12 15:53:47 UTC
Created attachment 124261 [details]
stacktrace
Comment 2 viggonavarsete 2012-10-13 06:17:15 UTC
Created attachment 125896 [details]
stacktrace

Trying to delete an Enterprise project
Comment 3 viggonavarsete 2012-10-21 21:11:21 UTC
Created attachment 126276 [details]
stacktrace
Comment 4 Martin Fousek 2012-10-23 19:26:54 UTC
Thanks to MartinJ and Milos I was able to identify that it's likely regression since the fix for issue #219320. I created patch to fixing that in EJB project which I'm attaching.

The fix is generally about registering project specific action provider via @ProjectServiceProvider + several needed changes around. BTW, it doesn't call CLEAN target directly over the ActionProvider (BaseActionProvider) - ap instance, since the BAP asserts for calling from AWT EDT which looks to me really useless here.

BTW, the patch could be used similarly for fixing of the issue #218072 in WebProject case too. If you would agree with that change I could do the same for web project if you would be David interested.
Comment 5 Martin Fousek 2012-10-23 19:27:49 UTC
Created attachment 126413 [details]
patch with usage of PSP

Attaching mentioned patch.
Comment 6 David Konecny 2012-10-23 21:33:40 UTC
Thanks Martin, it would be great if you could fix it in WebProject as well.

Re. patch - you have to change EjbJarActionProvider and EjbJarProject - merger will take care of that. Reading your patch EjbJarProjectOperations.notifyDeleting body could be further simplified to two lines, no:

  FileObject buildXML = project.getProjectDirectory().getFileObject(GeneratedFilesHelper.BUILD_XML_PATH);
  ActionUtils.runTarget(buildXML, new String[]{ActionProvider.COMMAND_CLEAN}, new Properties()).waitFinished();
Comment 7 Martin Fousek 2012-10-24 05:41:40 UTC
(In reply to comment #6)
> Re. patch - you have to change EjbJarActionProvider and EjbJarProject - merger
> will take care of that. Reading your patch
> EjbJarProjectOperations.notifyDeleting body could be further simplified to two
> lines, no:

That's right. But actually it could be simplified in that way in the original code as well. So I tried to keep few checks which were there. Anyway if you agree with that code simplification, I'm on your side for sure.

Fixed in web-main #1692502d2c76.
Comment 8 Quality Engineering 2012-10-25 01:33:08 UTC
Integrated into 'main-golden', will be available in build *201210250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1692502d2c76
User: Martin Fousek <marfous@netbeans.org>
Log: #218240 - AssertionError at org.netbeans.modules.j2ee.ejbjarproject.EjbJarProjectOperations.notifyDeleting
Comment 9 kjozic 2012-10-27 19:51:10 UTC
Created attachment 126670 [details]
stacktrace
Comment 10 Jiri Skrivanek 2012-10-29 14:59:22 UTC
*** Bug 221009 has been marked as a duplicate of this bug. ***
Comment 11 Martin Fousek 2012-10-30 12:26:23 UTC
*** Bug 220962 has been marked as a duplicate of this bug. ***
Comment 12 Martin Fousek 2012-10-30 12:26:47 UTC
*** Bug 220961 has been marked as a duplicate of this bug. ***