I'm having a problem trying to get URL data using
HttpServletRequest servReq = ServletActionContext.getRequest(); String test = servReq.getParameter("param");
Now i know that the first line "getRequest()" works fine, it is a problem with the "servReq.getParameter("param")".
I get the error stated in the title.
"Error rendering macro 'myMacro' : loader constraint violation: loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest"
Have no idea what this means really, i've been trying to figure it out for a while and still no luck.
This is the dependency in the POM
<dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency>
No i've tried to change somethings in the POM such as version and scope but nothing seems to stop the error.
Anyone know whats up with it or how to solve it?
If you you need any other information please comment.
This looks like a dependency conflict - the bundle class loader for your add-on has erroneously loaded the HttpServletRequest class. This means that this class is somehow packaged in your add-on. Your dependency scope seems correct, so there must be something else wrong with your pom. Do mvn clean install and open the produced jar file - do you see classes from javax.* packages inside? If yes - you need to figure out why this happens. If not, try running confluence again, maybe you did not run a clean build after your experiments with the pom?
Another week, another Topic Tuesday! Agile has been on my mind a lot lately because I've seen good implementations and bad implementations, but now as a Jira admin it matters more to me whether...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events