Skip to content

Commit bba0aa6

Browse files
authored
fix(cli): drop bundlename hint from new-app sqlite datasources (#2304)
`wheels new` was emitting `bundleName: "org.xerial.sqlite-jdbc"` into the generated config/app.cfm, which routes Lucee 7's datasource resolver through BundleProvider. That code path currently fails on all platforms because the upstream S3 listing at bundle-download.s3.amazonaws.com contains a malformed entry (`javassist-3.9.0.GA copy.jar`) whose space + " copy" suffix is both an illegal URI character and an invalid OSGi version qualifier. The listing parse throws, bundle resolution dies, and the SQLite driver never loads — leaving fresh `wheels new` apps with a 0-byte database and a `wheels migrate latest` that silently no-ops. Removing the bundleName hint lets Lucee fall through to the standard classpath, which resolves org.sqlite.JDBC normally as long as sqlite-jdbc is on the lib path. Companion changes to bundle the JAR in homebrew-wheels and chocolatey-wheels will follow. Reported by a fresh-VM tutorial onboarding run on macOS arm64. Note: cli/src/ (legacy CommandBox surface) still emits the same bundleName hint and will need a matching change if that distribution is still being shipped.
1 parent 525a30e commit bba0aa6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cli/lucli/Module.cfc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3458,7 +3458,9 @@ component extends="modules.BaseModule" {
34583458
/**
34593459
* Configure SQLite as the zero-config default database by creating the db
34603460
* directory and injecting datasource configuration into config/app.cfm.
3461-
* Lucee auto-downloads the SQLite JDBC bundle via the bundleName hint.
3461+
* The SQLite JDBC driver is loaded from the standard Lucee classpath
3462+
* (shipped with the Wheels distribution) rather than via OSGi bundle
3463+
* resolution, which is currently unreliable on Lucee 7's BundleProvider.
34623464
*/
34633465
private void function configureSQLiteDatabase(
34643466
required string targetDir,
@@ -3482,14 +3484,12 @@ component extends="modules.BaseModule" {
34823484
sqliteConfig &= tab & "// SQLite zero-config database (configured by wheels new)" & nl;
34833485
sqliteConfig &= tab & 'this.datasources["#datasourceName#"] = {' & nl;
34843486
sqliteConfig &= tab & tab & 'class: "org.sqlite.JDBC",' & nl;
3485-
sqliteConfig &= tab & tab & 'bundleName: "org.xerial.sqlite-jdbc",' & nl;
34863487
sqliteConfig &= tab & tab & 'connectionString: "jdbc:sqlite:" & expandPath("../db/development.sqlite")' & nl;
34873488
sqliteConfig &= tab & "};";
34883489

34893490
// Also add a test database datasource
34903491
sqliteConfig &= nl & tab & 'this.datasources["#datasourceName#_test"] = {' & nl;
34913492
sqliteConfig &= tab & tab & 'class: "org.sqlite.JDBC",' & nl;
3492-
sqliteConfig &= tab & tab & 'bundleName: "org.xerial.sqlite-jdbc",' & nl;
34933493
sqliteConfig &= tab & tab & 'connectionString: "jdbc:sqlite:" & expandPath("../db/test.sqlite")' & nl;
34943494
sqliteConfig &= tab & "};";
34953495

0 commit comments

Comments
 (0)