Bug 218240

Summary: AssertionError at org.netbeans.modules.j2ee.ejbjarproject.EjbJarProjectOperations.notifyDeleting
Product: javaee Reporter: Lukas Jungmann <jungi>
Component: EJB ProjectAssignee: Martin Fousek <marfous>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: dkonecny, kjozic, lehel, mjanicek, SuperM, viggonavarsete
Version: 7.3   
Target Milestone: 7.3   
Hardware: All   
OS: All   
Whiteboard: EXCEPTIONS_REPORT
Issue Type: DEFECT Exception Report: 192367
Attachments: stacktrace
stacktrace
stacktrace
patch with usage of PSP
stacktrace

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. ***
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo