2020-11-18 15:55

@JFinal 那当jar相同目录下没有config这个文件夹时,我的resource文件应该从哪里读取,现在我的jar包里面有这些resource但是运行时无法读取,报错java.io.FileNotFoundException: D:\print\newFolder\config\report\WMS_SAGAWA_BLUE.jasper

2020-09-11 11:29

//全局service添加事务拦截器
me.addGlobalServiceInterceptor(new Tx());

2020-09-11 09:48

@李通 我其他后台异常是可以正常捕获,并提示的,比如数据库字段超限,提示XXX

2020-09-11 09:46

@李通


后端异常捕获成功,并返回JSON数据



image.png



前端共用ajax的err方法,提示用户报错信息,但是这个responseText为空



image.png

2020-09-10 13:37

上传文件时候,JFINAL默认有个10M的大小限制,当超过限制时,后台会异常,这个拦截器的renderJson到前端的message会为空(虽然你e.getMessage是有值的)。

2020-08-18 11:45

@李通 生死全在前员工身上,另外不管是不是管理员,现在大家对系统通常都是保存账号密码的。虽然有权限,但是真不知道是不是管理员干的。

2020-08-18 10:11

卧槽,你这功能用完不删,那就是往服务器上放了个原子弹啊

2020-07-08 08:51

你debug进去看,我怀疑你的Excel里面最下面有空白或者其他字符,你真是数据可能有几十万条,导致内存溢出的。

2020-06-04 08:56

@myth4ian 这个问题有办法解决吗

2020-06-01 14:45

@JFinal 谢谢回复。确实没认真看到配置,但是我设置不设置,如果我故意在定时任务线程执行的时候,去shutdown Tomcat,会抛出一个内存错误,能指点下我应该怎么解决吗? 如果我等待线程结束后关闭Tomcat就不会报错。

Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode):

"localhost-startStop-2" #35 daemon prio=5 os_prio=0 tid=0x00007fb5740d0800 nid=0x7eca in Object.wait() [0x00007fb55fdfe000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.join(Thread.java:1249)
- locked <0x00000000d8baf220> (a java.lang.Thread)
at java.lang.Thread.join(Thread.java:1323)
at it.sauronsoftware.cron4j.TaskExecutor.join(Unknown Source)
at it.sauronsoftware.cron4j.Scheduler.tillExecutorDies(Unknown Source)
at it.sauronsoftware.cron4j.Scheduler.stop(Unknown Source)
- locked <0x00000000d88395f0> (a java.lang.Object)
at com.jfinal.plugin.cron4j.Cron4jPlugin$TaskInfo.stop(Cron4jPlugin.java:279)
at com.jfinal.plugin.cron4j.Cron4jPlugin.stop(Cron4jPlugin.java:226)
at com.jfinal.core.JFinal.stopPlugins(JFinal.java:115)
at com.jfinal.core.JFinalFilter.destroy(JFinalFilter.java:91)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:312)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4733)
- locked <0x00000000d5cabdb8> (a java.util.HashMap)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5528)
- locked <0x00000000d59e19d8> (a org.apache.catalina.core.StandardContext)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:221)
- locked <0x00000000d59e19d8> (a org.apache.catalina.core.StandardContext)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"Catalina-startStop-2" #34 daemon prio=5 os_prio=0 tid=0x00007fb59021b000 nid=0x7ec9 waiting on condition [0x00007fb580bfa000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c0707990> (a java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
at java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:999)
- locked <0x00000000d59e1e88> (a org.apache.catalina.core.StandardHost)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:221)
- locked <0x00000000d59e1e88> (a org.apache.catalina.core.StandardHost)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1413)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"cron4j::scheduler[2bff2bb57426fc7c0fbc094a000001726e9c4f040b710954]::executor[2bff2bb57426fc7c52ae49a8000001726e9ca8966f71a121]" #32 prio=5 os_prio=0 tid=0x00007fb560077000 nid=0x7eb1 runnable [0x00007fb580dfb000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
- locked <0x00000000d9423d48> (a java.lang.Object)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
- locked <0x00000000d9423ec8> (a sun.security.ssl.AppInputStream)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at com.amazonaws.http.protocol.SdkHttpRequestExecutor.doReceiveResponse(SdkHttpRequestExecutor.java:82)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1330)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1145)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:802)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:770)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:744)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:704)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:686)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:550)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:530)
at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:2207)
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2174)
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2163)
at com.amazonaws.services.sqs.AmazonSQSClient.executeReceiveMessage(AmazonSQSClient.java:1607)
at com.amazonaws.services.sqs.AmazonSQSClient.receiveMessage(AmazonSQSClient.java:1578)
at com.amazonaws.services.sqs.AmazonSQSClient.receiveMessage(AmazonSQSClient.java:1619)
at com.cms.task.AwsSqsReceiveTask.run(AwsSqsReceiveTask.java:41)
at it.sauronsoftware.cron4j.RunnableTask.execute(Unknown Source)
at it.sauronsoftware.cron4j.TaskExecutor$Runner.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)

"ajp-nio-8009-Acceptor-0" #29 daemon prio=5 os_prio=0 tid=0x00007fb59048c800 nid=0x7eae waiting on condition [0x00007fb56c7ad000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:674)
at java.lang.Thread.run(Thread.java:745)

"ajp-nio-8009-ClientPoller-0" #28 daemon prio=5 os_prio=0 tid=0x00007fb590222800 nid=0x7ead waiting on condition [0x00007fb56c8ae000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1023)
at java.lang.Thread.run(Thread.java:745)

"http-nio-5566-Acceptor-0" #27 daemon prio=5 os_prio=0 tid=0x00007fb590220800 nid=0x7eac waiting on condition [0x00007fb5809f8000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:674)
at java.lang.Thread.run(Thread.java:745)

"http-nio-5566-ClientPoller-0" #26 daemon prio=5 os_prio=0 tid=0x00007fb59021f000 nid=0x7eab waiting on condition [0x00007fb580af9000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1023)
at java.lang.Thread.run(Thread.java:745)

"config.data" #22 prio=5 os_prio=0 tid=0x00007fb57467d000 nid=0x7ea7 waiting on condition [0x00007fb56ceb0000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000d8824d58> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)