You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Harry Metske <ha...@gmail.com> on 2008/08/09 19:20:57 UTC

reference to MockServletContext in WebContainerAuthorizer in trunk

Hi,

while deploying 2.7.0-alpha-8 on a Glassfish server with the verifier
enabled during the deployment, I get the following failure :

................
     --------------
     FAILED TESTS :
     --------------

     Test Name : tests.web.WebArchiveClassesLoadable
     Test Assertion : All classes in this Web Archive are loadable excluding
classes used in JSPs. The test AllJSPsMustBeCompilable takes care of
reporting non portable errors in JSP classes.   Please refer to J2EE 1.4
Specification Section #8.1.2   for further information.
     Test Description : For [
/home/metskem/glassfish/domains/domain1/applications/j2ee-modules/JSPWiki ]

Failed to find following classes:
[
    net.sourceforge.stripes.mock.MockServletContext
]

referenced in the following call stack :

    at com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer
    at com.ecyrd.jspwiki.auth.AuthenticationManager
    at com.ecyrd.jspwiki.WikiSession
    at com.ecyrd.jspwiki.auth.AuthorizationManager
    at com.ecyrd.jspwiki.WikiEngine
    at com.ecyrd.jspwiki.dav.WikiDavProvider
    at com.ecyrd.jspwiki.dav.WikiRootProvider
    at com.ecyrd.jspwiki.dav.WikiDavServlet


Please either bundle the above mentioned classes in the application or use
optional packaging support for them.


          ----------------------------------
          END OF STATIC VERIFICATION RESULTS
          ----------------------------------

The following statement is causing this error :

           if ( url == null && m_engine.getServletContext() instanceof
MockServletContext )

The MockServletContext class is available in the stripes-1.5-RC1.jar.
While this jar is in the workspace, it is not copied to the lib directory
during build.
Should this reference be removed or should the stripes jar be included ?

regards,
Harry

-- 
met vriendelijke groet,
Harry Metske
Telnr. +31-548-512395
Mobile +31-6-51898081

Re: reference to MockServletContext in WebContainerAuthorizer in trunk

Posted by Andrew Jaquith <an...@me.com>.
Yes, this should be gone. I removed it in my latest checkins.

Andrew

On Aug 10, 2008, at 5:52 AM, Janne Jalkanen wrote:

>
> It is referring to this line:
>
>            // Hack in case we're using Stripes mock servlet context
>            // See bug [STS-376] at http://stripesframework.org/jira/browse/STS-376 
> . Will be fixed in Stripes 1.5.
>            if ( url == null && m_engine.getServletContext()  
> instanceof MockServletContext )
>            {
>                url = m_engine.getServletContext().getResource( "WEB- 
> INF/web.xml" );
>            }
>
> Andrew, since we're using 1.5, isn't it safe to remove the hack?
>
> /Janne
>
> On Aug 9, 2008, at 20:20 , Harry Metske wrote:
>
>> Hi,
>>
>> while deploying 2.7.0-alpha-8 on a Glassfish server with the verifier
>> enabled during the deployment, I get the following failure :
>>
>> ................
>>     --------------
>>     FAILED TESTS :
>>     --------------
>>
>>     Test Name : tests.web.WebArchiveClassesLoadable
>>     Test Assertion : All classes in this Web Archive are loadable  
>> excluding
>> classes used in JSPs. The test AllJSPsMustBeCompilable takes care of
>> reporting non portable errors in JSP classes.   Please refer to  
>> J2EE 1.4
>> Specification Section #8.1.2   for further information.
>>     Test Description : For [
>> /home/metskem/glassfish/domains/domain1/applications/j2ee-modules/ 
>> JSPWiki ]
>>
>> Failed to find following classes:
>> [
>>    net.sourceforge.stripes.mock.MockServletContext
>> ]
>>
>> referenced in the following call stack :
>>
>>    at com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer
>>    at com.ecyrd.jspwiki.auth.AuthenticationManager
>>    at com.ecyrd.jspwiki.WikiSession
>>    at com.ecyrd.jspwiki.auth.AuthorizationManager
>>    at com.ecyrd.jspwiki.WikiEngine
>>    at com.ecyrd.jspwiki.dav.WikiDavProvider
>>    at com.ecyrd.jspwiki.dav.WikiRootProvider
>>    at com.ecyrd.jspwiki.dav.WikiDavServlet
>>
>>
>> Please either bundle the above mentioned classes in the application  
>> or use
>> optional packaging support for them.
>>
>>
>>          ----------------------------------
>>          END OF STATIC VERIFICATION RESULTS
>>          ----------------------------------
>>
>> The following statement is causing this error :
>>
>>           if ( url == null && m_engine.getServletContext() instanceof
>> MockServletContext )
>>
>> The MockServletContext class is available in the stripes-1.5-RC1.jar.
>> While this jar is in the workspace, it is not copied to the lib  
>> directory
>> during build.
>> Should this reference be removed or should the stripes jar be  
>> included ?
>>
>> regards,
>> Harry
>>
>> -- 
>> met vriendelijke groet,
>> Harry Metske
>> Telnr. +31-548-512395
>> Mobile +31-6-51898081
>


Re: reference to MockServletContext in WebContainerAuthorizer in trunk

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
It is referring to this line:

             // Hack in case we're using Stripes mock servlet context
             // See bug [STS-376] at http://stripesframework.org/jira/ 
browse/STS-376. Will be fixed in Stripes 1.5.
             if ( url == null && m_engine.getServletContext()  
instanceof MockServletContext )
             {
                 url = m_engine.getServletContext().getResource( "WEB- 
INF/web.xml" );
             }

Andrew, since we're using 1.5, isn't it safe to remove the hack?

/Janne

On Aug 9, 2008, at 20:20 , Harry Metske wrote:

> Hi,
>
> while deploying 2.7.0-alpha-8 on a Glassfish server with the verifier
> enabled during the deployment, I get the following failure :
>
> ................
>      --------------
>      FAILED TESTS :
>      --------------
>
>      Test Name : tests.web.WebArchiveClassesLoadable
>      Test Assertion : All classes in this Web Archive are loadable  
> excluding
> classes used in JSPs. The test AllJSPsMustBeCompilable takes care of
> reporting non portable errors in JSP classes.   Please refer to  
> J2EE 1.4
> Specification Section #8.1.2   for further information.
>      Test Description : For [
> /home/metskem/glassfish/domains/domain1/applications/j2ee-modules/ 
> JSPWiki ]
>
> Failed to find following classes:
> [
>     net.sourceforge.stripes.mock.MockServletContext
> ]
>
> referenced in the following call stack :
>
>     at com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer
>     at com.ecyrd.jspwiki.auth.AuthenticationManager
>     at com.ecyrd.jspwiki.WikiSession
>     at com.ecyrd.jspwiki.auth.AuthorizationManager
>     at com.ecyrd.jspwiki.WikiEngine
>     at com.ecyrd.jspwiki.dav.WikiDavProvider
>     at com.ecyrd.jspwiki.dav.WikiRootProvider
>     at com.ecyrd.jspwiki.dav.WikiDavServlet
>
>
> Please either bundle the above mentioned classes in the application  
> or use
> optional packaging support for them.
>
>
>           ----------------------------------
>           END OF STATIC VERIFICATION RESULTS
>           ----------------------------------
>
> The following statement is causing this error :
>
>            if ( url == null && m_engine.getServletContext() instanceof
> MockServletContext )
>
> The MockServletContext class is available in the stripes-1.5-RC1.jar.
> While this jar is in the workspace, it is not copied to the lib  
> directory
> during build.
> Should this reference be removed or should the stripes jar be  
> included ?
>
> regards,
> Harry
>
> -- 
> met vriendelijke groet,
> Harry Metske
> Telnr. +31-548-512395
> Mobile +31-6-51898081