cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kim Jelmoni <...@otego.com>
Subject Re: <cocoon user-roles="failure">
Date Wed, 06 Nov 2002 07:52:46 GMT

Hi,

try

<cocoon version="2.0" user-roles="/WEB-INF/jtk-component.roles">

at my site work with /

Kim

Phil Shafer wrote:

> I'm trying to use the user-roles attribute on the  element
> of cocoon.xconf, but not having any luck.
>
> I've followed the FAQ (faq-configure-c2.html) and have:
>
>
>
> but I get:
>
>   Exception reloading
>   org.apache.avalon.framework.configuration.ConfigurationException:
>      Error trying to load user-roles configuration
>           at org.apache.cocoon.Cocoon.configure(Cocoon.java:400)
>    (The full exception is appended)
>
> jdb'ing it, I see a mangled 'url' getting built:
>
>   Step completed: thread="main", org.apache.cocoon.Cocoon.configure(), 
> line=392, bci=490
>     392    if (url == null) {
>   main[1] l
>   388      SAXConfigurationHandler b = new SAXConfigurationHandler();
>   389      org.apache.cocoon.environment.Context context =
>   390          (org.apache.cocoon.environment.Context) 
> this.context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
>   391      URL url = context.getResource(userRoles);
>   392 =>   if (url == null) {
>   393          throw new ConfigurationException("User-roles 
> configuration '"+userRoles+"' cannot be found.");
>   394      }
>   395      InputSource is = new InputSource(new 
> BufferedInputStream(url.openStream()));
>   396      is.setSystemId(this.configurationFile.getSystemId());
>   397      p.parse(is, b);
>   main[1] p userRoles
>    userRoles = "WEB-INF/jtk-component.roles"
>   main[1] x url
>    url = instance of java.net.URL(id=1076) {
>       serialVersionUID: -7627629688361524110
>       protocolPathProp: "java.protocol.handler.pkgs"
>       protocol: "jndi"
>       host: null
>       port: 0
>       file: "/localhost/jtkWEB-INF/jtk-component.roles"
>       query: null
>       authority: null
>       path: "/localhost/jtkWEB-INF/jtk-component.roles"
>       userInfo: null
>       ref: null
>       hostAddress: null
>       handler: instance of 
> org.apache.naming.resources.DirContextURLStreamHandler(id=1080)
>       hashCode: -1
>       specifyHandlerPerm: null
>       factory: instance of 
> org.apache.naming.resources.DirContextURLStreamHandlerFactory(id=1081)
>       handlers: instance of java.util.Hashtable(id=1082)
>       streamHandlerLock: instance of java.lang.Object(id=1083)
>   }
>
>
> Any thoughts on why the url ends up as 
> "/localhost/jtkWEB-INF/jtk-component.roles"?
>
> Changing user-roles to "cocoon:WEB-INF/jtk-component.roles" makes
> context.getResources() return null, leading to another exception.
> Is there something I'm missing?
>
> I'm running a Cocoon 2.1 tree from late September and tomcat 4.1.12.
>
> Thanks,
>  Phil
>
>
>
>
> ERROR   2002-11-05 14:29:03.160 [access                  ] (): 
> Exception reloading
> org.apache.avalon.framework.configuration.ConfigurationException: 
> Error trying to load user-roles configuration
>         at org.apache.cocoon.Cocoon.configure(Cocoon.java:400)
>         at org.apache.cocoon.Cocoon.initialize(Cocoon.java:284)
>         at 
> org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1264)
>         at 
> org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:465)
>         at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:924)
>         at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
>         at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3341)
>         at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3534)
>         at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
>         at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>         at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>         at 
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
>         at 
> org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
>         at 
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
>         at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
>         at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
>         at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
>         at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
>         at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>         at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>         at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>         at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>         at 
> org.apache.catalina.core.StandardService.start(StandardService.java:497)
>         at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
>         at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>         at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.
>
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message