Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

使用MiraiAndroid编译导入会导致使用Mybatis的jar发生错误 #67

Open
eiriksgata opened this issue Aug 3, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@eiriksgata
Copy link

eiriksgata commented Aug 3, 2021

本来我以为使用Mybatis注解导致无法解析编译后的代码,然后导致的错误,后来换成了xml后发现,也根本不行。这个问题应该是关于secure-processing的问题

日志链接:https://paste.ubuntu.com/p/8ncRNSNn4J/

<font color="#28BB28">[INFO]</font><![CDATA[Starting mirai-console...]]>
<font color="#28BB28">[INFO]</font><![CDATA[Backend: version 2.7-M1, built on 2021-06-20 02:21:33.]]>
<font color="#28BB28">[INFO]</font><![CDATA[Frontend Android: version 3.2.1, provided by Mamoe Technologies]]>
<font color="#28BB28">[INFO]</font><![CDATA[Welcome to visit https://mirai.mamoe.net/]]>
<font color="#28BB28">[INFO]</font><![CDATA[Successfully loaded plugin indi.eiriksgata.rulateday-dice]]>
<font color="#28BB28">[INFO]</font><![CDATA[Prepared built-in commands: autoLogin, help, login, permission, status, stop]]>
<font color="#28BB28">[INFO]</font><![CDATA[canonical:/]]>
<font color="#28BB28">[INFO]</font><![CDATA[absolute:/]]>
<font color="#28BB28">[INFO]</font><![CDATA[configPath:/storage/emulated/0/Android/data/io.github.mzdluo123.mirai.android/files/config/indi.eiriksgata.rulateday-dice]]>
<font color="#28BB28">[INFO]</font><![CDATA[dataPath:/storage/emulated/0/Android/data/io.github.mzdluo123.mirai.android/files/data/indi.eiriksgata.rulateday-dice]]>
<font color="#28BB28">[INFO]</font><![CDATA[Rulateday-Dice is enable.Register Eventing...]]>
<font color="#28BB28">[INFO]</font><![CDATA[Linux]]>
<font color="#28BB28">[INFO]</font><![CDATA[db-config:{url=jdbc:sqlite:/storage/emulated/0/Android/data/io.github.mzdluo123.mirai.android/files/data/indi.eiriksgata.rulateday-dice/rulateday0.3.6.db, db.file.version=0.3.6, driver=org.sqlite.JDBC, db.file.name=rulateday}]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[java.lang.ExceptionInInitializerError]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at indi.eiriksgata.rulateday.instruction.BotServiceControl.<clinit>(BotServiceControl.java:20)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at indi.eiriksgata.rulateday.DiceMessageEventHandle.<clinit>(DiceMessageEventHandle.java:28)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at indi.eiriksgata.rulateday.RulatedayCore.onEnable(RulatedayCore.java:50)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:113)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:119)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(Unknown Source:7)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:36)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:129)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:172)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:208)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:276)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at io.github.mzdluo123.mirai.android.service.BotService.startConsole(BotService.kt:178)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at io.github.mzdluo123.mirai.android.service.BotService.onStartCommand(BotService.kt:99)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4663)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at android.app.ActivityThread.access$2900(ActivityThread.java:296)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2259)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at android.os.Handler.dispatchMessage(Handler.java:107)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at android.os.Looper.loop(Looper.java:213)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at android.app.ActivityThread.main(ActivityThread.java:8178)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at java.lang.reflect.Method.invoke(Native Method)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[Caused by: org.apache.ibatis.exceptions.PersistenceException: ]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[### Error building SqlSession.]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: javax.xml.parsers.ParserConfigurationException: http://javax.xml.XMLConstants/feature/secure-processing]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:52)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:44)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at indi.eiriksgata.rulateday.utlis.MyBatisUtil.createSFactory(MyBatisUtil.java:45)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at indi.eiriksgata.rulateday.utlis.MyBatisUtil.getSqlSession(MyBatisUtil.java:54)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at indi.eiriksgata.rulateday.service.impl.BotControlServiceImpl.<clinit>(BotControlServiceImpl.java:16)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	... 22 more]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: javax.xml.parsers.ParserConfigurationException: http://javax.xml.XMLConstants/feature/secure-processing]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:263)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:122)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.ibatis.builder.xml.XMLConfigBuilder.<init>(XMLConfigBuilder.java:70)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:49)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	... 26 more]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[Caused by: javax.xml.parsers.ParserConfigurationException: http://javax.xml.XMLConstants/feature/secure-processing]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.harmony.xml.parsers.DocumentBuilderFactoryImpl.setFeature(DocumentBuilderFactoryImpl.java:101)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:234)]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[	... 29 more]]>
<font color="#DD1C1A">[ERROR]</font><![CDATA[]]>
<font color="#28BB28">[INFO]</font><![CDATA[1 plugin(s) enabled.]]>

@eiriksgata eiriksgata added the bug Something isn't working label Aug 3, 2021
@mzdluo123
Copy link
Owner

由于Android系统限制,一些关于数据库的类缺失。并且sqlite官方也没有提供armv8的驱动文件,目前在miraiandroid上持久化数据还是个问题,可能下一个大版本还是得回归到使用openjdk的方案

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

No branches or pull requests

2 participants