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

windows打包jar包,运行时添加python脚本无异常、关闭重新启动后报初始化异常 #61

Open
easy-do opened this issue Apr 17, 2024 · 1 comment

Comments

@easy-do
Copy link

easy-do commented Apr 17, 2024

报错信息:

2024-04-17 15:41:31 [main] �[35mERROR�[0;39m �[32m[com.yomahub.liteflow.log.LFLog ]�[0;39m �[36mAn exception occurred while building the node[simpleCmdDevelop1],component[simpleCmdDevelop1(123)] register error LookupError: no codec search functions registered: can't find encoding 'UTF-8'�[0;39m
com.yomahub.liteflow.exception.NodeBuildException: An exception occurred while building the node[simpleCmdDevelop1],component[simpleCmdDevelop1(123)] register error LookupError: no codec search functions registered: can't find encoding 'UTF-8'
at com.yomahub.liteflow.builder.LiteFlowNodeBuilder.build(LiteFlowNodeBuilder.java:161)
at com.yomahub.liteflow.parser.helper.ParserHelper.buildNode(ParserHelper.java:94)
at com.yomahub.liteflow.parser.helper.ParserHelper.parseNodeDocument(ParserHelper.java:135)
at com.yomahub.liteflow.parser.base.BaseXmlFlowParser.parse(BaseXmlFlowParser.java:39)
at com.yomahub.liteflow.parser.base.BaseXmlFlowParser.parse(BaseXmlFlowParser.java:25)
at com.yomahub.liteflow.parser.el.ClassXmlFlowELParser.parseMain(ClassXmlFlowELParser.java:16)
at com.yomahub.liteflow.core.FlowExecutor.init(FlowExecutor.java:174)
at com.yomahub.liteflow.springboot.LiteflowExecutorInit.afterSingletonsInstantiated(LiteflowExecutorInit.java:21)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:986)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at plus.easydo.bot.JLCBotApplication.main(JLCBotApplication.java:25)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58)
2024-04-17 15:41:31 [main] �[35mERROR�[0;39m �[32m[org.springframework.boot.SpringApplication ]�[0;39m �[36mApplication run failed�[0;39m
com.yomahub.liteflow.exception.FlowExecutorNotInitException: init flow executor cause error for path [com.yomahub.liteflow.parser.sql.SQLXmlELParser],reason: An exception occurred while building the node[simpleCmdDevelop1],component[simpleCmdDevelop1(123)] register error LookupError: no codec search functions registered: can't find encoding 'UTF-8'
at com.yomahub.liteflow.core.FlowExecutor.init(FlowExecutor.java:197)
at com.yomahub.liteflow.springboot.LiteflowExecutorInit.afterSingletonsInstantiated(LiteflowExecutorInit.java:21)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:986)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at plus.easydo.bot.JLCBotApplication.main(JLCBotApplication.java:25)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58)

python脚本内容:

        import json
        x='{"name": "杰克", "age": 25, "nationality": "China"}'
        jsonData=json.loads(x)
        name=jsonData['nationality']
        
        print 'jLCLiteFlowContext:'
        ## 上下文信息
        print(dir(jLCLiteFlowContext))
        print jLCLiteFlowContext.getParam();
        
        print('botApi:')
        print(dir(botApi))
        print('dbApi:')
        print(dir(dbApi))
        print('botConfApi:')
        print(dir(botConfApi))
        
        print(botApi.getLoginInfo())
        print(botConfApi.getAllBotConf())
@easy-do easy-do changed the title windows打包jar包,运行时添加python脚本无异常、关闭后启动后报初始化异常 windows打包jar包,运行时添加python脚本无异常、关闭重新启动后报初始化异常 Apr 17, 2024
@easy-do
Copy link
Author

easy-do commented Apr 17, 2024

实测不光python、lua脚本也会这样 :
--获取上下文信息
local param = jLCLiteFlowContext:getParam()
print(param)
--botApi
print(botApi:getLoginInfo())
--dbApi
local tableName="bot_conf"
print(dbApi:selectAll(tableName))
--botConfApi
print(botConfApi:getAllBotConf())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant