NoSuchFileException o NullPointer exceptions while upgrading the DB for DXP 7.2 SP1

Issue

  • When running the DB_Upgrade tool for installing the SP1 on DXP 7.2, the following errors may appear and the upgrade will not complete:
ERROR [ServerService Thread Pool -- 89][ModuleReadHookImpl:85] Unable to copy from file:/opt/liferay/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/com.liferay.portal.osgi.web.jasper.plugins.taglib.jar?proto
col=jar&static=true to /opt/liferay/osgi/state/org.eclipse.osgi/1/0/bundleFile
java.nio.file.NoSuchFileException: /opt/liferay/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/com.liferay.portal.osgi.web.jasper.plugins.taglib.jar
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:526)
at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)
at java.nio.file.Files.copy(Files.java:1274)
at com.liferay.portal.bootstrap.ModuleReadHookImpl.process(ModuleReadHookImpl.java:65)
at org.eclipse.osgi.container.ModuleDatabase$Persistence.readModule(ModuleDatabase.java:1265)
at org.eclipse.osgi.container.ModuleDatabase$Persistence.load(ModuleDatabase.java:1160)
at org.eclipse.osgi.container.ModuleDatabase.load(ModuleDatabase.java:890)
at org.eclipse.osgi.storage.Storage.<init>(Storage.java:235)
at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:151)
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:69)
at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
at org.eclipse.osgi.launch.EquinoxFactory.newFramework(EquinoxFactory.java:24)
at com.liferay.portal.bootstrap.ModuleFrameworkImpl.initFramework(ModuleFrameworkImpl.java:279)
at com.liferay.portal.module.framework.ModuleFrameworkUtilAdapter.initFramework(ModuleFrameworkUtilAdapter.java:64)
at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:237)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:205)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:174)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:239)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:99)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)

or


ERROR [main][ModuleFrameworkImpl:1281] com.liferay.portal.kernel.exception.PortalException: java.lang.NullPointerException
com.liferay.portal.kernel.exception.PortalException: java.lang.NullPointerException
at com.liferay.portal.bootstrap.ModuleFrameworkImpl._getStaticBundle(ModuleFrameworkImpl.java:1105)
at com.liferay.portal.bootstrap.ModuleFrameworkImpl._addBundle(ModuleFrameworkImpl.java:646)
at com.liferay.portal.bootstrap.ModuleFrameworkImpl._installInitialBundle(ModuleFrameworkImpl.java:1255)
at com.liferay.portal.bootstrap.ModuleFrameworkImpl._deployStaticBundlesFromFile(ModuleFrameworkImpl.java:986)
at com.liferay.portal.bootstrap.ModuleFrameworkImpl._setUpInitialBundles(ModuleFrameworkImpl.java:1607)
at com.liferay.portal.bootstrap.ModuleFrameworkImpl.startFramework(ModuleFrameworkImpl.java:403)
at com.liferay.portal.module.framework.ModuleFrameworkUtilAdapter.startFramework(ModuleFrameworkUtilAdapter.java:100)
at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:226)
at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:197)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
Caused by: java.lang.NullPointerException
at org.eclipse.osgi.internal.framework.BundleContextImpl.notifyFindHooksPriviledged(BundleContextImpl.java:224)
at org.eclipse.osgi.internal.framework.BundleContextImpl.notifyFindHooks(BundleContextImpl.java:209)
at org.eclipse.osgi.internal.framework.BundleContextImpl.getBundles(BundleContextImpl.java:197)
at com.liferay.portal.bootstrap.ModuleFrameworkImpl._getStaticBundle(ModuleFrameworkImpl.java:1088)
... 14 more

Environment

  • DXP 7.2 - DB_Upgrade tool

Resolution

  • This is caused by temp files getting stick on the OSGI state. It's solved by clearing the following folders:
  1. $[Liferay-home]/work
  2. $[Liferay-home]/osgi/state
  3. $[WebServer-home]/temp
  4. $[WebServer-home]/work
这篇文章有帮助吗?
1 人中有 1 人觉得有帮助