I have come across an error when trying to deploy a webmodule to a tomcat server in Eclipse Luna. The error message is not very helpful. And i would like some help in tracking down the cause. The error i get is
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.
Any suggestions on how to interpret the message would be nice. I have tried in various ways to edit the web deployment assembly.
The only other thread covering this issue is this one, that did not get an answer
https://www.eclipse.org/forums/index.php/m/1065433/?srch=flatfile+cannot+be+cast#msg_1065433
It's possible your workspace may have been corrupted. I tried a number of approaches; different server runtimes, different version of Eclipse. I couldn't get past this until I created a new workspace, loaded my projects into it and set up a new server runtime.
Related
I have been having issues on my project on Eclipse. It keeps on showing me the error message "The selection cannot be run on any server".
I have already checked the project facets and Dynamic Web Module, Java, Javascript, Websphere Web (Coexistence and Extended) are checked.
I have Websphere checked on runtimes as well.
Websphere settings are fine as well.
There are no errors on the project.
It runs on Tomcat without issues, but when I try to run it on WebSphere Application Server I get an error.
When I click on Server > Add & Remove > I am not able to find my project there.
I have already reinstalled Websphere.
I have already researched about the issue and mostly have done the steps in there.
I'm hoping someone could help me and enlighten as to why this is happening. Thank you!
I am trying to run a simple Restful web service example on oracle weblogic server . but i am getting this issue while run the project on server. Publishing to Oracle Weblogic server at localhost has encountered a problem.Runtime exception occurred in publish task 'SplitsrcTargetPreparation'.
Have a look on screen sort.What i have to do ?
None of the other answers solved my problem, but I finally found a solution. I'm not claiming that this is the best or only way of resolving this issue, but it worked for me. Hope it helps others.
Open the Properties of your WebLogic server instance in Eclipse. Select Publishing. Set the publishing mode to "Publish as an exploded archive". You will no longer get a split source error.
Check the following.
Maven version – If you have imported as a maven project then make
sure that maven version is compatible to the java version you are
using.
Makes sure that you are using the java from the Middleware
which is comes bundled with weblogic.
New domain – Corrupt domain
may also cause this. Create a new domain
I am working on JavaEE webprojects using maven for dependencies and so on. The testing environment is Tomcat 7 for eclipse.
Now, when I made the transition to the newer eclipse (Luna) and deploy the webapp on tomcat, the tomcat instance refuses to serve the project. It gives 404 and the request on localhost:8080 doesn't produce any unusual console or log entries except the normal startup output (the exact same as on Juno).
I compared the server access log files located in /.metadata/... and the startup scripts. They are equal. No error messages, and no other clues on why the Luna Tomcat does not work. Don't get me wrong, the server 'works', as it provides a 404 message, it just does not serve the webapp that is deployed.
Does somebody have an idea on how to debug this further, or what the reason for the different behaviour could be? Thanks for any hints or advice.
-a
EDIT:
Just a few things I already did:
- Check and set project root (set to / in both cases)
- One suggestion found via google was to fiddle with the Libraries and Order and Export in Project Settings Build Path. (just move them up and down to get rid of a bug -> did not work)
- In Project Properties, set the targeted runtime to Tomcat 7 (the server in question)
- Reinstall the server
- Copy all configuration from one server path to the other.
- Set the server base path of Luna to the exact same as the working Juno instance (yes, they are in different places)
EDIT2:
Updating Eclipse to the newest version (MARS) did the job. Sadly I will now never know what the cause of the problem was. Luckily everything works again and I can focus on actually doing something :D
I'm trying to run the JHipster application via my Eclipse Juno, using jdk 1.7.
The app seems to be loading properly (no console errors), but when i'm trying to reach the server with the client side (or via Postman, by sending a request to the REST servlets in port 8080), it's not responding.
However, when i'm running "mvn spring-boot:run" in the command shell, the server is loaded successfully and is responding to the exact same requests. Also, I managed to run the same command via eclipse with some maven configuration but it seems to be running only the target files (jars) and not the source code. I still haven't been able to run the source code of this app using eclipse in order to properly debug it.
Any suggestions?
Thanks!
So the answer is quite trivial, but since I spent several hours to reach it, it might save some time for others-
Download & install STS IDE.
Import the project as existing Maven project.
Run/Debug the project.
I tried to run it via Eclipse the whole time (wasn't familiar with STS to be honest) and this probably needs some extra configuration (another comment with explanations on eclipse configuration will be much appreciated). Once you work with STS, it's easy.
You should not need STS, just Eclipse with the J2EE stuff.
I've imported the sample jhipster in Eclipse (without STS) as a Maven project and everything was OK, after installing the maven dependencies.
To run the project, run as an application and search for the Application (com.mycompany.myapp.Application)
This app works for me: https://github.com/jhipster/jhipster-sample-app. It is stuck on Boot RC5 which probably means it's a bit old. Maybe Julien can comment on that (or update it)?
I have run a j2ee application in tomcat/eclipse for several months now, but suddenly (after working with changed in the css files), I get the server error:
The requested resource /appname/ is not available. I'm totally lost. I've gone through a number of posts. This one describes my problem: Eclipse is not detecting servlet libraries, but I've gone through everything in that post without finding any missing jars or servers or anything in my project.
I'm running Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 1.
Project -> Properties -> Server shows Tomcat v6.0 Server at localhost
Project -> Build path, please see attached screen dump.
Project -> Project Facets: Dynamic Web Module 2.5 and Java 1.6 is checked.
I have tried to clean and rebuild the project.
I'm running over https so I'm connecting to https://localhost:8443/appname/Start. I'm not sure if that could be the problem, but it has worked ok until now.
Can anyone give me a hint what can be wrong?
Finally got it working again, but I honestly don't know exactly what fixed it.
I started with removing some servlets/servlet mappings from the web.xml file. After having done that change, when restarting the server, the Start servlet was found, but the jsp that the servlet was forwaring to was not (and the url to the jsp page looked strange). Also the logcat property file was not found. I read in another post that the Server might need to be cleaned so I did that and then cleaned the project once again. Then restarted the Server and now it's the application is running again.
Thanks for your help anyway, Andrei.
try cleaning your tomcat from eclipse:
right click in tomcat > clean.
then restart your server