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 203450 - NullPointerException at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator.generate
Summary: NullPointerException at org.netbeans.modules.websvc.rest.wizard.fromdb.Databa...
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-10 15:59 UTC by Sergey Petrov
Modified: 2011-10-14 15:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 181845


Attachments
stacktrace (1.95 KB, text/plain)
2011-10-10 16:00 UTC, Sergey Petrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2011-10-10 15:59:58 UTC
Build: NetBeans IDE Dev (Build 20111010-292359ca2a0d)
VM: Java HotSpot(TM) Client VM, 20.2-b06, Java(TM) SE Runtime Environment, 1.6.0_27-b07
OS: Windows 7

Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator.generate(DatabaseResourceWizardIterator.java:295)
   at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator.access$000(DatabaseResourceWizardIterator.java:122)
   at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator$1.run(DatabaseResourceWizardIterator.java:192)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1973)
Comment 1 Sergey Petrov 2011-10-10 16:00:02 UTC
Created attachment 111797 [details]
stacktrace
Comment 2 Denis Anisimov 2011-10-10 16:05:31 UTC
Steps to reproduce ?
Comment 3 Sergey Petrov 2011-10-10 16:07:50 UTC
nit sure if it's new of one of npe can be reproduced only on my system (or may
be specific to build created on win platform).

steps - just create web project on gf 3.1.1 with spring and generate REST from database for sample database (PRODUCT_CODE for example) with all default.
Comment 4 Sergey Petrov 2011-10-10 16:10:56 UTC
in real I just can't verify https://netbeans.org/bugzilla/show_bug.cgi?id=198346 as it'[s blocked by this one issue.
Comment 5 Denis Anisimov 2011-10-10 16:12:19 UTC
Not able to reproduce with mentioned steps.
It could be some specific values used in the UI. 
In the latter case please provide DETAILED UI actions with entered values.
Comment 6 Sergey Petrov 2011-10-10 16:31:01 UTC
as requested:
start fresh ide (no user dir/removed user dir)
install junit as suggested
close welcome screen
invoke new|project
select Java Web|Web Application
next
keep project name default (WebApplication9)
keep project path default (C:\Users\userrr\Documents\NetBeansProjects)
next
press "Add.." to add a server
select glassfish 3+ server type
find path to gf3.1.1 (i.e. c:\glassfish3.1.1) and register
next
select spring framework
finish
on Source Packages node select 'New|Other'
select Web Services|REST.. from database
next
select datasource "jdbc/sample"
move PRODUCT_CODE to selected tables and press next
set package to "p" and press finish
wait
REST resource confiiguration dialog will appear
keep all default ("Netbeans will generate a subclass.." selected + "add jersey library..." selected + "/resources" path) and press ok.

just wait for exception.
I'm pretty sure it doesn't matter in this case (specific values).
Comment 7 Sergey Petrov 2011-10-10 16:33:33 UTC
one more point, ide was started with "--userdir c:\tmpr1" option
Comment 8 Denis Anisimov 2011-10-10 16:45:36 UTC
(In reply to comment #6)


There is one important detail which is the reason of the bug :
>move PRODUCT_CODE to selected tables and press next
>set package to "p" and press finish

There is third wizard panel. It is used to set package name for generated REST
resources. 
So the second panel should not be finishable probably.
Comment 9 Sergey Petrov 2011-10-10 16:47:41 UTC
yes "and press next" should move the wizard to 3rd panel
Comment 10 Denis Anisimov 2011-10-11 07:12:51 UTC
web-main#de006162d24e
Comment 11 Quality Engineering 2011-10-12 14:25:55 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/de006162d24e
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#203450 - NullPointerException at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator.generate
Comment 12 Quality Engineering 2011-10-14 15:11:44 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a7a8cff84ff1
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #203450 fix fix