You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "casper (JIRA)" <ji...@apache.org> on 2010/02/02 01:30:18 UTC
[jira] Commented: (AXIS2-4614) Modules not loaded by axis2 when run
inside a Java Web Start application
[ https://issues.apache.org/jira/browse/AXIS2-4614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828370#action_12828370 ]
casper commented on AXIS2-4614:
-------------------------------
There is a workaround for this issue.
- put both mar files into a jar file that is signed and loaded by JWS at runtime.
- load the mar files as resources
- write the mar files to the 'current' directory (.). which ended up being the install directory for my web browser for me
- axis2 will load the modules from the classpath, which includes the 'current' directory
example code to load mar as resource and write to current dir:
try {
String[] resources = { "addressing-1.5.1.mar", "rampart-1.4.mar" };
for (String resource : resources) {
String resourcePath = "/" + resource;
InputStream resourceStream = this.getClass().getResourceAsStream(resourcePath);
BufferedInputStream source = new BufferedInputStream(resourceStream);
BufferedOutputStream target = new BufferedOutputStream(new FileOutputStream(new File(resource)));
try {
byte[] buffer = new byte[1024];
int len;
while ((len = source.read(buffer)) != -1) {
target.write(buffer, 0, len);
}
target.flush();
} finally {
target.close();
source.close();
}
}
} catch (IOException t) {
// log an error
}
> Modules not loaded by axis2 when run inside a Java Web Start application
> ------------------------------------------------------------------------
>
> Key: AXIS2-4614
> URL: https://issues.apache.org/jira/browse/AXIS2-4614
> Project: Axis2
> Issue Type: Bug
> Components: modules
> Affects Versions: 1.4.1
> Environment: server: OS AIX, ibm jre "1.5.0" build pap32dev-20080315 (SR7), web stack oc4j 10.1.3.4
> client: winxp sp2, sun jre1.6.0_16
> Reporter: casper
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> We have a Java Web Start (JWS) application that uses axis2 generate soap proxies. We are using the rampart module to provide security headers for the soap requests.
> The problem is, the addressing module does not get loaded when our application is run from within JWS.
> It works fine from within eclipse, loading the module from the classpath, but not from JWS.
> My assumption is, that the axis2 module loading works from a custom class loader that is not being used when run from within a JWS application.
> java.lang.RuntimeException: <snip>: java.lang.RuntimeException: org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressingjava.lang.RuntimeException: <snip>: java.lang.RuntimeException: org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressing
> <snip>
> at java.awt.event.InvocationEvent.dispatch(Unknown Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: <snip>: java.lang.RuntimeException: org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressing
> <snip>
> ... 15 more
> Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressing
> <snip>
> ... 18 more
> Caused by: org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressing
> at org.apache.axis2.deployment.URLBasedAxisConfigurator.getAxisConfiguration(URLBasedAxisConfigurator.java:78)
> at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
> at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromURIs(ConfigurationContextFactory.java:194)
> ... 19 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.