Eclipse Plugin, SWT "Unresolved requirement: Require-Capability" - eclipse-plugin

I'm stuck. I am unable to figure out what is causing me to receive "Unresolved requirement: Require-Capability" errors for an SWT bundle (and others, if I dig deeper). The requirements stated for it are win32 os and ws, and arch of x86_64, all of which seem like they should be satisfied by my system. I have included details below, and will update with details that anyone requests.
Background and Problem Details
I'm working on an Eclipse plugin project that hasn't been exported in a long time. It was upgraded from Java 7 to 8, and from Juno to Mars, since the last release. Last week, I went to make a new release, by using the 'Eclipse Product export wizard' in the .product file. Previous releases were fine. Launching the project from within Eclipse works fine (using the product file context menu Run As->Eclipse application to create the Launch configuration). Using the Validate Plug-ins functionality, seen in both the .product and launch config, shows no problems.
The log shows the following:
!SESSION 2016-08-05 09:50:28.847 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_101
java.vendor=Oracle Corporation
BootLoader constants: OS=${target.os}, ARCH=${target.arch}, WS=${target.ws}, NL=en_US
Framework arguments: -enableassertions
Command-line arguments: -os ${target.os} -ws ${target.ws} -arch ${target.arch} -clean -consoleLog -enableassertions -console
!ENTRY org.eclipse.osgi 4 0 2016-08-05 09:50:30.975
!MESSAGE An error occurred while automatically activating bundle org.eclipse.ui.workbench (96).
!STACK 0
org.osgi.framework.BundleException: Error starting module.
at org.eclipse.osgi.container.Module.doStart(Module.java:580)
...
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
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.newInstance(Unknown Source)
at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:755)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:706)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
at org.eclipse.osgi.container.Module.doStart(Module.java:571)
... 42 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError cannot be found by org.eclipse.ui.workbench_3.107.0.v20150825-2206
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 51 more
Root exception:
java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
...
!ENTRY org.eclipse.osgi 4 0 2016-08-05 09:50:30.988
!MESSAGE An error occurred while automatically activating bundle ca.uvic.chisel.atlantis (2).
!STACK 0
org.osgi.framework.BundleException: Error loading bundle activator.
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:711)
etc etc...
I have access to the osgi console, and gotten some more information:
osgi> ss org.eclipse.swt
"Framework is launched."
id State Bundle
82 RESOLVED org.eclipse.swt_3.104.1.v20150825-0743
113 INSTALLED org.eclipse.swt.win32.win32.x86_64_3.104.1.v20150825-0743
osgi> diag 113
org.eclipse.swt.win32.win32.x86_64 [113]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osg
i.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))"
```
Some more details on SWT on my system...the exported application has "/plugins/org.eclipse.swt.win32.win32.x86_64_3.104.1.v20150825-0743.jar", which is the same version specified by the org.eclipse.swt.win32.win32.x86_64 entry in the .product file's "Plug-ins and Fragments" config. (There is also org.eclipse.swt_3.104.1.v20150825-0743.jar and matching org.eclipse.swt). The bundle fragment requirements are as noted in the osgi console results, namely "(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))".
In the previous (functioning) release from my archives, I see it has org.eclipse.swt.win32.win32.x86_64_3.100.1.v4234e.jar. I do not know if the bundle fragment requirements were the same or different back then. I do not have access to the osgi console in this release, because I did not include the necessary libraries for it back then.
Looking at other bundles, I saw some that are not RESOLVED status either.
Development Context
I am developing, exporting, and running the project on Windows 7. My JRE System Library for dev is jre1.8.0_101-b13. This is the same version (same file path) as the JRE installed for running Java applications.
C:\Atlantis Export\Atlantis 0.3.0 TEST 3>java -XshowSettings:properties -version
Property settings:
awt.toolkit = sun.awt.windows.WToolkit
file.encoding = Cp1252
file.encoding.pkg = sun.io
file.separator = \
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = .
java.class.version = 52.0
java.endorsed.dirs = C:\Program Files\Java\jre1.8.0_101\lib\endorsed
java.ext.dirs = C:\Program Files\Java\jre1.8.0_101\lib\ext
C:\Windows\Sun\Java\lib\ext
java.home = C:\Program Files\Java\jre1.8.0_101
java.io.tmpdir = C:\Users\eric\AppData\Local\Temp\
java.library.path = C:\ProgramData\Oracle\Java\javapath
C:\Windows\Sun\Java\bin
C:\Windows\system32
C:\Windows
C:\ProgramData\Oracle\Java\javapath
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\pgmodeler
C:\WinPython-64bit-3.4.3.5\python-3.4.3.amd64
%USERPROFILE%\.dnx\bin
C:\Program Files\Microsoft DNX\Dnvm\
C:\Program Files\nodejs\
C:\Program Files (x86)\Skype\Phone\
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\010 Editor
C:\Users\eric\AppData\Roaming\npm
.
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.8.0_101-b13
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.8
java.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
java.version = 1.8.0_101
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.8
java.vm.vendor = Oracle Corporation
java.vm.version = 25.101-b13
line.separator = \r \n
os.arch = amd64
os.name = Windows 7
os.version = 6.1
path.separator = ;
sun.arch.data.model = 64
sun.boot.class.path = C:\Program Files\Java\jre1.8.0_101\lib\resources.jar
C:\Program Files\Java\jre1.8.0_101\lib\rt.jar
C:\Program Files\Java\jre1.8.0_101\lib\sunrsasign.jar
C:\Program Files\Java\jre1.8.0_101\lib\jsse.jar
C:\Program Files\Java\jre1.8.0_101\lib\jce.jar
C:\Program Files\Java\jre1.8.0_101\lib\charsets.jar
C:\Program Files\Java\jre1.8.0_101\lib\jfr.jar
C:\Program Files\Java\jre1.8.0_101\classes
sun.boot.library.path = C:\Program Files\Java\jre1.8.0_101\bin
sun.cpu.endian = little
sun.cpu.isalist = amd64
sun.desktop = windows
sun.io.unicode.encoding = UnicodeLittle
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = Cp1252
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.os.patch.level = Service Pack 1
sun.stderr.encoding = cp437
sun.stdout.encoding = cp437
user.country = US
user.dir = C:\Atlantis Export\Atlantis 0.3.0 TEST 3
user.home = C:\Users\eric
user.language = en
user.name = eric
user.script =
user.timezone =
user.variant =
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
I have tried upgrading again from Mars, to Neon. That didn't resolve anything. Downgrading to Juno to fix something like this smells like the wrong solution.

So...while preparing my answer, I found the solution. I know that if I had someone to bounce this off of before, it might have occurred to me then.
I noticed that the ${target.ws} and ${target.os} occur in the launch config. I am not sure how these were added; perhaps the product file generated these arguments, perhaps I added them when trying to fix another bug many moons ago. In any case, I was googling to see how to inspect these values, and decided to simply remove them and test launch and export without them. both worked fine. I don't need them there, I am not sure if they were even containing values.
To reiterate, my solution was to remove the "-os ${target.os} -ws ${target.ws} -arch ${target.arch}" arguments in the .product file (as well as the launch config derived from it).
I may have added them on the advice of somewhere like this (but I don't know why): Eclipse Validation error - Platform filter did not match:(&(osgi.ws=win32)(osgi.os=win32)(osgi.arch=x86)) . Looking at blame, I see that the arguments were added when I first changed the project from using manually defined launch configurations, to using .product based launch configuration; there were inconsistencies and machine dependent strings when the launch was manually defined. I do not know if they were automatically added, or if I thought I needed them.

Related

Teradata Studio Express: new install on Mac, not working

I just installed Teradata Express Studio (16.10.01) on MacOS Sierra 10.12.6, but when I try to open it I get the message 'An error has occurred'. The log file shows this (just first lines):
!SESSION 2017-09-28 15:55:21.661 -----------------------------------------------
eclipse.buildId=unknown
java.version=9
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_GB
Framework arguments: -keyring /Users/KULMAK/.eclipse_keyring
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/KULMAK/.eclipse_keyring
!ENTRY org.eclipse.equinox.ds 4 0 2017-09-28 15:55:26.460
!MESSAGE Exception occurred while creating new instance of component Component[
name = ConnectionService
activate = activate
deactivate = deactivate
modified =
configuration-policy = optional
factory = null
autoenable = true
immediate = false
implementation = com.teradata.datatools.connection.services.impl.ConnectionService
state = Unsatisfied
properties =
serviceFactory = false
serviceInterface = [com.teradata.datatools.connection.services.interfaces.IConnectionService]
references = null
located in bundle = com.teradata.datatools.connection.services.definition_15.11.0.201708101349 [29]
]
!STACK 0
java.lang.NoClassDefFoundError: java/sql/SQLException
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
at java.base/java.lang.Class.getConstructor0(Class.java:3315)
at java.base/java.lang.Class.newInstance(Class.java:530)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:493)
Prior to that I installed not-the-latest version of Java JDK 8 (Java 1.8), for compatibility reasons with other pieces of software - not that it matters, even if I install JDK 9, the issues remain the same.
Any ideas what could be causing issues?
Thanks for help!
Problem solved - it turns out there was a 'hidden' Java version 9 installed on my Mac that didn't appear in System Preferences (where you could see only Java 8), but became apparent after checking java --version in the terminal. After uninstalling Java 9 all my problems were solved.

Cannot run Mule project from within Anypoint Studio; ResourceException

Problem:
When I want to run a project from within Anypoint Studio I am encountering a problem. This project was originally setup in Eclipse Juno with the Mule IDE plugin.
From within Eclipse Juno I was able to run the mule-config.xml on a local installation Mule Server.
Now I have upgraded to the latest Anypoint Studio (5.3.1; I have both the standalone and the plug-in with Eclipse Mars). I was successful in importing the project in the Anypoint environment and building it with Maven.
In both (standalone and plug-in) I am not able to run the project. When I try running through ‘Run Configurations’ I get an error where it complains that a resource is not available. But I don’t understand this error, because the resource /XmlProxyValidationFilter it is complaining about is a custom filter within my project in src/main/java which is on my build path (all included, none excluded).
Definition of the custom filter:
<custom-filter name="xmlValidatieRequestFilter" class="nl.xxx.icc.mule.XmlProxyValidationFilter">
<spring:property name="xsdRepositoryBean" ref="iccXsdRepositoryBean" />
</custom-filter>
Calling the custom filter from a flow:
<flow name="xmlproxy.validator">
<!-- some other stuff -->
<filter ref="xmlValidatieRequestFilter" />
</flow>
This flow validates an XML-message that is passing through against its corresponding XSD which is in the xsdRepositoryBean.
What I have tried:
In Run-configurations I have chosen my project in Mule domains/projects (expecting it to be added to the classpath) and Mule Server 3.4.0 CE as Target Server Runtime (same runtime as with successful Maven-build).
In Run-configurations tried to add the missing resource to User Entries on the Classpath tab.
I have found a suggestion to try in this question, but I am not sure how to do this since I use Maven integrated in Eclipse. Therefor I have tried converting my project to a Maven project (I think this is a function specific to the Anypoint plug-in) but this does not solve the problem.
Tried to find similar problems for possible solutions, but only the above came close.
Question:
Any ideas why I am getting an error about a missing resource when I try to run the flow, while this resource is in my project-folder and I can build the project without problems with Maven?
Error-log:
eclipse.buildId=4.5.1.M20150904-0015
java.version=1.8.0_31
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product
org.mule.tooling.core
Error
Wed Oct 21 08:00:33 CEST 2015
Unable to package application ZIP file
java.lang.reflect.InvocationTargetException
at org.mule.tooling.core.packageManager.ExportPackageManager.export(ExportPackageManager.java:87)
at org.mule.tooling.runtime.launch.DefaultDeploymentStrategy.packageZipFile(DefaultDeploymentStrategy.java:55)
at org.mule.tooling.runtime.launch.DefaultDeploymentStrategy.deployToEmbeddedInstance(DefaultDeploymentStrategy.java:26)
at org.mule.tooling.runtime.launch.MuleRuntimeLaunchDelegate.deployProjects(MuleRuntimeLaunchDelegate.java:486)
at org.mule.tooling.runtime.launch.MuleRuntimeLaunchDelegate.performLegacyDeployment(MuleRuntimeLaunchDelegate.java:344)
at org.mule.tooling.runtime.launch.MuleRuntimeLaunchDelegate.launch(MuleRuntimeLaunchDelegate.java:238)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/XmlProxyValidationFilter' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:334)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:208)
at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:140)
at org.eclipse.core.internal.resources.Project.hasNature(Project.java:521)
at org.mule.tooling.core.deployer.MuleApplicationDeployment.copyArtifacts(MuleApplicationDeployment.java:621)
at org.mule.tooling.core.deployer.MuleApplicationDeployment.copyReferencedProjectsArtifactsRecursively(MuleApplicationDeployment.java:615)
at org.mule.tooling.core.deployer.MuleApplicationDeployment.copyReferencedProjectsArtifacts(MuleApplicationDeployment.java:608)
at org.mule.tooling.core.packageManager.MuleApplicationExportDelegate.export(MuleApplicationExportDelegate.java:41)
at org.mule.tooling.core.packageManager.ExportPackageManager.doExport(ExportPackageManager.java:93)
at org.mule.tooling.core.packageManager.ExportPackageManager.export(ExportPackageManager.java:85)
... 10 more
Root exception:
org.eclipse.core.internal.resources.ResourceException: Resource '/XmlProxyValidationFilter' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:334)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:208)
at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:140)
at org.eclipse.core.internal.resources.Project.hasNature(Project.java:521)
at org.mule.tooling.core.deployer.MuleApplicationDeployment.copyArtifacts(MuleApplicationDeployment.java:621)
at org.mule.tooling.core.deployer.MuleApplicationDeployment.copyReferencedProjectsArtifactsRecursively(MuleApplicationDeployment.java:615)
at org.mule.tooling.core.deployer.MuleApplicationDeployment.copyReferencedProjectsArtifacts(MuleApplicationDeployment.java:608)
at org.mule.tooling.core.packageManager.MuleApplicationExportDelegate.export(MuleApplicationExportDelegate.java:41)
at org.mule.tooling.core.packageManager.ExportPackageManager.doExport(ExportPackageManager.java:93)
at org.mule.tooling.core.packageManager.ExportPackageManager.export(ExportPackageManager.java:85)
at org.mule.tooling.runtime.launch.DefaultDeploymentStrategy.packageZipFile(DefaultDeploymentStrategy.java:55)
at org.mule.tooling.runtime.launch.DefaultDeploymentStrategy.deployToEmbeddedInstance(DefaultDeploymentStrategy.java:26)
at org.mule.tooling.runtime.launch.MuleRuntimeLaunchDelegate.deployProjects(MuleRuntimeLaunchDelegate.java:486)
at org.mule.tooling.runtime.launch.MuleRuntimeLaunchDelegate.performLegacyDeployment(MuleRuntimeLaunchDelegate.java:344)
at org.mule.tooling.runtime.launch.MuleRuntimeLaunchDelegate.launch(MuleRuntimeLaunchDelegate.java:238)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
#Jeroen Akershoek ... I have faced same issue. So please put your resource in src/main/resource directory and use class path loader in your filter jar.

Can't deploy adapter/application in IBM MobileFirst Platform Foundation 7.0

In a production installation over 'WAS_LIBERTY_CORE_V8.5.5.4' with 'DB2':
I have now a simple configuration in server.xml.
The mobilefirst console shows the runtimes but I can't deploy adapters or applications. This is the content of messages.log. This 2 lines appears every attempt to upload an adapter/application:
[19/04/15 19:19:37:667 CEST] 0000008e org.apache.wink.server.internal.registry.ResourceRegistry I The system cannot find any method in the com.ibm.worklight.admin.services.RuntimeService class that supports POST. Verify that a method exists.
[19/04/15 19:19:37:683 CEST] 0000008e org.apache.wink.server.internal.RequestProcessor I The following error occurred during the invocation of the handlers chain: WebApplicationException (405) with message 'null' while processing POST request sent to http://MACHINENAME:9080/wladmin/management-apis/1.0/runtimes/test/
More info:
wlp.install.dir = C:/IBM/WebSphere/Liberty/
java.home = C:\Program Files\Java\jdk1.7.0_79\jre
java.version = 1.7.0_79
java.runtime = Java(TM) SE Runtime Environment (1.7.0_79-b15)
os = Windows Server 2008 R2 (6.1; amd64) (en_US)​
DB: DB2 in localhost
Complete server.xml file: https://drive.google.com/file/d/0BxAEyIioPI2YT2NPZXdCcktoT1U/view?usp=sharing
Complete console.log file: https://drive.google.com/file/d/0BxAEyIioPI2YUDhLZDQ0Qmgydk0/view?usp=sharing
Complete messages.log file: https://drive.google.com/file/d/0BxAEyIioPI2YdUREcjcyd3JYNGs/view?usp=sharing
I'm tried with other Java version like 'SDK_JAVA_TE_V7.0_WASLC_V8.5.5', with other runtimes, reinstalling all...
Per the comments, the error appears to happen only in IE 9.
As a work around, use a different browser such as Safari, Chrome, Firefox, Opera, etc... in order to deploy artifacts.
The issue with IE 9 will be investigated.

java.lang.UnsupportedClassVersionError: bad major version at offset=6

I have deployed a WAR file in the webapps folder in my tomcat. And when I am starting my tomcat, like below
C:\apache-tomcat-6.0.35\bin>startup.bat
Using CATALINA_BASE: "C:\apache-tomcat-6.0.35"
Using CATALINA_HOME: "C:\apache-tomcat-6.0.35"
Using CATALINA_TMPDIR: "C:\apache-tomcat-6.0.35\temp"
Using JRE_HOME: "C:\Program Files (x86)\IBM\RationalSDLC\Common\Java5.0\jre"
Using CLASSPATH: "C:\apache-tomcat-6.0.35\bin\bootstrap.jar"
I am getting this below exception-
SEVERE: Error deploying web application archive DirectoryServer.war
java.lang.UnsupportedClassVersionError: (com/services/rest/Listener) bad major version at offset=6 (unable to load class com.services.rest.Listener)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2822)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.startup.WebAnnotationSet.loadClassAnnotation(WebAnnotationSet.java:145)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:73)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:56)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1078)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4612)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
And this is my JAVA version-
C:\apache-tomcat-6.0.35\bin>java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
Can anyone provide any suggestion why is it happening?
You have essentially compiled your code with JDK 1.6 but running it with Java 5 - Just ensure a Java 6 runtime.
Even I faced same problem. The problem is inappropriate class version, for ex. compiling with different jre.
Solution: IF you are using Eclipse or RAD, set change compiler setting as per your requirement and also change same setting to project configuration by clicking on "Configure Project specific setting". Windows->Preferences->Compiler-> click on link "Configure Project specific setting".
For me the fix was to set the JAVA_Home system variable to the correct path.
It is a compiler issue. Make sure all your modules are configured with java 1.5 as a compiler. Window-->preference--> Java --> Compiler. Make sure 1.5 is selected.

Issues with running nunit-console.exe with Mono

I could make a dll for NUnit NUnit test under mono, but when I tried to run in with nunit-console.exe I get the following error message.
Runtime Environment -
OS Version: Unix 10.3.0.0
CLR Version: 2.0.50727.1433 ( 2.6.4 (tarball Thu Apr 22 13:24:33 MDT 2010) )
ProcessModel: Default DomainUsage: Single
Execution Runtime: mono-2.0
** (/Users/smcho/bin/NUnit-2.5.5.10112/bin/net-2.0/nunit-console.exe:36800): WARNING **: The following assembly referenced from /private/var/folders/m4/m4u1hmP+FHOQaiZbHj1UCk+++TI/-Tmp-/nunit20/ShadowCopyCache/36800_634111616836311880/Tests_-22323139/assembly/shadow/54274fc2/118e035c_45a94c9e_00000001/mut.dll could not be loaded:
Assembly: nunit.framework (assemblyref_index=1)
Version: 2.5.5.10112
Public Key: 96d09a1eb7f44a77
System error: Invalid argument
** (/Users/smcho/bin/NUnit-2.5.5.10112/bin/net-2.0/nunit-console.exe:36800): WARNING **: Could not load file or assembly 'nunit.framework, Version=2.5.5.10112, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies.
What might be wrong? I have nunit.framework.dll under /Users/smcho/bin/NUnit-2.5.5.10112/bin/net-2.0/framework, but it doesn't seem to know about this.
This is another frustrating point about using NUnit in Mono. As far as I've been able to tell, you need to have all of those missing files (there will be more than just nunit.framework.dll) in the same directory as nunit-console.exe.
There might be a command line option either in mono or nunit-console.exe to specify another directory to search for missing DLLs -- I'm not sure. Barring that, you'll have to copy the missing DLLs into the same folder as nunit-console.exe, or you'll have to cd into the framework folder and use mono ../nunit-console.exe /path/to/my/tests.dll
Once nuget is installed, you can use it to install nunit.console like so:
(This is from my .circlci/config.yml file)
- run: mono --runtime=v4.0 nuget.exe install nunit.console
- run: msbuild MySolution.sln
- run: mono --runtime=v4.0 NUnit.ConsoleRunner.3.12.0/tools/nunit3-console.exe FirstModule.Tests/bin/Debug/FirstModule.Tests.dll
- run: mono --runtime=v4.0 NUnit.ConsoleRunner.3.12.0/tools/nunit3-console.exe SecondModule.Tests/bin/Debug/SecondModule.Tests.dll
The trick is to specify the entire path for the NUnit.ConsoleRunner and to watchout for the - changing into a . by version 3