Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK 0.7.4] - ClassNotFoundException for JsonManagedReference and JsonBackReference on running a certain project #118

Open
TheAmg opened this issue Sep 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@TheAmg
Copy link
Contributor

TheAmg commented Sep 4, 2024

Describe the bug

While running the following project on sdk 0.7.4 ClassnotFoundExceptions are seen on start.

Project : https://github.com/aamirshayanshaikh/spring-transaction-management

Trace added below

Reproduction steps

  1. Clone above project
  2. Add unlogged sdk dependency to the project and run with java 17

Expected behavior

For no exception to be throw and project to run normally

Additional context

Trace (Partial)

java.lang.ClassNotFoundException: com.fasterxml.jackson.annotation.JsonManagedReference
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:375)
	at io.unlogged.logging.ObjectMapperFactory$2._findAnnotation(ObjectMapperFactory.java:578)
	at selogger.com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.findReferenceType(JacksonAnnotationIntrospector.java:462)
	at selogger.com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findReferenceType(AnnotationIntrospectorPair.java:291)
	at selogger.com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findReferenceType(AnnotationIntrospectorPair.java:290)
	at selogger.com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$2.withMember(POJOPropertyBuilder.java:783)
	at selogger.com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$2.withMember(POJOPropertyBuilder.java:780)
	at selogger.com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.fromMemberAnnotations(POJOPropertyBuilder.java:1285)
	at selogger.com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.findReferenceType(POJOPropertyBuilder.java:780)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanProperties(BeanSerializerFactory.java:625)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory.constructBeanOrAddOnSerializer(BeanSerializerFactory.java:401)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanOrAddOnSerializer(BeanSerializerFactory.java:294)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory._createSerializer2(BeanSerializerFactory.java:239)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:173)
	at selogger.com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1495)
	at selogger.com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1443)
	at selogger.com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:544)
	at selogger.com.fasterxml.jackson.databind.SerializerProvider.findTypedValueSerializer(SerializerProvider.java:822)
	at selogger.com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:308)
	at selogger.com.fasterxml.jackson.databind.ObjectMapper._writeValueAndClose(ObjectMapper.java:4568)
	at selogger.com.fasterxml.jackson.databind.ObjectMapper.writeValueAsBytes(ObjectMapper.java:3844)
	at io.unlogged.logging.impl.DetailedEventStreamAggregatedLogger.recordEvent(DetailedEventStreamAggregatedLogger.java:355)
	at io.unlogged.logging.Logging.recordEvent(Logging.java:63)
	at com.javakar.transactionmanagementexample.author.InsertFirstAuthorService.Unlogged$Probed$$com$javakar$transactionmanagementexample$author$InsertFirstAuthorService$insertFirstAuthor(InsertFirstAuthorService.java:28)
	at com.javakar.transactionmanagementexample.author.InsertFirstAuthorService.insertFirstAuthor(InsertFirstAuthorService.java)
	at com.javakar.transactionmanagementexample.author.InsertFirstAuthorService$$FastClassBySpringCGLIB$$1c1c5f92.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
	at com.javakar.transactionmanagementexample.author.InsertFirstAuthorService$$EnhancerBySpringCGLIB$$4f6e1538.insertFirstAuthor(<generated>)
	at com.javakar.transactionmanagementexample.TransactionManagementExampleApplication.lambda$init$0(TransactionManagementExampleApplication.java:29)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:762)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:752)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
	at com.javakar.transactionmanagementexample.TransactionManagementExampleApplication.main(TransactionManagementExampleApplication.java:22)
java.lang.ClassNotFoundException: com.fasterxml.jackson.annotation.JsonBackReference
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:375)
	at io.unlogged.logging.ObjectMapperFactory$2._findAnnotation(ObjectMapperFactory.java:578)
	at selogger.com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.findReferenceType(JacksonAnnotationIntrospector.java:466)
	at selogger.com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findReferenceType(AnnotationIntrospectorPair.java:291)
	at selogger.com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findReferenceType(AnnotationIntrospectorPair.java:290)
	at selogger.com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$2.withMember(POJOPropertyBuilder.java:783)
	at selogger.com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$2.withMember(POJOPropertyBuilder.java:780)
	at selogger.com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.fromMemberAnnotations(POJOPropertyBuilder.java:1285)
	at selogger.com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.findReferenceType(POJOPropertyBuilder.java:780)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanProperties(BeanSerializerFactory.java:625)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory.constructBeanOrAddOnSerializer(BeanSerializerFactory.java:401)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanOrAddOnSerializer(BeanSerializerFactory.java:294)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory._createSerializer2(BeanSerializerFactory.java:239)
	at selogger.com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:173)
	at selogger.com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1495)
	at selogger.com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1443)
	at selogger.com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:544)
	at selogger.com.fasterxml.jackson.databind.SerializerProvider.findTypedValueSerializer(SerializerProvider.java:822)
	at selogger.com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:308)
	at selogger.com.fasterxml.jackson.databind.ObjectMapper._writeValueAndClose(ObjectMapper.java:4568)
	at selogger.com.fasterxml.jackson.databind.ObjectMapper.writeValueAsBytes(ObjectMapper.java:3844)
	at io.unlogged.logging.impl.DetailedEventStreamAggregatedLogger.recordEvent(DetailedEventStreamAggregatedLogger.java:355)
	at io.unlogged.logging.Logging.recordEvent(Logging.java:63)
	at com.javakar.transactionmanagementexample.author.InsertFirstAuthorService.Unlogged$Probed$$com$javakar$transactionmanagementexample$author$InsertFirstAuthorService$insertFirstAuthor(InsertFirstAuthorService.java:28)
	at com.javakar.transactionmanagementexample.author.InsertFirstAuthorService.insertFirstAuthor(InsertFirstAuthorService.java)
	at com.javakar.transactionmanagementexample.author.InsertFirstAuthorService$$FastClassBySpringCGLIB$$1c1c5f92.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
	at com.javakar.transactionmanagementexample.author.InsertFirstAuthorService$$EnhancerBySpringCGLIB$$4f6e1538.insertFirstAuthor(<generated>)
	at com.javakar.transactionmanagementexample.TransactionManagementExampleApplication.lambda$init$0(TransactionManagementExampleApplication.java:29)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:762)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:752)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
	at com.javakar.transactionmanagementexample.TransactionManagementExampleApplication.main(TransactionManagementExampleApplication.java:22)
@TheAmg TheAmg added the bug Something isn't working label Sep 4, 2024
@artpar
Copy link
Contributor

artpar commented Sep 4, 2024

Fixed by 672de89 released as v0.7.5

artpar added a commit that referenced this issue Sep 4, 2024
@artpar
Copy link
Contributor

artpar commented Sep 4, 2024

Pushed another missing fix as 0.7.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants