Skip to content

AppMap Recording Failure in Spring Boot Applications #293

Open

Description

@roomicofficial

Hello, at our organization, a team installed AppMap as part of an initiative to evaluate GenAI developer assistance tools for licensing. However, we are consistently encountering an issue while running our Java Spring Boot application with AppMap. We have tried exploring the AppMap documentation and other resources, but we have been unable to resolve the error.

We would appreciate any support you can provide, as we are interested in further exploring AppMap and recommending it for an organization-level license if it works as documented.

Spring Boot : v2.7.13 and Spring : v5.3.28 and Java : 17.0.8

The error log for the Spring Boot application is as follows:

11:53:06.474 [main] WARN ClassFileTransformer.transform:
java.lang.ArrayIndexOutOfBoundsException: Index 46 out of bounds for length 42 at
com.appland.shade.javassist.bytecode.ByteArray.readU16bit(ByteArray.java:27) at
com.appland.shade.javassist.bytecode.LocalVariableAttribute.nameIndex(LocalVariableAttribute.java:207) at
com.appland.shade.javassist.bytecode.LocalVariableAttribute.variableName(LocalVariableAttribute.java:217) at
com.appland.appmap.output.v1.Parameters.(Parameters.java:122) at
com.appland.appmap.output.v1.Event.(Event.java:159) at
com.appland.appmap.record.EventTemplateRegistry.register(EventTemplateRegistry.java:42) at
com.appland.appmap.transform.annotations.Hook.prepare(Hook.java:95) at
com.appland.appmap.transform.ClassFileTransformer.getHookSites(ClassFileTransformer.java:254) at
com.appland.appmap.transform.ClassFileTransformer.applyHooks(ClassFileTransformer.java:196) at
com.appland.appmap.transform.ClassFileTransformer.transform(ClassFileTransformer.java:334) at
java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244) at
java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at
java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:541) at
java.base/java.lang.ClassLoader.defineClass1(Native Method) at
java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) at
java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) at
java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:76) at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) at
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:188) at
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:579) at
java.base/java.lang.Class.forName(Class.java:467) at
org.springframework.util.ClassUtils.forName(ClassUtils.java:284) at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:469) at
org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1621) at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1548) at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:704) at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:674) at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1684) at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:542) at
org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:246) at
org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:229) at
org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:182) at
org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:157) at
org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:47) at
org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) at
org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:193) at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:153) at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:129) at
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:343) at
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247) at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:748) at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564) at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) at
org.springframework.boot.SpringApplication.run(SpringApplication.java:307) at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)

Activity

  1. dividedmind commented on Feb 27, 2025

    @dividedmind
    Contributor

    Thank you so much for the report! The details you've provided are very helpful. Let me look into the issue and get back to you.

  2. dividedmind commented on Feb 27, 2025

    @dividedmind
    Contributor

    Unfortunately I'm unable to reproduce this issue. I'll keep trying, but in the meantime could you generate some debugging information by setting system properties (eg. with java -D option) appmap.debug=true and appmap.debug.locals=true and sending me the log?

  3. dividedmind commented on Feb 28, 2025

    @dividedmind
    Contributor

    Another thing to check: are you using any other code instrumentation or transformation tools? This could be things like code coverage recorders, profilers, obfuscators etc. If yes, it's possible one of them is interfering with AppMap; you could try running your code with just AppMap to see if it helps. Please let me know if it does!

  4. self-assigned this
    on Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions