IBM Support

Failed to publish on server when having a .properties folder

Troubleshooting


Problem

This technote describes an Eclipse defect that causes a publishing issue within IBM® Rational® Application Developer (RAD) if your project has a folder with the ending [].properties[] If you have a problem with publishing your application to the server and have such an exception in your [].log[] file, this technote may help you. [] !ENTRY com.ibm.ws.ast.st.v61.core 4 0 2007-08-17 17:45:47.406 !MESSAGE Could not publish to the server. !STACK 0 java.lang.ClassCastException: org.eclipse.core.internal.resources.Folder incompatible with org.eclipse.core.resources.IFile at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.findFile(Unknown Source) at com.ibm.etools.wrd.websphere.internal.operations.AbstractServerOperation.checkForJCAProperties(Unknown Source) at com.ibm.etools.wrd.websphere.internal.operations.AbstractServerOperation.(Unknown Source) at com.ibm.etools.wrd.websphere.internal.operations.ApplicationPublishOperation.(Unknown Source) at com.ibm.etools.wrd.websphere.internal.operations.ApplicationPublishOperation.(Unknown Source) at com.ibm.etools.wrd.websphere.internal.operations.WASPublisherImpl.addApplication(Unknown Source) at com.ibm.ws.ast.st.v61.core.internal.WASServerBehaviour.publishWrdDelta(Unknown Source) at com.ibm.ws.ast.st.v61.core.internal.WASServerBehaviour.publishModules(Unknown Source) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(Unknown Source) at org.eclipse.wst.server.core.internal.Server.doPublish(Unknown Source) at org.eclipse.wst.server.core.internal.Server.publish(Unknown Source) at org.eclipse.wst.server.core.internal.PublishServerJob.run(Unknown Source) at org.eclipse.core.internal.jobs.Worker.run(Unknown Source) []

Cause

In the class 

org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities

there is a method called findFile(). It makes the following call:


                                                                    IVirtualResource file = root.findMember(path);                      
if(file != null) {                                                  
   return (IFile) file.getUnderlyingResource();                      
}                                                                    
   

This will fail if the return value is not a file, as in this case.

Resolving The Problem

This is a known issue in Eclipse 3.2 and there is an Eeclipse defect opened for it under the number 200666.

The Rational Application Developer (RAD) defect for it is APAR PK51481.

Related Information

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Eclipse","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.0.1;7.0.0.2;7.0.0.3","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSYK2S","label":"Rational Software Architect Designer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Eclipse","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.0.1;7.0.0.2;7.0.0.3","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
10 September 2020

UID

swg21268557