No Assembler service found - please make sure that the right jars are in your classpath
Posted Fanx繁星
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No Assembler service found - please make sure that the right jars are in your classpath相关的知识,希望对你有一定的参考价值。
报错信息
[ERROR]2021-11-30 09:53:35.439[org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler:95] - Unexpected error occurred in scheduled task
com.atomikos.icatch.SysException: No Assembler service found - please make sure that the right jars are in your classpath
at com.atomikos.icatch.config.Configuration.loadAssembler(Configuration.java:352)
at com.atomikos.icatch.config.Configuration.getAssembler(Configuration.java:342)
at com.atomikos.icatch.config.Configuration.getConfigProperties(Configuration.java:358)
at com.atomikos.icatch.config.UserTransactionServiceImp.initialize(UserTransactionServiceImp.java:103)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:219)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:59)
at com.atomikos.icatch.jta.UserTransactionImp.getStatus(UserTransactionImp.java:117)
at org.springframework.transaction.jta.JtaTransactionManager.isExistingTransaction(JtaTransactionManager.java:824)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:574)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:361)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
at com.jees.datascale.bcht.limsnet.service.DataService$$EnhancerBySpringCGLIB$$23b2941d.update(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
过程
今天在给程序打包后,使用如下命令执行后,出现这个错误
java -jar xxxx.jar
原因
看报错信息因为 atomikos 是缺少Jar包了,但没有指出是哪个包
No Assembler service found - please make sure that the right jars are in your classpath
然后看下面这段报错的位置,发现一个transaction包下的错误,这个时候就知道啥原因了。。。
org.springframework.transaction.jta.JtaTransactionManager.isExistingTransaction(JtaTransactionManager.java:824)
解决方法
引jar包啊!!!!
如果加了 atomikos-util 的依赖的话,把下面的依赖加进去就好
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions</artifactId>
<version>4.0.6</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-jta</artifactId>
<version>4.0.6</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-jdbc</artifactId>
<version>4.0.6</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-api</artifactId>
<version>4.0.6</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>atomikos-util</artifactId>
<version>4.0.6</version>
</dependency>
以上是关于No Assembler service found - please make sure that the right jars are in your classpath的主要内容,如果未能解决你的问题,请参考以下文章
the service mysql57 failed the most
Microservices==;Service Mesh==;Serverless,走马观花