BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

Hyper module failing

Description

Not sure how to reproduce as a test case but it looks like hyper if failing when instantiated, has it been tested with boxlang?

Then it should have constructed the http request (107 ms) - 0 > -1 /app/forgebox/hyper/models/HyperRequest.cfc:1258 1256: */ 1257: public HyperRequest function clone() { 1258: var req = new HyperRequest(); 1259: req.setInterceptorService( variables.interceptorService ); 1260: req.setAsyncManager( variables.asyncManager ); java.lang.IllegalArgumentException: 0 > -1 at java.base/java.util.Arrays.copyOfRange(Arrays.java:3808) at java.base/java.util.Arrays.copyOfRange(Arrays.java:3768) at ortus.boxlang.runtime.util.FQN.getPackage(FQN.java:124) at ortus.boxlang.runtime.util.ResolvedFilePath.getPackage(ResolvedFilePath.java:110) at ortus.boxlang.runtime.loader.resolvers.BoxResolver.findByRelativeLocation(BoxResolver.java:283) at ortus.boxlang.runtime.loader.resolvers.BoxResolver.findFromLocal(BoxResolver.java:172) at ortus.boxlang.runtime.loader.resolvers.BoxResolver.lambda$resolve$0(BoxResolver.java:133) at java.base/java.util.Optional.or(Optional.java:313) at ortus.boxlang.runtime.loader.resolvers.BoxResolver.resolve(BoxResolver.java:133) at ortus.boxlang.runtime.loader.ClassLocator.lambda$resolveFromSystem$2(ClassLocator.java:585) at java.base/java.util.Optional.or(Optional.java:313) at ortus.boxlang.runtime.loader.ClassLocator.resolveFromSystem(ClassLocator.java:585) at ortus.boxlang.runtime.

Activity

Show:

Brad Wood September 17, 2024 at 9:46 PM

That error doesn’t seem to have anything to do with Hyper-- just an array out of bounds error. I’d have to see what the package name of the class was-- prolly empty I’d guess, but I thought we had test coverage for that.

Ok, I think I have reproduced this with the test

FQN fqn = new FQN( Paths.get( "FQNTest.java" ) ); // Ensure we don't get array out of bounds exceptions assertEquals( "", fqn.getPackage().getPackage().getPackageString() );

Please see if this fixes the issue on the bleeding edge of BL>

John Whish September 17, 2024 at 8:41 PM

I can replicate this outside of ColdBox.

box install hyper box install bx-compat@1.4

Application.cfc

component { this.mappings[ "/hyper" ] = expandPath( "/modules/hyper" ); }

index.cfm

<cfscript> hyper = new hyper.models.HyperBuilder(); a = hyper.new(); </cfscript>

Then start it up using:

box server start cfengine=boxlang@1.0.0-beta14 javaVersion=openjdk21_jdk --debug

Luis Majano September 17, 2024 at 12:15 PM

can you check this please.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created September 17, 2024 at 11:08 AM
Updated September 17, 2024 at 9:46 PM
Resolved September 17, 2024 at 9:46 PM

Flag notifications