This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

WebSphere and JSF

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 498
Eclipse IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 498
Eclipse IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 498
Eclipse IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
You have to be odd to be #1 - Seuss. An odd little ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic