Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

317
Views
El servicio web de arranque de resorte dockerizado lanza la excepción FileNotFound

Intenté copiar archivos de mi máquina con Windows al contenedor Docker usando el Comando de archivo Docker y leyendo esos archivos desde el servicio web Spring. ¡El servicio web arroja un archivo de error no encontrado!

Aquí estoy tratando de copiar mi directorio local src/nlp a /directorio de contenedor de datos

a continuación se muestra el volumen de la ventana acoplable disponible

ingrese la descripción de la imagen aquí

Archivo acoplable

 FROM openjdk:8-jdk-alpine EXPOSE 8080 ARG JAR_FILE=/target/nlp-0.0.1-SNAPSHOT.jar ADD ${JAR_FILE} nlp-0.0.1-SNAPSHOT.jar ADD src/nlp /data ENTRYPOINT ["java","-jar", "nlp-0.0.1-SNAPSHOT.jar"]`

aplicación.propiedades

 server.port=8080 logging.level.radial.nlp=DEBUG logging.file = mylogfile.log nlp.learning.dir = /data/

Java

 InputStream inputStream = new FileInputStream(environment.getProperty("nlp.learning.dir")+ "/train/models/en/token/en-token.bin");

Error

 java.io.FileNotFoundException: /data/train/models/en/token/en-token.bin (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138)
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Observe una barra inclinada adicional en su ruta antes de entrenar dir /data//train/models/en/token/en-token.bin

Considere cambiar la línea de lectura a:

InputStream inputStream = new FileInputStream(environment.getProperty("nlp.learning.dir")+ "train/models/en/token/en-token.bin");

over 4 years ago · Santiago Trujillo Report

0

He modificado la dependencia de mi complemento maven, ahora funciona bien

 <plugin> <groupId>com.spotify</groupId> <artifactId>dockerfile-maven-plugin</artifactId> <version>1.4.7</version> <!-- Wire up to the default build phases --> <executions> <execution> <id>default</id> <goals> <goal>build</goal> <goal>push</goal> </goals> </execution> </executions> <configuration> <repository>${project.artifactId}</repository> <buildArgs> <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE> </buildArgs> </configuration>

over 4 years ago · Santiago Trujillo Report

0

Lo más probable es que no tenga un archivo src/nlp/train/models/en/token/en-token.bin el mismo directorio desde el que está construyendo su contenedor.

 parent/ ├── Dockerfile └── src/ └── nlp/ └── train/ └── models/ └── en/ └── token/ └── en-token.bin <--- does this exist?
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!