Mysql Liferay上传文件错误

Mysql Liferay上传文件错误,mysql,liferay,Mysql,Liferay,liferay是否有任何快速修复,以修复上载文件错误。在上载过程中,我有: ERROR [BufferedIncreament-DLFolderLocalService.updateLastPostDate(long,Date)-1][BufferedIncrementRunnable:68] Unable to write buffered increment value to the database java.lang.NullPointerException at java.u

liferay是否有任何快速修复,以修复上载文件错误。在上载过程中,我有:

 ERROR [BufferedIncreament-DLFolderLocalService.updateLastPostDate(long,Date)-1][BufferedIncrementRunnable:68] Unable to write buffered increment value to the database
java.lang.NullPointerException
    at java.util.Date.getMillisOf(Date.java:956)
    at java.util.Date.before(Date.java:915)
    at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.updateLastPostDate(DLFolderLocalServiceImpl.java:1095)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
    at com.liferay.portal.increment.BufferedIncreasableEntry.proceed(BufferedIncreasableEntry.java:48)
    at com.liferay.portal.increment.BufferedIncrementRunnable.run(BufferedIncrementRunnable.java:65)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

我知道的唯一解决方案是重置DB模式,这可能会有问题:(帮助!

您应该在报告问题(除非您发现问题已经存在),然后执行以下任一操作:

  • 等到修好了再说
  • 创建一个ext插件,并将检查添加到
    DLFolderLocalServiceImpl.updateLastPostDate

    if (dlFolder.getLastPostDate() != null 
            && lastPostDate.before(dlFolder.getLastPostDate())) {
        return;
    }
    
  • 不要使用文档文件夹(只需将所有内容放入根目录)

  • 通过在服务器脱机时更新数据库中所有文档文件夹的
    lastPostDate
    (或随后刷新缓存),暂时修复所有现有文件夹的此问题:


    • Liferay运行大量代码以确保service builder具有其上下文-如果stacktrace没有缩短,则看起来您运行的线程与请求无关,而servicebuilder可能没有正确初始化(显然)

      因此,这可能不是Liferay中的bug,但您需要按照Liferay准备环境的方式来准备环境。我不能确切地告诉您必要的步骤,但您可以记住。此外,stacktrace中没有任何内容指向“上传bug”IMHO,因为您只涉及最后的发布日期


      如果你漏掉了stacktrace的部分内容,最好用“…”来表示你漏掉了一些东西。我觉得它不完整。你发布的部分在我看来不太合适。

      Hi:d你的水晶球坏了;)我使用的是liferay-portal-6.2-ce-ga4版本。我有一个问题,在错误尝试插入(幸运的是数据4expl)后,即使修复插入-每次下一次上载都会导致此错误:(哦,对不起,我已经检查了liferay-portal-6.2-ce-ga3,它没有包含那个问题。我以为它是为7引入的。不管怎样,你检查了它是否为ce-ga5修复了吗?也许升级也有帮助。我已经调整了我的帖子。
      UPDATE DLFOLDER SET LASTPOSTDATE = NOW() WHERE LASTPOSTDATE IS NULL