I am being driven mad the following (apparently hard) error from eclipse.
Publish failed using Ant publisher
Resource is out of sync with the file system: '/MyServlet/build/classes/com/inver/hotzones/database/BaseNetworkData.class'.
I have seen comments on similar errors where refreshing eclipses view of the project helps but it is not helping me. Have tried cleaning the project, removing it from the webserver, deleting war files but cant seem to clear it. I have reset my TMPDIR variable so that it uses a directory on the same filesystem as that appeared to be another possible cause.
The error occurs on classes which have been enhanced by datanuculeus. I have auto-enhance on the project. The other references to this problem indicate that it is due to Eclipses view of the project being out of step with the filesystem, and I am guessing that this has something to do with thedata nucleus enhancement.
Any ideas?
Thanks.
I am using Eclipse 3.5.2 with latest datanucleus pluggins.
Stack trace
org.eclipse.core.runtime.CoreException: Resource is out of sync with the file system: '/MyServlet/build/classes/com/inver/hotzones/database/BaseNetworkData.class'.
at org.eclipse.jst.server.generic.core.internal.publishers.AbstractModuleAssembler.copyModule(AbstractModuleAssembler.java:172)
at org.eclipse.jst.server.generic.core.internal.publishers.WarModuleAssembler.assemble(WarModuleAssembler.java:31)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.assembleModule(AntPublisher.java:167)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(AntPublisher.java:128)
at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(GenericServerBehaviour.java:82)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:949)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1039)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:872)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Related
There's a single project in one of my working sets that completely broke my Eclipse. I can't refresh it, I can't close it, I can't delete it. Usually, the way I fix other projects is by deleting them in Eclipse and reimporting them. I can't do that for this one. Because of that, I can't use this working set, there's walls of error everytime there's a SVN status cache refresh.
I don't know where the resource should be, where Eclipse is looking for it. The project-name folder does exist in \workspace\.metadata\.plugins\org.eclipse.core.resources\.projects\. Where else should I look?
In the error log, there are tons of Resource '/project-name' does not exist. errors. Same message, different stack trace depending on the call. An example:
org.eclipse.core.internal.resources.ResourceException(/project-name)[368]: java.lang.Exception: Resource '/project-name' does not exist.
at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:39)
at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:35)
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:327)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:201)
at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:142)
at org.eclipse.core.internal.resources.Project.getDescription(Project.java:394)
at org.eclipse.wst.validation.internal.ValidationRegistryReader.getValidatorMetaData(ValidationRegistryReader.java:817)
at org.eclipse.wst.validation.internal.ValidationRegistryReader.getValidatorMetaData(ValidationRegistryReader.java:795)
at org.eclipse.wst.validation.internal.ValidationRegistryReader.isConfiguredOnProject(ValidationRegistryReader.java:1053)
at org.eclipse.wst.validation.internal.ProjectConfiguration.extractProjectValidators(ProjectConfiguration.java:259)
at org.eclipse.wst.validation.internal.ProjectConfiguration.getValidators(ProjectConfiguration.java:145)
at org.eclipse.wst.validation.internal.EventManager.closing(EventManager.java:96)
at org.eclipse.wst.validation.internal.EventManager.resourceChanged(EventManager.java:248)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:297)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:287)
at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:251)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:371)
at org.eclipse.core.internal.resources.Project.close(Project.java:190)
at org.eclipse.ui.actions.CloseResourceAction.invokeOperation(CloseResourceAction.java:168)
at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:156)
at org.eclipse.ui.actions.WorkspaceAction$1.runInWorkspace(WorkspaceAction.java:456)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
When I try to close the project, I get this nullPointerException:
An internal error occurred during: "Close Project".
java.lang.NullPointerException
at org.eclipse.core.internal.resources.Project.internalGetActiveBuildConfig(Project.java:752)
at org.eclipse.core.internal.resources.Project.getActiveBuildConfig(Project.java:349)
at org.eclipse.core.internal.resources.SaveManager.getTreesToSave(SaveManager.java:1879)
at org.eclipse.core.internal.resources.SaveManager.writeTree(SaveManager.java:2030)
at org.eclipse.core.internal.resources.SaveManager.writeTree(SaveManager.java:2075)
at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1216)
at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1145)
at org.eclipse.core.internal.resources.Project.close(Project.java:194)
at org.eclipse.ui.actions.CloseResourceAction.invokeOperation(CloseResourceAction.java:168)
at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:156)
at org.eclipse.ui.actions.WorkspaceAction$1.runInWorkspace(WorkspaceAction.java:456)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
How can I fix this?
(I use project-name in lieu of the actual project name.)
Hmm, might there be some handles alive? The error seems to indicate eclipse's not able to flush the closing-project change - if possible you could maybe try shutting the jvm instances.
If you didn't already, try to remove project from the working set(configure working sets -> edit) /remove the working set and create again without the plugin.
When importing - do you copy the project to the workspace or leave in the original place? I know you have already imported the project so it's just a thought for future I found myself useful :)
Recently Eclipse 2020-09 updated itself to 20200-12. My Java development has been OK. However, this evening, I needed to create a new Groovy class. The editor failed to open - I got an error 'window' (tltle = 'New') that said:
Creation of element failed. org/codehaus/groovy/eclipse/refactoring/core/utils/GroovyTypeBuilder
Opening an existing Groovy file results in the editor area being all grey and open editors have lost focus.
I've spent ages trying to find a solution - and failed.
If someone can help me with this, I'll be immensely grateful as work on my product has ground to a halt!
BACKGROUND
The new-class action creates a .log file. At the end of the log the entry is
Root exception:
java.lang.NoClassDefFoundError: org/codehaus/groovy/eclipse/refactoring/core/utils/GroovyTypeBuilder
Further up the log, I've seen other 'no class def found' entries for:
"org/codehaus/jdt/groovy/integration/LanguageSupport"
"org/codehaus/jdt/groovy/integration/LanguageSupportFactory"
"org/codehaus/groovy/eclipse/refactoring/formatter/GroovyIndentationService"
This is a Maven+Git project that produces a jar file.
Groovy complierversion is 2.5.14.
Maven dependency is groovy-xml-2.5.6,jar, which pulls in groovy-2.5.6,jar
I spent a long time at the start of 2020 working out the pom.xml so that the App's jar file and related folders+files all end up correctly. (I'm a Sunday-driver Maven guy, so once it worked, I was happy to leave it alone).
I really don't want to change versions of Groovy or anything - I don't think it's good practice to change 'infrasucture' in the middle of project.
As I don't know what other information will be helpful, I will provide it on request.
I just finished my Java app and I'm trying to deploy it to Tomcat 7.
The problem is that starting run war file causes errors:
FAIL - Application at context path /tradesystem-0.0.1-SNAPSHOT could not be started
FAIL - Encountered exception org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/tradesystem-0.0.1-SNAPSHOT]]
I have read many articles and I still didn't solve that.
when I'm write in console 'java -version' it shows v11, which fits with version of compiler (settings > compiler > java compiler > target byte code of project
I've read also, that errors can be caused of bad structure of target folder (someone wrote, that folder 'classes' in target/classes should be deletted but it didn't help.
My sugestion is that I missing some obvious configuration in pom.xml or something like that, but I really don't want to mess up my project, so I've decided to ask you guys.
The screenshot shows structure of my project.
Please keep in mind that's my first deploy ever and the bug for most could be obvious.
Solved by following that article:
https://dzone.com/articles/deploy-spring-boot-apps-from-jar-to-war
I just skip section 2. Update your Main class to extends SpringBootServletInitializer
Topic can be closed.
I have a project which has been added and it is running in an IServer,
I would like to rename the project from the workspace and also in the IServer however when it is running it is facing the problem that the resource cannot be modified because it is being used, when the module is stopped the rename success but the IServer fails because the project the IModule is linked to doesn't exist anymore.
My first approach was through an IResourceChangeListener, just before the eclipse rename the project,
I was trying to stop and remove the application running in the IServer in order to the renaming
of the project perform successfully, but continue failing aparently because some process was using some file(s) of the project.
and the rename job triggered not finish due to same exceptions.
Problems occurred while refreshing local changes
org.eclipse.core.internal.resources.ResourceException: Errors occurred while refreshing resources with the local file system.
org.eclipse.core.internal.resources.ResourceException(null)[380]: java.lang.Exception: The resource tree is locked for modifications.
I tried with all the types of events, mainly with the PRE_DELETE and PRE_BUILD but the exceptions remains.
I've created a GWT project using Eclipse which was working perfectly (I was able to run it in both Hosted Mode and on Google App Engine) until I tried to import the Gears API for Google Web Toolkit. After adding the following line to my java source file:
import com.google.gwt.gears.client.geolocation.Geolocation;
I get the following error when I try to compile:
19-Jun-2009 3:36:09 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext#1c7d682{/,C:\Documents and Settings\Geoff Denning\workspace\TaskPath\war}
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
I've already added the gwt-gears.jar file to my \war\WEB-INF\lib directory, and I've referenced it in Eclipse as follows:
I've even opened the gwt-gears.jar file and confirmed that org/apache/xerces/jaxp/SAXParserFactoryImpl.class does exist. Can anyone give me any pointers as to why I'm getting the above error?
Check that Xerces exists in:
$JAVA_HOME/lib/endorsed
Sounds like a Java 5 issue. Also check the Java system property for:
javax.xml.parsers.SAXParserFactory
It should be:
org.apache.xerces.jaxp.SAXParserFactoryImpl
If not then that's your issue, make sure you set the system property.
Apparently this is a bug in jre 1.5. I was able to resolve the problem by switching my default JRE in Eclipse from 1.5.0_06 to 1.6.0_03, as shown below:
Thanks to Jon and Rahul for pointing me in the right direction.
This happened to me. I had conflicting JARs in my workspace. I removed one and boom it worked. The message didn't lend very well to the root of the error.
My SAXParserFactoryImpl problem was caused by gwt-gadgets.jar I had in my boot class path. Removing this JAR from the boot class path solved the problem for me. Basically you have to remove any JAR containing a SAXParserFactoryImpl class from your build path (user libs).
Remove the $JAVA_HOME/jre/lib/jaxp.properties fixed the issue.
Take a look at Trouble with Selenium (XercesImpl) and Google App Engine.
I had a similar problem with GWT / GAE (SAXParserFactoyImpl not found) and solved it by;
Importing the jar to war/WEB-INF/lib
Adding the jar to the build path