[ 
http://issues.ops4j.org/browse/PAXWEB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14166#action_14166
 ] 

Achim Nierbeck commented on PAXWEB-264:
---------------------------------------

@Caspar, 

no need to create a new issue for your second problem it's fixed by now with 
PAXWEB-266

> jetty fragment bundle fails due to lack of package import
> ---------------------------------------------------------
>
>                 Key: PAXWEB-264
>                 URL: http://issues.ops4j.org/browse/PAXWEB-264
>             Project: Pax Web
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>         Environment: Karaf 2.2.0 (using Felix 3.0.8), Hotspot 64bit 1.6.0_24 
> on Ubuntu
>            Reporter: Caspar MacRae
>
> In the logs:
> {{6:25:12,470 | ERROR | FelixStartLevel  | JettyServerImpl                  | 
> e.jetty.internal.JettyServerImpl   98 | 54 - org.ops4j.pax.web.pax-web-jetty 
> - 1.0.1 | java.lang.IllegalArgumentException: Object is not of type class 
> org.eclipse.jetty.server.handler.MovedContextHandler}}
> bundle 54 is mvn:org.ops4j.pax.web/pax-web-jetty/1.0.1 to which my fragment 
> correctly attaches
> bundle 47 is packages:imports | grep org.eclipse.jetty.server.handler
> Running {{packages:imports | grep org.eclipse.jetty.server.handler}} shows 
> that only bundle 47 imports the package for the ContextHandler I'm trying to 
> use
> {code:title=jetty.xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" 
> "http://jetty.mortbay.org/configure.dtd";>
> <Configure class="org.eclipse.jetty.server.handler.MovedContextHandler">
>       <Set name="ContextPath">/old-context-root</Set>
>       <Set name="NewContextURL">/new-context-root</Set>
>       <Set name="Permanent">true</Set>
>       <Set name="DiscardPathInfo">false</Set>
>       <Set name="DiscardQuery">false</Set>
> </Configure>
> {code}
> The jetty.xml is located in the root of the bundle jar
> {code:title=snippet_of_pom.xml}
> ...
>                       <plugin>
>                               <groupId>org.apache.felix</groupId>
>                               <artifactId>maven-bundle-plugin</artifactId>
>                               
> <version>${version.plugin.felix.bundle}</version>
>                               <configuration>
>                                       <instructions>
>                                               
> <Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
>                                               
> <Bundle-ContactAddress>${project.organization.url}</Bundle-ContactAddress>
>                                               
> <Bundle-Description>${project.description}</Bundle-Description>
>                                               
> <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
>                                               
> <Bundle-Version>${project.version}</Bundle-Version>
>                                               
> <Fragment-Host>org.ops4j.pax.web.pax-web-jetty</Fragment-Host>
>                                               
> <Import-Package>org.eclipse.jetty.server.handler</Import-Package>
>                                       </instructions>
>                               </configuration>
>                       </plugin>
> ...
> {code}
> I tried using  {{dev:dynamic-import 54}} but this doesn't seem to help, so 
> may be I'm wrong in thinking that org.ops4j.pax.web/pax-web-jetty/1.0.1 
> should import org.eclipse.jetty.server.handler.
> Another thing, when the above log message is seen none of the contexts are 
> available, but requests don't 404 they just spin endlessly until timeout.
> The attachment of the fragment causes a refresh of the attached-to bundle 
> AFAIK - I suspect that this is causing the port from etc/jetty.xml to be 
> picked up instead of that defined by org.osgi.service.http.port - if I set 
> them to be the same the the contexts are accessible and the logged error 
> doesn't appear but the MovedContextHandler has no effect.
> I think this issue relates to PAXWEB-186 and apologize if this issue should 
> really be created on the Karaf Jira.
> thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to