Comments (6)
The first thing here, please try to build using pack
and see if you encounter the same issue.
Second, please include any image config settings from your pom.xml/build.gradle file. These can impact how the build is executed, so we need to take them into account.
Third, include your full version of Spring Boot.
Fourth, include your Linux distro & version. In case we need to try and reproduce.
Thanks
from java.
I havent had a chance to try to use the pack command yet, but the same build does work using macOS.
Heres the full pom.xml:
`
4.0.0
<groupId>com.sample.test</groupId>
<artifactId>spring-native-demo</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<java.version>11</java.version>
<spring.boot.version>2.5.4</spring.boot.version>
<spring.native.version>0.10.3</spring.native.version>
<docker-registry.host>*.*.com</docker-registry.host>
<docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<repositories>
<repository>
<id>spring-release</id>
<name>Spring release</name>
<url>https://repo.spring.io/release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-release</id>
<name>Spring release</name>
<url>https://repo.spring.io/release</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-native</artifactId>
<version>${spring.native.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-aot-maven-plugin</artifactId>
<version>${spring.native.version}</version>
<executions>
<execution>
<id>test-generate</id>
<goals>
<goal>test-generate</goal>
</goals>
</execution>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<builder>paketobuildpacks/builder:tiny</builder>
<name>${docker-registry.host}/${project.artifactId}:latest</name>
<pullPolicy>IF_NOT_PRESENT</pullPolicy>
<env>
<BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE>
<BP_NATIVE_IMAGE_BUILD_ARGUMENTS>-H:+ReportExceptionStackTraces --verbose</BP_NATIVE_IMAGE_BUILD_ARGUMENTS>
</env>
</image>
</configuration>
<executions>
<execution>
<goals>
<goal>build-image</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
`
Linux Machine Info
NAME="Ubuntu" VERSION="18.04.2 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.2 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic
from java.
OK, thanks for that detail. Please update when you have a chance to run with pack
.
It'll be something like pack build -e BP_NATIVE_IMAGE=true -e BP_NATIVE_IMAGE_BUILD_ARGUMENTS='-H:+ReportExceptionStackTraces --verbose' --pull-policy=if-not-present -B paketobuildpacks/builder:tiny -p target/your-jar-file <image-name>
.
I know that there was a similar issue with permissions, but that should be fixed in your Spring Boot version, so I don't think that's it.
[INFO] [creator] unlinkat /workspace/BOOT-INF/lib/jackson-core-2.12.4.jar: permission denied
Could you also check to see if you have anything that might impact the permissions of that file? Check the original file permissions, but also check your /tmp
directory and possibly umask settings on your machine. The build process is going to add the contents of your application JAR into the container, and it has to extract the files. I'm not 100% sure if it's using /tmp
for storage as it does this, I'd need to check into it more, but if you can check for anything that might restrict permissions to be less than 644 for files and 755 for folders, that could give us some clues.
from java.
Just following up. Did you have a chance to run the command I suggested? Did you get this issue resolved? Thanks
from java.
Sorry for the late reply, but sudden priority changes have prevented me from troubleshooting this further. Unless anyone else has reported the problem I guess you can close the issue and I can re-open it later if necessary.
from java.
I will close. If you @rab2215 or anyone else encounter this, feel free to reopen. Thanks.
from java.
Related Issues (20)
- Implement RFC0044: Disable SBOM HOT 2
- Java Buildpack 10.2.0 Error HOT 2
- When the image built using bootBuildImage creates files or folders with Chinese names at runtime, their names will be garbled HOT 1
- When BP_JVM_VERSION is 21, the workspace owner has a problem. HOT 3
- No builldpack.toml found in java 10.7.0 HOT 4
- Spring Boot `bootBuildImage` fails with `Invalid response received when loading image` HOT 12
- Unable to build java buildpack locally HOT 1
- Validating stack mixins fails HOT 1
- Add Node into the buildpack order group HOT 6
- Add custom folders during paketo build HOT 12
- OpenJDK error with cgroups v2 HOT 6
- Enable option and support to specify a different JVM as an environment variable. HOT 5
- Request to Update Bellsoft Liberica Buildpacks to 9.4.2 as default HOT 3
- Implement RFC0052: Graceful Stack Upgrades HOT 3
- including newrelic buildpack HOT 10
- Spring Boot Native Builds with bellsoft-liberica:9.9.0-ea crash since this morning with 403 HOT 3
- Make it easier to run apps that require fonts HOT 2
- Support Structured Log Format HOT 1
- repo.spring.io brown-out process is breaking spring boot builds HOT 4
- build image un-idempotency HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java.