You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Christian Koelle <ko...@gmx.de> on 2008/05/13 23:03:51 UTC

Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Hello,

I am trying to migrate my jetty:run-alike myfaces application to Websphere 6.1, i.e. the Websphere bundled in IBM's Rapid Application Developer.

No matter wether I use Myfaces 1.1.5 or Myfaces 1.2.2, I get the following error if I deploy and start the application:

"java.lang.NoSuchMethodError: javax/faces/render/ResponseStateManager.getState(Lj..."

Please note that I have set the classloading to "Classes loaded with application class loader first".

Any ideas? Every hint appreciated and thanks in advance.

Regards
Christian Kölle
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

Re: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Posted by Scott O'Bryan <da...@gmail.com>.
I'm confused by this.  Myfaces 1.2.2 shouldn't work with Websphere 6.1, 
you'll need a J2EE5 web container to use JSF1.2.  You'll need to, 
therefore, use JSF1.1.  In JSF 1.1, there was no getState method on 
ResponseStateManager.  My guess is you are using an application or 
renderkit written for JSF 1.2 and you are trying to use it with the 
MyFaces 1.1.5 container.

Here is my advice, either

1. Downgrade your application to use JSF 1.1.  Make sure that you 
downgrade any renderkits you may be using to their 1.1 equivalents (for 
instance, Trinidad 1.1.x is for JSF 1.1 while Trinidad 1.2.x is for JSF 
1.2).  Then deploy to the server using MyFaces 1.1.x..

2. Upgrade your server to support J2EE5 and deploy using MyFaces 1.2.2.

Scott

||


Christian Koelle wrote:
> Hello,
>
> I am trying to migrate my jetty:run-alike myfaces application to Websphere 6.1, i.e. the Websphere bundled in IBM's Rapid Application Developer.
>
> No matter wether I use Myfaces 1.1.5 or Myfaces 1.2.2, I get the following error if I deploy and start the application:
>
> "java.lang.NoSuchMethodError: javax/faces/render/ResponseStateManager.getState(Lj..."
>
> Please note that I have set the classloading to "Classes loaded with application class loader first".
>
> Any ideas? Every hint appreciated and thanks in advance.
>
> Regards
> Christian Kölle
>   


AW: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Posted by Christian Koelle <ko...@gmx.de>.
> I will see my starting page but the it does
> not work properly as the extensionResource-Servlet is not running. A
> request to 
> http://<myMachine>:9080/<mycontextRoot>/faces/extensionResource comes up
> with an 404  contrary to jetty an tomcat. As a consequence my JSCook-Menu is
> not loaded at all.

I just run a test with the myfaces-example-simple:
a.) I extracted commons-logging and repacked it (according to the wiki-description for WAS 6.1) 
b.) I deployed it via the administration console of the WAS,
c.) I set the classloader according to the wiki-description
d.) I started the deployed application.

Behavior: The application seems to work fine, except for the fact that the extension filter does not seem to be 
started, i. e. as a consequence the default styles for the TabbedPanel are not found, the JSCook-menu is not displayed at all. 

I have just checked JIRA. I cannot find an entry for this issue. The question is, whether it is regarded as 
Myfaces issue or whether it is regarded as a WAS problem? I am not sure. Please advice. 

I have to fix this in my application. Right now, I will hardcode the reference to the missing resources. I am not sure how this will end. Any suggestions?

FYI: The following console output is done during startup:
x.x.MyfacesConfig getCurrentInstance Starting up Tomahawk on the RI-JSF-Implementation.
x.x.MyfacesConfig getCurrentInstance Starting up Tomahawk on the MyFaces-JSF-Implementation
x.x.MyfacesConfig getCurrentInstance Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.
>From now on I regard those statements as unproblematic. 

RAD: 7.0.0.6
WAS: 6.1.0.0.15 (Updated)
Tomahawk: 1.1.6
MyFaces: 1.1.5

Regards
Christian Kölle



-- 
Super-Aktion nur in der GMX Spieleflat: 10 Tage für 1 Euro.
Über 180 Spiele downloaden: http://flat.games.gmx.de

AW: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Posted by ch...@sdm.de.
Hello,

thanks to all your responses regarding the WAS migration. Unfortunately I haven't had the time to respond yet. 

My initial problem was caused by the fact that the application hadn't been undeployed properly.

I followed Scott's advice an downgraded my application to JSF 1.1. to get it running. I probably will not switch to Facelets right now. 

I am still facing problems. 

I do not have a real WAS 6.1 available. Only the one which comes with the RAD7. I am unsecure, wether it is different compared to the the original WAS 6.1.

First issue:
If I bundle the application by hand with maven (according to the myfaces wiki for WAS 6.1 without commons-logging, ...), deploy the file via the administration console of the WAS in RAD, set the classloader of the module properly and access my start-page I will see my starting page but the it does not work properly as the extensionResource-Servlet is not running. A request to 
http://<myMachine>:9080/<mycontextRoot>/faces/extensionResource comes up with an 404  contrary to jetty an tomcat. As a consequence my JSCook-Menu is not loaded at all.

Most interestingly I get the following log-statement, no matter whether my META-INF/manifest contains references to the dependencies in the War's WEB-INF/lib-Folder or not:
x.myfaces.x.FacesConfigurator logMetaInf MyFaces-package : myfaces-api not found.
x.myfaces.x.FacesConfigurator logMetaInf MyFaces-package : myfaces-impl not found.
x.myfaces.x.FacesConfigurator logMetaInf MyFaces-package : tomahawk-sandbox not found.
x.myfaces.x.FacesConfigurator logMetaInf MyFaces-package : tomahawk not found.

Regards & thanks for advice in advance

Christian Kölle

RE: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Posted by Murtaza Goga <Mu...@trisyngroup.com>.
It makes sense, that was my hunch as well.  I needed an expert opinion.  Thanks a bunch for the detailed feedback.

________________________________

From: Scott O'Bryan [mailto:darkarena@gmail.com]
Sent: Wed 5/14/2008 3:53 PM
To: MyFaces Discussion
Subject: Re: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?



There is a slight mixup here and these MTR's are not easy.  Let me try
to explain.

JSF 1.2 requires JSP 2.1 which is in J2EE 5.  Furthermore, it requires
J2SE5 because of all the coolness in J2SE5...
Trinidad 1.2.x requires JSF1.2 and J2SE5.

Facelets (which is not part of J2EE) is an alternative display
technology to JSP.  In other words, when using Facelets, you don't use
the JSP engine at all.  Facelets added a "hack" which allowed JSF 1.2 to
run on pre-J2EE 5 branches.  It did this by implimenting the EL-Resolver
functionality from the JSP 2.1 specification that was required by JSF
1.2 inside of the Facelet's engine.  While this is not an "officially"
supported configuration, there are a lot of people using it so it's
pretty well tested.  It is, however, off spec.

As such, without Facelets, you cannot get JSF 1.2 to run on a pre-J2EE5
server.

Therefore, had the subject been "MyFaces + Websphere 6.1 + Facelets"
instead of just "MyFaces + Websphere 6.1", I would have probably stated
that 1.2 was possible on such a container... :)

I hope that all makes sense.
Scott

Murtaza Goga wrote:
> Just a parallel question Scott.  We do have a successful deployment with using MyFaces 1.2.2, Trinidad 1.2.7 and Facelets 1.1.14 within WAS 6.1.  The MyFaces documentation says that it needs a JEE5 engine.  WAS 6.1 is not at that spec level, and we are running fine.  I am wondering what features require the JEE5 spec.
>
> Thanks for your response,
> Murtaza.
>
> -----Original Message-----
> From: Scott O'Bryan [mailto:darkarena@gmail.com]
> Sent: Wednesday, May 14, 2008 12:48 PM
> To: MyFaces Discussion
> Subject: Re: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?
>
> Yes, if your using JSF 1.2 and Facelets, that will allow you to work on
> WAS.  And you can either set the classloader policy or you can simply
> take the JSF1.1 libraries out of your root classpath.  :)
>
> Scott
>
> Zheng, Xiahong wrote:
>  
>> Did you set the "Class Loader Order" policy at the module level as well? Under Enterprise Applications -> yourEAR -> Managing Modules -> yourwar? I recently had some API conflict when I use Sun's RI 1.2 (with facelets, of course) on WAS6.1 and setting the above "Class Loader Order" to "Classes loaded with application class loader first" at the module level resolved the problem.
>>
>> -----Original Message-----
>> From: Christian Koelle [mailto:koellemcchrisi@gmx.de]
>> Sent: Tuesday, May 13, 2008 5:04 PM
>> To: users@myfaces.apache.org
>> Subject: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?
>>
>> Hello,
>>
>> I am trying to migrate my jetty:run-alike myfaces application to Websphere 6.1, i.e. the Websphere bundled in IBM's Rapid Application Developer.
>>
>> No matter wether I use Myfaces 1.1.5 or Myfaces 1.2.2, I get the following error if I deploy and start the application:
>>
>> "java.lang.NoSuchMethodError: javax/faces/render/ResponseStateManager.getState(Lj..."
>>
>> Please note that I have set the classloading to "Classes loaded with application class loader first".
>>
>> Any ideas? Every hint appreciated and thanks in advance.
>>
>> Regards
>> Christian Kölle
>>  
>>    
>
>  




Re: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Posted by Scott O'Bryan <da...@gmail.com>.
There is a slight mixup here and these MTR's are not easy.  Let me try 
to explain.

JSF 1.2 requires JSP 2.1 which is in J2EE 5.  Furthermore, it requires 
J2SE5 because of all the coolness in J2SE5...
Trinidad 1.2.x requires JSF1.2 and J2SE5.

Facelets (which is not part of J2EE) is an alternative display 
technology to JSP.  In other words, when using Facelets, you don't use 
the JSP engine at all.  Facelets added a "hack" which allowed JSF 1.2 to 
run on pre-J2EE 5 branches.  It did this by implimenting the EL-Resolver 
functionality from the JSP 2.1 specification that was required by JSF 
1.2 inside of the Facelet's engine.  While this is not an "officially" 
supported configuration, there are a lot of people using it so it's 
pretty well tested.  It is, however, off spec.

As such, without Facelets, you cannot get JSF 1.2 to run on a pre-J2EE5 
server.

Therefore, had the subject been "MyFaces + Websphere 6.1 + Facelets" 
instead of just "MyFaces + Websphere 6.1", I would have probably stated 
that 1.2 was possible on such a container... :)

I hope that all makes sense.
Scott

Murtaza Goga wrote:
> Just a parallel question Scott.  We do have a successful deployment with using MyFaces 1.2.2, Trinidad 1.2.7 and Facelets 1.1.14 within WAS 6.1.  The MyFaces documentation says that it needs a JEE5 engine.  WAS 6.1 is not at that spec level, and we are running fine.  I am wondering what features require the JEE5 spec.
>
> Thanks for your response,
> Murtaza.
>
> -----Original Message-----
> From: Scott O'Bryan [mailto:darkarena@gmail.com] 
> Sent: Wednesday, May 14, 2008 12:48 PM
> To: MyFaces Discussion
> Subject: Re: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?
>
> Yes, if your using JSF 1.2 and Facelets, that will allow you to work on 
> WAS.  And you can either set the classloader policy or you can simply 
> take the JSF1.1 libraries out of your root classpath.  :)
>
> Scott
>
> Zheng, Xiahong wrote:
>   
>> Did you set the "Class Loader Order" policy at the module level as well? Under Enterprise Applications -> yourEAR -> Managing Modules -> yourwar? I recently had some API conflict when I use Sun's RI 1.2 (with facelets, of course) on WAS6.1 and setting the above "Class Loader Order" to "Classes loaded with application class loader first" at the module level resolved the problem.
>>
>> -----Original Message-----
>> From: Christian Koelle [mailto:koellemcchrisi@gmx.de] 
>> Sent: Tuesday, May 13, 2008 5:04 PM
>> To: users@myfaces.apache.org
>> Subject: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?
>>
>> Hello,
>>
>> I am trying to migrate my jetty:run-alike myfaces application to Websphere 6.1, i.e. the Websphere bundled in IBM's Rapid Application Developer.
>>
>> No matter wether I use Myfaces 1.1.5 or Myfaces 1.2.2, I get the following error if I deploy and start the application:
>>
>> "java.lang.NoSuchMethodError: javax/faces/render/ResponseStateManager.getState(Lj..."
>>
>> Please note that I have set the classloading to "Classes loaded with application class loader first".
>>
>> Any ideas? Every hint appreciated and thanks in advance.
>>
>> Regards
>> Christian Kölle
>>   
>>     
>
>   


RE: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Posted by Murtaza Goga <Mu...@trisyngroup.com>.
Just a parallel question Scott.  We do have a successful deployment with using MyFaces 1.2.2, Trinidad 1.2.7 and Facelets 1.1.14 within WAS 6.1.  The MyFaces documentation says that it needs a JEE5 engine.  WAS 6.1 is not at that spec level, and we are running fine.  I am wondering what features require the JEE5 spec.

