You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by ba...@wipro.com on 2005/11/11 10:01:49 UTC

MyFaces and Spring.

Hi,

I'm moving from Sun RI to MyFaces. When I replace the Sun RI jars with
MyFaces my application fails to load giving the following exception in
Spring framework.
        ....
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
        at $Proxy5.deploy(Unknown Source)
        at
org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
        at org.jboss.Main.boot(Main.java:195)
        at org.jboss.Main$1.run(Main.java:463)
        at java.lang.Thread.run(Thread.java:595)
14:27:27,187 ERROR [Util] Can't instantiate class:
'org.springframework.web.jsf.
DelegatingVariableResolver'.:org.springframework.web.jsf.DelegatingVaria
bleResol
ver:exception:org.springframework.web.jsf.DelegatingVariableResolver
14:27:28,390 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

On seeing the source for the "DelegatingVariableResolver.java", I find
the following statement.

<b>Note:</b> Spring's JSF support has been developed and tested against
JSF 1.1. Unfortunately, the JSF 1.1 RI (as of June 2004) does not apply
a custom VariableResolver to property values of JSF-managed beans: This
has to be considered a bug, as it is supposed to work according to the
JSF spec. It does work in <a
href="http://www.marinschek.com/myfaces/tiki">MyFaces</a> 1.0.5, for
example.

I use MyFaces nightly build, to be exact myfaces-20051105. Do  anyone
have any pointers as to what might be wrong?

Thanks
Balaji Saranathan
Wipro Technologies
-----------------------------------------------------
ESN:  6  877 8715
Tel :   91 80 2852 0408 * 82333
Fax :  91 80 5138 1761
Cell :  91 98868 61757





Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

Re: MyFaces and Spring.

Posted by Marco Mistroni <mm...@gmail.com>.
Hello Mike,
 i am actually using this

<filter>

<filter-name>RequestHandled</filter-name>

<filter-class>de.mindmatters.faces.spring.support.RequestHandledFilter
</filter-class>

</filter>

in your faces config you don't need to declare anything in particular in
<application> tag.. just your beans and navigations.

check jsf-spring docs for which beans you would declare in jsf-config.xml as
opposed to applicationContext.xml

 HTH

MARCO

RE: MyFaces and Spring.

Posted by Yee CN <ye...@streamyx.com>.
Mike,

 

It took me a while to figure this out.

 

You ONLY need the following in web.xml.

 

      <listener>

            <listener-class>

                  de.mindmatters.faces.spring.support.ContextLoaderListener

            </listener-class>

      </listener>

 

You will also have to delete the entry in faces-config.xml (can't remember
what it was) that is required by earlier versions of jsf-spring API.

 

Regards,

Yee

 

  _____  

From: Mike Kienenberger [mailto:mkienenb@gmail.com] 
Sent: Friday, 11 November 2005 11:15 PM
To: MyFaces Discussion
Subject: Re: MyFaces and Spring.

 

Marco, how are you configuring 3.0.0M2 to make it work?

I'm still using jsf-spring 2.71 with spring 1.2-rc2 because I couldn't
figure out how to upgrade to 3.0.0M2.

Thanks,

-Mike

On 11/11/05, Marco Mistroni <mm...@gmail.com> wrote:

Hello,

  i am using successfullly  myfaces & spring ..

how ar eyou integrating the two?

i personally use a library called JSF-Spring, version 3.0.0M2 and it works
fine..

 

can you post more details about how are you integrating the two so i could
help

finding out the problem?

 

thanks and regards

 marco

 

On 11/11/05, balaji.saranathan@wipro.com <balaji.saranathan@wipro.com >
wrote: 

Hi,

 

I'm moving from Sun RI to MyFaces. When I replace the Sun RI jars with
MyFaces my application fails to load giving the following exception in
Spring framework.

        ....

        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
        at $Proxy5.deploy(Unknown Source) 
        at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
        at org.jboss.Main.boot(Main.java:195)
        at org.jboss.Main$1.run (Main.java:463)
        at java.lang.Thread.run(Thread.java:595)
14:27:27,187 ERROR [Util] Can't instantiate class:
'org.springframework.web.jsf.
DelegatingVariableResolver'.:org.springframework.web.jsf.DelegatingVariableR
esol 
ver:exception:org.springframework.web.jsf.DelegatingVariableResolver
14:27:28,390 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

 

On seeing the source for the "DelegatingVariableResolver.java", I find the
following statement.

 

<b>Note:</b> Spring's JSF support has been developed and tested against JSF
1.1. Unfortunately, the JSF 1.1 RI (as of June 2004) does not apply a
custom VariableResolver to property values of JSF-managed beans: This has to
be considered a bug, as it is supposed to work according to the JSF spec. It
does work in <a href=" http://www.marinschek.com/myfaces/tiki
<http://www.marinschek.com/myfaces/tiki%22> ">MyFaces</a>  1.0.5, for
example.

 

I use MyFaces nightly build, to be exact myfaces-20051105. Do  anyone have
any pointers as to what might be wrong? 

 

Thanks

Balaji Saranathan

Wipro Technologies

-----------------------------------------------------

ESN:  6  877 8715

Tel :   91 80 2852 0408 * 82333

Fax :  91 80 5138 1761

Cell :  91 98868 61757

 




Confidentiality Notice 

The information contained in this electronic message and any attachments to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If 
you are not the intended recipient, please notify the sender at Wipro or
Mailadmin@wipro.com immediately 
and destroy all copies of this message and any attachments.





 


Re: MyFaces and Spring.

Posted by Mike Kienenberger <mk...@gmail.com>.
Marco, how are you configuring 3.0.0M2 to make it work?

I'm still using jsf-spring 2.71 with spring 1.2-rc2 because I couldn't
figure out how to upgrade to 3.0.0M2.

Thanks,

-Mike

On 11/11/05, Marco Mistroni <mm...@gmail.com> wrote:
>
> Hello,
>  i am using successfullly myfaces & spring ..
> how ar eyou integrating the two?
> i personally use a library called JSF-Spring, version 3.0.0M2 and it works
> fine..
>  can you post more details about how are you integrating the two so i
> could help
> finding out the problem?
>  thanks and regards
>  marco
>
>  On 11/11/05, balaji.saranathan@wipro.com <balaji.saranathan@wipro.com >
> wrote:
> >
> > Hi,
> >  I'm moving from Sun RI to MyFaces. When I replace the Sun RI jars with
> > MyFaces my application fails to load giving the following exception in
> > Spring framework.
> >  ....
> >  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> > at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
> > at $Proxy5.deploy(Unknown Source)
> > at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
> > at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
> > at org.jboss.Main.boot(Main.java:195)
> > at org.jboss.Main$1.run (Main.java:463)
> > at java.lang.Thread.run(Thread.java:595)
> > 14:27:27,187 ERROR [Util] Can't instantiate class: '
> > org.springframework.web.jsf.
> > DelegatingVariableResolver'.:
> > org.springframework.web.jsf.DelegatingVariableResol
> > ver:exception:org.springframework.web.jsf.DelegatingVariableResolver
> > 14:27:28,390 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
> >  On seeing the source for the "DelegatingVariableResolver.java", I find
> > the following statement.
> >  <b>Note:</b> Spring's JSF support has been developed and tested against JSF
> > 1.1. Unfortunately, the JSF 1.1 RI (as of June 2004) does not apply a custom
> > VariableResolver to property values of JSF-managed beans: This has to be
> > considered a bug, as it is supposed to work according to the JSF spec. It
> > does work in <a href=" http://www.marinschek.com/myfaces/tiki"<http://www.marinschek.com/myfaces/tiki%22>
> > >MyFaces</a> 1.0.5, for example.
> >  I use MyFaces nightly build, to be exact myfaces-20051105. Do anyone
> > have any pointers as to what might be wrong?
> >  Thanks
> > *Balaji Saranathan*
> > *Wipro Technologies*
> > -----------------------------------------------------
> > ESN: 6 877 8715
> > Tel : 91 80 2852 0408 * 82333
> > Fax : 91 80 5138 1761
> > Cell : 91 98868 61757
> >
> >
> > Confidentiality Notice
> >
> > The information contained in this electronic message and any attachments
> > to this message are intended
> > for the exclusive use of the addressee(s) and may contain confidential
> > or privileged information. If
> > you are not the intended recipient, please notify the sender at Wipro or
> > Mailadmin@wipro.com immediately
> > and destroy all copies of this message and any attachments.
> >
>
>

Re: MyFaces and Spring.

Posted by Marco Mistroni <mm...@gmail.com>.
Hello,
 i am using successfullly myfaces & spring ..
how ar eyou integrating the two?
i personally use a library called JSF-Spring, version 3.0.0M2 and it works
fine..
 can you post more details about how are you integrating the two so i could
help
finding out the problem?
 thanks and regards
 marco

 On 11/11/05, balaji.saranathan@wipro.com <ba...@wipro.com>
wrote:
>
> Hi,
>  I'm moving from Sun RI to MyFaces. When I replace the Sun RI jars with
> MyFaces my application fails to load giving the following exception in
> Spring framework.
>  ....
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
> at $Proxy5.deploy(Unknown Source)
> at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
> at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
> at org.jboss.Main.boot(Main.java:195)
> at org.jboss.Main$1.run(Main.java:463)
> at java.lang.Thread.run(Thread.java:595)
> 14:27:27,187 ERROR [Util] Can't instantiate class: '
> org.springframework.web.jsf.
> DelegatingVariableResolver'.:
> org.springframework.web.jsf.DelegatingVariableResol
> ver:exception:org.springframework.web.jsf.DelegatingVariableResolver
> 14:27:28,390 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
>  On seeing the source for the "DelegatingVariableResolver.java", I find
> the following statement.
>  <b>Note:</b> Spring's JSF support has been developed and tested against JSF
> 1.1. Unfortunately, the JSF 1.1 RI (as of June 2004) does not apply a custom
> VariableResolver to property values of JSF-managed beans: This has to be
> considered a bug, as it is supposed to work according to the JSF spec. It
> does work in <a href="http://www.marinschek.com/myfaces/tiki"<http://www.marinschek.com/myfaces/tiki%22>
> >MyFaces</a> 1.0.5, for example.
>  I use MyFaces nightly build, to be exact myfaces-20051105. Do anyone have
> any pointers as to what might be wrong?
>  Thanks
> *Balaji Saranathan*
> *Wipro Technologies*
> -----------------------------------------------------
> ESN: 6 877 8715
> Tel : 91 80 2852 0408 * 82333
> Fax : 91 80 5138 1761
> Cell : 91 98868 61757
>
>
> Confidentiality Notice
>
> The information contained in this electronic message and any attachments
> to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or
> privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or
> Mailadmin@wipro.com immediately
> and destroy all copies of this message and any attachments.
>