You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by arnold4sho <tu...@hotmail.com> on 2010/03/13 13:24:15 UTC

Classloader Problems running JSF in jetty equinox


Hi

I have problems running JSF in an OSGi environment. I am using jetty web
container and equinox to provide the OSGi functionality. The structure of my
application is as follows:
The first bundle has all the JSF libs, web.xml and a config.xml. It looks as
the following:
                           webapplication1
                           ----src/main/java
                           -------de/package
                           ----------Activator.java
                           ----------JSFResolver.java
                           ----src/main/resource
                           ------ WebContent
                           ----------META-INF
                           -------------face-config.xml
                          --------------web.xhtml
                           ----------start.xhtml
                          -----------include.xhtml
                          ----libs (containing all JSF required Jars)

The structure of the second bundle is as follows:
                           webapplication2
                           ---src/main/java
                           ------de/package
                           ----------Bean.java
                           ---src/main/resource
                           ------META-INF
                           ---------face-config.xml
                           ------WebContent
                           ---------index.xhtml
                                           
When running the application of equinox, the webapplication1 is the main
bundle where all the browser requests are sent to. In the second bundle, the
'index.xhtml' file can be retrieved the by first bundle upon request. The
'index.xhtml' in bundle 2 gets its values and properties from the
'Bean.java' in bundle 2. The problem comes when i request the 'index.xhtml',
the Bean.java class is not found. I think this is because the class loader
of bundle1 cannot find it, it has no knowledge of it. So i would like to ask
if anyone knows how to solve this problem. If so please do assist me, i have
tried all the possibilities i had.. I have provided my 
http://old.nabble.com/file/p27887386/workspace_current.rar
workspace_current.rar bundles as attatchments.

Is it infact possible  to have JSF run on multiple bundles using the same
FaceletsContex? Can i be able to have seperate faces-config.xml files in
each bundle, which can all be connected other faces-config.xml in other
bundles? Can anyone please provide me a solution. Sample code would help. 

thanks 
http://old.nabble.com/file/p27887386/workspace_current.rar
workspace_current.rar 
Arnold
-- 
View this message in context: http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Classloader Problems running JSF in jetty equinox

Posted by arnold4sho <tu...@hotmail.com>.
Hi

I attached the .RAR files with all the bundles in there but here is a list
of them all:
For jetty, i am using the following bundles:
org.eclipse.equinox.http.jetty
org.eclipse.equinox.http.registry
org.mortbay.jetty

My project bundles are:
de.clintworld.clintweb.test
de.clintworld.clintweb.ui

So when i start the OSGi console, i run all the above bundles with their
dependancies. I created my project on eclipse, to reproduce it you can just
copy the projects to a workspace and then set the 'Run Configurations as
follows:'

   1. Select Run --> Open Run Dialog...
   2. Highlight the OSGi Configuration, click the right mouse, and choose
Duplicate.
   3. Change the name to OSGi Servlet Configuration.
   4. (optional) Select the arguments tab and add
-Dorg.osgi.service.http.port to assign the port number. I chose port 8081
for OSGi.

      Return to the Bundles tab to select the Jetty dependencies

   5. In addition to selecting our projects, select the following bundles:
          * javax.servlet
          * org.apache.commons.logging
          * org.apache.xerces
          * org.apache.xml.resolver
          * org.eclipse.core.jobs
          * org.eclipse.core.runtime.compatibility.registry
          * org.eclipse.equinox.common
          * org.eclipse.equinox.http.jetty
          * org.eclipse.equinox.http.registry
          * org.eclipse.equinox.http.servlet
          * org.eclipse.equinox.registry
          * org.eclipse.osgi.services
          * org.mortbay.jetty

You can now launch the OSGi bundle with an embedded Jetty server. 

Those are the instructions for running my projects which i followed from the
following website,
http://byteworksinc.blogspot.com/2008/02/return-of-jetty-embedded-osgi-server.html

but ya, that should work. Here are the project bundles, just unpack them and
do the above stated configurations and it should work. 
http://old.nabble.com/file/p27887565/workspace_current.rar
workspace_current.rar 

thank  you very much





Leonardo Uribe wrote:
> 
> Hi
> 
> Can you list what bundles are you using for? I would like to reproduce it
> and it is necessary to know which bundles are you usings to run jetty and
> servlet stuff, and all configuration hacks you are using for it.
> 
> regards,
> 
> Leonardo Uribe
> 
> 2010/3/13 arnold4sho <tu...@hotmail.com>
> 
>>
>>
>> Hi
>>
>> I have problems running JSF in an OSGi environment. I am using jetty web
>> container and equinox to provide the OSGi functionality. The structure of
>> my
>> application is as follows:
>> The first bundle has all the JSF libs, web.xml and a config.xml. It looks
>> as
>> the following:
>>                           webapplication1
>>                           ----src/main/java
>>                           -------de/package
>>                           ----------Activator.java
>>                           ----------JSFResolver.java
>>                           ----src/main/resource
>>                           ------ WebContent
>>                           ----------META-INF
>>                           -------------face-config.xml
>>                          --------------web.xhtml
>>                           ----------start.xhtml
>>                          -----------include.xhtml
>>                          ----libs (containing all JSF required Jars)
>>
>> The structure of the second bundle is as follows:
>>                           webapplication2
>>                           ---src/main/java
>>                           ------de/package
>>                           ----------Bean.java
>>                           ---src/main/resource
>>                           ------META-INF
>>                           ---------face-config.xml
>>                           ------WebContent
>>                           ---------index.xhtml
>>
>> When running the application of equinox, the webapplication1 is the main
>> bundle where all the browser requests are sent to. In the second bundle,
>> the
>> 'index.xhtml' file can be retrieved the by first bundle upon request. The
>> 'index.xhtml' in bundle 2 gets its values and properties from the
>> 'Bean.java' in bundle 2. The problem comes when i request the
>> 'index.xhtml',
>> the Bean.java class is not found. I think this is because the class
>> loader
>> of bundle1 cannot find it, it has no knowledge of it. So i would like to
>> ask
>> if anyone knows how to solve this problem. If so please do assist me, i
>> have
>> tried all the possibilities i had.. I have provided my
>> http://old.nabble.com/file/p27887386/workspace_current.rar
>> workspace_current.rar bundles as attatchments.
>>
>> Is it infact possible  to have JSF run on multiple bundles using the same
>> FaceletsContex? Can i be able to have seperate faces-config.xml files in
>> each bundle, which can all be connected other faces-config.xml in other
>> bundles? Can anyone please provide me a solution. Sample code would help.
>>
>> thanks
>> http://old.nabble.com/file/p27887386/workspace_current.rar
>> workspace_current.rar
>> Arnold
>> --
>> View this message in context:
>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
>> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887565.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Classloader Problems running JSF in jetty equinox

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

>From jsf side, Spring DM set the context classloader and allows to
Thread.getCurrentThread().getContextClassLoader() to work. Note in OSGi,
trying to locate a class through the context classloader could cause a
ClassNotFoundException, and use the BundleClassLoader through
jsfclass.class.getClassLoader() is not right in cases like the one found in
javax.faces.FactoryFinder.

regards,

Leonardo Uribe

2010/3/15 Werner Punz <we...@gmail.com>

> Am 15.03.10 12:19, schrieb arnold4sho:
>
>  Thanks for your effort. Would it be advisable for me to use Spring DM
>> instead of deploying a jetty web container into osgi, like i was trying to
>> do? If Spring provides the better solution then i would gladly use Spring
>> DM
>> for it.
>>
>>  It is definitely advisable because you might run into issues on the JPA
> side was well, due to the javaagent class recompilation jpa does.
> As far as I know there are some issues regarding class weaving which the
> spring people apparently have solved.
>
>
>

Re: Classloader Problems running JSF in jetty equinox

Posted by Werner Punz <we...@gmail.com>.
Am 15.03.10 12:19, schrieb arnold4sho:
> Thanks for your effort. Would it be advisable for me to use Spring DM
> instead of deploying a jetty web container into osgi, like i was trying to
> do? If Spring provides the better solution then i would gladly use Spring DM
> for it.
>
It is definitely advisable because you might run into issues on the JPA 
side was well, due to the javaagent class recompilation jpa does.
As far as I know there are some issues regarding class weaving which the 
spring people apparently have solved.



Re: Classloader Problems running JSF in jetty equinox

Posted by arnold4sho <tu...@hotmail.com>.
Hi

Thanks for your effort. Would it be advisable for me to use Spring DM
instead of deploying a jetty web container into osgi, like i was trying to
do? If Spring provides the better solution then i would gladly use Spring DM
for it. 


Arnold

Leonardo Uribe wrote:
> 
> Hi
> 
> On this link:
> 
> https://issues.apache.org/jira/browse/MYFACES-2290
> 
> There is an example that runs myfaces in osgi using spring dm. Look at the
> comments, because it is required to download two artifacts not available
> on
> spring osgi repository.
> 
> Really, I'm trying to find other example configuration that does not use
> spring dm.
> 
> regards,
> 
> Leonardo Uribe
> 
> 2010/3/13 arnold4sho <tu...@hotmail.com>
> 
>>
>> I checked out your link, which bundles do you suggest i use for the
>> MyFaces
>> and Jsp?
>>
>> Arnold
>>
>> arnold4sho wrote:
>> >
>> > Hi
>> >
>> > Thanks for your reply, were you able to get my application to run?
>> > I have been looking at many possibilies of making the application run
>> but
>> > up until now i have none which actually works. Do you have any
>> > suggestions?
>> >
>> >
>> >
>> >
>> > Leonardo Uribe wrote:
>> >>
>> >> Hi
>> >>
>> >> Checking this page:
>> >>
>> >>
>> http://download.eclipse.org/equinox/drops/R-3.5.2-201002111343/index.php
>> >>
>> >> There is no javax.servlet.jsp bundle for 2.1. Myfaces 1.2.x or 2.0.x
>> >> requires servlet 2.5 / jsp 2.1 to run. It could be possible, but I'm
>> not
>> >> 100% sure that it is possible to run but using facelets + servlet 2.4
>> +
>> >> jsp
>> >> 2.1, but I have never tried before.
>> >>
>> >> regards,
>> >>
>> >> Leonardo Uribe
>> >>
>> >> 2010/3/13 arnold4sho <tu...@hotmail.com>
>> >>
>> >>>
>> >>> Hi
>> >>>
>> >>> Once again, the problem is that the bean class in the second bundle
>> is
>> >>> not
>> >>> resolved. If you type in
>> >>> http://localhost:8081/clintweb.xhtml. Clintweb.xhtml is in the second
>> >>> bundle.
>> >>>
>> >>> in the browser, the checkbox does not show the property value in the
>> >>> SimpleTestBean. I would like to know how i can be able to get that to
>> >>> work.
>> >>> I would like to be able to access the beans in other bundles. That is
>> my
>> >>> main problem
>> >>>
>> >>> thanks alot!
>> >>>
>> >>> Arnold
>> >>>
>> >>> Leonardo Uribe wrote:
>> >>> >
>> >>> > Hi
>> >>> >
>> >>> > Can you list what bundles are you using for? I would like to
>> reproduce
>> >>> it
>> >>> > and it is necessary to know which bundles are you usings to run
>> jetty
>> >>> and
>> >>> > servlet stuff, and all configuration hacks you are using for it.
>> >>> >
>> >>> > regards,
>> >>> >
>> >>> > Leonardo Uribe
>> >>> >
>> >>> > 2010/3/13 arnold4sho <tu...@hotmail.com>
>> >>> >
>> >>> >>
>> >>> >>
>> >>> >> Hi
>> >>> >>
>> >>> >> I have problems running JSF in an OSGi environment. I am using
>> jetty
>> >>> web
>> >>> >> container and equinox to provide the OSGi functionality. The
>> >>> structure
>> >>> of
>> >>> >> my
>> >>> >> application is as follows:
>> >>> >> The first bundle has all the JSF libs, web.xml and a config.xml.
>> It
>> >>> looks
>> >>> >> as
>> >>> >> the following:
>> >>> >>                           webapplication1
>> >>> >>                           ----src/main/java
>> >>> >>                           -------de/package
>> >>> >>                           ----------Activator.java
>> >>> >>                           ----------JSFResolver.java
>> >>> >>                           ----src/main/resource
>> >>> >>                           ------ WebContent
>> >>> >>                           ----------META-INF
>> >>> >>                           -------------face-config.xml
>> >>> >>                          --------------web.xhtml
>> >>> >>                           ----------start.xhtml
>> >>> >>                          -----------include.xhtml
>> >>> >>                          ----libs (containing all JSF required
>> Jars)
>> >>> >>
>> >>> >> The structure of the second bundle is as follows:
>> >>> >>                           webapplication2
>> >>> >>                           ---src/main/java
>> >>> >>                           ------de/package
>> >>> >>                           ----------Bean.java
>> >>> >>                           ---src/main/resource
>> >>> >>                           ------META-INF
>> >>> >>                           ---------face-config.xml
>> >>> >>                           ------WebContent
>> >>> >>                           ---------index.xhtml
>> >>> >>
>> >>> >> When running the application of equinox, the webapplication1 is
>> the
>> >>> main
>> >>> >> bundle where all the browser requests are sent to. In the second
>> >>> bundle,
>> >>> >> the
>> >>> >> 'index.xhtml' file can be retrieved the by first bundle upon
>> request.
>> >>> The
>> >>> >> 'index.xhtml' in bundle 2 gets its values and properties from the
>> >>> >> 'Bean.java' in bundle 2. The problem comes when i request the
>> >>> >> 'index.xhtml',
>> >>> >> the Bean.java class is not found. I think this is because the
>> class
>> >>> >> loader
>> >>> >> of bundle1 cannot find it, it has no knowledge of it. So i would
>> like
>> >>> to
>> >>> >> ask
>> >>> >> if anyone knows how to solve this problem. If so please do assist
>> me,
>> >>> i
>> >>> >> have
>> >>> >> tried all the possibilities i had.. I have provided my
>> >>> >> http://old.nabble.com/file/p27887386/workspace_current.rar
>> >>> >> workspace_current.rar bundles as attatchments.
>> >>> >>
>> >>> >> Is it infact possible  to have JSF run on multiple bundles using
>> the
>> >>> same
>> >>> >> FaceletsContex? Can i be able to have seperate faces-config.xml
>> files
>> >>> in
>> >>> >> each bundle, which can all be connected other faces-config.xml in
>> >>> other
>> >>> >> bundles? Can anyone please provide me a solution. Sample code
>> would
>> >>> help.
>> >>> >>
>> >>> >> thanks
>> >>> >> http://old.nabble.com/file/p27887386/workspace_current.rar
>> >>> >> workspace_current.rar
>> >>> >> Arnold
>> >>> >> --
>> >>> >> View this message in context:
>> >>> >>
>> >>>
>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
>> >>> >> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>> >>> >>
>> >>> >>
>> >>> >
>> >>> >
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887566.html
>> >>> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27891298.html
>> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27903003.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Classloader Problems running JSF in jetty equinox

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

On this link:

https://issues.apache.org/jira/browse/MYFACES-2290

There is an example that runs myfaces in osgi using spring dm. Look at the
comments, because it is required to download two artifacts not available on
spring osgi repository.

Really, I'm trying to find other example configuration that does not use
spring dm.

regards,

Leonardo Uribe

2010/3/13 arnold4sho <tu...@hotmail.com>

>
> I checked out your link, which bundles do you suggest i use for the MyFaces
> and Jsp?
>
> Arnold
>
> arnold4sho wrote:
> >
> > Hi
> >
> > Thanks for your reply, were you able to get my application to run?
> > I have been looking at many possibilies of making the application run but
> > up until now i have none which actually works. Do you have any
> > suggestions?
> >
> >
> >
> >
> > Leonardo Uribe wrote:
> >>
> >> Hi
> >>
> >> Checking this page:
> >>
> >>
> http://download.eclipse.org/equinox/drops/R-3.5.2-201002111343/index.php
> >>
> >> There is no javax.servlet.jsp bundle for 2.1. Myfaces 1.2.x or 2.0.x
> >> requires servlet 2.5 / jsp 2.1 to run. It could be possible, but I'm not
> >> 100% sure that it is possible to run but using facelets + servlet 2.4 +
> >> jsp
> >> 2.1, but I have never tried before.
> >>
> >> regards,
> >>
> >> Leonardo Uribe
> >>
> >> 2010/3/13 arnold4sho <tu...@hotmail.com>
> >>
> >>>
> >>> Hi
> >>>
> >>> Once again, the problem is that the bean class in the second bundle is
> >>> not
> >>> resolved. If you type in
> >>> http://localhost:8081/clintweb.xhtml. Clintweb.xhtml is in the second
> >>> bundle.
> >>>
> >>> in the browser, the checkbox does not show the property value in the
> >>> SimpleTestBean. I would like to know how i can be able to get that to
> >>> work.
> >>> I would like to be able to access the beans in other bundles. That is
> my
> >>> main problem
> >>>
> >>> thanks alot!
> >>>
> >>> Arnold
> >>>
> >>> Leonardo Uribe wrote:
> >>> >
> >>> > Hi
> >>> >
> >>> > Can you list what bundles are you using for? I would like to
> reproduce
> >>> it
> >>> > and it is necessary to know which bundles are you usings to run jetty
> >>> and
> >>> > servlet stuff, and all configuration hacks you are using for it.
> >>> >
> >>> > regards,
> >>> >
> >>> > Leonardo Uribe
> >>> >
> >>> > 2010/3/13 arnold4sho <tu...@hotmail.com>
> >>> >
> >>> >>
> >>> >>
> >>> >> Hi
> >>> >>
> >>> >> I have problems running JSF in an OSGi environment. I am using jetty
> >>> web
> >>> >> container and equinox to provide the OSGi functionality. The
> >>> structure
> >>> of
> >>> >> my
> >>> >> application is as follows:
> >>> >> The first bundle has all the JSF libs, web.xml and a config.xml. It
> >>> looks
> >>> >> as
> >>> >> the following:
> >>> >>                           webapplication1
> >>> >>                           ----src/main/java
> >>> >>                           -------de/package
> >>> >>                           ----------Activator.java
> >>> >>                           ----------JSFResolver.java
> >>> >>                           ----src/main/resource
> >>> >>                           ------ WebContent
> >>> >>                           ----------META-INF
> >>> >>                           -------------face-config.xml
> >>> >>                          --------------web.xhtml
> >>> >>                           ----------start.xhtml
> >>> >>                          -----------include.xhtml
> >>> >>                          ----libs (containing all JSF required Jars)
> >>> >>
> >>> >> The structure of the second bundle is as follows:
> >>> >>                           webapplication2
> >>> >>                           ---src/main/java
> >>> >>                           ------de/package
> >>> >>                           ----------Bean.java
> >>> >>                           ---src/main/resource
> >>> >>                           ------META-INF
> >>> >>                           ---------face-config.xml
> >>> >>                           ------WebContent
> >>> >>                           ---------index.xhtml
> >>> >>
> >>> >> When running the application of equinox, the webapplication1 is the
> >>> main
> >>> >> bundle where all the browser requests are sent to. In the second
> >>> bundle,
> >>> >> the
> >>> >> 'index.xhtml' file can be retrieved the by first bundle upon
> request.
> >>> The
> >>> >> 'index.xhtml' in bundle 2 gets its values and properties from the
> >>> >> 'Bean.java' in bundle 2. The problem comes when i request the
> >>> >> 'index.xhtml',
> >>> >> the Bean.java class is not found. I think this is because the class
> >>> >> loader
> >>> >> of bundle1 cannot find it, it has no knowledge of it. So i would
> like
> >>> to
> >>> >> ask
> >>> >> if anyone knows how to solve this problem. If so please do assist
> me,
> >>> i
> >>> >> have
> >>> >> tried all the possibilities i had.. I have provided my
> >>> >> http://old.nabble.com/file/p27887386/workspace_current.rar
> >>> >> workspace_current.rar bundles as attatchments.
> >>> >>
> >>> >> Is it infact possible  to have JSF run on multiple bundles using the
> >>> same
> >>> >> FaceletsContex? Can i be able to have seperate faces-config.xml
> files
> >>> in
> >>> >> each bundle, which can all be connected other faces-config.xml in
> >>> other
> >>> >> bundles? Can anyone please provide me a solution. Sample code would
> >>> help.
> >>> >>
> >>> >> thanks
> >>> >> http://old.nabble.com/file/p27887386/workspace_current.rar
> >>> >> workspace_current.rar
> >>> >> Arnold
> >>> >> --
> >>> >> View this message in context:
> >>> >>
> >>>
> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
> >>> >> Sent from the My Faces - Dev mailing list archive at Nabble.com.
> >>> >>
> >>> >>
> >>> >
> >>> >
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887566.html
> >>> Sent from the My Faces - Dev mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27891298.html
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>

Re: Classloader Problems running JSF in jetty equinox

Posted by arnold4sho <tu...@hotmail.com>.
I checked out your link, which bundles do you suggest i use for the MyFaces
and Jsp?

Arnold

arnold4sho wrote:
> 
> Hi
> 
> Thanks for your reply, were you able to get my application to run?
> I have been looking at many possibilies of making the application run but
> up until now i have none which actually works. Do you have any
> suggestions?
> 
> 
> 
> 
> Leonardo Uribe wrote:
>> 
>> Hi
>> 
>> Checking this page:
>> 
>> http://download.eclipse.org/equinox/drops/R-3.5.2-201002111343/index.php
>> 
>> There is no javax.servlet.jsp bundle for 2.1. Myfaces 1.2.x or 2.0.x
>> requires servlet 2.5 / jsp 2.1 to run. It could be possible, but I'm not
>> 100% sure that it is possible to run but using facelets + servlet 2.4 +
>> jsp
>> 2.1, but I have never tried before.
>> 
>> regards,
>> 
>> Leonardo Uribe
>> 
>> 2010/3/13 arnold4sho <tu...@hotmail.com>
>> 
>>>
>>> Hi
>>>
>>> Once again, the problem is that the bean class in the second bundle is
>>> not
>>> resolved. If you type in
>>> http://localhost:8081/clintweb.xhtml. Clintweb.xhtml is in the second
>>> bundle.
>>>
>>> in the browser, the checkbox does not show the property value in the
>>> SimpleTestBean. I would like to know how i can be able to get that to
>>> work.
>>> I would like to be able to access the beans in other bundles. That is my
>>> main problem
>>>
>>> thanks alot!
>>>
>>> Arnold
>>>
>>> Leonardo Uribe wrote:
>>> >
>>> > Hi
>>> >
>>> > Can you list what bundles are you using for? I would like to reproduce
>>> it
>>> > and it is necessary to know which bundles are you usings to run jetty
>>> and
>>> > servlet stuff, and all configuration hacks you are using for it.
>>> >
>>> > regards,
>>> >
>>> > Leonardo Uribe
>>> >
>>> > 2010/3/13 arnold4sho <tu...@hotmail.com>
>>> >
>>> >>
>>> >>
>>> >> Hi
>>> >>
>>> >> I have problems running JSF in an OSGi environment. I am using jetty
>>> web
>>> >> container and equinox to provide the OSGi functionality. The
>>> structure
>>> of
>>> >> my
>>> >> application is as follows:
>>> >> The first bundle has all the JSF libs, web.xml and a config.xml. It
>>> looks
>>> >> as
>>> >> the following:
>>> >>                           webapplication1
>>> >>                           ----src/main/java
>>> >>                           -------de/package
>>> >>                           ----------Activator.java
>>> >>                           ----------JSFResolver.java
>>> >>                           ----src/main/resource
>>> >>                           ------ WebContent
>>> >>                           ----------META-INF
>>> >>                           -------------face-config.xml
>>> >>                          --------------web.xhtml
>>> >>                           ----------start.xhtml
>>> >>                          -----------include.xhtml
>>> >>                          ----libs (containing all JSF required Jars)
>>> >>
>>> >> The structure of the second bundle is as follows:
>>> >>                           webapplication2
>>> >>                           ---src/main/java
>>> >>                           ------de/package
>>> >>                           ----------Bean.java
>>> >>                           ---src/main/resource
>>> >>                           ------META-INF
>>> >>                           ---------face-config.xml
>>> >>                           ------WebContent
>>> >>                           ---------index.xhtml
>>> >>
>>> >> When running the application of equinox, the webapplication1 is the
>>> main
>>> >> bundle where all the browser requests are sent to. In the second
>>> bundle,
>>> >> the
>>> >> 'index.xhtml' file can be retrieved the by first bundle upon request.
>>> The
>>> >> 'index.xhtml' in bundle 2 gets its values and properties from the
>>> >> 'Bean.java' in bundle 2. The problem comes when i request the
>>> >> 'index.xhtml',
>>> >> the Bean.java class is not found. I think this is because the class
>>> >> loader
>>> >> of bundle1 cannot find it, it has no knowledge of it. So i would like
>>> to
>>> >> ask
>>> >> if anyone knows how to solve this problem. If so please do assist me,
>>> i
>>> >> have
>>> >> tried all the possibilities i had.. I have provided my
>>> >> http://old.nabble.com/file/p27887386/workspace_current.rar
>>> >> workspace_current.rar bundles as attatchments.
>>> >>
>>> >> Is it infact possible  to have JSF run on multiple bundles using the
>>> same
>>> >> FaceletsContex? Can i be able to have seperate faces-config.xml files
>>> in
>>> >> each bundle, which can all be connected other faces-config.xml in
>>> other
>>> >> bundles? Can anyone please provide me a solution. Sample code would
>>> help.
>>> >>
>>> >> thanks
>>> >> http://old.nabble.com/file/p27887386/workspace_current.rar
>>> >> workspace_current.rar
>>> >> Arnold
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
>>> >> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887566.html
>>> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27891298.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Classloader Problems running JSF in jetty equinox

Posted by arnold4sho <tu...@hotmail.com>.
Hi

Thanks for your reply, were you able to get my application to run?
I have been looking at many possibilies of making the application run but up
until now i have none which actually works. Do you have any suggestions?




Leonardo Uribe wrote:
> 
> Hi
> 
> Checking this page:
> 
> http://download.eclipse.org/equinox/drops/R-3.5.2-201002111343/index.php
> 
> There is no javax.servlet.jsp bundle for 2.1. Myfaces 1.2.x or 2.0.x
> requires servlet 2.5 / jsp 2.1 to run. It could be possible, but I'm not
> 100% sure that it is possible to run but using facelets + servlet 2.4 +
> jsp
> 2.1, but I have never tried before.
> 
> regards,
> 
> Leonardo Uribe
> 
> 2010/3/13 arnold4sho <tu...@hotmail.com>
> 
>>
>> Hi
>>
>> Once again, the problem is that the bean class in the second bundle is
>> not
>> resolved. If you type in
>> http://localhost:8081/clintweb.xhtml. Clintweb.xhtml is in the second
>> bundle.
>>
>> in the browser, the checkbox does not show the property value in the
>> SimpleTestBean. I would like to know how i can be able to get that to
>> work.
>> I would like to be able to access the beans in other bundles. That is my
>> main problem
>>
>> thanks alot!
>>
>> Arnold
>>
>> Leonardo Uribe wrote:
>> >
>> > Hi
>> >
>> > Can you list what bundles are you using for? I would like to reproduce
>> it
>> > and it is necessary to know which bundles are you usings to run jetty
>> and
>> > servlet stuff, and all configuration hacks you are using for it.
>> >
>> > regards,
>> >
>> > Leonardo Uribe
>> >
>> > 2010/3/13 arnold4sho <tu...@hotmail.com>
>> >
>> >>
>> >>
>> >> Hi
>> >>
>> >> I have problems running JSF in an OSGi environment. I am using jetty
>> web
>> >> container and equinox to provide the OSGi functionality. The structure
>> of
>> >> my
>> >> application is as follows:
>> >> The first bundle has all the JSF libs, web.xml and a config.xml. It
>> looks
>> >> as
>> >> the following:
>> >>                           webapplication1
>> >>                           ----src/main/java
>> >>                           -------de/package
>> >>                           ----------Activator.java
>> >>                           ----------JSFResolver.java
>> >>                           ----src/main/resource
>> >>                           ------ WebContent
>> >>                           ----------META-INF
>> >>                           -------------face-config.xml
>> >>                          --------------web.xhtml
>> >>                           ----------start.xhtml
>> >>                          -----------include.xhtml
>> >>                          ----libs (containing all JSF required Jars)
>> >>
>> >> The structure of the second bundle is as follows:
>> >>                           webapplication2
>> >>                           ---src/main/java
>> >>                           ------de/package
>> >>                           ----------Bean.java
>> >>                           ---src/main/resource
>> >>                           ------META-INF
>> >>                           ---------face-config.xml
>> >>                           ------WebContent
>> >>                           ---------index.xhtml
>> >>
>> >> When running the application of equinox, the webapplication1 is the
>> main
>> >> bundle where all the browser requests are sent to. In the second
>> bundle,
>> >> the
>> >> 'index.xhtml' file can be retrieved the by first bundle upon request.
>> The
>> >> 'index.xhtml' in bundle 2 gets its values and properties from the
>> >> 'Bean.java' in bundle 2. The problem comes when i request the
>> >> 'index.xhtml',
>> >> the Bean.java class is not found. I think this is because the class
>> >> loader
>> >> of bundle1 cannot find it, it has no knowledge of it. So i would like
>> to
>> >> ask
>> >> if anyone knows how to solve this problem. If so please do assist me,
>> i
>> >> have
>> >> tried all the possibilities i had.. I have provided my
>> >> http://old.nabble.com/file/p27887386/workspace_current.rar
>> >> workspace_current.rar bundles as attatchments.
>> >>
>> >> Is it infact possible  to have JSF run on multiple bundles using the
>> same
>> >> FaceletsContex? Can i be able to have seperate faces-config.xml files
>> in
>> >> each bundle, which can all be connected other faces-config.xml in
>> other
>> >> bundles? Can anyone please provide me a solution. Sample code would
>> help.
>> >>
>> >> thanks
>> >> http://old.nabble.com/file/p27887386/workspace_current.rar
>> >> workspace_current.rar
>> >> Arnold
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
>> >> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887566.html
>> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27891279.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Classloader Problems running JSF in jetty equinox

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

Checking this page:

http://download.eclipse.org/equinox/drops/R-3.5.2-201002111343/index.php

There is no javax.servlet.jsp bundle for 2.1. Myfaces 1.2.x or 2.0.x
requires servlet 2.5 / jsp 2.1 to run. It could be possible, but I'm not
100% sure that it is possible to run but using facelets + servlet 2.4 + jsp
2.1, but I have never tried before.

regards,

Leonardo Uribe

2010/3/13 arnold4sho <tu...@hotmail.com>

>
> Hi
>
> Once again, the problem is that the bean class in the second bundle is not
> resolved. If you type in
> http://localhost:8081/clintweb.xhtml. Clintweb.xhtml is in the second
> bundle.
>
> in the browser, the checkbox does not show the property value in the
> SimpleTestBean. I would like to know how i can be able to get that to work.
> I would like to be able to access the beans in other bundles. That is my
> main problem
>
> thanks alot!
>
> Arnold
>
> Leonardo Uribe wrote:
> >
> > Hi
> >
> > Can you list what bundles are you using for? I would like to reproduce it
> > and it is necessary to know which bundles are you usings to run jetty and
> > servlet stuff, and all configuration hacks you are using for it.
> >
> > regards,
> >
> > Leonardo Uribe
> >
> > 2010/3/13 arnold4sho <tu...@hotmail.com>
> >
> >>
> >>
> >> Hi
> >>
> >> I have problems running JSF in an OSGi environment. I am using jetty web
> >> container and equinox to provide the OSGi functionality. The structure
> of
> >> my
> >> application is as follows:
> >> The first bundle has all the JSF libs, web.xml and a config.xml. It
> looks
> >> as
> >> the following:
> >>                           webapplication1
> >>                           ----src/main/java
> >>                           -------de/package
> >>                           ----------Activator.java
> >>                           ----------JSFResolver.java
> >>                           ----src/main/resource
> >>                           ------ WebContent
> >>                           ----------META-INF
> >>                           -------------face-config.xml
> >>                          --------------web.xhtml
> >>                           ----------start.xhtml
> >>                          -----------include.xhtml
> >>                          ----libs (containing all JSF required Jars)
> >>
> >> The structure of the second bundle is as follows:
> >>                           webapplication2
> >>                           ---src/main/java
> >>                           ------de/package
> >>                           ----------Bean.java
> >>                           ---src/main/resource
> >>                           ------META-INF
> >>                           ---------face-config.xml
> >>                           ------WebContent
> >>                           ---------index.xhtml
> >>
> >> When running the application of equinox, the webapplication1 is the main
> >> bundle where all the browser requests are sent to. In the second bundle,
> >> the
> >> 'index.xhtml' file can be retrieved the by first bundle upon request.
> The
> >> 'index.xhtml' in bundle 2 gets its values and properties from the
> >> 'Bean.java' in bundle 2. The problem comes when i request the
> >> 'index.xhtml',
> >> the Bean.java class is not found. I think this is because the class
> >> loader
> >> of bundle1 cannot find it, it has no knowledge of it. So i would like to
> >> ask
> >> if anyone knows how to solve this problem. If so please do assist me, i
> >> have
> >> tried all the possibilities i had.. I have provided my
> >> http://old.nabble.com/file/p27887386/workspace_current.rar
> >> workspace_current.rar bundles as attatchments.
> >>
> >> Is it infact possible  to have JSF run on multiple bundles using the
> same
> >> FaceletsContex? Can i be able to have seperate faces-config.xml files in
> >> each bundle, which can all be connected other faces-config.xml in other
> >> bundles? Can anyone please provide me a solution. Sample code would
> help.
> >>
> >> thanks
> >> http://old.nabble.com/file/p27887386/workspace_current.rar
> >> workspace_current.rar
> >> Arnold
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
> >> Sent from the My Faces - Dev mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887566.html
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>

Re: Classloader Problems running JSF in jetty equinox

Posted by arnold4sho <tu...@hotmail.com>.
Hi

Once again, the problem is that the bean class in the second bundle is not
resolved. If you type in 
http://localhost:8081/clintweb.xhtml. Clintweb.xhtml is in the second
bundle. 

in the browser, the checkbox does not show the property value in the
SimpleTestBean. I would like to know how i can be able to get that to work.
I would like to be able to access the beans in other bundles. That is my
main problem

thanks alot!

Arnold

Leonardo Uribe wrote:
> 
> Hi
> 
> Can you list what bundles are you using for? I would like to reproduce it
> and it is necessary to know which bundles are you usings to run jetty and
> servlet stuff, and all configuration hacks you are using for it.
> 
> regards,
> 
> Leonardo Uribe
> 
> 2010/3/13 arnold4sho <tu...@hotmail.com>
> 
>>
>>
>> Hi
>>
>> I have problems running JSF in an OSGi environment. I am using jetty web
>> container and equinox to provide the OSGi functionality. The structure of
>> my
>> application is as follows:
>> The first bundle has all the JSF libs, web.xml and a config.xml. It looks
>> as
>> the following:
>>                           webapplication1
>>                           ----src/main/java
>>                           -------de/package
>>                           ----------Activator.java
>>                           ----------JSFResolver.java
>>                           ----src/main/resource
>>                           ------ WebContent
>>                           ----------META-INF
>>                           -------------face-config.xml
>>                          --------------web.xhtml
>>                           ----------start.xhtml
>>                          -----------include.xhtml
>>                          ----libs (containing all JSF required Jars)
>>
>> The structure of the second bundle is as follows:
>>                           webapplication2
>>                           ---src/main/java
>>                           ------de/package
>>                           ----------Bean.java
>>                           ---src/main/resource
>>                           ------META-INF
>>                           ---------face-config.xml
>>                           ------WebContent
>>                           ---------index.xhtml
>>
>> When running the application of equinox, the webapplication1 is the main
>> bundle where all the browser requests are sent to. In the second bundle,
>> the
>> 'index.xhtml' file can be retrieved the by first bundle upon request. The
>> 'index.xhtml' in bundle 2 gets its values and properties from the
>> 'Bean.java' in bundle 2. The problem comes when i request the
>> 'index.xhtml',
>> the Bean.java class is not found. I think this is because the class
>> loader
>> of bundle1 cannot find it, it has no knowledge of it. So i would like to
>> ask
>> if anyone knows how to solve this problem. If so please do assist me, i
>> have
>> tried all the possibilities i had.. I have provided my
>> http://old.nabble.com/file/p27887386/workspace_current.rar
>> workspace_current.rar bundles as attatchments.
>>
>> Is it infact possible  to have JSF run on multiple bundles using the same
>> FaceletsContex? Can i be able to have seperate faces-config.xml files in
>> each bundle, which can all be connected other faces-config.xml in other
>> bundles? Can anyone please provide me a solution. Sample code would help.
>>
>> thanks
>> http://old.nabble.com/file/p27887386/workspace_current.rar
>> workspace_current.rar
>> Arnold
>> --
>> View this message in context:
>> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
>> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887566.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: Classloader Problems running JSF in jetty equinox

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

Can you list what bundles are you using for? I would like to reproduce it
and it is necessary to know which bundles are you usings to run jetty and
servlet stuff, and all configuration hacks you are using for it.

regards,

Leonardo Uribe

2010/3/13 arnold4sho <tu...@hotmail.com>

>
>
> Hi
>
> I have problems running JSF in an OSGi environment. I am using jetty web
> container and equinox to provide the OSGi functionality. The structure of
> my
> application is as follows:
> The first bundle has all the JSF libs, web.xml and a config.xml. It looks
> as
> the following:
>                           webapplication1
>                           ----src/main/java
>                           -------de/package
>                           ----------Activator.java
>                           ----------JSFResolver.java
>                           ----src/main/resource
>                           ------ WebContent
>                           ----------META-INF
>                           -------------face-config.xml
>                          --------------web.xhtml
>                           ----------start.xhtml
>                          -----------include.xhtml
>                          ----libs (containing all JSF required Jars)
>
> The structure of the second bundle is as follows:
>                           webapplication2
>                           ---src/main/java
>                           ------de/package
>                           ----------Bean.java
>                           ---src/main/resource
>                           ------META-INF
>                           ---------face-config.xml
>                           ------WebContent
>                           ---------index.xhtml
>
> When running the application of equinox, the webapplication1 is the main
> bundle where all the browser requests are sent to. In the second bundle,
> the
> 'index.xhtml' file can be retrieved the by first bundle upon request. The
> 'index.xhtml' in bundle 2 gets its values and properties from the
> 'Bean.java' in bundle 2. The problem comes when i request the
> 'index.xhtml',
> the Bean.java class is not found. I think this is because the class loader
> of bundle1 cannot find it, it has no knowledge of it. So i would like to
> ask
> if anyone knows how to solve this problem. If so please do assist me, i
> have
> tried all the possibilities i had.. I have provided my
> http://old.nabble.com/file/p27887386/workspace_current.rar
> workspace_current.rar bundles as attatchments.
>
> Is it infact possible  to have JSF run on multiple bundles using the same
> FaceletsContex? Can i be able to have seperate faces-config.xml files in
> each bundle, which can all be connected other faces-config.xml in other
> bundles? Can anyone please provide me a solution. Sample code would help.
>
> thanks
> http://old.nabble.com/file/p27887386/workspace_current.rar
> workspace_current.rar
> Arnold
> --
> View this message in context:
> http://old.nabble.com/Classloader-Problems-running-JSF-in-jetty-equinox-tp27887386p27887386.html
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>