Eclipse Juno Loading descriptor error - eclipse

I just updated my Eclipse from Galileo to Juno. I created a new workspace and imported a Java Spring MVC based project. When I open it, it begins 'Loading descriptor' and then an error message pops up: An internal error occurred during: "Loading descriptor for mta_pfm.". If I open it using Galileo, there is no error. I tried to disable the validation of XML file in Juno, but it does not work. I have no idea how to fix it now. Please help. Thanks
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value '
Container
' is not legal. (platform:/resource/mta_pfm/WebContent/WEB-INF/web.xml, 138, 14)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.getResource(ProjectResourceSetImpl.java:1064)
at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelResource(JEE5ModelProvider.java:169)
at org.eclipse.jst.jee.model.internal.Web25ModelProvider.getModelObject(Web25ModelProvider.java:44)
at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelObject(JEE5ModelProvider.java:215)
at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.loadProviders(AbstractMergedModelProvider.java:261)
at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.access$2(AbstractMergedModelProvider.java:255)
at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider$LoadModelsWorkspaceRunnable.run(AbstractMergedModelProvider.java:278)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.loadModel(AbstractMergedModelProvider.java:249)
at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.getMergedModel(AbstractMergedModelProvider.java:219)
at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.getModelObject(AbstractMergedModelProvider.java:139)
at org.eclipse.jst.jee.ui.internal.navigator.Web25ContentProvider.getNewContentProviderInstance(Web25ContentProvider.java:69)
at org.eclipse.jst.jee.ui.internal.navigator.LoadingJeeDDJob.run(LoadingJeeDDJob.java:50)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value '
Container
' is not legal. (platform:/resource/mta_pfm/WebContent/WEB-INF/web.xml, 138, 14)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2657)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2642)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endElement(XMLHandler.java:1564)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:240)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1505)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1284)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.demandLoad(ProjectResourceSetImpl.java:811)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 14 more
Caused by: java.lang.IllegalArgumentException: The value '
Container
' is not a valid enumerator of 'ResAuthType'
at org.eclipse.jst.javaee.core.internal.impl.JavaeeFactoryImpl.createResAuthTypeFromString(JavaeeFactoryImpl.java:741)
at org.eclipse.jst.javaee.core.internal.impl.JavaeeFactoryImpl.createFromString(JavaeeFactoryImpl.java:135)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createFromString(XMLHelperImpl.java:1615)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1156)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2652)
... 35 more

Some of your projects file may be incompatible with Juno (Juno in it's first release is not very stable, I recommend downloading the official update patches or even better - moving to Kepler which feels more solid).
Anyway, Eclipse can take some runtime arguments as described here: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html
Edit your Juno eclipse.exe shortcut and run "'...\eclipse.exe' -clean" to refresh your project files.
Remember to remove the argument once it's fixed as you have no need to clean the project files every time you start eclipse.

Try to start eclipse in clean mode from the command line
eclipse -clean

Related

Tomcat 9 Upgrade java.lang.NoClassDefFoundError: org/apache/tomcat/util/file/ConfigurationSource

I have a working Tomcat 8 environment under Eclipse 4.9 IDE 2018‑09 and am trying to add a Tomcat 9 server to Eclipse for testing but upon Tomcat startup I am getting the following No Class Found error. Previously a lib tomcat-util.jar was needed but that doesn't seem to exist with Tomcat 9. Any help would be appreciated.
java.lang.NoClassDefFoundError: org/apache/tomcat/util/file/ConfigurationSource
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:264)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:461)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.file.ConfigurationSource
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
So it looks like I might have had a bad download from a Tomcat mirror. I re-downloaded version 9.0.14 from the tomcat archive and it works fine now. The ConfigurationSource class is in the tomcat-util.jar and the jar was missing from the download.
Tomcat 9.0.14 archive download

Could not find main class : Program will exit

I was messing with the JRE setup on Eclipse. Originally the project was set to 1.6 and when set to 1.7, my program started showing a lot of errors. So when i switched back to 1.6, all the compile time errors vanished but i have a new problem now.
This was shown on the console when i tried to run the started class containing the main function. The .class files all exist. Please advice.
java.lang.UnsupportedClassVersionError: Demo : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"
Version 51.0 means the are still class files compiled with Java 7. This files wont run with a JRE 6. You have to recompile them first (Rebuild project or clean compile using ant/maven).
Check if java versions match in your Java Build path and Java Compiler in Project properties. I think you compiled with 1.6 and is trying to run with java 1.7

java.lang.NoClassDefFoundError while running JUnit

Hi i am getting this error please help me out, thanks
java.lang.NoClassDefFoundError: com/ge/energy/wp/core/exception/WPException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class`enter code here`.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at org.junit.internal.requests.ClassRequest.hasSuiteMethod(ClassRequest.java:62)
at org.junit.internal.requests.ClassRequest.getRunnerClass(ClassRequest.java:50)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:28)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:24)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:40)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:30)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ClassNotFoundException: com.ge.energy.wp.core.exception.WPException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 15 more
try adding source folder to your classpath. If you use eclipse, right click test file and select Run configuration under Junit test and select classpath and add your source folders to class path.
Check class WPException. Usually your IDE should show you if something is wrong with the java file but not with the class file - either it wasn't compiled or missing (the error is triggered when the JVM can't find the class) for some other reason, one of them could be, like bluelabel mentioned, a problem with the PATH.
I know this is old post...but may help someone else...
whenever I have faced this issue only problem have been the java version eclipse is defaulted to - which is the eclipse jre.
Fix - change to the proper jre installed on your machine !

PMD 3.2.6 Issue With Eclipse 3.2

I have installed PMD 3.2.6 plugin on eclipse 3.2 using the steps mentioned in
http://pmd.sourceforge.net/integrations.html#eclipse
However, I get following error if I try to open the PMD views or try to PMD code check.
Note that I did re-start my eclipse after installation.
Also it worked fine when I installed it in Eclipse 3.3. Unfortunately I have to stick to Eclipse 3.2 due to some other constraints.
Error: Unable to create view: An unexpected exception was thrown.
java.lang.NullPointerException
at net.sourceforge.pmd.eclipse.ui.views.PriorityFilter.<init>(Unknown Source)
at net.sourceforge.pmd.eclipse.ui.views.ViolationOverview.init(Unknown Source)
at org.eclipse.ui.part.ViewPart.init(ViewPart.java:122)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:305)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:3915)
at org.eclipse.ui.internal.WorkbenchPage.restoreState(WorkbenchPage.java:2929)
at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1936)
at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2873)
at org.eclipse.ui.internal.Workbench.access$14(Workbench.java:2821)
at org.eclipse.ui.internal.Workbench$20.run(Workbench.java:1697)
at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1437)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1695)
at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1666)
at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1545)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1489)
at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:702)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1101)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Anyone faced this issue before?
That's an old version of Eclipse! If PMD isn't supported with that version, you can run PMD at the command line or as an Ant script. Then the plugin integration fails to be a factor.

Error when Updating/Installing software in Eclipse 3.4.2

I am trying to update installed software and install plugins for a fresh install of eclipse 3.4.2. Whenever I try to update/install I get this error:
"Unexpected error encountered while preparing for the operation. org.eclipse.core.runtime.AssertionFailedException"
Details:
"Unexpected error encountered while preparing for the operation. null argument:"
log file entry
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:86)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:74)
at org.eclipse.equinox.internal.provisional.p2.metadata.ProvidedCapability.<init>(ProvidedCapability.java:25)
at org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.createProvidedCapability(MetadataFactory.java:189)
at org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataParser$ProvidedCapabilityHandler.<init>(MetadataParser.java:483)
at org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataParser$ProvidedCapabilitiesHandler.startElement(MetadataParser.java:469)
at org.eclipse.equinox.internal.p2.persistence.XMLParser$AbstractHandler.startElement(XMLParser.java:171)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryIO$Parser.parse(MetadataRepositoryIO.java:193)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryIO.read(MetadataRepositoryIO.java:56)
at org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory.validateAndLoad(SimpleMetadataRepositoryFactory.java:116)
at org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory.load(SimpleMetadataRepositoryFactory.java:85)
at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepository.initializeMetadataRepository(UpdateSiteMetadataRepository.java:187)
at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepository.<init>(UpdateSiteMetadataRepository.java:67)
at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory.load(UpdateSiteMetadataRepositoryFactory.java:48)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:485)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:452)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:435)
at org.eclipse.equinox.internal.p2.director.SimplePlanner.gatherAvailableInstallableUnits(SimplePlanner.java:196)
at org.eclipse.equinox.internal.p2.director.SimplePlanner.getProvisioningPlan(SimplePlanner.java:235)
at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.getProvisioningPlan(ProvisioningUtil.java:210)
at org.eclipse.equinox.internal.provisional.p2.ui.actions.InstallAction.computeProvisioningPlan(InstallAction.java:80)
at org.eclipse.equinox.internal.provisional.p2.ui.actions.InstallAction.getProvisioningPlan(InstallAction.java:130)
at org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction$1.run(ProfileModificationAction.java:61)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
What is causing this problem and how do I fix it?
I fixed my problem by reinstalling eclipse from the archived package. I used the same procedure (to my knowledge) to reinstall as I used the first time, but this time with no errors when trying to update and install features.
p2 was barely able to run in 3.4.x (and was still with quite a few bugs like this one in early 3.5).
Any chance you can try with a 3.5.1 eclipse installation?