Ich bin ratlos für was könnte dieses Problem verursachen. Im Wesentlichen habe ich eine Java-Webapp, die mit einer gehosteten Mongo-Datenbank verbunden ist. Ich habe der App eine neue Sammlung hinzugefügt, indem ich ein neues Repository verwende, das so aussieht.MongoDB einige Daten nicht laden in Java Tomcat-Anwendung
public interface ContractRepository extends PagingAndSortingRepository<Contract, String> {
public Contract findByNameIgnoreCase(String name);
public List<Contract> findByOwnerCompany(Company c);
}
Alles funktionierte feine Daten wurde hinzugefügt, und in die App geladen. Dann schoben wir eine neue Version und es würde nicht mehr die Daten aus der Datenbank ziehen, aber es gab keinen Datenverlust in der Datenbank. Ich habe neue Datensätze manuell hinzugefügt und sie würden gut angezeigt. Seitdem haben wir alle Datensätze wieder hinzugefügt und es funktionierte bis zu einem weiteren Update. Gleicher Fehler.
POM:
http://maven.apache.org/maven-v4_0_0.xsd "> net.company.com Bewerber-Tracking-System 1.0.0
<modelVersion>4.0.0</modelVersion>
<groupId>net.company.com</groupId>
<artifactId>ats-web</artifactId>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<properties>
<org.slf4j-version>1.7.7</org.slf4j-version>
<java-version>1.8</java-version>
<debug>true</debug>
</properties>
<dependencyManagement>
<dependencies>
<!-- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>4.0.6.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.2.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>net.acesinc.ats</groupId>
<artifactId>ats-model</artifactId>
<version>1.0.0-BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.company.com</groupId>
<artifactId>ats-resume-parser</artifactId>
<version>1.0.0</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- exclude their default logging logback so we can use log4j -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-spring-service-connector</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-cloudfoundry-connector</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<!-- include the log4j logger -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
</dependency>
<!-- Spring Data -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>1.9.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>1.6.1.RELEASE</version>
</dependency>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-mongodb</artifactId>
<version>3.5.1</version>
</dependency>
<!-- Security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>4.0.0.RELEASE</version>
<exclusions>
<!--Exclude Commons Logging in favor of SLF4j-->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>4.0.0.RELEASE</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.0.0.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>4.0.0.RELEASE</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>4.0.0.RELEASE</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</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>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.8-ea02</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
<!-- Apache Commons file upload -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.3.5</version>
</dependency>
<!-- Apache Commons IO -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
</dependencies>
<repositories>
<!-- These are set in the settings.xml to our nexus repo -->
</repositories>
<pluginRepositories>
<!-- These are set in the settings.xml to our nexus repo -->
</pluginRepositories>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>
<!-- <plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.1.v20140609</version>
<configuration>
<systemPropertiesFile>${project.basedir}/src/main/resources/jetty/jetty.properties</systemPropertiesFile>
<jettyXml>${project.basedir}/src/main/resources/jetty/jetty.xml,${project.basedir}/src/main/resources/jetty/jetty-http.xml,${project.basedir}/src/main/resources/jetty/jetty-ssl.xml,${project.basedir}/src/main/resources/jetty/jetty-https.xml</jettyXml>
<jettyXml>${project.basedir}/src/main/resources/jetty/jetty.xml,${project.basedir}/src/main/resources/jetty/jetty-http.xml</jettyXml>
<war>${project.build.directory}/${project.build.finalName}</war>
<scanIntervalSeconds>1</scanIntervalSeconds>
</configuration>
</plugin>-->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<systemProperties>
<spring.profiles.active>dev</spring.profiles.active>
</systemProperties>
<path>/</path>
<url>http://localhost:1234/mymanager</url>
</configuration>
</plugin>
</plugins>
</build>
Irgendwelche Vorschläge wäre sehr dankbar.
ich sollte fügen Sie hinzu, gibt es andere Sammlungen und Repositories, die nie ein Problem hatten. – Dylan
Haben Sie die Struktur der Vertragsklasse geändert? –
Eigentlich könnte das möglich sein – Dylan