Hi,

Again, check your qosp.axis2.repository property value. It looks like
you do not provide a valid URL for repository location. use file://
(please notice the double slash) as URL prefix.

Regards,
Sukma

On 1/19/08, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
> On Sat, 2008-01-19 at 00:39 +0100, Andreas Veithen wrote:
> > Michele,
> >
> > How did you construct the URLs passed as arguments to
> > createConfigurationContextFromURIs?
> > Can you also provide the stack trace of the
> > java.net.MalformedURLException, or better the instruction in the
> > source code that triggers this exception?
>
> There's no stack trace, but this is the chunk of code I was using
>
> // this file is in the same package as the class containing this code
> private static final String WORKER_AXIS2_XML = "worker_axis2.xml";
>
>
>  URL url = WorkerConfiguration.class.getResource(WORKER_AXIS2_XML);
>
> // repository is a directory contained into the root of my aar file
>  URL repo =
> WorkerConfiguration.class.getClassLoader().getResource("repository");
>                 if (repo == null) {
>                     log.error("The repository is null");
>                 } else {
>                     log.info(repo.getPath());
>                 }
>                 if ((url == null) || (repo == null)) {
>                     createDefaultConfigurationContext();
>                 } else {
>                     try {
>                         configurationContext =
> ConfigurationContextFactory.createConfigurationContextFromURIs(url,
> repo);
>                         log.info("Custom conf. context created");
>                     } catch (Exception e) {
>                         log.error(e);
>                         createDefaultConfigurationContext();
>                     }
>                 }
>
>
>
>
> This is how I use
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
>
>
> // contains the full path to the repository
> final String repository = System.getProperty("qosp.axis2.repository");
> URL url = WorkerConfiguration.class.getResource(WORKER_AXIS2_XML);
>
> // execute the following code only if the two values above are not null
>  try {
>      configurationContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(repository,
> url.getPath());
>
>      log.info("Custom conf. context created");
>   } catch (Exception e) {
>          log.error(e);
>           createDefaultConfigurationContext();
>   }
>
>
> Michele
>
> >
> >
> > Andreas
> >
> > On 18 Jan 2008, at 17:35, Michele Mazzucco wrote:
> >
> > > Hi all,
> > >
> > > I'd like to create a custom configuration context from inside a
> > > service
> > > archive. The parameters (axis2.xml and repository) are contained into
> > > the aar file (or at least the custom axis2.xml).
> > > I've tried both the
> > > ConfigurationContextFactory.createConfigurationContextFromFileSystem
> > > and
> > > ConfigurationContextFactory.createConfigurationContextFromURIs, but
> > > they
> > > don't work as expected.
> > >
> > > This is the result when I use the first approach and my custom
> > > axis2.xml
> > > (worker_axis2.xml) is contained into the archive
> > >
> > > ERROR 16:30:35,124 (WorkerConfiguration.java:128) -
> > > org.apache.axis2.AxisFault: System can not find the given axis2.xml
> > > file:/work/michele/router/work/Catalina/localhost/axis2/
> > > axis227495RoutingService.aar!/ncl/qosp/controller/worker_axis2.xml
> > >
> > > The other approach fails in a similar way:
> > > ERROR 16:21:10,971 (WorkerConfiguration.java:127) -
> > > org.apache.axis2.AxisFault: invalid
> > > url: //file:/work/michele/router/work/Catalina/localhost/axis2/
> > > axis226240RoutingService.aar!/repository/
> > > (java.net.MalformedURLException: no protocol: //file:/work/michele/
> > > router/work/Catalina/localhost/axis2/axis226240RoutingService.aar)
> > >
> > >
> > > Any idea?
> > >
> > > Thanks,
> > > Michele
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-- 
Sent from Gmail for mobile | mobile.google.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to