Hi Martin,

On [Fri, 01.10.2010 10:05], Martin Grigorov wrote:
> Hi Elke,
> 
> On Fri, Oct 1, 2010 at 8:34 AM, Eike Kettner <n...@eknet.org> wrote:
> 
> > Hello!
> >
> > I developed a wicket app using OSGi (felix) where different bundles may
> > contribute content to the wicket bundle. It works really nice using
> > wicket 1.4.9+. Now I want to upgrade to wicket 1.5 and I run in problems
> > starting the osgi container.
> >
> > It complains with the good-known classnotfound-exception for classes
> > like IClusterable and AuthenticatedWebapplication which all are classes
> > in packages exported by more than one bundle (for example
> > org.apache.wicket or org.apache.wicket.authentication). Earlier I found
> > this was a problem or at least a "not-good" for OSGi bundles. But as am
> > using OSGi 4.2 this may work with some special treatment (I'v never
> > tried this though). Do you think I'm doing something wrong or is this
> > something on the road for 1.5?
> >
> I don't have much experience with OSGi so can you give more details what
> exactly is the problem  ?
> I think there is no difference in these two classes between 1.4.x and 1.5.x.
> They are packed the same way.
> There is no difference in the bnd-maven-plugin configuration as well.
> If you can find where the problem comes from then we can improve it.
> 

thank you for the quick reply. As you said, there shouldn't be any
difference from 1.4 to 1.5 as the packaging remained the same. That
sounds like a problem on my side. I will look into this more this
evening. But to tell you the steps I took: I replaced the wicket-version
in the poms, removed the resulting compile errors by rudely deleting
everything... until I ended up with one application class (extending
AuthenticatedWebApplication). And I maked sure the packages are properly
stated in the "Import-Package" header. I put the wicket-request and
wicket-util bundles in the container and tried to startup.

Now, one thing I forgot to mention: I use spring (spring-dm) and have my
web application created by the spring osgi extender. This means, my
MyWebApplication class is declared as a spring bean and the spring
extender cannot instantiate the class because it cannot find
"org.apache.wicket.authentication.AuthenticatedWebapplication". This is
most detail I can give for now, I will give more later.


> >
> > Also, since I have implemented ..UrlCodingStrategy and a custom
> > RequestTarget I'm studying the new request handling in 1.5 sources to
> > find out where to "plugin" my stuff. Are there any documentation besides
> > source and javadoc for the new concepts? The code is good to read but if
> > there are some pictures and text available it would be of great help.
> >
> Unfortunately there is other documentation yet.
> The idea is:
> with application.getRootRequestMapperAsCompound().add(myMapper) you can add
> a IRequestMapper to the list of mappers.
> When a request comes Wicket asks all registered mappers whether they are
> able to process the request. Mappers with bigger
> org.apache.wicket.request.IRequestMapper.getCompatibilityScore(Request) are
> asked first. So Wicket calls
> org.apache.wicket.request.IRequestMapper.mapRequest(Request) for each mapper
> and if it returns non-null IRequestHandler then this is the handler which
> will be used. In #mapRequest(Request) use have to check request's segments
> (this is similar to httpServletRequest#getPath()) and request's parameters
> (get and post) and decide whether they match to your logic.
> After the handling of the request
> (org.apache.wicket.request.IRequestHandler.respond(IRequestCycle)) Wicket
> will ask the mapper to create a Url which will be used for all urlFor()
> calls, i.e. to create the urls for all links, form action, etc. via
> org.apache.wicket.request.IRequestMapper.mapHandler(IRequestHandler)
> 
> There are IRequestMapper implementations for all url coding strategies from
> 1.4.x so you can use them as examples.
> Let us know if you need more help.

Thank you! This already helps me alot. Once I get the main idea, the
code is alot easier to read! I will gladly ask questions here when they
come.


Eike

> >
> > Thanks in advance!
> > Eike
> >
> > martin-g
> 
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to