[jboss-dev-forums] [JBoss AS 7 Development] - Re: URL-Protocol Handler doesn't work

Stephen Kouretas do-not-reply at jboss.com
Wed Apr 11 11:17:10 EDT 2012


Stephen Kouretas [https://community.jboss.org/people/skoure] created the discussion

"Re: URL-Protocol Handler doesn't work"

To view the discussion, visit: https://community.jboss.org/message/729397#729397

--------------------------------------------------------------
> 
> > Stephen Kouretas wrote:
> > 
> > The jcifs package does not include a URLStreamHandlerFactory since java.protocol.handler.pkgs only requires a URLStreamHandler.
> > 
> > Hence, I created a seperate jar with a URLStreamHandlerFactory and placed it in the modules/jcifs/main directory. (see code below)
> > In the META-INF/services directory of this jar contains a text file named java.net.URLStreamHandlerFactory which contains the fully-qualified name of this factory.
> > In the module.xml file I added this new jar as a resource-root and removed the service-loader-resources directory from the resources list.
> > 
> > the org.jboss.as.standalone module still has a dependency on the jcifs module.
> > 
> > I am still getting the same MalformedURLException unknown protocol: smb.
> This is after you added your module name to jboss.protocol.handler.modules?

Both the jcifs.jar and my jar with the URLStreamHandlerFactory (jcifs_wrapper.jar) are in the jcifs module directory.
The module.xml references both jar resources.
set JAVA_OPTS=%JAVA_OPTS% -Djboss.protocol.handler.modules=jcifs
<module xmlns="urn:jboss:module:1.1" name="jcifs" > 
<resources> 
<resource-root path="jcifs_wrapper.jar"/> 
<resource-root path="jcifs-1.3.15.jar"/> 
</resources>
</module> 


 standalone.conf.bat still contains: 
boot.log confirms this settng:
jboss.protocol.handler.modules = jcifs
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/729397#729397]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120411/87bef2ba/attachment.html 


More information about the jboss-dev-forums mailing list