关于多个报表导出为一个文件的java代码运行报错

我用了这里的java代码:https://help.fanruan.com/finereport/doc-view-736.html,改了一些路径和参数明以后就会报这些错

[INFO]Starting fine assist...

[ERROR]Fine assist start failed.

[ERROR]java.lang.reflect.InvocationTargetException

com.fr.invoke.ReflectException: java.lang.reflect.InvocationTargetException

at com.fr.invoke.Reflect.on(Reflect.java:751)

at com.fr.invoke.Reflect.call(Reflect.java:412)

at com.fr.jvm.assist.FineAssist.loadNativeLibrary(FineAssist.java:82)

at com.fr.jvm.assist.FineAssist.access$000(FineAssist.java:21)

at com.fr.jvm.assist.FineAssist$1.run(FineAssist.java:52)

at com.fr.jvm.util.JvmAgentUtil.runOnce(JvmAgentUtil.java:39)

at com.fr.jvm.assist.FineAssist.<clinit>(FineAssist.java:58)

at com.fr.runtime.FineRuntime.<clinit>(FineRuntime.java:33)

at com.fr.module.engine.build.ModuleBuilder.<clinit>(ModuleBuilder.java:29)

at com.fr.module.engine.build.FineModuleParser.simpleParse(FineModuleParser.java:32)

at com.fr.module.tool.ActivatorToolBox.simpleLink(ActivatorToolBox.java:59)

at com.fr.io.ExportReports.main(ExportReports.java:36)

Caused by: java.lang.reflect.InvocationTargetException

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 com.fr.invoke.Reflect.on(Reflect.java:748)

... 11 more

Caused by: java.io.IOException: Can not attach to current VM

at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.<init>(HotSpotVirtualMachine.java:76)

at jdk.attach/sun.tools.attach.VirtualMachineImpl.<init>(VirtualMachineImpl.java:48)

at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:69)

at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:207)

... 16 more

[INFO]Starting fine runtime...

[ERROR]Unable to make static native java.lang.Class java.lang.ClassLoader.defineClass1(java.lang.ClassLoader,java.lang.String,byte[],int,int,java.security.ProtectionDomain,java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @3b81a1bc

java.lang.reflect.InaccessibleObjectException: Unable to make static native java.lang.Class java.lang.ClassLoader.defineClass1(java.lang.ClassLoader,java.lang.String,byte[],int,int,java.security.ProtectionDomain,java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @3b81a1bc

at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)

at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)

at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)

at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)

at com.fr.plugin.Start$Jdk11Helper.findMethod(Start.java:122)

at com.fr.plugin.Start$Helper.<init>(Start.java:96)

at com.fr.plugin.Start$Jdk11Helper.<init>(Start.java:108)

at com.fr.plugin.Start.defineHelper(Start.java:82)

at com.fr.plugin.Start.<init>(Start.java:23)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)

at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)

at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)

at java.base/java.lang.Class.newInstance(Class.java:645)

at com.fr.runtime.FineRuntime.initEncryptedBridge(FineRuntime.java:95)

at com.fr.runtime.FineRuntime.start(FineRuntime.java:52)

at com.fr.module.engine.build.ModuleBuilder.<clinit>(ModuleBuilder.java:29)

at com.fr.module.engine.build.FineModuleParser.simpleParse(FineModuleParser.java:32)

at com.fr.module.tool.ActivatorToolBox.simpleLink(ActivatorToolBox.java:59)

at com.fr.io.ExportReports.main(ExportReports.java:36)

[ERROR]com.fr.plugin.bridge.FinePluginBridge

java.lang.ClassNotFoundException: com.fr.plugin.bridge.FinePluginBridge

at com.fr.plugin.Start.findClass(Start.java:69)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)

at com.fr.plugin.Start.loadClass(Start.java:38)

at java.base/java.lang.Class.forName0(Native Method)

at java.base/java.lang.Class.forName(Class.java:467)

at com.fr.runtime.FineRuntime.initEncryptedBridge(FineRuntime.java:96)

at com.fr.runtime.FineRuntime.start(FineRuntime.java:52)

at com.fr.module.engine.build.ModuleBuilder.<clinit>(ModuleBuilder.java:29)

at com.fr.module.engine.build.FineModuleParser.simpleParse(FineModuleParser.java:32)

at com.fr.module.tool.ActivatorToolBox.simpleLink(ActivatorToolBox.java:59)

at com.fr.io.ExportReports.main(ExportReports.java:36)

Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "this.method" is null

at com.fr.plugin.Start$Jdk11Helper.defineClass(Start.java:114)

at com.fr.plugin.Start.findClass(Start.java:67)

... 10 more

[INFO]Fine runtime started.

[DEBUG]Fire event AfterSwitch ,listeners : [].

[INFO]Module VirtualActivator starting...

[INFO]Module BaseDBActivator starting...

log4j:WARN No appenders could be found for logger (com.fr.third.org.jboss.logging).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

1月 03, 2022 3:13:34 下午 com.fr.third.org.hsqldb.persist.Logger logSevereEvent

严重: could not reopen database

com.fr.third.org.hsqldb.HsqlException: Database lock acquisition failure: lockFile: com.fr.third.org.hsqldb.persist.LockFile@21eb5b14[file =D:\FineReport_10.0\webapps\webroot\WEB-INF\embed\finedb\db.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2022-01-03 07:13:33 heartbeat - read: -7587 ms.

at com.fr.third.org.hsqldb.error.Error.error(Error.java:85)

at com.fr.third.org.hsqldb.error.Error.error(Error.java:73)

at com.fr.third.org.hsqldb.persist.LockFile.newLockFileLock(LockFile.java:642)

at com.fr.third.org.hsqldb.persist.Logger.acquireLock(Logger.java:1415)

at com.fr.third.org.hsqldb.persist.Logger.open(Logger.java:371)

at com.fr.third.org.hsqldb.Database.reopen(Database.java:225)

at com.fr.third.org.hsqldb.Database.open(Database.java:207)

at com.fr.third.org.hsqldb.DatabaseManager.getDatabase(DatabaseManager.java:255)

at com.fr.third.org.hsqldb.DatabaseManager.newSession(DatabaseManager.java:156)

at com.fr.third.org.hsqldb.jdbc.JDBCConnection.<init>(JDBCConnection.java:3570)

at com.fr.third.org.hsqldb.jdbc.JDBCDriver.getConnection(JDBCDriver.java:313)

at com.fr.third.org.hsqldb.jdbc.JDBCDriver.connect(JDBCDriver.java:261)

at com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1461)

at com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1525)

at com.fr.third.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2165)

请问有大佬知道为什么吗?

FineReport 普普通通的len 发布于 2022-1-3 15:13
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
0
zsh331Lv8专家互助
发布于2022-6-24 17:20

-- 路径指向异常,类无法加载(类包加载完整);

——————————————————

image.png

image.png

最佳回答
0
snrtuemcLv8专家互助
发布于2022-1-3 15:21

看这个报错,应该是你你改的某个参数,原来是引号引者,你改的时候,不小心把引号丢了,按文档仔细检查你改的地方

image.png

  • 3关注人数
  • 553浏览人数
  • 最后回答于:2022-6-24 17:20
    请选择关闭问题的原因
    确定 取消
    返回顶部