You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Eivind Ronnevik <ei...@kadme.com> on 2008/07/05 15:17:44 UTC

Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Hi!

 

I've been working with Myfaces-1.1.5  for some time, but now decided to change to  the 1.2 implementation, with myfaces-1.2.3 jars.

 

I've had no problems in creating and deploying an application, but suddenly I hit a problem I don't understand

 

I wanted to create a component programmatically (HtmlCommandLink), and set the action with the MethodBinding, as I've always done in myfaces-1.1.5:

 

MethodBinding methodBinding = FacesContext.getCurrentInstance().getApplication().createMethodBinding( 

      "#{myHandler.myAction}",null);

htmlCommandLink.setAction( methodBinding )

 

 But then my IDE (Eclipse) reported this method (createMethodBinding) as deprecated. I had a look at the javadoc following the myfaces-1.2.3 bin, and from what I could understand there is a new way of doing this. Application interface should have a method getExpressionFactory()  from which you would call the method createMethodExpression( ELContext, String, Class, Class[])

 

But if I retrieve the Application object from my facesContext, I don't see this method. I only see the methods that I also did in myfaces-1.1.5, but the createMethodBinding() is now listed as deprecated. And I can't find ExpressionFactory in the list of possible classes either. I have had a look at the source of 1.2.3, and for what I can understand the ApplicationImpl provide this and other missing methods. The Application interface provides the methods as well, but throws UnsupportedOperationExceptions on those methods.

 

Am I the stupid one here missing something obvious? Should I add some other libraries to use myaces-1.2.3,  or are there any explanations to why I have this problem?

 

Do I need to create my own implementation of the Application interface?

 

Hope to have some quick answers to this one, because I'm really getting stuck here. J

 

Regards,

 

Eivind Rønnevik

 

 


Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Matthias Wessendorf <ma...@apache.org>.
Yeah,

that is b/c of the real impl is in the -impl JAR.
ApplicationImpl.

but, the method is there, so there is something wrong in your setup

-M

On Sat, Jul 5, 2008 at 4:51 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
> Hi again!
>
> I did the decompile, and (as I expected when seeing the source) the proper output is there.
>
> Application interface has method:
>
>    public ExpressionFactory getExpressionFactory()
>    {
>        throw new UnsupportedOperationException();
>    }
>
> And ApplicationImpl has method:
>
>   public ExpressionFactory getExpressionFactory()
>    {
>        return _runtimeConfig.getExpressionFactory();
>    }
>
> So the source has it, the decompiled class-files has it, and it's there in the javadoc. But still in eclipse I don't see it ;)
>
> I questioned the javax-libraries, because even though Application.class is part of javax.faces, ExpressionFactory is not, it belongs to javax.el
>
> :)
>
> Regards,
>
> Eivind
>
> -----Original Message-----
> From: Matthias Wessendorf [mailto:matzew@apache.org]
> Sent: 5. juli 2008 15:59
> To: MyFaces Discussion
> Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??
>
> On Sat, Jul 5, 2008 at 3:57 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
>> Matthias,
>>
>> Thanks for your quick reply!
>>
>> Unfortunately, this was already my first thought.. So I created a brand new project with only myfaces-1.2.3 in classpath, and in a stupid class I tried to get the Application interface to see the available methods. Same result..
>
> hrm.
> can you open the MyFaces API JAR and decompile the Application.class file?
> it must be in there, if you are using MyFaces 1.2.x
>
>>
>> Could this be linked to some incorrect version of my javax - libraries?
>> (myfaces 1.2 requires JSP 2.1 and JSTL 1.2). Are there any references from myfaces.apache.org on which libraries to use and where to get them?
>
> the application is part of javax.faces, which comes from myfaces.
>
> very strange.
>
> -M
>
>>
>> Best regards,
>>
>> Eivind
>>
>>
>> -----Original Message-----
>> From: Matthias Wessendorf [mailto:matzew@apache.org]
>> Sent: 5. juli 2008 15:33
>> To: MyFaces Discussion
>> Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??
>>
>> Hi,
>>
>> I see the method here:
>> http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/application/Application.html#getExpressionFactory()
>>
>> perhaps you somehow have both libs in your clazzpath ?
>> -M
>>
>> On Sat, Jul 5, 2008 at 3:17 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
>>> Hi!
>>>
>>>
>>>
>>> I've been working with Myfaces-1.1.5  for some time, but now decided to
>>> change to  the 1.2 implementation, with myfaces-1.2.3 jars.
>>>
>>>
>>>
>>> I've had no problems in creating and deploying an application, but suddenly
>>> I hit a problem I don't understand
>>>
>>>
>>>
>>> I wanted to create a component programmatically (HtmlCommandLink), and set
>>> the action with the MethodBinding, as I've always done in myfaces-1.1.5:
>>>
>>>
>>>
>>> MethodBinding methodBinding =
>>> FacesContext.getCurrentInstance().getApplication().createMethodBinding(
>>>
>>>       "#{myHandler.myAction}",null);
>>>
>>> htmlCommandLink.setAction( methodBinding )
>>>
>>>
>>>
>>>  But then my IDE (Eclipse) reported this method (createMethodBinding) as
>>> deprecated. I had a look at the javadoc following the myfaces-1.2.3 bin, and
>>> from what I could understand there is a new way of doing this. Application
>>> interface should have a method getExpressionFactory()  from which you would
>>> call the method createMethodExpression( ELContext, String, Class, Class[])
>>>
>>>
>>>
>>> But if I retrieve the Application object from my facesContext, I don't see
>>> this method. I only see the methods that I also did in myfaces-1.1.5, but
>>> the createMethodBinding() is now listed as deprecated. And I can't find
>>> ExpressionFactory in the list of possible classes either. I have had a look
>>> at the source of 1.2.3, and for what I can understand the ApplicationImpl
>>> provide this and other missing methods. The Application interface provides
>>> the methods as well, but throws UnsupportedOperationExceptions on those
>>> methods.
>>>
>>>
>>>
>>> Am I the stupid one here missing something obvious? Should I add some other
>>> libraries to use myaces-1.2.3,  or are there any explanations to why I have
>>> this problem?
>>>
>>>
>>>
>>> Do I need to create my own implementation of the Application interface?
>>>
>>>
>>>
>>> Hope to have some quick answers to this one, because I'm really getting
>>> stuck here. J
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Eivind Rønnevik
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> further stuff:
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> mail: matzew-at-apache-dot-org
>>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Matthias Wessendorf <mw...@gmail.com>.
If your project builds with maven u could generate the correct eclipse  
project via mvn eclipse:eclipse

Sent from my iPod.

Am 05.07.2008 um 18:04 schrieb "Eivind Ronnevik" <ei...@kadme.com>:

> I'm sure that the proper myfaces-api is the one I use. In my project  
> I only have myfaces-api and -impl -1.2.3.jar as myfaces libraries in  
> the build path, no earlier versions.
>
> But what other (are there other?) dependencies and libraries do I  
> have to have on my build path then?
>
> I don't know if it could be Eclipse doing something, but never  
> experienced anything like this before..
>
> - E
>
> -----Original Message-----
> From: Matthias Wessendorf [mailto:matzew@apache.org]
> Sent: 5. juli 2008 17:49
> To: MyFaces Discussion
> Subject: Re: Problem with missing methods in Application.class in  
> Myfaces 1.2.3 ??
>
>> I questioned the javax-libraries, because even though  
>> Application.class is part of javax.faces, ExpressionFactory is not,  
>> it belongs to javax.el
>
> the ExpressionFActory is part of the JSP engine, that your container
> is shipping. But, yeah.. the proper method is in place.
> Are you sure your eclipse project links to the "correct" MyFaces API ?
>
> This is a strange error.
>
> -M
>
>>
>> :)
>>
>> Regards,
>>
>> Eivind
>>
>> -----Original Message-----
>> From: Matthias Wessendorf [mailto:matzew@apache.org]
>> Sent: 5. juli 2008 15:59
>> To: MyFaces Discussion
>> Subject: Re: Problem with missing methods in Application.class in  
>> Myfaces 1.2.3 ??
>>
>> On Sat, Jul 5, 2008 at 3:57 PM, Eivind Ronnevik <ei...@kadme.com>  
>> wrote:
>>> Matthias,
>>>
>>> Thanks for your quick reply!
>>>
>>> Unfortunately, this was already my first thought.. So I created a  
>>> brand new project with only myfaces-1.2.3 in classpath, and in a  
>>> stupid class I tried to get the Application interface to see the  
>>> available methods. Same result..
>>
>> hrm.
>> can you open the MyFaces API JAR and decompile the  
>> Application.class file?
>> it must be in there, if you are using MyFaces 1.2.x
>>
>>>
>>> Could this be linked to some incorrect version of my javax -  
>>> libraries?
>>> (myfaces 1.2 requires JSP 2.1 and JSTL 1.2). Are there any  
>>> references from myfaces.apache.org on which libraries to use and  
>>> where to get them?
>>
>> the application is part of javax.faces, which comes from myfaces.
>>
>> very strange.
>>
>> -M
>>
>>>
>>> Best regards,
>>>
>>> Eivind
>>>
>>>
>>> -----Original Message-----
>>> From: Matthias Wessendorf [mailto:matzew@apache.org]
>>> Sent: 5. juli 2008 15:33
>>> To: MyFaces Discussion
>>> Subject: Re: Problem with missing methods in Application.class in  
>>> Myfaces 1.2.3 ??
>>>
>>> Hi,
>>>
>>> I see the method here:
>>> http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/application/Application.html#getExpressionFactory( 
>>> )
>>>
>>> perhaps you somehow have both libs in your clazzpath ?
>>> -M
>>>
>>> On Sat, Jul 5, 2008 at 3:17 PM, Eivind Ronnevik <ei...@kadme.com>  
>>> wrote:
>>>> Hi!
>>>>
>>>>
>>>>
>>>> I've been working with Myfaces-1.1.5  for some time, but now  
>>>> decided to
>>>> change to  the 1.2 implementation, with myfaces-1.2.3 jars.
>>>>
>>>>
>>>>
>>>> I've had no problems in creating and deploying an application,  
>>>> but suddenly
>>>> I hit a problem I don't understand
>>>>
>>>>
>>>>
>>>> I wanted to create a component programmatically  
>>>> (HtmlCommandLink), and set
>>>> the action with the MethodBinding, as I've always done in  
>>>> myfaces-1.1.5:
>>>>
>>>>
>>>>
>>>> MethodBinding methodBinding =
>>>> FacesContext.getCurrentInstance().getApplication 
>>>> ().createMethodBinding(
>>>>
>>>>      "#{myHandler.myAction}",null);
>>>>
>>>> htmlCommandLink.setAction( methodBinding )
>>>>
>>>>
>>>>
>>>> But then my IDE (Eclipse) reported this method  
>>>> (createMethodBinding) as
>>>> deprecated. I had a look at the javadoc following the  
>>>> myfaces-1.2.3 bin, and
>>>> from what I could understand there is a new way of doing this.  
>>>> Application
>>>> interface should have a method getExpressionFactory()  from which  
>>>> you would
>>>> call the method createMethodExpression( ELContext, String, Class,  
>>>> Class[])
>>>>
>>>>
>>>>
>>>> But if I retrieve the Application object from my facesContext, I  
>>>> don't see
>>>> this method. I only see the methods that I also did in  
>>>> myfaces-1.1.5, but
>>>> the createMethodBinding() is now listed as deprecated. And I  
>>>> can't find
>>>> ExpressionFactory in the list of possible classes either. I have  
>>>> had a look
>>>> at the source of 1.2.3, and for what I can understand the  
>>>> ApplicationImpl
>>>> provide this and other missing methods. The Application interface  
>>>> provides
>>>> the methods as well, but throws UnsupportedOperationExceptions on  
>>>> those
>>>> methods.
>>>>
>>>>
>>>>
>>>> Am I the stupid one here missing something obvious? Should I add  
>>>> some other
>>>> libraries to use myaces-1.2.3,  or are there any explanations to  
>>>> why I have
>>>> this problem?
>>>>
>>>>
>>>>
>>>> Do I need to create my own implementation of the Application  
>>>> interface?
>>>>
>>>>
>>>>
>>>> Hope to have some quick answers to this one, because I'm really  
>>>> getting
>>>> stuck here. J
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>> Eivind Rønnevik
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> further stuff:
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> mail: matzew-at-apache-dot-org
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> further stuff:
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> mail: matzew-at-apache-dot-org
>>
>
>
>
> -- 
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org

RE: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Eivind Ronnevik <ei...@kadme.com>.
I'm sure that the proper myfaces-api is the one I use. In my project I only have myfaces-api and -impl -1.2.3.jar as myfaces libraries in the build path, no earlier versions.

But what other (are there other?) dependencies and libraries do I have to have on my build path then?

I don't know if it could be Eclipse doing something, but never experienced anything like this before..

- E

-----Original Message-----
From: Matthias Wessendorf [mailto:matzew@apache.org] 
Sent: 5. juli 2008 17:49
To: MyFaces Discussion
Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

> I questioned the javax-libraries, because even though Application.class is part of javax.faces, ExpressionFactory is not, it belongs to javax.el

the ExpressionFActory is part of the JSP engine, that your container
is shipping. But, yeah.. the proper method is in place.
Are you sure your eclipse project links to the "correct" MyFaces API ?

This is a strange error.

-M

>
> :)
>
> Regards,
>
> Eivind
>
> -----Original Message-----
> From: Matthias Wessendorf [mailto:matzew@apache.org]
> Sent: 5. juli 2008 15:59
> To: MyFaces Discussion
> Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??
>
> On Sat, Jul 5, 2008 at 3:57 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
>> Matthias,
>>
>> Thanks for your quick reply!
>>
>> Unfortunately, this was already my first thought.. So I created a brand new project with only myfaces-1.2.3 in classpath, and in a stupid class I tried to get the Application interface to see the available methods. Same result..
>
> hrm.
> can you open the MyFaces API JAR and decompile the Application.class file?
> it must be in there, if you are using MyFaces 1.2.x
>
>>
>> Could this be linked to some incorrect version of my javax - libraries?
>> (myfaces 1.2 requires JSP 2.1 and JSTL 1.2). Are there any references from myfaces.apache.org on which libraries to use and where to get them?
>
> the application is part of javax.faces, which comes from myfaces.
>
> very strange.
>
> -M
>
>>
>> Best regards,
>>
>> Eivind
>>
>>
>> -----Original Message-----
>> From: Matthias Wessendorf [mailto:matzew@apache.org]
>> Sent: 5. juli 2008 15:33
>> To: MyFaces Discussion
>> Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??
>>
>> Hi,
>>
>> I see the method here:
>> http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/application/Application.html#getExpressionFactory()
>>
>> perhaps you somehow have both libs in your clazzpath ?
>> -M
>>
>> On Sat, Jul 5, 2008 at 3:17 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
>>> Hi!
>>>
>>>
>>>
>>> I've been working with Myfaces-1.1.5  for some time, but now decided to
>>> change to  the 1.2 implementation, with myfaces-1.2.3 jars.
>>>
>>>
>>>
>>> I've had no problems in creating and deploying an application, but suddenly
>>> I hit a problem I don't understand
>>>
>>>
>>>
>>> I wanted to create a component programmatically (HtmlCommandLink), and set
>>> the action with the MethodBinding, as I've always done in myfaces-1.1.5:
>>>
>>>
>>>
>>> MethodBinding methodBinding =
>>> FacesContext.getCurrentInstance().getApplication().createMethodBinding(
>>>
>>>       "#{myHandler.myAction}",null);
>>>
>>> htmlCommandLink.setAction( methodBinding )
>>>
>>>
>>>
>>>  But then my IDE (Eclipse) reported this method (createMethodBinding) as
>>> deprecated. I had a look at the javadoc following the myfaces-1.2.3 bin, and
>>> from what I could understand there is a new way of doing this. Application
>>> interface should have a method getExpressionFactory()  from which you would
>>> call the method createMethodExpression( ELContext, String, Class, Class[])
>>>
>>>
>>>
>>> But if I retrieve the Application object from my facesContext, I don't see
>>> this method. I only see the methods that I also did in myfaces-1.1.5, but
>>> the createMethodBinding() is now listed as deprecated. And I can't find
>>> ExpressionFactory in the list of possible classes either. I have had a look
>>> at the source of 1.2.3, and for what I can understand the ApplicationImpl
>>> provide this and other missing methods. The Application interface provides
>>> the methods as well, but throws UnsupportedOperationExceptions on those
>>> methods.
>>>
>>>
>>>
>>> Am I the stupid one here missing something obvious? Should I add some other
>>> libraries to use myaces-1.2.3,  or are there any explanations to why I have
>>> this problem?
>>>
>>>
>>>
>>> Do I need to create my own implementation of the Application interface?
>>>
>>>
>>>
>>> Hope to have some quick answers to this one, because I'm really getting
>>> stuck here. J
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Eivind Rønnevik
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> further stuff:
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> mail: matzew-at-apache-dot-org
>>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Matthias Wessendorf <ma...@apache.org>.
> I questioned the javax-libraries, because even though Application.class is part of javax.faces, ExpressionFactory is not, it belongs to javax.el

the ExpressionFActory is part of the JSP engine, that your container
is shipping. But, yeah.. the proper method is in place.
Are you sure your eclipse project links to the "correct" MyFaces API ?

This is a strange error.

-M

>
> :)
>
> Regards,
>
> Eivind
>
> -----Original Message-----
> From: Matthias Wessendorf [mailto:matzew@apache.org]
> Sent: 5. juli 2008 15:59
> To: MyFaces Discussion
> Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??
>
> On Sat, Jul 5, 2008 at 3:57 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
>> Matthias,
>>
>> Thanks for your quick reply!
>>
>> Unfortunately, this was already my first thought.. So I created a brand new project with only myfaces-1.2.3 in classpath, and in a stupid class I tried to get the Application interface to see the available methods. Same result..
>
> hrm.
> can you open the MyFaces API JAR and decompile the Application.class file?
> it must be in there, if you are using MyFaces 1.2.x
>
>>
>> Could this be linked to some incorrect version of my javax - libraries?
>> (myfaces 1.2 requires JSP 2.1 and JSTL 1.2). Are there any references from myfaces.apache.org on which libraries to use and where to get them?
>
> the application is part of javax.faces, which comes from myfaces.
>
> very strange.
>
> -M
>
>>
>> Best regards,
>>
>> Eivind
>>
>>
>> -----Original Message-----
>> From: Matthias Wessendorf [mailto:matzew@apache.org]
>> Sent: 5. juli 2008 15:33
>> To: MyFaces Discussion
>> Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??
>>
>> Hi,
>>
>> I see the method here:
>> http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/application/Application.html#getExpressionFactory()
>>
>> perhaps you somehow have both libs in your clazzpath ?
>> -M
>>
>> On Sat, Jul 5, 2008 at 3:17 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
>>> Hi!
>>>
>>>
>>>
>>> I've been working with Myfaces-1.1.5  for some time, but now decided to
>>> change to  the 1.2 implementation, with myfaces-1.2.3 jars.
>>>
>>>
>>>
>>> I've had no problems in creating and deploying an application, but suddenly
>>> I hit a problem I don't understand
>>>
>>>
>>>
>>> I wanted to create a component programmatically (HtmlCommandLink), and set
>>> the action with the MethodBinding, as I've always done in myfaces-1.1.5:
>>>
>>>
>>>
>>> MethodBinding methodBinding =
>>> FacesContext.getCurrentInstance().getApplication().createMethodBinding(
>>>
>>>       "#{myHandler.myAction}",null);
>>>
>>> htmlCommandLink.setAction( methodBinding )
>>>
>>>
>>>
>>>  But then my IDE (Eclipse) reported this method (createMethodBinding) as
>>> deprecated. I had a look at the javadoc following the myfaces-1.2.3 bin, and
>>> from what I could understand there is a new way of doing this. Application
>>> interface should have a method getExpressionFactory()  from which you would
>>> call the method createMethodExpression( ELContext, String, Class, Class[])
>>>
>>>
>>>
>>> But if I retrieve the Application object from my facesContext, I don't see
>>> this method. I only see the methods that I also did in myfaces-1.1.5, but
>>> the createMethodBinding() is now listed as deprecated. And I can't find
>>> ExpressionFactory in the list of possible classes either. I have had a look
>>> at the source of 1.2.3, and for what I can understand the ApplicationImpl
>>> provide this and other missing methods. The Application interface provides
>>> the methods as well, but throws UnsupportedOperationExceptions on those
>>> methods.
>>>
>>>
>>>
>>> Am I the stupid one here missing something obvious? Should I add some other
>>> libraries to use myaces-1.2.3,  or are there any explanations to why I have
>>> this problem?
>>>
>>>
>>>
>>> Do I need to create my own implementation of the Application interface?
>>>
>>>
>>>
>>> Hope to have some quick answers to this one, because I'm really getting
>>> stuck here. J
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Eivind Rønnevik
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> further stuff:
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> mail: matzew-at-apache-dot-org
>>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

RE: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Eivind Ronnevik <ei...@kadme.com>.
Hi again!

I did the decompile, and (as I expected when seeing the source) the proper output is there.

Application interface has method:

    public ExpressionFactory getExpressionFactory()
    {
        throw new UnsupportedOperationException();
    }

And ApplicationImpl has method:

   public ExpressionFactory getExpressionFactory()
    {
        return _runtimeConfig.getExpressionFactory();
    }

So the source has it, the decompiled class-files has it, and it's there in the javadoc. But still in eclipse I don't see it ;)

I questioned the javax-libraries, because even though Application.class is part of javax.faces, ExpressionFactory is not, it belongs to javax.el

:)

Regards,

Eivind

-----Original Message-----
From: Matthias Wessendorf [mailto:matzew@apache.org] 
Sent: 5. juli 2008 15:59
To: MyFaces Discussion
Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

On Sat, Jul 5, 2008 at 3:57 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
> Matthias,
>
> Thanks for your quick reply!
>
> Unfortunately, this was already my first thought.. So I created a brand new project with only myfaces-1.2.3 in classpath, and in a stupid class I tried to get the Application interface to see the available methods. Same result..

hrm.
can you open the MyFaces API JAR and decompile the Application.class file?
it must be in there, if you are using MyFaces 1.2.x

>
> Could this be linked to some incorrect version of my javax - libraries?
> (myfaces 1.2 requires JSP 2.1 and JSTL 1.2). Are there any references from myfaces.apache.org on which libraries to use and where to get them?

the application is part of javax.faces, which comes from myfaces.

very strange.

-M

>
> Best regards,
>
> Eivind
>
>
> -----Original Message-----
> From: Matthias Wessendorf [mailto:matzew@apache.org]
> Sent: 5. juli 2008 15:33
> To: MyFaces Discussion
> Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??
>
> Hi,
>
> I see the method here:
> http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/application/Application.html#getExpressionFactory()
>
> perhaps you somehow have both libs in your clazzpath ?
> -M
>
> On Sat, Jul 5, 2008 at 3:17 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
>> Hi!
>>
>>
>>
>> I've been working with Myfaces-1.1.5  for some time, but now decided to
>> change to  the 1.2 implementation, with myfaces-1.2.3 jars.
>>
>>
>>
>> I've had no problems in creating and deploying an application, but suddenly
>> I hit a problem I don't understand
>>
>>
>>
>> I wanted to create a component programmatically (HtmlCommandLink), and set
>> the action with the MethodBinding, as I've always done in myfaces-1.1.5:
>>
>>
>>
>> MethodBinding methodBinding =
>> FacesContext.getCurrentInstance().getApplication().createMethodBinding(
>>
>>       "#{myHandler.myAction}",null);
>>
>> htmlCommandLink.setAction( methodBinding )
>>
>>
>>
>>  But then my IDE (Eclipse) reported this method (createMethodBinding) as
>> deprecated. I had a look at the javadoc following the myfaces-1.2.3 bin, and
>> from what I could understand there is a new way of doing this. Application
>> interface should have a method getExpressionFactory()  from which you would
>> call the method createMethodExpression( ELContext, String, Class, Class[])
>>
>>
>>
>> But if I retrieve the Application object from my facesContext, I don't see
>> this method. I only see the methods that I also did in myfaces-1.1.5, but
>> the createMethodBinding() is now listed as deprecated. And I can't find
>> ExpressionFactory in the list of possible classes either. I have had a look
>> at the source of 1.2.3, and for what I can understand the ApplicationImpl
>> provide this and other missing methods. The Application interface provides
>> the methods as well, but throws UnsupportedOperationExceptions on those
>> methods.
>>
>>
>>
>> Am I the stupid one here missing something obvious? Should I add some other
>> libraries to use myaces-1.2.3,  or are there any explanations to why I have
>> this problem?
>>
>>
>>
>> Do I need to create my own implementation of the Application interface?
>>
>>
>>
>> Hope to have some quick answers to this one, because I'm really getting
>> stuck here. J
>>
>>
>>
>> Regards,
>>
>>
>>
>> Eivind Rønnevik
>>
>>
>>
>>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Matthias Wessendorf <ma...@apache.org>.
> (I don't have 1.2.3 release jar handy, so used 1.2.4-snapshot).

should be there, b/c that release passed the TCK ;)

>
> Regards,
> Simon
>
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by simon <si...@chello.at>.
On Sat, 2008-07-05 at 15:59 +0200, Matthias Wessendorf wrote:
> On Sat, Jul 5, 2008 at 3:57 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
> > Matthias,
> >
> > Thanks for your quick reply!
> >
> > Unfortunately, this was already my first thought.. So I created a brand new project with only myfaces-1.2.3 in classpath, and in a stupid class I tried to get the Application interface to see the available methods. Same result..
> 
> hrm.
> can you open the MyFaces API JAR and decompile the Application.class file?
> it must be in there, if you are using MyFaces 1.2.x

Yes, that's the best way to check. I just ran this:
  javap -classpath myfaces-api-1.2.4-SNAPSHOT.jar \
    javax.faces.application.Application

and the output includes:
  public javax.el.ExpressionFactory getExpressionFactory();

(I don't have 1.2.3 release jar handy, so used 1.2.4-snapshot).

Regards,
Simon



Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Matthias Wessendorf <ma...@apache.org>.
On Sat, Jul 5, 2008 at 3:57 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
> Matthias,
>
> Thanks for your quick reply!
>
> Unfortunately, this was already my first thought.. So I created a brand new project with only myfaces-1.2.3 in classpath, and in a stupid class I tried to get the Application interface to see the available methods. Same result..

hrm.
can you open the MyFaces API JAR and decompile the Application.class file?
it must be in there, if you are using MyFaces 1.2.x

>
> Could this be linked to some incorrect version of my javax - libraries?
> (myfaces 1.2 requires JSP 2.1 and JSTL 1.2). Are there any references from myfaces.apache.org on which libraries to use and where to get them?

the application is part of javax.faces, which comes from myfaces.

very strange.

-M

>
> Best regards,
>
> Eivind
>
>
> -----Original Message-----
> From: Matthias Wessendorf [mailto:matzew@apache.org]
> Sent: 5. juli 2008 15:33
> To: MyFaces Discussion
> Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??
>
> Hi,
>
> I see the method here:
> http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/application/Application.html#getExpressionFactory()
>
> perhaps you somehow have both libs in your clazzpath ?
> -M
>
> On Sat, Jul 5, 2008 at 3:17 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
>> Hi!
>>
>>
>>
>> I've been working with Myfaces-1.1.5  for some time, but now decided to
>> change to  the 1.2 implementation, with myfaces-1.2.3 jars.
>>
>>
>>
>> I've had no problems in creating and deploying an application, but suddenly
>> I hit a problem I don't understand
>>
>>
>>
>> I wanted to create a component programmatically (HtmlCommandLink), and set
>> the action with the MethodBinding, as I've always done in myfaces-1.1.5:
>>
>>
>>
>> MethodBinding methodBinding =
>> FacesContext.getCurrentInstance().getApplication().createMethodBinding(
>>
>>       "#{myHandler.myAction}",null);
>>
>> htmlCommandLink.setAction( methodBinding )
>>
>>
>>
>>  But then my IDE (Eclipse) reported this method (createMethodBinding) as
>> deprecated. I had a look at the javadoc following the myfaces-1.2.3 bin, and
>> from what I could understand there is a new way of doing this. Application
>> interface should have a method getExpressionFactory()  from which you would
>> call the method createMethodExpression( ELContext, String, Class, Class[])
>>
>>
>>
>> But if I retrieve the Application object from my facesContext, I don't see
>> this method. I only see the methods that I also did in myfaces-1.1.5, but
>> the createMethodBinding() is now listed as deprecated. And I can't find
>> ExpressionFactory in the list of possible classes either. I have had a look
>> at the source of 1.2.3, and for what I can understand the ApplicationImpl
>> provide this and other missing methods. The Application interface provides
>> the methods as well, but throws UnsupportedOperationExceptions on those
>> methods.
>>
>>
>>
>> Am I the stupid one here missing something obvious? Should I add some other
>> libraries to use myaces-1.2.3,  or are there any explanations to why I have
>> this problem?
>>
>>
>>
>> Do I need to create my own implementation of the Application interface?
>>
>>
>>
>> Hope to have some quick answers to this one, because I'm really getting
>> stuck here. J
>>
>>
>>
>> Regards,
>>
>>
>>
>> Eivind Rønnevik
>>
>>
>>
>>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

RE: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Eivind Ronnevik <ei...@kadme.com>.
Matthias,

Thanks for your quick reply!

Unfortunately, this was already my first thought.. So I created a brand new project with only myfaces-1.2.3 in classpath, and in a stupid class I tried to get the Application interface to see the available methods. Same result..

Could this be linked to some incorrect version of my javax - libraries?
(myfaces 1.2 requires JSP 2.1 and JSTL 1.2). Are there any references from myfaces.apache.org on which libraries to use and where to get them?

Best regards,

Eivind


-----Original Message-----
From: Matthias Wessendorf [mailto:matzew@apache.org] 
Sent: 5. juli 2008 15:33
To: MyFaces Discussion
Subject: Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Hi,

I see the method here:
http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/application/Application.html#getExpressionFactory()

perhaps you somehow have both libs in your clazzpath ?
-M

On Sat, Jul 5, 2008 at 3:17 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
> Hi!
>
>
>
> I've been working with Myfaces-1.1.5  for some time, but now decided to
> change to  the 1.2 implementation, with myfaces-1.2.3 jars.
>
>
>
> I've had no problems in creating and deploying an application, but suddenly
> I hit a problem I don't understand
>
>
>
> I wanted to create a component programmatically (HtmlCommandLink), and set
> the action with the MethodBinding, as I've always done in myfaces-1.1.5:
>
>
>
> MethodBinding methodBinding =
> FacesContext.getCurrentInstance().getApplication().createMethodBinding(
>
>       "#{myHandler.myAction}",null);
>
> htmlCommandLink.setAction( methodBinding )
>
>
>
>  But then my IDE (Eclipse) reported this method (createMethodBinding) as
> deprecated. I had a look at the javadoc following the myfaces-1.2.3 bin, and
> from what I could understand there is a new way of doing this. Application
> interface should have a method getExpressionFactory()  from which you would
> call the method createMethodExpression( ELContext, String, Class, Class[])
>
>
>
> But if I retrieve the Application object from my facesContext, I don't see
> this method. I only see the methods that I also did in myfaces-1.1.5, but
> the createMethodBinding() is now listed as deprecated. And I can't find
> ExpressionFactory in the list of possible classes either. I have had a look
> at the source of 1.2.3, and for what I can understand the ApplicationImpl
> provide this and other missing methods. The Application interface provides
> the methods as well, but throws UnsupportedOperationExceptions on those
> methods.
>
>
>
> Am I the stupid one here missing something obvious? Should I add some other
> libraries to use myaces-1.2.3,  or are there any explanations to why I have
> this problem?
>
>
>
> Do I need to create my own implementation of the Application interface?
>
>
>
> Hope to have some quick answers to this one, because I'm really getting
> stuck here. J
>
>
>
> Regards,
>
>
>
> Eivind Rønnevik
>
>
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: Problem with missing methods in Application.class in Myfaces 1.2.3 ??

Posted by Matthias Wessendorf <ma...@apache.org>.
Hi,

I see the method here:
http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/application/Application.html#getExpressionFactory()

perhaps you somehow have both libs in your clazzpath ?
-M

On Sat, Jul 5, 2008 at 3:17 PM, Eivind Ronnevik <ei...@kadme.com> wrote:
> Hi!
>
>
>
> I've been working with Myfaces-1.1.5  for some time, but now decided to
> change to  the 1.2 implementation, with myfaces-1.2.3 jars.
>
>
>
> I've had no problems in creating and deploying an application, but suddenly
> I hit a problem I don't understand
>
>
>
> I wanted to create a component programmatically (HtmlCommandLink), and set
> the action with the MethodBinding, as I've always done in myfaces-1.1.5:
>
>
>
> MethodBinding methodBinding =
> FacesContext.getCurrentInstance().getApplication().createMethodBinding(
>
>       "#{myHandler.myAction}",null);
>
> htmlCommandLink.setAction( methodBinding )
>
>
>
>  But then my IDE (Eclipse) reported this method (createMethodBinding) as
> deprecated. I had a look at the javadoc following the myfaces-1.2.3 bin, and
> from what I could understand there is a new way of doing this. Application
> interface should have a method getExpressionFactory()  from which you would
> call the method createMethodExpression( ELContext, String, Class, Class[])
>
>
>
> But if I retrieve the Application object from my facesContext, I don't see
> this method. I only see the methods that I also did in myfaces-1.1.5, but
> the createMethodBinding() is now listed as deprecated. And I can't find
> ExpressionFactory in the list of possible classes either. I have had a look
> at the source of 1.2.3, and for what I can understand the ApplicationImpl
> provide this and other missing methods. The Application interface provides
> the methods as well, but throws UnsupportedOperationExceptions on those
> methods.
>
>
>
> Am I the stupid one here missing something obvious? Should I add some other
> libraries to use myaces-1.2.3,  or are there any explanations to why I have
> this problem?
>
>
>
> Do I need to create my own implementation of the Application interface?
>
>
>
> Hope to have some quick answers to this one, because I'm really getting
> stuck here. J
>
>
>
> Regards,
>
>
>
> Eivind Rønnevik
>
>
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org