RE: Cannot run program "java": error=2, No such file or directory

thumbnail
Bangaru Raju Potnuru, modified 7 Years ago. New Member Posts: 22 Join Date: 11/22/14 Recent Posts

Hi All,
I got the below error ,while starting the server for Liferay-7 in eclpise.Could any one help me out

17-Oct-2018 11:35:45.794 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
 java.lang.RuntimeException: com.liferay.portal.kernel.process.ProcessException: java.io.IOException: Cannot run program "java": error=2, No such file or directory
 
   at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:256)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
    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)
Caused by: com.liferay.portal.kernel.process.ProcessException: java.io.IOException: Cannot run program "java": error=2, No such file or directory
    at com.liferay.portal.kernel.process.local.LocalProcessExecutor.execute(LocalProcessExecutor.java:230)
    at com.liferay.portal.lpkg.deployer.internal.LPKGIndexValidator._getTargetPlatformIndexURIs(LPKGIndexValidator.java:301)
    at com.liferay.portal.lpkg.deployer.internal.LPKGIndexValidator.validate(LPKGIndexValidator.java:222)
    at com.liferay.portal.lpkg.deployer.internal.DefaultLPKGDeployer._doActivate(DefaultLPKGDeployer.java:266)
    at com.liferay.portal.lpkg.deployer.internal.DefaultLPKGDeployer.activate(DefaultLPKGDeployer.java:84)
    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)

 

Thanks & Regards,

P.V.B.Raju

thumbnail
Minhchau Dang, modified 7 Years ago. Liferay Master Posts: 598 Join Date: 10/22/07 Recent Posts
Bangaru Raju Potnuru:
Caused by: com.liferay.portal.kernel.process.ProcessException: java.io.IOException: Cannot run program "java": error=2, No such file or directory
    at com.liferay.portal.kernel.process.local.LocalProcessExecutor.execute(LocalProcessExecutor.java:230)
    at com.liferay.portal.lpkg.deployer.internal.LPKGIndexValidator._getTargetPlatformIndexURIs(LPKGIndexValidator.java:301)
    at com.liferay.portal.lpkg.deployer.internal.LPKGIndexValidator.validate(LPKGIndexValidator.java:222)
    at com.liferay.portal.lpkg.deployer.internal.DefaultLPKGDeployer._doActivate(DefaultLPKGDeployer.java:266)
    at com.liferay.portal.lpkg.deployer.internal.DefaultLPKGDeployer.activate(DefaultLPKGDeployer.java:84)
    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)

You're running into LPS-68512. To resolve it, you need to make sure that your ${JAVA_HOME}/bin folder is on the system path.