My selenium automation framework using TestNG is working fine on the windows 7 but when I configured the same framework on the windows 10 I'm facing the below issue.
Could you please help me on the same.
Test Details:
Operating system: windows 10 64 bit
Eclipse Version: Version: 2019-03 (4.11.0)
TestNG version: 6.14.3
[RemoteTestNG] detected TestNG version 6.14.3
org.testng.TestNGException: An error occurred while instantiating
class com.saf.aw_nxt_end_to_end_tests.AW_NXT_Login:
org/w3c/dom/ElementTraversal at
org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:435)
at
org.testng.internal.ClassHelper.createInstance(ClassHelper.java:336)
at
org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:125)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:190) at
org.testng.internal.TestNGClassFinder.processFactory(TestNGClassFinder.java:203)
at
org.testng.internal.TestNGClassFinder.processMethod(TestNGClassFinder.java:179)
at
org.testng.internal.TestNGClassFinder.processClass(TestNGClassFinder.java:171)
at
org.testng.internal.TestNGClassFinder.(TestNGClassFinder.java:121)
at org.testng.TestRunner.initMethods(TestRunner.java:370) at
org.testng.TestRunner.init(TestRunner.java:271) at
org.testng.TestRunner.init(TestRunner.java:241) at
org.testng.TestRunner.(TestRunner.java:192) at
org.testng.remote.support.RemoteTestNG6_12$1.newTestRunner(RemoteTestNG6_12.java:33)
at
org.testng.remote.support.RemoteTestNG6_12$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_12.java:66)
at
org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:713)
at org.testng.SuiteRunner.init(SuiteRunner.java:260) at
org.testng.SuiteRunner.(SuiteRunner.java:198) at
org.testng.TestNG.createSuiteRunner(TestNG.java:1295) at
org.testng.TestNG.createSuiteRunners(TestNG.java:1273) at
org.testng.TestNG.runSuitesLocally(TestNG.java:1128) at
org.testng.TestNG.runSuites(TestNG.java:1049) at
org.testng.TestNG.run(TestNG.java:1017) at
org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) Caused
by: java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal at
java.lang.ClassLoader.defineClass1(Native Method) at
java.lang.ClassLoader.defineClass(ClassLoader.java:763) at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) at
java.net.URLClassLoader.access$100(URLClassLoader.java:74) at
java.net.URLClassLoader$1.run(URLClassLoader.java:369) at
java.net.URLClassLoader$1.run(URLClassLoader.java:363) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:362) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) at
org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown
Source) at
org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown
Source) at
org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown
Source) at
org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown
Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205) at
org.apache.log4j.xml.DOMConfigurator$1.parse(DOMConfigurator.java:749)
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:871)
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:755)
at
org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:896)
at com.saf.utilities.Log.getInstance(Log.java:19) at
com.saf.base.BaseTest.(BaseTest.java:138) at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:24)
at
org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:423)
... 24 more Caused by: java.lang.ClassNotFoundException:
org.w3c.dom.ElementTraversal at
java.net.URLClassLoader.findClass(URLClassLoader.java:382) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 58 more
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook Picked up
_JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:"C:\Program Files (x86)\HP\Unified Functional
Testing\bin\java_shared\classes";"C:\Program Files (x86)\HP\Unified
Functional Testing\bin\java_shared\classes\jasmine.jar"
Looks like you are getting the java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal error.
From Another Answer:
The reason for this error is that the 1.4.01 version of the xml-apis library, includes the required ElementTraversal class. Other versions like 2.0.0, 1.0.0, etc. do not include it, and the application fails while compiling.
MAVEN SOLUTION:
At pom.xml , set "xml-apis" dependency to version 1.4.01:
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
SOLUTION FOR EVERYONE ELSE:
If not using maven, you can manually add the xml-apis library, version 1.4.01. You will find the jars inside the xml-commons binary package, named "XML Commons External 1.4.01", and you can download it here: http://xerces.apache.org/mirrors.cgi.
Finally, compile and execute your java application/project with this version of the library.
Related
Related to the issue discussed here I get the following exception:
[Byte Buddy] ERROR com.panaya.as.web.util.WebAnalyticsUtils$AnalyticsData[WebappClassLoader
context:
delegate: false
repositories:
----------> Parent Classloader:
ClassRealm[plugin>org.apache.tomcat.maven:tomcat7-maven-plugin:2.2-1614397209, parent: sun.misc.Launcher$AppClassLoader#14dad5dc]
, null]
java.lang.IllegalStateException: Unexpected remainder on the operand stack: -1
at net.bytebuddy.utility.StackAwareMethodVisitor.drainStack(StackAwareMethodVisitor.java:120)
at net.bytebuddy.asm.Advice$AdviceVisitor$WithExitAdvice.onVisitInsn(Advice.java:1704)
at net.bytebuddy.utility.ExceptionTableSensitiveMethodVisitor.visitInsn(ExceptionTableSensitiveMethodVisitor.java:288)
at org.objectweb.asm.ClassReader.a(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at net.bytebuddy.dynamic.scaffold.TypeWriter$Default$ForInlining.create(TypeWriter.java:3018)
at net.bytebuddy.dynamic.scaffold.TypeWriter$Default.make(TypeWriter.java:1617)
at net.bytebuddy.dynamic.scaffold.inline.RedefinitionDynamicTypeBuilder.make(RedefinitionDynamicTypeBuilder.java:171)
at net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Simple$Resolution.apply(AgentBuilder.java:5849)
at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:6242)
at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.access$900(AgentBuilder.java:6067)
at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:6566)
at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:6516)
at java.security.AccessController.doPrivileged(Native Method)
at net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:6180)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1191)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1669)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
...
The agent runs on an enterprise web app on top of a tomcat server.
Most of the classes are instrumented without any problem, but still...
I tried to reproduce the exception in a standalone fiddle, but I could not find any unique specification for the class which the instrumentation fails on...
I guess it has to do with a specific framework or annotation which the class uses.
Appreciate any pointers....
You have found a bug in Byte Buddy. It is resolved in version 1.4.17 which is now available from Maven Central.
I've written a custom annotation and processor which implements com.sun.source.util.TaskListener.
The annotation processing currently works when ran as part of a gradle build, but when I enable annotation processing in STS, I get the following error:
Problems occurred when invoking code from plug-in: "org.eclipse.core.resources"
java.lang.NoClassDefFoundError: com/sun/source/util/TaskListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.loadJava6FactoryClasses(AnnotationProcessorFactoryLoader.java:638)
at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.loadFactories(AnnotationProcessorFactoryLoader.java:577)
at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.getJava6FactoriesAndAttributesForProject(AnnotationProcessorFactoryLoader.java:455)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:131)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:968)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:489)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:397)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:184)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:334)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:63)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:180)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.ClassNotFoundException: com.sun.source.util.TaskListener
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 35 more
I've tried a few things to try to resolve this:
I have changed the installed JRE to point to an installed JDK
I added tools.jar as an external jar in the JRE Definition in eclipse
I tried adding tools.jar as an external jar to the project on which annotation processing has been turned on.
I also tried adding tools.jar as a defined Classpath variable
com.sun.source.util.TaskListener is javac-private API. Eclipse has it's own compiler. Try to set the default compiler to Javac in Eclipse settings.
The complete version of the problem, entire log file can be found at this link
We have a Eclipse application whose 64 bit windows version fails to launch. While its 32 bit windows version, 32 and 64 bit mac version and 32 and 64 bit linux version work well.
I am using eclipse-java-luna-SR1a-win32-x86_64
I have referred the following links:-
Link_A
Link_B
Link_C
But they are not helpful to me as either they revert back to 32 bit system instead of 64 bit system. I need to get the 64bit version of the application working. In the other link they add missing SWT jar. I checked my target platform[Windows->Preferences->Plug-in Development->Target Platforms -> Edit -> type swt in type filter text]. And I see SWT library checked or included
Any attempts to run the 64 bit version of the application by double clicking the application fails to launch and generates the following exception in the log. I am pasting here starting part of my log file. As the entire log file shall not fit in here
!SESSION 2015-01-20 13:49:43.986 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_72
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2015-01-20 13:49:45.107
!MESSAGE An error occurred while automatically activating bundle org.eclipse.ui.workbench (73).
!STACK 0
org.osgi.framework.BundleException: The activator org.eclipse.ui.internal.WorkbenchPlugin for bundle org.eclipse.ui.workbench is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.getMethod(ServiceComponent.java:148)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:245)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:441)
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:213)
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:800)
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:767)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at java.lang.Thread.run(Unknown Source)
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.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
... 30 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 35 more
Root exception:
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.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.getMethod(ServiceComponent.java:148)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:245)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:441)
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:213)
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:800)
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:767)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 35 more
I shall appreciate any help resolving this issue
I got it resolved with the help of guys at eclipse forum. For detailed explanation check the link
Solution:-
The 64 bit org.eclipse.swt.win32.win32.x86_64 bundle was not getting included in the target osgi environment.
A quick test was to open osgi shell for the application
Command:- application.exe -noExit -console
Once you are in the osgi shell, execute the command ss org.eclipse.swt
osgi> ss org.eclipse.swt
Framework is launched.
id State Bundle
70 RESOLVED org.eclipse.swt_3.7.2.v3740f
Fragments=71
71 RESOLVED org.eclipse.swt.win32.win32.x86_64_3.7.2.v3740f
Master=70
If equinox(OSGI container) does not include 64 bit SWT bundle, you shall not see
71 RESOLVED org.eclipse.swt.win32.win32.x86_64_3.7.2.v3740f Master=70in the above command prompt.
I finally noticed for Target platform's equinox environment, in my feature.xml plugin specification for org.eclipse.swt.win32.win32.x86_64 and org.eclipse.equinox.launcher.win32.win32.x86_64 were not included.
In the feature.xml file had to include the following
<plugin
id="org.eclipse.swt.win32.win32.x86_64"
os="win32"
ws="win32"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
<plugin
id="org.eclipse.equinox.launcher.win32.win32.x86_64"
os="win32"
ws="win32"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
Once I included them, the project ran fine
I've just upgraded from Opensuse 13.1 to 13.2 and can no longer get my Qt development for android to work correctly. My investigation leads me to believe that it's more of an android development issue (ant) than anything to do with Qt.
I'm getting the error below while trying to deploy the example projects. I've found that it might be tied to missing xml-apis package, possible the xml-commons packages should provide this functionality but they don't seem to.
I'm not at all familiar with Java and have been stuck on this for a while now. Any suggestions appreciated.
22:46:33: Starting: "/home/bobstaff/Qt/5.3/android_armv7/bin/androiddeployqt" --input /home/bobstaff/Qt/Examples/Qt-5.3/quick/scenegraph/build-openglunderqml-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_2-Debug/android-libopenglunderqml.so-deployment-settings.json --output /home/bobstaff/Qt/Examples/Qt-5.3/quick/scenegraph/build-openglunderqml-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_2-Debug/android-build --deployment bundled --install --ant /usr/bin/ant --android-platform android-21 --jdk /usr/lib64/jvm/java-1.7.0-openjdk --device 10.1.2.5:5555
22:46:33: Pulling files necessary for debugging.
22:46:33: Package deploy: Running command '/home/bobstaff/android/adt-bundle-linux-x86_64-20140702/sdk/platform-tools/adb -s 10.1.2.5:5555 pull /system/bin/app_process /home/bobstaff/Qt/Examples/Qt-5.3/quick/scenegraph/build-openglunderqml-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_2-Debug/app_process'.
22:46:33: Package deploy: Running command '/home/bobstaff/android/adt-bundle-linux-x86_64-20140702/sdk/platform-tools/adb -s 10.1.2.5:5555 pull /system/lib/libc.so /home/bobstaff/Qt/Examples/Qt-5.3/quick/scenegraph/build-openglunderqml-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_2-Debug/libc.so'.
BUILD FAILED
/home/bobstaff/android/adt-bundle-linux-x86_64-20140702/sdk/tools/ant/build.xml:407: java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:466)
at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:513)
at com.android.ant.GetTypeTask.execute(GetTypeTask.java:85)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 40 more
Total time: 0 seconds
Generating Android Package
Input file: /home/bobstaff/Qt/Examples/Qt-5.3/quick/scenegraph/build-openglunderqml-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_2-Debug/android-libopenglunderqml.so-deployment-settings.json
Output directory: /home/bobstaff/Qt/Examples/Qt-5.3/quick/scenegraph/build-openglunderqml-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_2-Debug/android-build
Application binary: /home/bobstaff/Qt/Examples/Qt-5.3/quick/scenegraph/build-openglunderqml-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_2-Debug/libopenglunderqml.so
Android build platform: android-21
Install to device: 10.1.2.5:5555
Buildfile: /home/bobstaff/Qt/Examples/Qt-5.3/quick/scenegraph/build-openglunderqml-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_2-Debug/android-build/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 23.0.5
[checkenv] Installed at /home/bobstaff/android/adt-bundle-linux-x86_64-20140702/sdk
-setup:
[echo] Project Name: QtApp
Building the android package failed!
-- For more information, run this command with --verbose.
22:46:36: The process "/home/bobstaff/Qt/5.3/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project openglunderqml (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.3.2))
When executing step "Deploy to Android device"
22:46:36: Elapsed time: 00:04.
I solved the same problem by removing 'xml-commons', 'xml-commons-jaxp-1.3-apis' using opensuse 13.2 software manager and installing 'xerces-j2', 'xerces-j2-xml-apis', 'xerces-j2-xml-resolver' and my project reports BUILD SUCCESSFUL.
Complete steps for clarifying:
open "Software Management" from "Yast2" control centre.
search for "xml-commons".
Uncheck 'xml-commons', 'xml-commons-jaxp-1.X-apis' if are
checked(installed)[note: X stands for any version number], and
Accept for complete uninstalling that softwares.
Now search for 'xerces-j2'.
Check(install) 'xerces-j2', 'xerces-j2-xml-apis',
'xerces-j2-xml-resolver' from result list and Accept for installing
them or if they are currently checked dont tuch them!
that was all of my solution for this problem.
I am using:
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 1
Build id: 20121004-1855
And offline Jboss tools zip file is
jbosstools-4.0.0.Final.aggregate-Update-2012-12-06_13-22-08-B136
I successfully added zip file and it is also connecting to database,see the screenshot
http://imageshack.us/photo/my-images/21/jboss.png/
and my hibernate jars are(hibernate-release-4.1.8.Final)
hibernate-entitymanager-4.1.8.Final.jar
hibernate-envers-4.1.8.Final.jar
antlr-2.7.7.jar
dom4j-1.6.1.jar
hibernate-commos-annotations-4.0.1.Final.jar
hibernate-core-4.1.8.Final.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
javassist-3.15.0-GA.jar
jboss-logging-3.1.0.GA.jar
jboss-transaction-api_1.1_spec-1.0.0.Final.jar
In screenshot first exceptions is
org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge]**
org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge]
at org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:402)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:270)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2155)
at org.hibernate.console.ConsoleConfiguration$6.execute(ConsoleConfiguration.java:430)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.getSettings(ConsoleConfiguration.java:428)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:119)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:115)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:65)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:397)
... 15 more
Caused by: org.hibernate.cache.CacheException: could not instantiate CacheProvider [org.hibernate.cache.internal.NoCacheProvider]
at org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge.<init>(RegionFactoryCacheProviderBridge.java:66)
... 20 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.internal.NoCacheProvider
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge.<init>(RegionFactoryCacheProviderBridge.java:63)
... 20 more