rackerlabs/repose

Issue Running ProxyApp (Valve) in IDE and Via Shade

Closed this issue · 6 comments

I recently imported Reprose into IntelliJ 12 and tried running ProxyApp. I receive..

Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

Upon further research I have found that if I include the following transitive dependency then the IDE is happier...

    <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>2.0.2-rax</version>
    </dependency>

My next step is using Valve to run reprose. Even with the dependency change above the shaded jar does not include org.w3c. Below are relevant excerpts from the mvn -X output...

[DEBUG] xml-apis:xml-apis:jar:2.0.2-rax:compile
[INFO] Including xml-apis:xml-apis:jar:2.0.2-rax in the shaded jar.

Hey Scott,

Could you send over the steps on how you're running through intellij?

Thanks

Sure,

First do a maven import of the project…

Main Class: com.rackspace.cloud.valve.server.ProxyApp
Program Args: START -c /Users/sdelap/Development/repose-tutorial/etc/powerapi
Working Directory: /Users/sdelap/Development/repose-tutorial/bin

On a related not I just tried changing my config to absolute paths. powerFilterChainBuilder is not initialized at startup. No ApplicationDeploymentEvent is fired to init things. Touching the system file fixes this but is kind of hacky. I could debug higher up the execution stack but I've got some other Repose things to look into first.

Scott

On Mar 14, 2013, at 2:45 PM, Meynard Alconis wrote:

Hey Scott,

Could you send over the steps on how you're running through intellij?

Thanks


Reply to this email directly or view it on GitHubhttps://github.com/rackspace/repose/issues/458#issuecomment-14924798.

Hey Scott,

Do you still get the same error if you try to run the jar directly? Are you able to build just using a mvn clean install?

Also, the arguments for the jar are: START -c -s

Yes but I'm running the jar directly like so because Shade is not working for Valve. In theory the class path and main class specification are exactly what java -jar does with the manifest however…

java -cp repose-valve.jar:xml-apis-2.0.2-rax.jar com.rackspace.cloud.valve.server.ProxyApp START -c /Users/sdelap/Development/repose-tutorial/etc/powerapi

On Mar 14, 2013, at 4:18 PM, Meynard Alconis wrote:

Hey Scott,

Do you still get the same error if you try to run the jar directly? Are you able to build just using a mvn clean install?

Also, the arguments for the jar are: START -c -s


Reply to this email directly or view it on GitHubhttps://github.com/rackspace/repose/issues/458#issuecomment-14929901.

Hi Scott,

I wasn't sure if you meant that running repose using java -cp ... works for you
or if you still get the same error.

Also, did you ever install any jars (especially the xml apis) directly into your
java installation (into jre/lib/ext for example)?

Dan.


From: scottdelap notifications@github.com
To: rackspace/repose repose@noreply.github.com
Sent: Thu, March 14, 2013 4:24:44 PM
Subject: Re: [repose] Issue Running ProxyApp (Valve) in IDE and Via Shade (#458)

Yes but I'm running the jar directly like so because Shade is not working for
Valve. In theory the class path and main class specification are exactly what
java -jar does with the manifest however…

java -cp repose-valve.jar:xml-apis-2.0.2-rax.jar
com.rackspace.cloud.valve.server.ProxyApp START -c
/Users/sdelap/Development/repose-tutorial/etc/powerapi

On Mar 14, 2013, at 4:18 PM, Meynard Alconis wrote:

Hey Scott,

Do you still get the same error if you try to run the jar directly? Are you able
to build just using a mvn clean install?

Also, the arguments for the jar are: START -c -s


Reply to this email directly or view it on
GitHubhttps://github.com/rackspace/repose/issues/458#issuecomment-14929901.


Reply to this email directly or view it on GitHub.

Closing after a year of inactivity. If this is still a problem, feel free to re-open.