请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

本地运行jar文件

因为在Linux中一直连接不到mysql,我本地也是15.0.2的jdk,所以我想本地运行emos-workflow.jar部署工作流

出现了如下错误应该怎么解决

https://img1.sycdn.imooc.com//szimg/630c870709acc25114200703.jpg

 .   ____          _            __ _ _

 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

  '  |____| .__|_| |_|_| |_\__, | / / / /

 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v2.4.2)


17:26:25  INFO   Starting EmosApplication using Java 15.0.2 on DESKTOP-RA29DMJ with PID 11120 (E:\PracticalProject\SpringBoot\resource-master\resource\emos-workflow.jar started by YD in E:\PracticalProject\SpringBoot\resource-master\resource)

17:26:25  INFO   No active profile set, falling back to default profiles: default

17:26:26  INFO   Multiple Spring Data modules found, entering strict repository configuration mode!

17:26:26  INFO   Bootstrapping Spring Data Redis repositories in DEFAULT mode.

17:26:26  INFO   Finished Spring Data repository scanning in 10 ms. Found 0 Redis repository interfaces.

17:26:27  INFO   Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@1fcb4808' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

17:26:27  INFO   Bean 'methodSecurityConfig' of type [org.activiti.spring.boot.MethodSecurityConfig$$EnhancerBySpringCGLIB$$5ace82a4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

17:26:27  INFO   Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

17:26:27  INFO   Tomcat initialized with port(s): 9090 (http)

17:26:27  INFO   Starting service [Tomcat]

17:26:27  INFO   Starting Servlet engine: [Apache Tomcat/9.0.41]

17:26:27  INFO   Initializing Spring embedded WebApplicationContext

17:26:27  INFO   Root WebApplicationContext: initialization completed in 2579 ms

17:26:28  INFO   Init DruidDataSource

17:26:28  INFO   {dataSource-1} inited

17:26:28  INFO   Using default implementation for ThreadExecutor

17:26:28  INFO   Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl

17:26:28  INFO   Quartz Scheduler v.2.3.2 created.

17:26:28  INFO   Using db table-based data access locking (synchronization).

17:26:28  INFO   JobStoreCMT initialized.

17:26:28  INFO   Scheduler meta-data: Quartz Scheduler (v2.3.2) 'quartzScheduler' with instanceId 'NON_CLUSTERED'

  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.

  NOT STARTED.

  Currently in standby mode.

  Number of jobs executed: 0

  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.

  Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is not clustered.


17:26:28  INFO   Quartz scheduler 'quartzScheduler' initialized from an externally provided properties instance.

17:26:28  INFO   Quartz scheduler version: 2.3.2

17:26:28  INFO   JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@7eb6b6b6

17:26:29  INFO


Using generated security password: 90b21090-71c5-483c-935d-0c87f0c7ce82


17:26:29  INFO   Initializing ExecutorService 'applicationTaskExecutor'

WARNING: An illegal reflective access operation has occurred

WARNING: Illegal reflective access by org.springframework.boot.loader.jar.Handler (file:/E:/PracticalProject/SpringBoot/resource-master/resource/emos-workflow.jar) to constructor sun.net.www.protocol.jar.Handler()

WARNING: Please consider reporting this to the maintainers of org.springframework.boot.loader.jar.Handler

WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations

WARNING: All illegal access operations will be denied in a future release

17:26:30  INFO   The following process definition files will be deployed: [meeting.bpmn20.xml, meeting.bpmn20.xml]

17:26:30  INFO   Found 1 Process Engine Configurators in total:

17:26:30  INFO   class org.activiti.spring.process.autoconfigure.ProcessExtensionsConfiguratorAutoConfiguration$$EnhancerBySpringCGLIB$$abcaaa42 (priority:10000)

17:26:30  INFO   Executing beforeInit() of class org.activiti.spring.process.autoconfigure.ProcessExtensionsConfiguratorAutoConfiguration$$EnhancerBySpringCGLIB$$abcaaa42 (priority:10000)

17:26:30  INFO   Executing configure() of class org.activiti.spring.process.autoconfigure.ProcessExtensionsConfiguratorAutoConfiguration$$EnhancerBySpringCGLIB$$abcaaa42 (priority:10000)

17:26:30  INFO   ProcessEngine default created

17:26:31  INFO   Process deployed: {id: meeting:1:aab2410d-277c-11ed-a6d1-005056c00001, key: meeting, name: meeting }

17:26:31  INFO   Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@61874b9d, org.springframework.security.web.context.SecurityContextPersistenceFilter@4dad0eed, org.springframework.security.web.header.HeaderWriterFilter@104dc1a2, org.springframework.security.web.authentication.logout.LogoutFilter@9dada78, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@164642a4, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@62765aec, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@d611f1c, org.springframework.security.web.session.SessionManagementFilter@4735d6e5, org.springframework.security.web.access.ExceptionTranslationFilter@1989e8c6, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@484149eb]

17:26:31  WARN   Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.validation.beanvalidation.LocalValidatorFactoryBean]: Factory method 'defaultValidator' threw exception; nested exception is java.lang.NoSuchMethodError: 'javax.el.ExpressionFactory javax.el.ELUtil.getExpressionFactory()'

17:26:31  INFO   Shutting down ExecutorService 'applicationTaskExecutor'

17:26:31  INFO   Shutting down Quartz Scheduler

17:26:31  INFO   Scheduler quartzScheduler_$_NON_CLUSTERED shutting down.

17:26:31  INFO   Scheduler quartzScheduler_$_NON_CLUSTERED paused.

17:26:31  INFO   Scheduler quartzScheduler_$_NON_CLUSTERED shutdown complete.

17:26:31  INFO   {dataSource-1} closed

17:26:31  INFO   Stopping service [Tomcat]

17:26:31  INFO


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

17:26:31  ERROR


***************************

APPLICATION FAILED TO START

***************************


Description:


An attempt was made to call a method that does not exist. The attempt was made from the following location:


    javax.el.ELManager.getExpressionFactory(ELManager.java:38)


The following method did not exist:


    'javax.el.ExpressionFactory javax.el.ELUtil.getExpressionFactory()'


The method's class, javax.el.ELUtil, is available from the following locations:


    jar:file:/E:/PracticalProject/SpringBoot/resource-master/resource/emos-workflow.jar!/BOOT-INF/lib/el-api-2.2.jar!/javax/el/ELUtil.class

    jar:file:/E:/PracticalProject/SpringBoot/resource-master/resource/emos-workflow.jar!/BOOT-INF/lib/jakarta.el-3.0.3.jar!/javax/el/ELUtil.class


The class hierarchy was loaded from the following locations:


    javax.el.ELUtil: jar:file:/E:/PracticalProject/SpringBoot/resource-master/resource/emos-workflow.jar!/BOOT-INF/lib/el-api-2.2.jar!/



Action:


Correct the classpath of your application so that it contains a single, compatible version of javax.el.ELUtil


正在回答 回答被采纳积分+3

插入代码

2回答

piglite 2023-08-04 17:50:54

这个是Activiti7的一个坑,pom里面添加Activiti7的时候,它会下载el-api-2.2作为依赖,但是el-api-2.2与jakarta.el-3.0.3有冲突。解决的方法也很直接,用压缩软件打开emos-workflow.jar(是打开不是解压),进入BOOT-INF文件夹,编辑classpath.idx文件,删除里面的el-api-2.2.jar的信息,保存后再进入BOOT-INF/lib文件夹,将el-api-2.2.jar直接删除掉就可以了。保存修改,再用java15在本地启动emos-workflow.jar就ok了。

2 回复 有任何疑惑可以回复我~
神思者 2022-08-29 20:52:04

把你电脑中所有JDK都卸载,然后重新安装15.0.2,重新配置环境变量

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信