diff --git a/nb-configuration.xml b/nb-configuration.xml index e9e56b52729f6bef68a0435ec98b924804cf7522..00dea3e61d563b10c9cd00a3ba3dda34e9871fc4 100755 --- a/nb-configuration.xml +++ b/nb-configuration.xml @@ -18,5 +18,6 @@ Any value defined here will override the pom.xml file value but is only applicab <netbeans.hint.license>nibio_open_source_license.ftl</netbeans.hint.license> <org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>WildFly</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server> <org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>1.7-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion> + <netbeans.hint.jdkPlatform>JDK_1.8_SUN</netbeans.hint.jdkPlatform> </properties> </project-shared-configuration> diff --git a/pom.xml b/pom.xml index 0156729ea51ae1c79cd838318e7f943a9d90252b..5ef3e3fc76cf16cee7d3b7c3d066dc4e309c36da 100755 --- a/pom.xml +++ b/pom.xml @@ -12,75 +12,27 @@ <dependencies> <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.servlet.jsp</groupId> - <artifactId>jsp-api</artifactId> - <version>2.1</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.jboss.resteasy</groupId> - <artifactId>resteasy-jaxrs</artifactId> - <version>3.0.9.Final</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - <version>2.4.1</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.4.1</version> - </dependency> - <dependency> - <groupId>javax.persistence</groupId> - <artifactId>persistence-api</artifactId> - <version>1.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.transaction</groupId> - <artifactId>jta</artifactId> - <version>1.1</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.reflections</groupId> - <artifactId>reflections</artifactId> - <version>0.9.9</version> - </dependency> - <dependency> - <groupId>no.nibio.vips.common</groupId> - <artifactId>VIPSCommon</artifactId> - <version>1.0-SNAPSHOT</version> - <scope>provided</scope> - </dependency> - <dependency> + <groupId>org.reflections</groupId> + <artifactId>reflections</artifactId> + <version>0.9.11</version> +</dependency> +<dependency> <groupId>com.thetransactioncompany</groupId> <artifactId>cors-filter</artifactId> <version>1.7.1</version> </dependency> <dependency> - <groupId>javax</groupId> - <artifactId>javaee-web-api</artifactId> - <version>6.0</version> + <groupId>no.bioforsk.vips.common</groupId> + <artifactId>VIPSCommon</artifactId> + <version>1.0-SNAPSHOT</version> <type>jar</type> - <scope>provided</scope> </dependency> <dependency> - <groupId>com.bedatadriven</groupId> - <artifactId>jackson-datatype-jts</artifactId> - <version>2.2</version> - </dependency> - + <groupId>com.bedatadriven</groupId> + <artifactId>jackson-datatype-jts</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> </dependencies> <build> diff --git a/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java b/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java index 6db9d155fd6bd375c1ccea8fcc6cea7cf4b35849..13e0c995a687edd18208999a4b00e9a101d90211 100755 --- a/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java +++ b/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java @@ -19,6 +19,8 @@ package no.nibio.vips.core.service; +import java.net.URL; +import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -51,7 +53,7 @@ public class ModelResourceImpl implements ModelResource{ @Context HttpServletRequest servletRequest; - + /** * Lists all models available in this instance, using default language (English) * @return list of all models available diff --git a/src/main/java/no/nibio/vips/model/factory/ModelFactory.java b/src/main/java/no/nibio/vips/model/factory/ModelFactory.java index f78c1f4098137b7d149ae3ce79059c6f07698b2d..4edc6756ac85dcb3e4061c594b8faea4be603f31 100755 --- a/src/main/java/no/nibio/vips/model/factory/ModelFactory.java +++ b/src/main/java/no/nibio/vips/model/factory/ModelFactory.java @@ -135,7 +135,7 @@ public class ModelFactory { reflections = new Reflections(topDomain); subTypes.addAll(reflections.getSubTypesOf(Model.class)); } - + /** * Iterates and instantiates one object for each class */ @@ -158,7 +158,7 @@ public class ModelFactory { throw new DuplicateModelIdException(message); } //System.out.println("Model " + model.getModelName() + " with id=" + model.getModelId().toString() + " was found"); - } catch ( InstantiationException | IllegalAccessException | DuplicateModelIdException ex) { + } catch ( InstantiationException | IllegalAccessException | DuplicateModelIdException | NoClassDefFoundError ex) { Logger.getLogger(ModelFactory.class.getName()).log(Level.SEVERE, null, ex); } }