Skip to content

Commit

Permalink
LDEV-4728 - try to recover from exception
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Oct 18, 2023
1 parent 9ce493a commit 5af3ceb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions core/src/main/java/lucee/runtime/osgi/OSGiUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,7 @@ public static Bundle _start(Bundle bundle, Set<String> parents) throws BundleExc
List<PackageQuery> listPackages = getRequiredPackages(bundle);
List<PackageQuery> failedPD = new ArrayList<PackageQuery>();
loadPackages(parents, loadedBundles, listPackages, bundle, failedPD);
resolveBundleLoadingIssues(ThreadLocalPageContext.getConfig(), be2);
try {
// startIfNecessary(loadedBundles.toArray(new Bundle[loadedBundles.size()]));
BundleUtil.start(bundle);
Expand Down Expand Up @@ -2163,11 +2164,7 @@ public static boolean isValid(Object obj) {
return true;
}

public static boolean resolveBundleLoadingIssues(Config config, ClassNotFoundException cnfe) {
Throwable cause = cnfe.getCause();
if (!(cause instanceof BundleException)) return false;
BundleException be = (BundleException) cause;

public static boolean resolveBundleLoadingIssues(Config config, BundleException be) {
try {
loadBundlesAndPackagesFromMessage(config, be.getMessage());
return true;
Expand All @@ -2178,6 +2175,14 @@ public static boolean resolveBundleLoadingIssues(Config config, ClassNotFoundExc
return false;
}

public static boolean resolveBundleLoadingIssues(Config config, ClassNotFoundException cnfe) {
Throwable cause = cnfe.getCause();
if (!(cause instanceof BundleException)) return false;
BundleException be = (BundleException) cause;

return resolveBundleLoadingIssues(config, be);
}

// (bundle-version>=30.1.0)
// (!(bundle-version>=31.0.0))
private static VersionDefinition toVersionDefinition(String value, boolean bundle) throws BundleException {
Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="5.4.4.20-SNAPSHOT"/>
<property name="version" value="5.4.4.21-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>5.4.4.20-SNAPSHOT</version>
<version>5.4.4.21-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit 5af3ceb

Please sign in to comment.