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 179911

Summary: beans.xml file wizard doesn't work at 68_fixes
Product: javaee Reporter: Jindrich Sedek <jsedek>
Component: CDIAssignee: David Konecny <dkonecny>
Status: VERIFIED FIXED    
Severity: normal CC: sustaining
Priority: P1    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: full stacktrace
patch

Description Jindrich Sedek 2010-01-27 06:24:34 UTC
Created attachment 93593 [details]
full stacktrace

Create new Web Application
invoke create new file wizard, select Context and Dependency Injection category
choose beans.xml file
Press Next / Press Finish ...
the Finish button gets grayed but nothing happens.
No exception is visible, but NPE is thrown in log. 

The only option to continue is to Cancle the wizard
bean.xml file is created but it has no content

WARNING [org.openide.WizardDescriptor]
java.lang.NullPointerException
        at java.io.Reader.<init>(Reader.java:61)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
        at org.netbeans.modules.j2ee.common.dd.DDHelper$MakeFileCopy.readResource(DDHelper.java:218)
        at org.netbeans.modules.j2ee.common.dd.DDHelper$MakeFileCopy.run(DDHelper.java:197)
Comment 1 David Konecny 2010-01-27 16:47:04 UTC
The problem in only in release68_fixes repo. It can be fixed by:

cp main/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/beans-1.0.xml release68/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/

that seems to resolve it and beans.xml is created and can be edited. Validation of XML reports that schema from internet is used which can possibly cause problems if user is offline or his internet connection is too slow. This problem can be fixed by integrating remaining part of http://hg.netbeans.org/main-silver?cmd=changeset;node=a9ba29057258 I did that and patch is attached. I tested the patch and everything works fine. Somebody else should review and retest.
Comment 2 David Konecny 2010-01-27 16:48:02 UTC
Created attachment 93613 [details]
patch
Comment 3 David Konecny 2010-01-27 16:52:13 UTC
Leaving on sustaining to decide which fix is more suitable.
Comment 4 pgebauer 2010-01-28 04:57:45 UTC
The fix has been ported into the release68_fixes repository.
http://hg.netbeans.org/release68_fixes/rev/55655dd16da3