juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ishita Singh <ishitasingh1...@gmail.com>
Subject Re: Outreachy Internship
Date Thu, 10 Oct 2019 11:06:31 GMT
  Is it because I have set the WORKDIR to juneau-petstore-server?

On Thu, Oct 10, 2019 at 3:38 PM Ishita Singh <ishitasingh1234@gmail.com>
wrote:

> Hi,
>
> I am facing the following problems while making the Dockerfile
>
> 1. First approach - Create a jar file of the app and run.
>     Issue - There is no manifest file. I tried adding a manifest file
> using the command - jar -cvfm example.jar manifest.txt *.java
> Manifest file contents-
> Manifest-Version: 1.0
> Created-By: 1.8.0_171 (Oracle Corporation)
> Main-Class: org.apache.juneau.petstore.App
>
> Got the below error on running  java -jar example.jar
> Error: Could not find or load main class org.apache.juneau.petstore.App
>
> 2. Second approach - Run the application with mvn spring-boot:run
>     Issue - On running the docker image I get the below error
> SEVERE: Application run failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'petStoreService' defined in class path resource
> [org/apache/juneau/petstore/AppConfiguration.class]: Bean instantiation via
> factory method failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Failed to instantiate
> [org.apache.juneau.petstore.service.PetStoreService]: Factory method
> 'petStoreService' threw exception; nested exception is
> java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
>
> The app runs locally with the mvn command.
> To reproduce the error you can clone
> https://github.com/ishita20/juneau-petstore.git
> Then run the below commands inside juneau-petstore directory.
> docker build . -t image
> docker run --rm -it image:latest
>
>

Mime
View raw message