Fórum

Ant deploy: Unable to delete file commons-logging.jar

thumbnail
Ivano Carrara, modificado 9 Anos atrás.

Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
I'm porting a portlet plugin from 6.1 to 6.2 Liferay platform

After fixed some deprecations in service.xml, the Build Services generated my service layer with success.

Before to fix the others things due the 6.2 migration I ran the Ant deploy target but I obtain the below error and I can't resolve the issue.

Please, anyone could help me ?

Thank you in advance !

Ivano C.

My environment:
------------------------
- Eclipse Java EE IDE for Web Developers - Version: Luna Service Release 1 (4.4.1)
- Liferay IDE 2.2.1.201411200728-ga2

Ant log result:
--------------------

Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xml
deploy:
     [copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
    [javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
    [javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
     [java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
     [java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
    [javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
    [javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar

BUILD FAILED
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common-plugin.xml:482: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:993: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:299: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:1770: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:1853: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:409: Unable to delete file C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\commons-logging.jar

Total time: 6 seconds
thumbnail
Gregory Amerson, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
It seems that some process is locking that file. To find out what process is causing the problem use this program:
http://technet.microsoft.com/en-us/sysinternals/bb896653

So replicate the problem and then run that program and use the "Find > Handle..." and type in the filename of the problematic file. It should return any process id that has that file open currently. You can see if it is tomcat or Eclipse jvm that is locking the file. Once we know who is doing locking it, then we can start figuring out workarounds.
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Dear Gregory, thank you for your comment

In fact if I run Ant deploy for a test-portlet or marketplace-portlet for example, I don't get this problem.

I'm trying to use MS Process Explorer right now and I'll come back after a few minutes

Thank you in advance,
Ivano C.
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Dear Gregory, here are the similar file in use by some processes after the Ant deploy command:

- RAIDXpert.exe 1724 File C:\Program Files (x86)\AMD\RAIDXpert\jetty\lib\ext\commons-logging.jar
- javaw.exe 8256 File C:\dev\eclipse-jee-luna-SR1\plugins\org.apache.ant_1.9.2.v201404171502\lib\ant-commons-logging.jar

I don't think the above files are involved in my problem - what do you think ?

Please note that the commons-logging.jar that is one of the jar in the classpath part by Liferay Portlet Plugin API, is put in the folder C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib by the Ant deploy process.

Of course the commons-logging.jar is left in the above folder after the error occurs.

Thank you in advance for comment !

Ivano C.
thumbnail
Gregory Amerson, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
I agree it seems those two files are not involved. So the Explorer program is not reporting that any program has that file open? but the Ant Deploy process still reports that it can't be deleted?

How are you invoking the "deploy" command? From within Ecilpse or from command line?
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Gregory Amerson:
I agree it seems those two files are not involved. So the Explorer program is not reporting that any program has that file open? but the Ant Deploy process still reports that it can't be deleted?

How are you invoking the "deploy" command? From within Ecilpse or from command line?


Yes, the Explorer program is not reporting that any program has that file open - the only open program is Eclipse Luna and the deploy process still reports that it can't be deleted.

I checked also the properties of the jar left in my lib folder by the Ant deploy process and gave it the maximun permission to my user but nothing.

Actually I'm trying to Ant deploy from within Eclipse.

I'll try now to run it from the command line and I'll come back soon.

Thank you !

Ivano C.
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Gregory Amerson:
I agree it seems those two files are not involved. So the Explorer program is not reporting that any program has that file open? but the Ant Deploy process still reports that it can't be deleted?

How are you invoking the "deploy" command? From within Ecilpse or from command line?


I ran the Ant deploy from the command line as Administrator but the error is the same:

C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet>ant deploy
Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xml

deploy:
     [copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
    [javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
    [javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
     [java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
     [java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
    [javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
    [javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar

BUILD FAILED
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common-plugin.xml:482: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:993: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:299: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:1770: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:1853: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:409: Unable to delete file C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
\commons-logging.jar

Total time: 5 seconds
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Gregory Amerson:
I agree it seems those two files are not involved. So the Explorer program is not reporting that any program has that file open? but the Ant Deploy process still reports that it can't be deleted?

How are you invoking the "deploy" command? From within Ecilpse or from command line?


ERRATA CORRIGE: After I deleted the commons-logging.jar left in my lib folder by Ant deploy commnad form the IDE, the Ant deploy from the command line was ok - maibe is a problem by Eclipse Luna version I'm using ?


C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet>ant deploy
Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xm
l

deploy:
     [copy] Copying 2 files to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-b
ase-portlet\docroot\WEB-INF\lib
     [copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-ba
se-portlet\docroot\WEB-INF\tld
     [copy] Copying 5 files to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-b
ase-portlet\docroot\WEB-INF\lib
    [javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portl
ets\o2-base-portlet\docroot\WEB-INF\classes
    [javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.
2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
     [java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/
tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
     [java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/
tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
    [javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portl
ets\o2-base-portlet\docroot\WEB-INF\classes
    [javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.
2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
   [delete] Deleting: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portlet-6
.2.0.1.war
      [zip] Building zip: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portl
et-6.2.0.1.war
     [copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\bundles\tomcat-7.0.47\
deploy

BUILD SUCCESSFUL
Total time: 7 seconds
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Gregory Amerson:
I agree it seems those two files are not involved. So the Explorer program is not reporting that any program has that file open? but the Ant Deploy process still reports that it can't be deleted?

How are you invoking the "deploy" command? From within Ecilpse or from command line?


The behavior is very strange: I launch Ant deploy from the command line and the build was successfull. Then immediately after I relaunch a second time the same And delpoy command and the process fails. Then I manually delete the commons-logging.jar from my lib folder and relauch the Ant deploy command and the build was successfully.

Below the three command in sequence and the results - the first is OK, the second is KO, then I delete the jar and the last is OK.

Note that from the IDE the Ant deploy is everytime KO.

*** try 1 *** > OK

C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet>ant deploy
Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xml

deploy:
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[zip] Building zip: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portlet-6.2.0.1.war
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\bundles\tomcat-7.0.47\deploy

BUILD SUCCESSFUL
Total time: 8 seconds

*** try 2 *** > KO

C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet>ant deploy
Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xml

deploy:
[copy] Copying 2 files to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\tld
[copy] Copying 5 files to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[delete] Deleting: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portlet-6.2.0.1.war

BUILD FAILED
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common-plugin.xml:482: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:993: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:299: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:1770: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:1853: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:409: Unable to delete file C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
\commons-logging.jar

Total time: 4 seconds

*** try 3 *** > OK

C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet>ant deploy
Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xml

deploy:
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[zip] Building zip: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portlet-6.2.0.1.war
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\bundles\tomcat-7.0.47\deploy

BUILD SUCCESSFUL
Total time: 7 seconds
thumbnail
Gregory Amerson, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Can you retry this test but this time close the o2-base-portlet project in Eclipse and then try to reproduce?
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Gregory Amerson:
Can you retry this test but this time close the o2-base-portlet project in Eclipse and then try to reproduce?


Hi Gregory,

I restarted my PC and without open Eclipse I launched Ant deploy command from the command line - Two times the command processed ok but the third time failed. No one more build with success.

Then I closed the command prompt and redone the Ant deploy - One time the command processed ok but the second time failed. No one more build with success.

Then I closed the command prompt and redone the Ant deploy - One time the command processed ok but the second time failed. No one more build with success.

Then I closed the command prompt and redone the Ant deploy - The command fails. No one more build with success.

Then I closed the command prompt and redone the Ant deploy - The command fails. No one more build with success.

I restarted my PC and without open Eclipse I launched Ant deploy command from the command line - One time the command processed ok but the second time failed. No one more build with success.

Then I closed the command prompt and redone the Ant deploy - The command fails. No one more build with success.

Of course when a command fails, before to retry I'll delete the commons-loggin.jar from the lib folder.

The log below is about the first try:

C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet>ant deploy
Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xml

deploy:
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[zip] Building zip: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portlet-6.2.0.1.war
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\bundles\tomcat-7.0.47\deploy

BUILD SUCCESSFUL
Total time: 53 seconds

C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet>ant deploy
Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xml

deploy:
[copy] Copying 2 files to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\tld
[copy] Copying 5 files to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[delete] Deleting: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portlet-6.2.0.1.war
[zip] Building zip: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portlet-6.2.0.1.war
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\bundles\tomcat-7.0.47\deploy

BUILD SUCCESSFUL
Total time: 7 seconds

C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet>ant deploy

Buildfile: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\build.xml

deploy:
[copy] Copying 2 files to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[copy] Copying 1 file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\tld
[copy] Copying 5 files to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[java] Loading jar:file:/C:/dev/liferay/6.2.1-ce-ga2/bundles/tomcat-7.0.47/tomcat-7.0.47/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[javac] Compiling 1 source file to C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\classes
[javac] invalid Class-Path header in manifest of jar file: C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\org.restlet.jar
[delete] Deleting: C:\dev\liferay\6.2.1-ce-ga2\plugins\dist\o2-base-portlet-6.2.0.1.war

BUILD FAILED
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common-plugin.xml:482: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:993: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:299: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:1770: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:1853: The following error occurred while executing this line:
C:\dev\liferay\6.2.1-ce-ga2\plugins\build-common.xml:409: Unable to delete file
C:\dev\liferay\6.2.1-ce-ga2\plugins\portlets\o2-base-portlet\docroot\WEB-INF\lib\commons-logging.jar

Total time: 4 seconds
thumbnail
Gregory Amerson, modificado 9 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Ivano Carrara:

I restarted my PC and without open Eclipse I launched Ant deploy command from the command line - Two times the command processed ok but the third time failed. No one more build with success.


It seems that this doesn't have to do with Eclipse. Looks like some other process is locking the file, but I'm unsure of what it could be.

So for your development workflow, instead of using "ant deploy" you could use the "server publish" mechanism in Eclipse:

1. Configure a Liferay Portal server in Servers View
2. Drag and drop your portlet project to the server
3. Then start the server

The portlet webapp should be automatically deployed to the server. Its a shortcut and doesn't require the user of "ant deploy" in the background.

Let me know if you have trouble with this mechanism.
Traolly Xiong, modificado 8 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Regular Member Postagens: 195 Data de Entrada: 30/12/11 Postagens Recentes
Hello guys,
I am currently having the same issue on my window server 2008 machine.

BUILD FAILED
C:\Program Files (x86)\Jenkins\sharedspace\Continuous Branch\portlets\build-common-portlet.xml:24: The following error occurred while executing this line:
C:\Program Files (x86)\Jenkins\sharedspace\Continuous Branch\build-common-plugin.xml:1341: The following error occurred while executing this line:
C:\Program Files (x86)\Jenkins\sharedspace\Continuous Branch\build-common-plugin.xml:547: Unable to delete file C:\Program Files (x86)\Jenkins\sharedspace\Continuous Branch\portlets\EOB-Calculator-portlet\docroot\WEB-INF\lib\commons-logging.jar


Was there ever a solution on why this is happening?

Thanks.
eder silva, modificado 7 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

New Member Mensagem: 1 Data de Entrada: 30/04/16 Postagens Recentes
Hello guys,
I am currently having the same issue on my window server 2008 machine.

BUILD FAILED
C:\Program Files (x86)\Jenkins\sharedspace\Continuous Branch\portlets\build-common-portlet.xml:24: The following error occurred while executing this line:
C:\Program Files (x86)\Jenkins\sharedspace\Continuous Branch\build-common-plugin.xml:1341: The following error occurred while executing this line:
C:\Program Files (x86)\Jenkins\sharedspace\Continuous Branch\build-common-plugin.xml:547: Unable to delete file C:\Program Files (x86)\Jenkins\sharedspace\Continuous Branch\portlets\EOB-Calculator-portlet\docroot\WEB-INF\lib\commons-logging.jar


Was there ever a solution on why this is happening?

Thanks.
atualizar boleto
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Windows will not allow you to overwrite an open file. Jars will be open if the application container is running. Make sure the app container is not running and that no other process has the lock on the file.
Traolly Xiong, modificado 7 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Regular Member Postagens: 195 Data de Entrada: 30/12/11 Postagens Recentes
Hello,
Was there ever a finding of the issue and a resolution?

Much thanks.
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Never noticed this because of reviving a dead thread.

On top of trying everything these guys discussed, I would add that you should disable antivirus program and try again. I've seen cases where the AV will have a file locked during scanning and windows won't let it be changed or deleted.
thumbnail
Ivano Carrara, modificado 7 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Traolly Xiong:
Hello,
Was there ever a finding of the issue and a resolution?
Much thanks.


Hello all,

The problem is in the IDE, and was solved in a recent release - now when the problem occurs the Ant script wait for 5 seconds then it retry and the deploy get success

Ivano C.
Traolly Xiong, modificado 7 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Regular Member Postagens: 195 Data de Entrada: 30/12/11 Postagens Recentes
When using ant build-service via cmd the issue occurs too, Should the script be updated to wait 5 seconds prior to deleting any jars?

Thanks.
Traolly Xiong, modificado 7 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

Regular Member Postagens: 195 Data de Entrada: 30/12/11 Postagens Recentes
Found that "java.exe" was holding on to the jar too long while it was trying to get deleted prior to building the war.
Mukesh B, modificado 5 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

New Member Postagens: 3 Data de Entrada: 26/03/18 Postagens Recentes
Ivano Carrara:
Traolly Xiong:
Hello,
Was there ever a finding of the issue and a resolution?
Much thanks.


Hello all,

The problem is in the IDE, and was solved in a recent release - now when the problem occurs the Ant script wait for 5 seconds then it retry and the deploy get success

Ivano C.



Hi,
I am stilling facing this issue. which IDE are you refering to in here? My liferay version is 6.2 EE SP4 and ant version is 1.9.11. The build is successful 1 in 5 times.
Garry Brown, modificado 6 Anos atrás.

RE: Ant deploy: Unable to delete file commons-logging.jar

New Member Mensagem: 1 Data de Entrada: 11/02/18 Postagens Recentes
I would like to suggest you, try Long Path Tool program to resolve this issue. This tool is very helpful to resolve the issue.