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 58359 - Samples won't run
Summary: Samples won't run
Status: RESOLVED INVALID
Alias: None
Product: obsolete
Classification: Unclassified
Component: blueprints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Yutaka Yoshida
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-26 23:31 UTC by dejaniv
Modified: 2013-02-13 10:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dejaniv 2005-04-26 23:31:22 UTC
Downloaded NetBeans 4.1 RC1 with bundled 8.1 Sun App Server. Loaded sample
"command-submission". When I run it I get:

javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw
exception
	org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
	com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)

root cause

java.lang.NullPointerException
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        ...

Project verification also fails:

	Error Name : Could not verify successfully.
	Error Description : java.lang.NullPointerException

	at
com.sun.enterprise.deployment.backend.OptionalPkgDependency.satisfyOptionalPackageDependencies(OptionalPkgDependency.java:183)

	at
com.sun.enterprise.tools.verifier.VerificationHandler.init(VerificationHandler.java:120)

	at
com.sun.enterprise.tools.verifier.VerificationHandler.<init>(VerificationHandler.java:55)

	at com.sun.enterprise.tools.verifier.Verifier.verify(Verifier.java:74)

	at com.sun.enterprise.tools.verifier.Verifier.main(Verifier.java:53)


...and there goes my enthusiasm...
I'm sure there's workaround, but it would be nice if out-of-box samples worked
without workarounds...

Btw. please, suggest workaround :)
Thank you!

dejaniv
Comment 1 Yutaka Yoshida 2005-04-27 01:17:27 UTC
I just downloaded RC1 with 8.1 AS from
http://www.netbeans.info/downloads/download.php
, started it from a clean environment but couldn't reproduce
this bug.
When you create a project from this sample, the J2EE server
was successfully associated with the project, right?
Comment 2 dejaniv 2005-04-27 09:08:05 UTC
Yes, the server is properly associated. My environment however is not "clean". I
have many (java) things installed, as I am sure is the case with many of us (if
not all), but I really wouldn't go through eliminating possible causes one by
one. The message in the exception is unforunatly too cryptic, but searching on
the net I found that some people had similar problems with different products
(jboss etc.). 

I think javax.faces.webapp.FacesServlet.init line 144 is place to start. I don't
know if you'll have time to deal with this because I haven't seen similar issues
reported here, but it would be nice if I at least got a hint where to look.

Thank you!
dejaniv
Comment 3 Yutaka Yoshida 2005-04-27 18:00:35 UTC
I also have many things in my box. By "clean env", I meant
I moved $HOME/.netbeans/4.1rc to something else and started
netbeans as if it's the first time. Could you try the same thing?
Also, can you attach the full stack trace?
Comment 4 dejaniv 2005-04-27 22:18:25 UTC
Didn't help. Btw OS is Windows XP (moved c:\Documents and
Settings\dejaniv\.netbeans and started IDE). Here's stack trace:

javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw
exception
	org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
	com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)

root cause

java.lang.NullPointerException
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:585)
	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
	java.security.AccessController.doPrivileged(Native Method)
	javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:118)
	org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
	com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
	com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
Comment 5 dejaniv 2005-04-27 22:52:30 UTC
I've just resolved it!

I've downloaded separate NetBeans 4.1 RC1. Then downloaded Sun App Server 8.1
from  java.sun.com. I've added server in IDE and associated it with the sample
project. It all works now.

I've also uninstalled previous version of NetBeans (4.0) and NetBeans Mobility
pack (but I guess that has nothing to do with this).

Btw. why can't I specify server location in boundled version (browse button in
"Add new server" dialog is disabled leaving the only choice folder where
boundled server is isntalled)?

I'll leave this issue with Open status. You may want to investigate further.
Maybe you should double-check NB-AppServer boundle?
Thanks!

dejaniv
Comment 6 Yutaka Yoshida 2005-04-27 23:13:29 UTC
glad to hear it worked.
FacesServlet.java line 144 is such a fundamental part of
Faces. It gets called when the first request to Faces is
received and tries to create an application via the factory.
In your case, the factory itself is null. That process has even
nothing to do with the application itself and it can't happen
unless you're using an older version of jsf-impl.jar.

As for the issue of specifying the app server, I can reassign
to someone else, but since this issue report gets a bit longer,
perhaps it's better to ask you to create another issue.

If you agreed, I'll close this.
Comment 7 dejaniv 2005-04-28 11:02:58 UTC
Thank you for your help. The issue can be closed now.
Comment 8 Yutaka Yoshida 2005-04-28 18:06:32 UTC
close as "invalid"