Hi Chris,

that's most likely https://issues.apache.org/jira/browse/TAP5-2605 and it
should be fixed next Tapestry release.

In the meantime, you could override the GoogleClosureMinimizer by
copying the code from
org.apache.tapestry5.internal.webresources.GoogleClosureMinimizer to a new
class and look for the line:

SourceFile input = SourceFile.fromInputStream(resource.toString(),
resource.openStream(), StandardCharsets.UTF_8);

Replace resourse.toString() with a valid filename-like String, e.g.,
"streamable-resourece".

The first argument of the SourceFile.fromInputStream call doesn't actually
matter, but it might fail if the filesystem doesn't like angle brackets or
any other character in the String representation of StreamableResource.


Override the existing Minimizer with:

@Contribute(ResourceMinimizer.class)
@Primary
public static void overrideJavaScriptMinimizer(MappedConfiguration<String,
ResourceMinimizer> conf) {
    conf.overrideInstance("text/javascript",
FixedGoogleClosureMinimizer.class);
}


Cheers
Ben

On Mon, May 20, 2024 at 11:55 AM Christopher Dodunski (Tapestry) <
chrisfromtapes...@christopher.net.nz> wrote:

> Hi all,
>
> Today I encountered the below exception after upgrading from Tapestry
> 5.8.2 to 5.8.6, and am wondering what changed between these versions
> that might have led to this.  A dependency incompatibility perhaps?
>
> Evidently not liking the angle bracket immediately following
> "StreamableResource".  Running in production mode on Java 1.8, if this
> makes any difference.
>
> "Render queue error in SetupRender[core/ExceptionReport]: Illegal char
> <<> at index 18: StreamableResource<text/javascript;charset=utf-8 'core'
> JavaScript stack, for locale en,
> resources=classpath:META-INF/assets/tapestry5/require.js,
> classpath:META-INF/assets/tapestry5/underscore-1.13.6.js,
> classpath:META-INF/assets/tapestry5/t53-compatibility.js,
> classpath:META-INF/assets/tapestry5/jquery.js,
> classpath:META-INF/modules/t5/core/init.js,
> classpath:META-INF/assets/tapestry5/jquery-shim.js,
> classpath:META-INF/modules/t5/core/alert.js,
> classpath:META-INF/modules/t5/core/ajax.js,
> classpath:META-INF/modules/t5/core/bootstrap.js,
> classpath:META-INF/modules/t5/core/console.js,
> classpath:org/apache/tapestry5/t5-core-dom-jquery.js,
> classpath:META-INF/modules/t5/core/events.js,
> classpath:META-INF/modules/t5/core/exception-frame.js,
> classpath:META-INF/modules/t5/core/fields.js,
> classpath:META-INF/modules/t5/core/forms.js,
> classpath:META-INF/modules/t5/core/pageinit.js,
> classpath:META-INF/modules/t5/core/messages.js,
> classpath:META-INF/modules/t5/core/utils.js,
> classpath:META-INF/modules/t5/core/validation.js,
> classpath:META-INF/assets/tapestry5/underscore-shim.js COMPRESSABLE
> lastModified: Mon May 20 21:09:15 NZST 2024 size: 506185>"
>
> Kind regards,
>
> Chris.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to