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 120458 - RuntimeException: java.lang.reflect.InvocationTargetException
Summary: RuntimeException: java.lang.reflect.InvocationTargetException
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ sandipchitale
URL: http://statistics.netbeans.org/except...
Keywords:
: 120540 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-30 12:21 UTC by Roman Mostyka
Modified: 2008-03-20 19:13 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 1769


Attachments
stacktrace (2.88 KB, text/plain)
2007-10-30 12:21 UTC, Roman Mostyka
Details
stacktrace (2.88 KB, text/plain)
2007-10-30 15:12 UTC, Jiri Skrivanek
Details
stacktrace (2.88 KB, text/plain)
2007-10-30 15:24 UTC, Lark Fitzgerald
Details
stacktrace (2.88 KB, text/plain)
2007-10-31 14:07 UTC, paulr5930
Details
stacktrace (2.88 KB, text/plain)
2007-10-31 17:39 UTC, nouar38
Details
stacktrace (2.88 KB, text/plain)
2007-11-01 09:17 UTC, bernd_zedv
Details
stacktrace (2.88 KB, text/plain)
2007-11-01 09:22 UTC, bernd_zedv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2007-10-30 12:21:09 UTC
Build: NetBeans IDE Dev (Build 071030)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06
OS: Windows XP, 5.1, x86

User Comments: 
1. Build IDE from fresh sources.
2. Start IDE.
3. Add GlassFish V2 to the IDE.
4. Create Java EE 5 web application with "Visual Web JSF" framework for GlassFish.

Result: java.lang.NullPointerException arises.
Comment 1 Roman Mostyka 2007-10-30 12:21:20 UTC
Created attachment 51990 [details]
stacktrace
Comment 2 Roman Mostyka 2007-10-30 12:26:44 UTC
Project is totally unusable. "Loading, please wait..." message doesn't disappear. So upgraded to P1.
Comment 3 _ sandipchitale 2007-10-30 14:39:04 UTC
Roman is this consistently reproducible? What did you have in the Page1.java file when this happened. It seems we are
getting a null JavaSource (a Retouche object) instance for a Java file.

I will try to reproduce.




Comment 4 Petr Blaha 2007-10-30 14:57:49 UTC
I'm able to reproduce the bug with fresh build as well. The content of jsp page is below:

<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <webuijsf:page binding="#{Page1.page1}" id="page1">
            <webuijsf:html binding="#{Page1.html1}" id="html1">
                <webuijsf:head binding="#{Page1.head1}" id="head1">
                    <webuijsf:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
                </webuijsf:head>
                <webuijsf:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
                    <webuijsf:form binding="#{Page1.form1}" id="form1">
                    </webuijsf:form>
                </webuijsf:body>
            </webuijsf:html>
        </webuijsf:page>
    </f:view>
</jsp:root>
Comment 5 Jiri Skrivanek 2007-10-30 15:11:56 UTC
Build: NetBeans IDE Dev (Build 20071030121315)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b02
OS: Windows XP, 5.1, x86

User Comments: 
It started to happen in build #4203 (30-Oct-2007 09:33:43) and it breaks UI validation tests on deadlock.netbeans.org. To reproduce:

- open new project wizard
- choose Web|Web Application
- go to Frameworks panel
- check Visual Web JavaServer Faces
- finish the wizard and you get the exception. In editor is shown "Loading, please wait..." forever.
Comment 6 Jiri Skrivanek 2007-10-30 15:12:07 UTC
Created attachment 52007 [details]
stacktrace
Comment 7 _ sandipchitale 2007-10-30 15:17:04 UTC
Yes. I can reproduce. Deva can you have a look at this.
Comment 8 Lark Fitzgerald 2007-10-30 15:24:04 UTC
Build: NetBeans IDE Dev (Build 20071030121315)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b02
OS: Windows Vista, 6.0, x86

User Comments: 
Received this error creating a Visual web EE5 project with glassfish.
Comment 9 Lark Fitzgerald 2007-10-30 15:24:18 UTC
Created attachment 52011 [details]
stacktrace
Comment 10 Mark Dey 2007-10-30 15:41:12 UTC
FWIW, I was *not* able to reproduce the problem using yesterday's build under the following config:

Product Version: NetBeans IDE Dev (Build 200710291200)
Java: 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87
System: Mac OS X version 10.4.10 running on i386; MacRoman; en_US (nb)
Comment 11 _ sandipchitale 2007-10-30 15:45:59 UTC
Java Source is null because of the the following test in:

JavaSource org.netbeans.api.java.source.JavaSource.forFileObject(FileObject fileObject) throws IllegalArgumentException
:
:
            if (od.getLookup().lookup(CloneableEditorSupport.class) == null) {
                return null;
            }
Comment 12 _ sandipchitale 2007-10-30 15:47:17 UTC
1.95         (jlahoda  30-Oct-07):             DataObject od = DataObject.find(fileObject);
1.95         (jlahoda  30-Oct-07):             
1.95         (jlahoda  30-Oct-07):             if (od.getLookup().lookup(CloneableEditorSupport.class) == null) {
1.95         (jlahoda  30-Oct-07):                 return null;
1.95         (jlahoda  30-Oct-07):             }
Comment 13 _ sandipchitale 2007-10-30 15:54:34 UTC
The fix that Jan made was for issue # 115104

I sent Jan a query.115104 :



Comment 14 Jan Lahoda 2007-10-30 16:48:48 UTC
I have slightly relaxed the test in JS, so this problem should be gone now. Sorry for the problems.

BTW: it seems to me that the getCookie and getLookup() are not consistent for JsfJavaDataObject, ie.
d.getCookie(EditCookie.class) != d.getLookup().lookup(EditCookie.class), IMO.

Checking in JavaSource.java;
/cvs/java/source/src/org/netbeans/api/java/source/JavaSource.java,v  <--  JavaSource.java
new revision: 1.96; previous revision: 1.95
done
Comment 15 _ sandipchitale 2007-10-30 17:23:28 UTC
About Jan's comment:

"BTW: it seems to me that the getCookie and getLookup() are not consistent for JsfJavaDataObject, ie.
d.getCookie(EditCookie.class) != d.getLookup().lookup(EditCookie.class), IMO."

Can you plerase have a look at that Quy?
Comment 16 Petr Blaha 2007-10-30 18:52:30 UTC
*** Issue 120540 has been marked as a duplicate of this issue. ***
Comment 17 Quy Nguyen 2007-10-30 21:42:49 UTC
I looked into the lookup()/getCookie() mismatch, and it's working from my end.  Both getCookie(EditCookie.class) and
getLookup().lookup(EditCookie.class) return the same value.
Comment 18 Jan Lahoda 2007-10-30 22:38:38 UTC
Ahhh, OK, I understand how it works now. Sorry for disturbing you.
Comment 19 Petr Blaha 2007-10-31 11:39:48 UTC
Product Version: NetBeans IDE Dev (Build 071031)
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
System: Linux version 2.6.17-12-generic running on i386; UTF-8; en_US (nb)
Userdir: /usr/src/nbsrc/nbbuild/testuserdir
Comment 20 paulr5930 2007-10-31 14:07:25 UTC
Build: NetBeans IDE Dev (Build 200710301200)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05
OS: Windows XP, 5.1, x86

User Comments: 
I just created a new VWP project. The exception occured as the Page1 VWP editor window was initializing.
Comment 21 paulr5930 2007-10-31 14:07:33 UTC
Created attachment 52117 [details]
stacktrace
Comment 22 nouar38 2007-10-31 17:38:59 UTC
Build: NetBeans IDE Dev (Build 200710301200)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05
OS: SunOS, 5.10, sparc

User Comments: 
created a new Java EE 5 web project with framework Visual Web javaServer faces
Comment 23 nouar38 2007-10-31 17:39:11 UTC
Created attachment 52157 [details]
stacktrace
Comment 24 bernd_zedv 2007-11-01 09:17:33 UTC
Build: NetBeans IDE Dev (Build 200710301200)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05
OS: Windows XP, 5.1, x86

User Comments: 
created a new visual web page for a web project that had pure JSF pages before
Comment 25 bernd_zedv 2007-11-01 09:17:41 UTC
Created attachment 52221 [details]
stacktrace
Comment 26 bernd_zedv 2007-11-01 09:22:41 UTC
Build: NetBeans IDE Dev (Build 200710301200)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05
OS: Windows XP, 5.1, x86

User Comments: 
created a new web project with visual web framework
Comment 27 bernd_zedv 2007-11-01 09:22:50 UTC
Created attachment 52222 [details]
stacktrace
Comment 28 srbenita 2008-02-17 18:37:30 UTC
I downloaded the new 6.0.1 version of netbean and i have still this problem. "loading, please wait".how can i fix this 
Comment 29 _ sandipchitale 2008-02-19 02:22:48 UTC
Please specify exact steps.
Attach the project that is causing the problem.
Comment 30 srbenita 2008-03-20 11:04:41 UTC
To resolve this issue, I reinstalled the new version of JDK and than installed the 6.1 netbean version. Now it works. 
Comment 31 Roman Mostyka 2008-03-20 19:13:03 UTC
Verified with build 080320.