Hello,
So i decided to try out GRAILS, but im stuck at a (hopefully) very minor problem.
I have an existing JAVA (jar) library that i wish to use in my grails app. I managed to get the jar imported to my grails app, but when calling methods from the package i get the expected class not found exception. This offcourse is expected since i have not imported any of the dependencies. My jar uses the following dependencies:
What is the proper way to have GRAILS resolve these? I tried adding them one by one with the shell command install-dependency, and I tried adding them to the /lib folder of my grails project and running refresh dependency after that.
The result is that i always end up with the following exception,
java.lang.NoClassDefFoundError: org/apache/xerces/dom/DeferredElementImpl
at org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(Unknown Source)
so i'm kinda stuck here. Any help is appreciated, been banging my head against a wall for too many hours now.
R
johan
So i decided to try out GRAILS, but im stuck at a (hopefully) very minor problem.
I have an existing JAVA (jar) library that i wish to use in my grails app. I managed to get the jar imported to my grails app, but when calling methods from the package i get the expected class not found exception. This offcourse is expected since i have not imported any of the dependencies. My jar uses the following dependencies:
Code:
<dependencies>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.cssparser</groupId>
<artifactId>cssparser</artifactId>
<version>0.9.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit-core-js</artifactId>
<version>2.11</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.17</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-websocket</artifactId>
<version>8.1.7.v20120910</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.10.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.11</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.0</version>
</dependency>
</dependencies>
What is the proper way to have GRAILS resolve these? I tried adding them one by one with the shell command install-dependency, and I tried adding them to the /lib folder of my grails project and running refresh dependency after that.
The result is that i always end up with the following exception,
java.lang.NoClassDefFoundError: org/apache/xerces/dom/DeferredElementImpl
at org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(Unknown Source)
so i'm kinda stuck here. Any help is appreciated, been banging my head against a wall for too many hours now.
R
johan