Skip to content

Using relative path to atom-server.cfg.xml (Error) #263

Description

@volodymyrkozubal

I have a great problem with Atomhopper
atom-hopper\atomhopper\src\main\webapp\WEB-INF\web.xml
and a path to config file of atom server.

I need to change this

<init-param>
      <param-name>config-location</param-name>
      <param-value>file:///etc/atomhopper/atom-server.cfg.xml</param-value>
</init-param>

to

<init-param>
      <param-name>config-location</param-name>
      <param-value>/META-INF/atom-server.cfg.xml</param-value>
</init-param>

So as you can see i should keep this config file in war and use relative path.
So i use a maven-war-plugin and put it inside META-INF directory inside webapp
But i get an error

org.atomhopper.util.config.ConfigurationParserException: Failed to read the configuration. Reason: URI is not absolute - pump cause for more details
    at org.atomhopper.util.config.jaxb.JAXBConfigurationParser.readConfiguration(JAXBConfigurationParser.java:94) ~[core-1.2.16.jar:na]
    at org.atomhopper.util.config.AbstractConfigurationParser.read(AbstractConfigurationParser.java:35) ~[core-1.2.16.jar:na]
    at org.atomhopper.AtomHopperServlet.init(AtomHopperServlet.java:72) ~[core-1.2.16.jar:na]
    at javax.servlet.GenericServlet.init(GenericServlet.java:161) [javax.j2ee.servlet.jar:na]
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:336) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.load(ServletWrapper.java:1360) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:982) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3751) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195) [com.ibm.ws.webcontainer.jar:na]
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) [com.ibm.ws.runtime.jar:na]
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) [com.ibm.ws.runtime.jar:na]
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) [com.ibm.ws.runtime.jar:na]
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) [com.ibm.ws.runtime.jar:na]
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) [na:CCX.CF [o1103.02]]
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) [na:CCX.CF [o1103.02]]
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) [com.ibm.ws.runtime.jar:na]
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) [com.ibm.ws.runtime.jar:na]
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) [com.ibm.ws.runtime.jar:na]
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) [com.ibm.ws.runtime.jar:na]
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) [com.ibm.ws.runtime.jar:na]
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) [com.ibm.ws.runtime.jar:na]
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) [com.ibm.ws.runtime.jar:na]
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1690) [com.ibm.ws.runtime.jar:na]
Caused by: java.lang.IllegalArgumentException: URI is not absolute
    at java.net.URI.toURL(URI.java:1090) ~[na:1.6.0]
    at org.atomhopper.util.uri.CustomSchemeResolver.toURL(CustomSchemeResolver.java:43) ~[core-1.2.16.jar:na]
    at org.atomhopper.util.config.resource.uri.URIConfigurationResource.getInputStream(URIConfigurationResource.java:31) ~[core-1.2.16.jar:na]
    at org.atomhopper.util.config.jaxb.JAXBConfigurationParser.readConfiguration(JAXBConfigurationParser.java:81) ~[core-1.2.16.jar:na]

What does this mean, why so and how i could workaround this problem.
Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions