[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rampart-dev
Subject:    [jira] [Commented] (AXIS2-4900) Modules not getting loaded from
From:       "Wolfgang Knauf (JIRA)" <jira () apache ! org>
Date:       2011-06-24 14:15:47
Message-ID: 1880142604.36784.1308924947544.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/AXIS2-4900?page=com.atlassian.jira.plugin. \
system.issuetabpanels:comment-tabpanel&focusedCommentId=13054462#comment-13054462 ] 

Wolfgang Knauf commented on AXIS2-4900:
---------------------------------------

JBoss 6 adds another new URL scheme: "vfs://"

> Modules not getting loaded from classpath in JBoss 5.1
> ------------------------------------------------------
> 
> Key: AXIS2-4900
> URL: https://issues.apache.org/jira/browse/AXIS2-4900
> Project: Axis2
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5.2
> Environment: axis2 verion 1.5.2 in JBoss 5.1 with jdk 1.6
> Reporter: Yiming Du
> 
> Modules not getting loaded from classpath in JBoss 5.1
> I tried to deploy the axis2 verion 1.5.2 in JBoss 5.1 with jdk 1.6 and wanted to \
> load the modules from the classpath., which did not work.  AXIS2-4528 addresses the \
> similar issue, but on WebSphere with protocal "wsjar".   In JBoss 5.1:
> - the jar URL's protocal is "vfszip" instead of "jar" or "wsjar"
> - the jar URL's path will be like this
> /C:/jboss-eap-5.1/jboss-as/server/default/deploy/ApproveItWebServer_JBoss.ear/library/axis2/rampart-1.5.jar/META-INF/module.xml
>  Thus, in the class org.apache.axis2.deployment.RepositoryListener, method name \
> "loadClassPathModules()", the variable "idx" is always evaluated to be -1, and so \
> addFileToDeploy method will never be called. ClassLoader loader = \
> Thread.currentThread().getContextClassLoader(); try {
> Enumeration moduleURLs = loader.getResources("META-INF/module.xml");
> while (moduleURLs.hasMoreElements()) {
> try {
> URL url = (URL)moduleURLs.nextElement();
> URI moduleURI;
> if (url.getProtocol().equals("file")) {
> String urlString = url.toString();
> moduleURI = new URI(urlString.substring(0,
> urlString.lastIndexOf("/META-INF/module.xml")));
> } else {
> // Check if the URL refers to an archive (such as
> // jar:file:/dir/some.jar!/META-INF/module.xml) and extract the
> // URL of the archive. In general the protocol will be "jar", but
> // some containers may use other protocols, e.g. WebSphere uses
> // "wsjar" (AXIS2-4258).
> String path = url.getPath();
> int idx = path.lastIndexOf("!/");
> if (idx != -1 && path.substring(idx+2).equals("META-INF/module.xml")) {
> moduleURI = new URI(path.substring(0, idx));
> if (!moduleURI.getScheme().equals("file")) {
> continue;
> }
> } else {
> 							// it always goes here.
> continue;
> }
> }
> 
> log.debug("Deploying module from classpath at '" + moduleURI + "'");
> File f = new File(moduleURI);
> addFileToDeploy(f, deployer, WSInfo.TYPE_MODULE);
> } catch (URISyntaxException e) {
> log.info(e);
> }
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic