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

Stephen Kouretas do-not-reply at jboss.com
Mon Apr 9 16:05:49 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/728980#728980

--------------------------------------------------------------
David,

Can you please comment a little more on how to correctly register a URLStreamHandler on AS 7.1 via a static module.
I have an ear that uses the smb protocol from jcifs and I am having dificulty getting this to work on AS 7.1
Whenever my application tries to access a smb URL I get a MalformedURLException unknown protocol: smb
In the Manifest of the ear I have added a dependency to jcifs.
I have created the following directory structure under modules:
modules
 |- jcifs
     |- main
         |- module.xml
         |- jcifs.jar
         |- service-loader-resources
             |- META-INF
                 |- services
                     |- java.net.URLStreamHandler
java.net.URLStreamHandler is a text file containing the class name of the Handler (jcifs.smb.Handler).
module.xml contains a resource-root for both service-loader-resources as well as jcifs.jar
I modified standalone.conf.bat to include:
set JAVA_OPTS=%JAVA_OPTS% -Djboss.protocol.handler.modules=jcifs
I have also tried:
set JAVA_OPTS=%JAVA_OPTS% -Djava.protocol.handler.pkgs=jcifs
--------------------------------------------------------------

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

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/20120409/0bcc92f1/attachment.html 


More information about the jboss-dev-forums mailing list