Thanks for your response,
Murtaza.

-----Original Message-----
From: Scott O'Bryan [mailto:darkarena@gmail.com] 
Sent: Wednesday, May 14, 2008 12:48 PM
To: MyFaces Discussion
Subject: Re: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Yes, if your using JSF 1.2 and Facelets, that will allow you to work on 
WAS.  And you can either set the classloader policy or you can simply 
take the JSF1.1 libraries out of your root classpath.  :)

Scott

Zheng, Xiahong wrote:
> Did you set the "Class Loader Order" policy at the module level as well? Under Enterprise Applications -> yourEAR -> Managing Modules -> yourwar? I recently had some API conflict when I use Sun's RI 1.2 (with facelets, of course) on WAS6.1 and setting the above "Class Loader Order" to "Classes loaded with application class loader first" at the module level resolved the problem.
>
> -----Original Message-----
> From: Christian Koelle [mailto:koellemcchrisi@gmx.de] 
> Sent: Tuesday, May 13, 2008 5:04 PM
> To: users@myfaces.apache.org
> Subject: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?
>
> Hello,
>
> I am trying to migrate my jetty:run-alike myfaces application to Websphere 6.1, i.e. the Websphere bundled in IBM's Rapid Application Developer.
>
> No matter wether I use Myfaces 1.1.5 or Myfaces 1.2.2, I get the following error if I deploy and start the application:
>
> "java.lang.NoSuchMethodError: javax/faces/render/ResponseStateManager.getState(Lj..."
>
> Please note that I have set the classloading to "Classes loaded with application class loader first".
>
> Any ideas? Every hint appreciated and thanks in advance.
>
> Regards
> Christian Kölle
>   


Re: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Posted by Scott O'Bryan <da...@gmail.com>.
Yes, if your using JSF 1.2 and Facelets, that will allow you to work on 
WAS.  And you can either set the classloader policy or you can simply 
take the JSF1.1 libraries out of your root classpath.  :)

Scott

Zheng, Xiahong wrote:
> Did you set the "Class Loader Order" policy at the module level as well? Under Enterprise Applications -> yourEAR -> Managing Modules -> yourwar? I recently had some API conflict when I use Sun's RI 1.2 (with facelets, of course) on WAS6.1 and setting the above "Class Loader Order" to "Classes loaded with application class loader first" at the module level resolved the problem.
>
> -----Original Message-----
> From: Christian Koelle [mailto:koellemcchrisi@gmx.de] 
> Sent: Tuesday, May 13, 2008 5:04 PM
> To: users@myfaces.apache.org
> Subject: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?
>
> Hello,
>
> I am trying to migrate my jetty:run-alike myfaces application to Websphere 6.1, i.e. the Websphere bundled in IBM's Rapid Application Developer.
>
> No matter wether I use Myfaces 1.1.5 or Myfaces 1.2.2, I get the following error if I deploy and start the application:
>
> "java.lang.NoSuchMethodError: javax/faces/render/ResponseStateManager.getState(Lj..."
>
> Please note that I have set the classloading to "Classes loaded with application class loader first".
>
> Any ideas? Every hint appreciated and thanks in advance.
>
> Regards
> Christian Kölle
>   


RE: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
Did you set the "Class Loader Order" policy at the module level as well? Under Enterprise Applications -> yourEAR -> Managing Modules -> yourwar? I recently had some API conflict when I use Sun's RI 1.2 (with facelets, of course) on WAS6.1 and setting the above "Class Loader Order" to "Classes loaded with application class loader first" at the module level resolved the problem.

-----Original Message-----
From: Christian Koelle [mailto:koellemcchrisi@gmx.de] 
Sent: Tuesday, May 13, 2008 5:04 PM
To: users@myfaces.apache.org
Subject: Myfaces + Websphere 6.1 > How to fetch ResponseStateManager?

Hello,

I am trying to migrate my jetty:run-alike myfaces application to Websphere 6.1, i.e. the Websphere bundled in IBM's Rapid Application Developer.

No matter wether I use Myfaces 1.1.5 or Myfaces 1.2.2, I get the following error if I deploy and start the application:

"java.lang.NoSuchMethodError: javax/faces/render/ResponseStateManager.getState(Lj..."

Please note that I have set the classloading to "Classes loaded with application class loader first".

Any ideas? Every hint appreciated and thanks in advance.

Regards
Christian Kölle
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger