problem with createDynamicProxy on second applicaton usage: caching in cfclasses?

Description

When trying to use RabbitMQ consumer interface, application fails on second (and consequent) startup. As soon as I delete this map C:\Users\wbr\.CommandBox\server\6F742CC718A8B01CD51A4773E2B81B0F-mysite4u-back\lucee-5.2.9.31\WEB-INF\lucee-web\cfclasses\RPC or the only file in it (Vdc65763751ec3c6ac73173d2c2e627944384 class) everytihng will startup fine again. This file is only created when I call createDynamicProxy and if I skip this command code will run fine (but lack functionality of course).
Same code runs fine in ACF 2016

ERROR in lucee:
No matching Method/Function for com.rabbitmq.client.impl.recovery.AutorecoveringChannel.basicConsume(string, boolean, Vdc65763751ec3c6ac73173d2c2e627944384) found

How to reproduce:
Attached rab3 zip has as simple coldbox project. Unzip and start a lucee server with commandbox.

Code explained:
Main.onAppinit will be executed at server startup (coldbox settings)
// create connection factory
application.factory = createObject( "java", "com.rabbitmq.client.ConnectionFactory" ).init();
application.factory.setUsername( "rabbitmq" );
application.factory.setPassword( "rabbitmq" );
// Create a shared connection for this application
application.connection = application.factory.newConnection();
application.stopConsumer = false;
this will init a rabbit connection, which wil be used in Main.start. Code in Main.start.
application.channel = application.connection.createChannel();

// Crete Queue just in case
application.channel.queueDeclare(
"stock.prices",
javaCast( "boolean", false ),
javaCast( "boolean", false ),
javaCast( "boolean", true ),
javaCast( "null", "" )
);

// Prepare a push consumer
consumerTask = createDynamicProxy(
new models.Consumer( application.channel, createuuid() ),
[ "com.rabbitmq.client.Consumer" ]
);
// Consume Stream API
param name="prc.consumertag" default="geen";
prc.consumerTag = application.channel.basicConsume( "stock.prices", false, consumerTask );

The application.channel.basicConsume call will fail the second time you start the app. Luis Majano has the same code in a sample app, but there everything works fine. Only difference: he has a very simple app and starts his java consumer in a simple start.cfm file. There the RPC map in cfclasses will NOT be created. As soon as you move the exact code to a coldbox hander (Main.cfc in my case) this RPC map will be created and this will cause a restart to fail.

Environment

commandbox on windows & linux

Assignee

Unassigned

Reporter

Wil de Bruin

Priority

Major

Labels

Fix versions

None

Affects versions

Configure