Hi, I just upgraded to Lucee 6.2 from 6.0. Everyth...
# lucee
t
Hi, I just upgraded to Lucee 6.2 from 6.0. Everything works great, except my NewRelic integration stopped working. Here's my code, which was working fine in 6.0:
Copy code
var newRelicAgent = createObject("java","com.newrelic.api.agent.NewRelic");
newRelicAgent.setTransactionName("", "/#replace(replace(arguments.event.getCurrentEvent(), ":", "/", "ALL"), ".", "/", "ALL")#")
When I comment out the second line, it's ok, otherwise I get this error:
Message:	unable to load class path [com/newrelic/api/agent/NewRelic.class]
Tomcat is loading the NewRelic agent, and it's recording activity. I have a copy of the jars in /WEB-INF/lucee-server/context/lib/ Any ideas??
z
Copy code
<cfscript>
	newRelic = new component 
		javaSettings = '{maven:["com.newrelic.agent.java:newrelic-api:8.18.0"]}'
	{
		import com.newrelic.api.agent.NewRelic;
		function test() {
			newRelicAgent = createObject("java","com.newrelic.api.agent.NewRelic");
			newRelicAgent.setTransactionName("", "test");
		}
	};
	dump(newRelic.test());
</cfscript>
hmmm, that should be working. how did you install?
t
That gives me the same thing. The jars are in WEB-INF/lucee-server/context/lib/ They were already in there from lucee 5 and 6.0. It's only when I upgraded to 6.2 that it started failing. Seems kinda weird, but I thought maybe something had changed in 6.1 or 6.2 that might be obvious. I did read through the release notes and didn't see anything that stood out, but hoped someone who knows more than me might have some insight.
z
can you describe your install? os java tomcat etc etc?
t
Yep, it's tomcat 10, Java 25 on Amazon Linux 2
z
using the lucee installer?
t
No I think I probably used the jar
z
java 25????
t
I updated through the admin interface
z
java 23 is the latest stable release, 24 is still in early access
what version is your lucee loader? the admin overview page will list it
t
OpenJDK Runtime Environment (build 1.8.0_382-b05) OpenJDK 64-Bit Server VM (build 25.382-b05, mixed mode)
let me look 2 secs
z
yeah java 8 is no longer supported
t
Loader Version6.0.0.585#
z
why are you using java 25?
that's really bleeding edge and unstable https://jdk.java.net/25/
as a first step, i'd suggest going 21 or 23
t
Actually I'm using 11
z
ahhh ok
t
my tomcat config points to a different java version than java -version
z
you mentioned tomcat was seeing the new relic jar being loaded?
t
yes, it says so when tomcat starts, and it's recording info in newrelic
it's just when I try to access the newrelic api in lucee and set the transaction name
z
this is all locally? try stopping lucee, replace the jar in tomcat/lib with the 6.2 jar https://cdn.lucee.org/lucee-6.2.0.321.jar and restart? (this is upgrading the loader)
but hang on, if you are running tomcat 10, we only released the installer with tomcat 10 for 6.2 so how come you have a 6.0 loader?
t
Running loader 6.2.0.321 now, still get the same error
z
did you manually update tomcat?
t
I would have done yes - but that would have been long before I switched from 6 to 6.2
z
no that's not possible, 6 never worked with tomcat 10
6.2 introduced support for jakarta / aka tomcat 10
t
ahh, sorry my mistake
Apache Tomcat/9.0.72
I have 10 installed but it's not running
z
okay 🙂
i'd suggest doing a clean install using the 6.2 installer (in a vm maybe? ) and seeing if you get the same problems?
t
yeah ok - I'll give that a crack later today 👍
z
@tgmweb context/lib should be working in 6.2.1.55, can you try it? https://luceeserver.atlassian.net/browse/LDEV-5376
t
Hey Zack - sorry I got held up with something else! I get the same error - currently on 6.2.1.82-SNAPSHOT I did see the ticket I think this fix was related to - someone had got something similar working by putting the jar in /bundles - but that didn't work for me either. I'll come back to 6.2 later, 6.0 is still working ok for me at the moment. Really appreciate your help! Thanks,
❤️ 1
z
Even after a restart?