From: Tim Slattery on
I'm trying to switch to using the NetBeans IDE. Very nice, but...

I create a project and select the Struts framework out of the four
available. It creates the project. Then I look at the project
properties, and it has both Struts and JavaServer Faces activated! I
could add more frameworks if I wanted, but there seems to be no way to
get rid of one.

So what? When I build the project and deploy the resulting WAR to
WebLogic, it throws this:

Failed to initialize the application 'NCS' due to error
java.lang.ClassNotFoundException: javax.faces.webapp.UIComponentTag.

Nothing in my app mentions that class or anything in javax.faces.*.

The weird thing is that when I examine the WAR file, there's nothing
there except what I want. There's nothing referencing JSF at all. So
why is WL looking for that class?

--
Tim Slattery
Slattery_T(a)bls.gov
http://members.cox.net/slatteryt
From: Donkey Hottie on
On 6.5.2010 22:21, Tim Slattery wrote:
> I'm trying to switch to using the NetBeans IDE. Very nice, but...
>
> I create a project and select the Struts framework out of the four
> available. It creates the project. Then I look at the project
> properties, and it has both Struts and JavaServer Faces activated! I
> could add more frameworks if I wanted, but there seems to be no way to
> get rid of one.
>
> So what? When I build the project and deploy the resulting WAR to
> WebLogic, it throws this:
>
> Failed to initialize the application 'NCS' due to error
> java.lang.ClassNotFoundException: javax.faces.webapp.UIComponentTag.
>
> Nothing in my app mentions that class or anything in javax.faces.*.
>
> The weird thing is that when I examine the WAR file, there's nothing
> there except what I want. There's nothing referencing JSF at all. So
> why is WL looking for that class?
>

No JSF specific XML configuration files at all? Must be something...

--
Don't read any sky-writing for the next two weeks.
From: Lew on
Tim Slattery wrote:
>> I'm trying to switch to using the NetBeans IDE. Very nice, but...
>>
>> I create a project and select the Struts framework out of the four
>> available. It creates the project. Then I look at the project
>> properties, and it has both Struts and JavaServer Faces activated! I
>> could add more frameworks if I wanted, but there seems to be no way to
>> get rid of one.
>>
>

Donkey Hottie wrote:
> No JSF specific XML configuration files at all? Must be something...
>

Also, look in the web.xml to make sure it isn't including

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

But you're right, NB seems addicted to including JSF in Web apps, but
I sure don't know why. It's less of a problem for me because I'm
using JSF.

The answer I suspect to be buried in the nbprojects/ metadata
somewhere.

--
Lew
From: Tim Slattery on
Lew <lew(a)lewscanon.com> wrote:

>Also, look in the web.xml to make sure it isn't including
>
> <servlet>
> <servlet-name>Faces Servlet</servlet-name>
> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>

Been there, done that.

>But you're right, NB seems addicted to including JSF in Web apps, but
>I sure don't know why. It's less of a problem for me because I'm
>using JSF.

Big PITA. It's there immediately after I create the project, before
I've done ANYTHING to it.

>The answer I suspect to be buried in the nbprojects/ metadata
>somewhere.

I've looked there. I find references to Struts in build-impl.xml, but
I don't see anything about JSF. It's a long file, I've run (case
insensitive) text searches on "face", "javax", "jsf".

Hmm..the first line in project.properties is:

auxiliary.org-netbeans-modules-projectapi.jsf_2e_present=true

Seems unlikely, but you never know.

--
Tim Slattery
Slattery_T(a)bls.gov
http://members.cox.net/slatteryt
From: Tim Slattery on
Tim Slattery <Slattery_T(a)bls.gov> wrote:

>I'm trying to switch to using the NetBeans IDE. Very nice, but...
>
>I create a project and select the Struts framework out of the four
>available. It creates the project. Then I look at the project
>properties, and it has both Struts and JavaServer Faces activated! I
>could add more frameworks if I wanted, but there seems to be no way to
>get rid of one.
>
>So what? When I build the project and deploy the resulting WAR to
>WebLogic, it throws this:
>
>Failed to initialize the application 'NCS' due to error
>java.lang.ClassNotFoundException: javax.faces.webapp.UIComponentTag.

It seems that when I ask NetBeans for Struts support, it throws in a
whole list of Struts JAR files. One of those is
struts-faces-1.3.8.jar, that must be where the reference to
UIComponentTag is. I guess that the NetBeans IDE finds that reference
and shows Faces support in the project options dialog.

So I have NB show the list of JARs. I right-click struts-faces, and
select "Remove" and the entire list of Struts libraries disappears. I
guess there must be a way to control that somewhere. If nothing else,
I can just remove that library from the WAR before I deploy it.

--
Tim Slattery
Slattery_T(a)bls.gov
http://members.cox.net/slatteryt