You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Robert Maier <ro...@gmail.com> on 2011/04/27 14:57:31 UTC

Problem with @PageBean

Hello everybody,

I have a problem in a simple test-application whhich uses CODI with JSF2.0,
Glassfish 3.1 and Weld.

I posted a detailed problem-description to stackoverflow:
http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922

Thank you all in advance for any help!

Best regards,
Robert

Re: Problem with @PageBean

Posted by Robert Maier <ro...@gmail.com>.
Hi Gerhard,

thanks for the explanation. right now i successfully deployed the demo app
to my glassfish.
I downloaded the glassfish-installation file which installs and configures
the server. Then i was able to build the application using "mvn clean
install -Denvironment jee6" as stated in the readme and deploy it using the
admin-webfrontend.

Will check if my weld-application works now.

Best regards,
Robert



2011/4/27 Gerhard Petracek <ge...@gmail.com>

> hi robert,
>
> a dvcs (distributed version control system) like mercurial works a bit
> different.
>
> clone it - e.g.:
> hg clone
> https://hg.codespot.com/a/apache-extras.org/myfaces-codi-examples/
>
> and now you have the whole repository and you can switch to the branch - in
> this case via:
> hg update glassfish31
>
> if you are interested in some details, [1] and esp. [2] provide a quite
> nice
> explanation.
>
> thank you for the question - we will add a hint to the wiki.
>
> regards,
> gerhard
>
> [1] http://hginit.com/top/
> [2] http://hginit.com/top/00.html
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2011/4/27 Robert Maier <ro...@gmail.com>
>
> > Hi Gerhard,
> >
> > as I'm not a mercurial-user, how can I checkout (or clone) a particular
> > branch? I couldn't find an answer to that using google.
> >
> > Best regards,
> > Robert
> >
> > 2011/4/27 Gerhard Petracek <ge...@gmail.com>
> >
> > > hi robert,
> > >
> > > please update the weld-osgi bundle to v1.1.1
> > >
> > > fyi:
> > > you can have a look at the glassfish 3.1 branch of the community
> example
> > > [1].
> > > i've tested it with glassfish 3.1 + weld v1.1.1.
> > > (as mentioned in the readme use:
> > >  mvn clean install -Denvironment=jee6
> > > to build it)
> > >
> > > regards,
> > > gerhard
> > >
> > > [1]
> > >
> > >
> >
> http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/?r=glassfish31#hg%2Fcommunity
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2011/4/27 Robert Maier <ro...@gmail.com>
> > >
> > > > Hello everybody,
> > > >
> > > > I have a problem in a simple test-application whhich uses CODI with
> > > JSF2.0,
> > > > Glassfish 3.1 and Weld.
> > > >
> > > > I posted a detailed problem-description to stackoverflow:
> > > >
> > > >
> > >
> >
> http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922
> > > >
> > > > Thank you all in advance for any help!
> > > >
> > > > Best regards,
> > > > Robert
> > > >
> > >
> >
>

Re: Problem with @PageBean

Posted by Gerhard Petracek <ge...@gmail.com>.
hi robert,

a dvcs (distributed version control system) like mercurial works a bit
different.

clone it - e.g.:
hg clone https://hg.codespot.com/a/apache-extras.org/myfaces-codi-examples/

and now you have the whole repository and you can switch to the branch - in
this case via:
hg update glassfish31

if you are interested in some details, [1] and esp. [2] provide a quite nice
explanation.

thank you for the question - we will add a hint to the wiki.

regards,
gerhard

[1] http://hginit.com/top/
[2] http://hginit.com/top/00.html

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2011/4/27 Robert Maier <ro...@gmail.com>

> Hi Gerhard,
>
> as I'm not a mercurial-user, how can I checkout (or clone) a particular
> branch? I couldn't find an answer to that using google.
>
> Best regards,
> Robert
>
> 2011/4/27 Gerhard Petracek <ge...@gmail.com>
>
> > hi robert,
> >
> > please update the weld-osgi bundle to v1.1.1
> >
> > fyi:
> > you can have a look at the glassfish 3.1 branch of the community example
> > [1].
> > i've tested it with glassfish 3.1 + weld v1.1.1.
> > (as mentioned in the readme use:
> >  mvn clean install -Denvironment=jee6
> > to build it)
> >
> > regards,
> > gerhard
> >
> > [1]
> >
> >
> http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/?r=glassfish31#hg%2Fcommunity
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2011/4/27 Robert Maier <ro...@gmail.com>
> >
> > > Hello everybody,
> > >
> > > I have a problem in a simple test-application whhich uses CODI with
> > JSF2.0,
> > > Glassfish 3.1 and Weld.
> > >
> > > I posted a detailed problem-description to stackoverflow:
> > >
> > >
> >
> http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922
> > >
> > > Thank you all in advance for any help!
> > >
> > > Best regards,
> > > Robert
> > >
> >
>

Re: Problem with @PageBean

Posted by Robert Maier <ro...@gmail.com>.
Hi Gerhard,

as I'm not a mercurial-user, how can I checkout (or clone) a particular
branch? I couldn't find an answer to that using google.

Best regards,
Robert

2011/4/27 Gerhard Petracek <ge...@gmail.com>

> hi robert,
>
> please update the weld-osgi bundle to v1.1.1
>
> fyi:
> you can have a look at the glassfish 3.1 branch of the community example
> [1].
> i've tested it with glassfish 3.1 + weld v1.1.1.
> (as mentioned in the readme use:
>  mvn clean install -Denvironment=jee6
> to build it)
>
> regards,
> gerhard
>
> [1]
>
> http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/?r=glassfish31#hg%2Fcommunity
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2011/4/27 Robert Maier <ro...@gmail.com>
>
> > Hello everybody,
> >
> > I have a problem in a simple test-application whhich uses CODI with
> JSF2.0,
> > Glassfish 3.1 and Weld.
> >
> > I posted a detailed problem-description to stackoverflow:
> >
> >
> http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922
> >
> > Thank you all in advance for any help!
> >
> > Best regards,
> > Robert
> >
>

Re: Problem with @PageBean

Posted by Robert Maier <ro...@gmail.com>.
Oh, sorry.

In my tests, I had the @PageBean annotation for the class "MyPage" like
this:

@Page
@PageBean(MyPageBean.class)
public class MyPage ..... { }

2011/4/27 Gerhard Petracek <ge...@gmail.com>

> hi robert,
>
> in your example you removed the usage of @PageBean
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2011/4/27 Robert Maier <ro...@gmail.com>
>
> >      Thank you both for your answers, I did replace the bundles
> > weld-osgi-bundle with the 1.1.1 Final one, but starting the project from
> > netbeans 7 (using right-click on project -> Run) it doesnt work. But I
> just
> > had a look at the community example and realized some differences between
> my
> > code and the example code. So I guess I'm just using it wrong. In fact, I
> > did try to implement some of the examples from the "Fullstack Java EE 6
> > Session"-Slides from Confess 2011.
> >
> > Attached you'll find the compressed project folder of my
> netbeans-project.
> > But please note, this is just some useless code to experiment a little :)
> >
> > I'll report back after I tried to run the community example.
> >
> > Best regards,
> > Robert
> >
> > 2011/4/27 Gerhard Petracek <ge...@gmail.com>
> >
> >> hi robert,
> >>
> >> please update the weld-osgi bundle to v1.1.1
> >>
> >> fyi:
> >> you can have a look at the glassfish 3.1 branch of the community example
> >> [1].
> >> i've tested it with glassfish 3.1 + weld v1.1.1.
> >> (as mentioned in the readme use:
> >>  mvn clean install -Denvironment=jee6
> >> to build it)
> >>
> >> regards,
> >> gerhard
> >>
> >> [1]
> >>
> >>
> http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/?r=glassfish31#hg%2Fcommunity
> >>
> >> http://www.irian.at
> >>
> >> Your JSF powerhouse -
> >> JSF Consulting, Development and
> >> Courses in English and German
> >>
> >> Professional Support for Apache MyFaces
> >>
> >>
> >>
> >> 2011/4/27 Robert Maier <ro...@gmail.com>
> >>
> >> > Hello everybody,
> >> >
> >> > I have a problem in a simple test-application whhich uses CODI with
> >> JSF2.0,
> >> > Glassfish 3.1 and Weld.
> >> >
> >> > I posted a detailed problem-description to stackoverflow:
> >> >
> >> >
> >>
> http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922
> >> >
> >> > Thank you all in advance for any help!
> >> >
> >> > Best regards,
> >> > Robert
> >> >
> >>
> >
> >
>

Re: Problem with @PageBean

Posted by Gerhard Petracek <ge...@gmail.com>.
hi robert,

in your example you removed the usage of @PageBean

regards,
gerhard

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2011/4/27 Robert Maier <ro...@gmail.com>

>      Thank you both for your answers, I did replace the bundles
> weld-osgi-bundle with the 1.1.1 Final one, but starting the project from
> netbeans 7 (using right-click on project -> Run) it doesnt work. But I just
> had a look at the community example and realized some differences between my
> code and the example code. So I guess I'm just using it wrong. In fact, I
> did try to implement some of the examples from the "Fullstack Java EE 6
> Session"-Slides from Confess 2011.
>
> Attached you'll find the compressed project folder of my netbeans-project.
> But please note, this is just some useless code to experiment a little :)
>
> I'll report back after I tried to run the community example.
>
> Best regards,
> Robert
>
> 2011/4/27 Gerhard Petracek <ge...@gmail.com>
>
>> hi robert,
>>
>> please update the weld-osgi bundle to v1.1.1
>>
>> fyi:
>> you can have a look at the glassfish 3.1 branch of the community example
>> [1].
>> i've tested it with glassfish 3.1 + weld v1.1.1.
>> (as mentioned in the readme use:
>>  mvn clean install -Denvironment=jee6
>> to build it)
>>
>> regards,
>> gerhard
>>
>> [1]
>>
>> http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/?r=glassfish31#hg%2Fcommunity
>>
>> http://www.irian.at
>>
>> Your JSF powerhouse -
>> JSF Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>>
>>
>> 2011/4/27 Robert Maier <ro...@gmail.com>
>>
>> > Hello everybody,
>> >
>> > I have a problem in a simple test-application whhich uses CODI with
>> JSF2.0,
>> > Glassfish 3.1 and Weld.
>> >
>> > I posted a detailed problem-description to stackoverflow:
>> >
>> >
>> http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922
>> >
>> > Thank you all in advance for any help!
>> >
>> > Best regards,
>> > Robert
>> >
>>
>
>

Re: Problem with @PageBean

Posted by Robert Maier <ro...@gmail.com>.
Thank you both for your answers, I did replace the bundles weld-osgi-bundle
with the 1.1.1 Final one, but starting the project from netbeans 7 (using
right-click on project -> Run) it doesnt work. But I just had a look at the
community example and realized some differences between my code and the
example code. So I guess I'm just using it wrong. In fact, I did try to
implement some of the examples from the "Fullstack Java EE 6 Session"-Slides
from Confess 2011.

Attached you'll find the compressed project folder of my netbeans-project.
But please note, this is just some useless code to experiment a little :)

I'll report back after I tried to run the community example.

Best regards,
Robert

2011/4/27 Gerhard Petracek <ge...@gmail.com>

> hi robert,
>
> please update the weld-osgi bundle to v1.1.1
>
> fyi:
> you can have a look at the glassfish 3.1 branch of the community example
> [1].
> i've tested it with glassfish 3.1 + weld v1.1.1.
> (as mentioned in the readme use:
>  mvn clean install -Denvironment=jee6
> to build it)
>
> regards,
> gerhard
>
> [1]
>
> http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/?r=glassfish31#hg%2Fcommunity
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2011/4/27 Robert Maier <ro...@gmail.com>
>
> > Hello everybody,
> >
> > I have a problem in a simple test-application whhich uses CODI with
> JSF2.0,
> > Glassfish 3.1 and Weld.
> >
> > I posted a detailed problem-description to stackoverflow:
> >
> >
> http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922
> >
> > Thank you all in advance for any help!
> >
> > Best regards,
> > Robert
> >
>

Re: Problem with @PageBean

Posted by Gerhard Petracek <ge...@gmail.com>.
hi robert,

please update the weld-osgi bundle to v1.1.1

fyi:
you can have a look at the glassfish 3.1 branch of the community example
[1].
i've tested it with glassfish 3.1 + weld v1.1.1.
(as mentioned in the readme use:
  mvn clean install -Denvironment=jee6
to build it)

regards,
gerhard

[1]
http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/?r=glassfish31#hg%2Fcommunity

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2011/4/27 Robert Maier <ro...@gmail.com>

> Hello everybody,
>
> I have a problem in a simple test-application whhich uses CODI with JSF2.0,
> Glassfish 3.1 and Weld.
>
> I posted a detailed problem-description to stackoverflow:
>
> http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922
>
> Thank you all in advance for any help!
>
> Best regards,
> Robert
>

Re: Problem with @PageBean

Posted by Mark Struberg <st...@yahoo.de>.
Hi Robert!

First, welcome to the myfaces list!

Have you already tried to replace your weld-osgi-bundle in your glassfish with the on from the weld-1.1.1.Final distribution [1]?

LieGrue,
strub

[1] https://repository.jboss.org/nexus/content/groups/public/org/jboss/weld/weld-osgi-bundle/1.1.1.Final/

--- On Wed, 4/27/11, Robert Maier <ro...@gmail.com> wrote:

> From: Robert Maier <ro...@gmail.com>
> Subject: Problem with @PageBean
> To: users@myfaces.apache.org
> Date: Wednesday, April 27, 2011, 12:57 PM
> Hello everybody,
> 
> I have a problem in a simple test-application whhich uses
> CODI with JSF2.0,
> Glassfish 3.1 and Weld.
> 
> I posted a detailed problem-description to stackoverflow:
> http://stackoverflow.com/questions/5803492/apache-myfaces-codi-pagebean-argument-bean-must-not-be-null/5803922#5803922
> 
> Thank you all in advance for any help!
> 
> Best regards,
> Robert
>