Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Project importing existing web app into Eclipse(Project importing existing web app into Eclipse)
Project importing existing web app into Eclipse [message #994959] Fri, 28 December 2012 18:28 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 25
Registered: October 2010
Junior Member
I'm trying to debug an existing Web app in Eclipse. The Web App is written in Java using hibernate but wasn't initially developed in Eclipse. I can build the web app with an ant script with no problem, but I'm having trouble when I get into Eclipse.

I'm using Juno. I used "New" "Dynamic Web Project" to create a new project, and instead of creating a new project directory, I pointed to my already existing directory, pointing "SRC" to the "SRC" directory under the web app directory. The top level directories of my web app are layed out in a similar fashion to what Eclipse wants to create.

I want to debug using Tomcat 7. I have this installed and can create a server. However, I can't ever get the thing to run. The build seems fine, but when I do "Debug on server" I get the call stack below. The web app does not seem to be deployed - there is no "StoreFinder" directory created in C:\Users\owner\workspace_tomcat\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\StoreFinder, i.e. the direcory "StoreFinder" does not exist there.

I also notice that I can't export the project as a "WAR" - the export drop downs are empty.

I suspect this is a project setup issue. Can someone suggest where I need to start to debug this? Many many thanks!

George


Dec 28, 2012 12:22:17 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Bitvise Tunnelier;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Git\cmd;C:\eclipsejuno\eclipse;;.
Dec 28, 2012 12:22:18 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:StoreFinder' did not find a matching property.
Dec 28, 2012 12:22:18 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 28, 2012 12:22:18 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 28, 2012 12:22:18 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1607 ms
Dec 28, 2012 12:22:18 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 28, 2012 12:22:18 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.34
Dec 28, 2012 12:22:19 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Users\owner\workspace_tomcat\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\StoreFinder does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4906)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5086)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Dec 28, 2012 12:22:19 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in resourceStart()
Dec 28, 2012 12:22:19 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Dec 28, 2012 12:22:19 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/StoreFinder] startup failed due to previous errors
Dec 28, 2012 12:22:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 28, 2012 12:22:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 28, 2012 12:22:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 570 ms
Re: Project importing existing web app into Eclipse [message #995079 is a reply to message #994959] Sat, 29 December 2012 02:19 Go to previous messageGo to next message
Roberto Sanchez Herrera is currently offline Roberto Sanchez HerreraFriend
Messages: 36
Registered: January 2011
Member
Hi, if you cannot export the project as a WAR using the export war file wizard, then maybe the project is not being recognized as a WTP web project. Did you check if the project has the Dynamic web module facet? You can do this selecting the project and then select File > Properties > Project Facets. You should see Dynamic web module facet selected, along other facets.
Also, verify the files .project, .settings/org.eclipse.wst.common.component and .settings/org.eclipse.wst.common.project.facet.core.xml exist in the project location you selected in the first panel of the new dynamic web project wizard.
Re: Project importing existing web app into Eclipse [message #995277 is a reply to message #995079] Sat, 29 December 2012 16:17 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 25
Registered: October 2010
Junior Member
Roberto,

Thanks for the helpful tips, I appreciate it. My project does have that facet, and those files in the correct location as far as I can tell. When I try to export the project as a WAR file both of the drop downs are empty - I'm attaching a screen shot of what I get. Should the web app product a jar file as part of the build, or is there some other preliminary build step that might not be finishing that thwarts recognition of my code as a web app?

Thanks again for anybody who might have some ideas. I'm really looking forward to working on this stuff if Eclipse if I can get the project setup going.

Happy New Year everybody,

George

index.php/fa/12844/0/

index.php/fa/12845/0/

  • Attachment: eclipse.png
    (Size: 126.74KB, Downloaded 5594 times)
  • Attachment: war.png
    (Size: 108.79KB, Downloaded 5441 times)
Re: Project importing existing web app into Eclipse [message #997503 is a reply to message #995277] Mon, 07 January 2013 20:26 Go to previous message
Roberto Sanchez Herrera is currently offline Roberto Sanchez HerreraFriend
Messages: 36
Registered: January 2011
Member
By looking at the properties page of the project, I see that several tabs are missing, for example, Deployment assembly and Java Build Path, among others. This suggests that important files like .classpath and other files inside the .settings folder (in .settings, there are really important files for web projects) are missing. These files and folders are located at the root of the project.

I suggest to check if the .classpath file exists, and to check which files exist under .settings (if you can, provide the list of files). I suspect .settings is not empty, because the file org.eclipse.wst.common.project.facet.core.xml, which has information for the project facets, lives in there, and you can see the project facets).

Previous Topic:schema not loaded to cache
Next Topic:error in a ejb project
Goto Forum:
  


Current Time: Sat Apr 20 00:20:03 GMT 2024

Powered by FUDForum. Page generated in 0.03266 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top