Skip to content

Commit 23f3c45

Browse files
authored
Merge pull request #117 from a-schild/dev-3.0-changes
Fix class loader issues with spring boot applications
2 parents 3e47650 + 511f702 commit 23f3c45

File tree

14 files changed

+62
-42
lines changed

14 files changed

+62
-42
lines changed

Changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# JAVE2
22

33
## Changelog
4+
- **3.0.1**
5+
- Fixed a class loader issue when using it in spring boot environments
46
- **3.0.0**
57
- Reworked base classes to handle the executable (Thanks to Michael Ressler)
68
- Reworked the API to have a fluent and more flexible api (Thanks to Michael Ressler)

jave-all-deps/pom.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>ws.schild</groupId>
77
<packaging>jar</packaging>
8-
<version>3.0.0</version>
8+
<version>3.0.1</version>
99
<artifactId>jave-all-deps</artifactId>
1010
<name>Jave all native dependencies package</name>
1111
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
@@ -37,7 +37,7 @@
3737
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3838
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
3939
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
40-
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
40+
<maven-deploy-plugin.version>3.0.1-M1</maven-deploy-plugin.version>
4141
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
4242
<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
4343
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>
@@ -154,32 +154,32 @@
154154
<dependency>
155155
<groupId>ws.schild</groupId>
156156
<artifactId>jave-core</artifactId>
157-
<version>3.0.0</version>
157+
<version>3.0.1</version>
158158
</dependency>
159159
<dependency>
160160
<groupId>ws.schild</groupId>
161161
<artifactId>jave-nativebin-win32</artifactId>
162-
<version>3.0.0</version>
162+
<version>3.0.1</version>
163163
</dependency>
164164
<dependency>
165165
<groupId>ws.schild</groupId>
166166
<artifactId>jave-nativebin-win64</artifactId>
167-
<version>3.0.0</version>
167+
<version>3.0.1</version>
168168
</dependency>
169169
<dependency>
170170
<groupId>ws.schild</groupId>
171171
<artifactId>jave-nativebin-linux32</artifactId>
172-
<version>3.0.0</version>
172+
<version>3.0.1</version>
173173
</dependency>
174174
<dependency>
175175
<groupId>ws.schild</groupId>
176176
<artifactId>jave-nativebin-linux64</artifactId>
177-
<version>3.0.0</version>
177+
<version>3.0.1</version>
178178
</dependency>
179179
<dependency>
180180
<groupId>ws.schild</groupId>
181181
<artifactId>jave-nativebin-osx64</artifactId>
182-
<version>3.0.0</version>
182+
<version>3.0.1</version>
183183
</dependency>
184184
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
185185
<dependency>

jave-core-test-java11/pom.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.0.0</version>
6+
<version>3.0.1</version>
77
<artifactId>jave-core-test-java11</artifactId>
88
<properties>
99
<maven.compiler.source>11</maven.compiler.source>
@@ -38,32 +38,32 @@
3838
<dependency>
3939
<groupId>ws.schild</groupId>
4040
<artifactId>jave-core</artifactId>
41-
<version>3.0.0</version>
41+
<version>3.0.1</version>
4242
</dependency>
4343
<dependency>
4444
<groupId>ws.schild</groupId>
4545
<artifactId>jave-nativebin-win32</artifactId>
46-
<version>3.0.0</version>
46+
<version>3.0.1</version>
4747
</dependency>
4848
<dependency>
4949
<groupId>ws.schild</groupId>
5050
<artifactId>jave-nativebin-win64</artifactId>
51-
<version>3.0.0</version>
51+
<version>3.0.1</version>
5252
</dependency>
5353
<dependency>
5454
<groupId>ws.schild</groupId>
5555
<artifactId>jave-nativebin-linux32</artifactId>
56-
<version>3.0.0</version>
56+
<version>3.0.1</version>
5757
</dependency>
5858
<dependency>
5959
<groupId>ws.schild</groupId>
6060
<artifactId>jave-nativebin-linux64</artifactId>
61-
<version>3.0.0</version>
61+
<version>3.0.1</version>
6262
</dependency>
6363
<dependency>
6464
<groupId>ws.schild</groupId>
6565
<artifactId>jave-nativebin-osx64</artifactId>
66-
<version>3.0.0</version>
66+
<version>3.0.1</version>
6767
</dependency>
6868
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
6969
<dependency>

jave-core-test/pom.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>ws.schild</groupId>
77
<packaging>jar</packaging>
8-
<version>3.0.0</version>
8+
<version>3.0.1</version>
99
<artifactId>jave-core-test</artifactId>
1010
<properties>
1111
<maven.compiler.source>1.8</maven.compiler.source>
@@ -40,32 +40,32 @@
4040
<dependency>
4141
<groupId>ws.schild</groupId>
4242
<artifactId>jave-core</artifactId>
43-
<version>3.0.0</version>
43+
<version>3.0.1</version>
4444
</dependency>
4545
<dependency>
4646
<groupId>ws.schild</groupId>
4747
<artifactId>jave-nativebin-win32</artifactId>
48-
<version>3.0.0</version>
48+
<version>3.0.1</version>
4949
</dependency>
5050
<dependency>
5151
<groupId>ws.schild</groupId>
5252
<artifactId>jave-nativebin-win64</artifactId>
53-
<version>3.0.0</version>
53+
<version>3.0.1</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>ws.schild</groupId>
5757
<artifactId>jave-nativebin-linux32</artifactId>
58-
<version>3.0.0</version>
58+
<version>3.0.1</version>
5959
</dependency>
6060
<dependency>
6161
<groupId>ws.schild</groupId>
6262
<artifactId>jave-nativebin-linux64</artifactId>
63-
<version>3.0.0</version>
63+
<version>3.0.1</version>
6464
</dependency>
6565
<dependency>
6666
<groupId>ws.schild</groupId>
6767
<artifactId>jave-nativebin-osx64</artifactId>
68-
<version>3.0.0</version>
68+
<version>3.0.1</version>
6969
</dependency>
7070
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
7171
<dependency>

jave-core/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>ws.schild</groupId>
77
<artifactId>jave-core</artifactId>
88
<packaging>jar</packaging>
9-
<version>3.0.0</version>
9+
<version>3.0.1</version>
1010
<name>Jave core package</name>
1111
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
1212
ffmpeg project. Developers can take take advantage of JAVE2 to transcode
@@ -43,7 +43,7 @@
4343
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4444
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
4545
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
46-
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
46+
<maven-deploy-plugin.version>3.0.1-M1</maven-deploy-plugin.version>
4747
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
4848
<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
4949
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>

jave-core/src/main/java/ws/schild/jave/process/ffmpeg/DefaultFFMPEGLocator.java

+19-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@ public DefaultFFMPEGLocator() {
9191

9292
// Everything seems okay
9393
path = ffmpegFile.getAbsolutePath();
94-
LOG.debug("ffmpeg executable found: {}", path);
94+
if (ffmpegFile.exists())
95+
{
96+
LOG.debug("ffmpeg executable found: {}", path);
97+
}
98+
else
99+
{
100+
LOG.error("ffmpeg executable NOT found: {}", path);
101+
}
95102
}
96103

97104
@Override
@@ -120,6 +127,17 @@ private void copyFile(String path, File dest) {
120127
dest.getAbsolutePath());
121128
is = ClassLoader.getSystemResourceAsStream(resourceName);
122129
}
130+
if (is == null) {
131+
// Use this for spring boot with different class loaders
132+
resourceName = "ws/schild/jave/nativebin/" + path;
133+
LOG.debug(
134+
"Alternative copy from Thread.currentThread().getContextClassLoader() <{}> to target <{}>",
135+
resourceName,
136+
dest.getAbsolutePath());
137+
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
138+
is = classloader.getResourceAsStream(resourceName);
139+
}
140+
123141
if (is != null) {
124142
if (copy(is, dest.getAbsolutePath())) {
125143
if (dest.exists()) {

jave-example/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.0.0</version>
6+
<version>3.0.1</version>
77
<artifactId>jave-example</artifactId>
88
<properties>
99
<maven.compiler.source>12</maven.compiler.source>
@@ -66,12 +66,12 @@
6666
<dependency>
6767
<groupId>ws.schild</groupId>
6868
<artifactId>jave-core</artifactId>
69-
<version>3.0.0</version>
69+
<version>3.0.1</version>
7070
</dependency>
7171
<dependency>
7272
<groupId>ws.schild</groupId>
7373
<artifactId>jave-nativebin-linux32</artifactId>
74-
<version>3.0.0</version>
74+
<version>3.0.1</version>
7575
</dependency>
7676
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
7777
<dependency>

jave-nativebin-arm64/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.0.0</version>
6+
<version>3.0.1</version>
77
<artifactId>jave-nativebin-linux-arm64</artifactId>
88
<name>Jave linux arm 64 bit native package</name>
99
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
@@ -35,7 +35,7 @@
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3636
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
3737
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
38-
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
38+
<maven-deploy-plugin.version>3.0.1-M1</maven-deploy-plugin.version>
3939
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
4040
<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
4141
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>

jave-nativebin-linux32/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.0.0</version>
6+
<version>3.0.1</version>
77
<artifactId>jave-nativebin-linux32</artifactId>
88
<name>Jave linux 32 bit native package</name>
99
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
@@ -35,7 +35,7 @@
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3636
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
3737
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
38-
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
38+
<maven-deploy-plugin.version>3.0.1-M1</maven-deploy-plugin.version>
3939
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
4040
<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
4141
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>

jave-nativebin-linux64/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.0.0</version>
6+
<version>3.0.1</version>
77
<artifactId>jave-nativebin-linux64</artifactId>
88
<name>Jave linux 64 bit native package</name>
99
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
@@ -35,7 +35,7 @@
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3636
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
3737
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
38-
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
38+
<maven-deploy-plugin.version>3.0.1-M1</maven-deploy-plugin.version>
3939
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
4040
<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
4141
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>

jave-nativebin-osx64/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.0.0</version>
6+
<version>3.0.1</version>
77
<artifactId>jave-nativebin-osx64</artifactId>
88
<name>Jave OSX 64 bit native package</name>
99
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
@@ -35,7 +35,7 @@
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3636
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
3737
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
38-
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
38+
<maven-deploy-plugin.version>3.0.1-M1</maven-deploy-plugin.version>
3939
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
4040
<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
4141
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>

jave-nativebin-win32/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.0.0</version>
6+
<version>3.0.1</version>
77
<artifactId>jave-nativebin-win32</artifactId>
88
<name>Jave windows 32 bit native package</name>
99
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
@@ -35,7 +35,7 @@
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3636
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
3737
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
38-
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
38+
<maven-deploy-plugin.version>3.0.1-M1</maven-deploy-plugin.version>
3939
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
4040
<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
4141
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>

jave-nativebin-win64/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.0.0</version>
6+
<version>3.0.1</version>
77
<artifactId>jave-nativebin-win64</artifactId>
88
<name>Jave windows 64 bit native package</name>
99
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
@@ -35,7 +35,7 @@
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3636
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
3737
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
38-
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
38+
<maven-deploy-plugin.version>3.0.1-M1</maven-deploy-plugin.version>
3939
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
4040
<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
4141
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<artifactId>jave-modules</artifactId>
55
<packaging>pom</packaging>
66
<properties>
7-
<revision>3.0.0</revision>
7+
<revision>3.0.1</revision>
88
<!-- Don't forget to change it also in DefaultFFMPEGLocator.java -->
99
<maven.compiler.source>1.8</maven.compiler.source>
1010
<maven.compiler.target>1.8</maven.compiler.target>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1212
</properties>
1313

14-
<version>3.0.0</version>
14+
<version>3.0.1</version>
1515
<name>Jave master project</name>
1616
<description>Jave master project</description>
1717
<url>https://github.com/a-schild/jave2</url>

0 commit comments

Comments
 (0)