Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » FlatFile cannot be cast to IFlatFolder(Can't deploy maven webapp)
FlatFile cannot be cast to IFlatFolder [message #1065433] Tue, 25 June 2013 12:40 Go to next message
Missing name Mising name is currently offline Missing name Mising name
Messages: 4
Registered: August 2011
Junior Member
A few weeks ago I upgraded my macbook pro and since then I can no longer use WTP to launch my webapp. It fails consistently publishing (or trying to) with this error

Could not publish to the server.
org.eclipse.wst.common.componentcore.internal.flat.FlatFile cannot be cast to org.eclipse.wst.common.componentcore.internal.flat.IFlatFolder

This is a servlet+javascript project with maven. So far I have tried
- new workspace and re-import project
- new version of eclipse
- new version of tomcat
- m2e wtp incubator plugin
- all of the above at once

Any help would be appreciated if you have seen this before. Google is finding nothing based on this error

Thanks
Re: FlatFile cannot be cast to IFlatFolder [message #1065436 is a reply to message #1065433] Tue, 25 June 2013 12:53 Go to previous messageGo to next message
Roberto Sanchez Herrera is currently offline Roberto Sanchez Herrera
Messages: 20
Registered: January 2011
Junior Member
Hello,
What version of the products you mentioned are you using? For example, what version of WTP? eclipse? Tomcat? m2e and m2e-wtp?

Was your application working fine with the products mentioned above? and then you upgraded one of the products, and your application stopped working?

Also, do you see a full stack trace? If you do not see it in a dialog, search in the Errors view, or in the workspace log.

Are you using linked resources?

Re: FlatFile cannot be cast to IFlatFolder [message #1065559 is a reply to message #1065436] Wed, 26 June 2013 09:55 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising name
Messages: 4
Registered: August 2011
Junior Member
Eclipse Juno service release 2 Build id: 20130225-0426
Tomcat (tried 6.0.18, 7.0.34, 7.0.41)
m2e 1.1.0.20120530-0009
m2e-wtp 0.17.0.20130212-1821
Eclipse Web Developer Tools Version: 3.4.2.v201211061806-7O7MFu3EMkBK01NbrfU9ATE5cdZFz-OoeYjaI4d2

The app was working fine on an older macbook pro on osx 10.6.?. When the machine was replaced (and upgraded to osx 10.8.3) eclipse was copied from the old drive to the new and the problems started.

I have also now tried a few JDK versions (Java 7 latest and Java 6).

The full error from the eclipse log is like so

!ENTRY org.eclipse.wst.server.core 4 0 2013-06-26 09:53:16.077
!MESSAGE Could not publish to the server.
!STACK 0
java.lang.ClassCastException: org.eclipse.wst.common.componentcore.internal.flat.FlatFile cannot be cast to org.eclipse.wst.common.componentcore.internal.flat.IFlatFolder
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.ensureParentExists(VirtualComponentFlattenUtility.java:216)
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.addMembers(VirtualComponentFlattenUtility.java:50)
at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.addNonChildUsedReference(FlatVirtualComponent.java:400)
at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.addUsedReferences(FlatVirtualComponent.java:306)
at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.treeWalk(FlatVirtualComponent.java:235)
at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.cacheResources(FlatVirtualComponent.java:188)
at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.fetchResources(FlatVirtualComponent.java:118)
at org.eclipse.wst.web.internal.deployables.FlatComponentDeployable.members(FlatComponentDeployable.java:227)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.members(J2EEFlexProjDeployable.java:267)
at org.eclipse.wst.server.core.internal.ModulePublishInfo.fillCache(ModulePublishInfo.java:294)
at org.eclipse.wst.server.core.internal.ModulePublishInfo.getDelta(ModulePublishInfo.java:376)
at org.eclipse.wst.server.core.internal.ServerPublishInfo.getDelta(ServerPublishInfo.java:366)
at org.eclipse.wst.server.core.internal.Server.getPublishedResourceDelta(Server.java:1574)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.getPublishedResourceDelta(ServerBehaviourDelegate.java:698)
at org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour.getPublishedResourceDelta(TomcatServerBehaviour.java:958)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.computeDelta(ServerBehaviourDelegate.java:874)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:909)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3153)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Re: FlatFile cannot be cast to IFlatFolder [message #1065586 is a reply to message #1065559] Wed, 26 June 2013 11:19 Go to previous message
Missing name Mising name is currently offline Missing name Mising name
Messages: 4
Registered: August 2011
Junior Member
More interesting notes. I find that if I re-checkout the app to a new directory it will work with the same Eclipse/WTP/etc so the problem has to be with one of the files in the project under the .settings or the .metadata. haven't found the smoking gun yet though
Previous Topic:Validate WSDL Ant Task
Next Topic:Keeping in sync : StructuredTextEditor and GrapicalEditor in MultipageEditorPart
Goto Forum:
  


Current Time: Tue Oct 08 03:01:54 EDT 2013

Powered by FUDForum. Page generated in 0.01825 seconds