GeeCON Prague 2014*
The moose likes Websphere and the fly likes WebSphere and JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Websphere
Bookmark "WebSphere and JSF" Watch "WebSphere and JSF" New topic
Author

WebSphere and JSF

Oleg Tretyakov
Greenhorn

Joined: Jan 11, 2008
Posts: 3
Hi All,

I have a some problem when try to start application on WebSphere. But it is giving the error...




Can anybody help me to resolve this problem? The version of WAS is 6.1.0.

Thanks.
Jaime Garc�a
Greenhorn

Joined: Oct 09, 2006
Posts: 7
It is maybe a classloading issue. Please note that WebSphere comes with it's own version of JSF and JSTL jars and that maybe you want to use your own; to achieve this, you would deploy your application with those jars included, and set the classloader mode to PARENT_LAST.


Use the classloader viewer utility that comes with the administrative console to analize how the classloading is happening.
Oleg Tretyakov
Greenhorn

Joined: Jan 11, 2008
Posts: 3
Thank you for reply.

I want to use jsf libraries (jsf-impl.jar and standart.jar) from apps/web-inf/lib. But WebSphere is conflicting with it, because C:\WAS\IBM\WebSphere\AppServer\plugins\com.ibm.ws.webcontainer_2.0.0.jar contains jsf lib too.

following is the error I receive.



Also the application is not work when I try to access to webapp

Error 403: SRVE0190E: File not found: /index.jsp

Please advise.

Thanks.
Oleg Tretyakov
Greenhorn

Joined: Jan 11, 2008
Posts: 3
Hi All,

I have configured class loader mode to PARENT_LAST and moved jsf-impl.jar, jsf-api.jar and javaee.jar into java/jre/lib/ext folder. So, WebSphere 6.1.0 uses JSF-1.2 instead of own JSF-1.1.

I try to run application and it does not work. The following error message is appeared in SystemOut.log:



Please help me to resolve this issue.

Thanks.
Marcelo Sousa Ancelmo
Ranch Hand

Joined: Jan 17, 2002
Posts: 497

Ok,

This thread is very old, but from times to times people come along with this issue, here is the breaktrough:
1 - You will need el-api.jar, jsf-api.jar, jsf-imp.jar and jstl.jar for Java Server Faces 1.1
2 - You will put the jars on WEB-INF/lib, as a shared library referenced by your Web Module or as references of optional-package declarations
3 - After deploying the application, change the value of the EAR ClassLoader to PARENT_LAST (Classes loaded with application class loader first option)
4 - Verify that this configuration is replicated to the WEB module classloader configuration, if not, change there also to "Classes loaded with application class loader first"
5 - Start / Restart de Web application
6 - Enjoy ;-)

This will work for the vast majority of JSF implementations (Myfaces, Icefaces) and frameworks tha rely on it (SEAM)

Regards,


Marcelo Sousa Ancelmo - Brazil
Ayan Dutta
Ranch Hand

Joined: Oct 16, 2005
Posts: 94
Hi Marcelo ,
I have one query regarding your post .
I am using WAS 6.1 with RAD .
You mentioned in point 3
"After deploying the application, change the value of the EAR ClassLoader to PARENT_LAST (Classes loaded with application class loader first option) "
I have followed this point by the following steps :
Navigating to Admin Cosole --> Applications -->Enterprise Applications -->Select Applicable EAR -->Manage Modules --> Select Applicable WAR --> Change Class loader order to "Classes loaded with application class loader first" .

Now , in point 4 you mentioned ..
"Verify that this configuration is replicated to the WEB module classloader configuration, if not, change there also to "Classes loaded with application class loader first" .
Can you explain this point a little bit more about the specific steps to verify the configuration replication ?
Regards,
Ayan Dutta
Marcelo Sousa Ancelmo
Ranch Hand

Joined: Jan 17, 2002
Posts: 497

Hello Ayan,

The steps you described is to change the classloading policy for the web application. So you had done the step 4. It should work without any problem and is preferred if you have others web modules in your EAR that doesn't need the changed classloader policy.
I updated the steps, providing the paths in the administrative console.
1 - You will need el-api.jar, jsf-api.jar, jsf-imp.jar and jstl.jar for Java Server Faces 1.1
2 - You will put the jars on WEB-INF/lib, as a shared library referenced by your Web Module or as references of optional-package declarations
3 - After deploying the application, change the value of the EAR ClassLoader to PARENT_LAST (Classes loaded with application class loader first option) - Admin Cosole --> Applications -->Enterprise Applications -->Select EAR --> Class loading and update detection --> Change Class loader order to "Classes loaded with application class loader first"
4 - Verify that this configuration is replicated to the WEB module classloader configuration, if not, change there also to "Classes loaded with application class loader first" - Admin Cosole --> Applications -->Enterprise Applications -->Select EAR -->Manage Modules --> Select Applicable WAR --> Change Class loader order to "Classes loaded with application class loader first".
5 - Start / Restart de Web application


Regards,
James T Thomas
Greenhorn

Joined: May 30, 2009
Posts: 1
I know this is an older thread. I ran into the problems noted above and changing the class loading policy only made things worse for me so beware. Now the site doesw not come up at all. Error 404: SRVE0201E: Servlet [com.alstom.power.suppliernet.servlets.Login]: not a servlet class . We never had to change this before. I am going to seek out another solution and post it here if I do.
Marcelo Sousa Ancelmo
Ranch Hand

Joined: Jan 17, 2002
Posts: 497

Hi James,

What is the version of JSF that you are trying to run? What is the version of WebSphere that you are using? Did you followed all the steps outlined here?

Regards,
 
GeeCON Prague 2014
 
subject: WebSphere and JSF