How to reslove instrumentation error in selendroid? - selendroid

I have given following coding to start android device.While running,it points the android device and it creates the Android driver App in android device,after that it throws the following error message.
WebDriver driver = new RemoteWebDriver(DesiredCapabilities.android());
driver.get("url");
Error message:
Failed tests: setUp(mobileweb.photocentric.ScrollArticleTest): Could not start the app under test using instrumentation.
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{io.selendroid.io.selendroid.androiddriver/io.selendroid.server.ServerInstrumentation}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.io.selendroid.androiddriver/io.selendroid.server.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:301)
at dalvik.system.NativeStart.main(Native Method)

I had the same problem and I found out that the androiddriver package was conflicting with a previous version installed in my device.
Try uninstalling the package from your device with the following command:
adb shell pm uninstall io.selendroid.io.selendroid.androiddriver

Related

NoSuchMethodError: org.openqa.selenium.os.CommandLine.findExecutable(Ljava/lang/String;)Ljava/lang/String; while launching Chrome using SoapUI

I'm trying to launch the selenium scripts from SoapUI 5.2.1 tool with the following launching script:
System.setProperty("webdriver.chrome.driver","D:\\SoapUI-5.2.1\\bin\\ext\\chromedriver.exe")
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("https://www.MyUrl.com")
driver.manage().timeouts().implicitlyWait(120,TimeUnit.SECONDS);
I have kept the following selenium dependency file in SoapUI/bin/ext folder
- chromedriver 2.36
- selenium-server-standalone-3.4.0.jar
- selenium-chrome-driver-2.3.1.jar
But I'm getting the following error message while running the script.
Tue May 22 15:51:47 IST 2018:ERROR:java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.findExecutable(Ljava/lang/String;)Ljava/lang/String;
java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.findExecutable(Ljava/lang/String;)Ljava/lang/String;
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:84)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:87)
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.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186)
at Script1.launchURL(Script1.groovy:49)
at Script1.run(Script1.groovy:20)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:92)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:141)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:250)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Anyone help me to solve this issue as I'm not able to find correct solution in Google.
Thanks
Karunagara Pandi
This error message...
java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.findExecutable(Ljava/lang/String;)Ljava/lang/String;
java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.findExecutable(Ljava/lang/String;)Ljava/lang/String;
...implies that a NoSuchMethodError was raised when the os command findExecutable() tried to locate the executable as per your System.setProperty() line.
Class NoSuchMethodError
NoSuchMethodError extends IncompatibleClassChangeError and as per the Java Docs it is thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method. Normally, this error is caught by the compiler and this error can only occur at run time if the definition of a class has incompatibly changed. Incompatible class change occurs due to change in definition of some class, on which the currently executing method depends.
What went wrong?
You have created the WebDriver instance i.e. driver and casted it through ChromeDriver(). But the SoapUI/bin/ext sub-directory contains multiple defination from selenium-server-standalone-3.4.0.jar and selenium-chrome-driver-2.3.1.jar.
Solution
Perform the following steps :
Remove selenium-chrome-driver-2.3.1.jar from SoapUI/bin/ext sub-directory.
Upgrade JDK to recent levels JDK 8u171.
Upgrade Selenium to current levels Version 3.11.0.
Upgrade ChromeDriver to current ChromeDriver v2.38 level.
Keep Chrome version at Chrome v66.x levels. (as per ChromeDriver v2.38 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test.
Code to initialize the chromedriver is like the below code mentioned
System.setProperty("webdriver.chrome.driver", "C:\\chromedriver_win32\\chromedriver.exe");
Webdriver driver = new ChromeDriver();
You need to set the correct dependency artifact id of selenium like
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.12.0</version>
</dependency>
if you are using jar file then download the selenium jar file from here Authentic link

Multi-OS Engine build failed in Android Studio

I'm recently getting an error building a Multi-OS engine project using LibGDX in Android Studio. This is the output from the Multi-OS Engine console:
ERROR: Failed to upgradeonly on device, Unknown error
Command failed: [/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java, -Dfile.encoding=UTF-8, -Duser.country=US, -Duser.language=en, -Duser.variant, -jar, /Users/camilo/.moe/moe-sdk-1.3.0-beta-2/tools/ios-device.jar, --app-path=/path/to/my/project/ios-moe/build/moe/xcodebuild/Debug-iphoneos/MyApp.app, --wait-for-device, --launch-arg=-args, --launch-arg=--debug, --install-mode=upgradeonly]
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ios-moe:moeLaunch'.
> Process exited with non-zero exit value
* Try:
:ios-moe:moeLaunch FAILED
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
My gradle looks like this:
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'org.multi-os-engine:moe-gradle:1.3.3'
}
}
LibGDX version = 1.9.6
Nonetheless the Application is installed in the device, but I cannot see the logs in the console. When I change the build target to Simulator it works just fine.
Problem solved, my iPhone has updated to 10.3.1 and Xcode didn't have the DeveloperDiskImage corresponding to the latest iOS version, so I had to update Xcode too to version 8.3.1.

LibGDX Android Emulator Problems

Okay, so I dont know if its my program or if eclipse is just bad at running an android emulator. My application runs fine as a runnable jar file however trying to run it in an android emulator I get a FATAL ERROR:MAIN and it fails to load my package classe. I've also tried using Andy OS as an emulator but it doesnt work on that either. Also I tried running a libgdx set up with nothing on it and i get the same errors.
08-03 18:44:16.455: E/Trace(6706): error opening trace file: No such file or directory (2)
08-03 18:44:16.508: W/dalvikvm(6706): Unable to resolve superclass of Lcom/caleb/gspikes/AndroidLauncher; (14)
08-03 18:44:16.508: W/dalvikvm(6706): Link of class 'Lcom/caleb/gspikes/AndroidLauncher;' failed
08-03 18:44:16.508: W/dalvikvm(6706): threadid=1: thread exiting with uncaught exception (group=0xa615a908)
08-03 18:44:16.511: E/AndroidRuntime(6706): FATAL EXCEPTION: main
08-03 18:44:16.511: E/AndroidRuntime(6706): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.caleb.gspikes/com.caleb.gspikes.AndroidLauncher}: java.lang.ClassNotFoundException: Didn't find class "com.caleb.gspikes.AndroidLauncher" on path: /data/app/com.caleb.gspikes-1.apk
This is some of the logcat message when using Andy OS
This fixed it for me but when i configured the build path in the order and export I selected the external jars I used.

Error building server: An error occurred while resigning test.apk

Whenever i try to run the following command:
java -jar selendroid-standalone-0.15.0-with-dependencies.jar -app test.apk
I get the following error:
io.selendroid.standalone.SelendroidLauncher launchServer
SEVERE: Error building server: An error occurred while resigning the app 'test.apk'.
Exception in thread "main" io.selendroid.server.common.exceptions.SessionNotCreatedException: An error occurred while resigning the app 'test.apk'.
The same question has been posted earlier.
Kindly respond if anyone has the solution to it.
Thanks.
System requirements on the selenroid website:
Java SDK (minimum 1.6) must be installed and JAVA_HOME configured. IMPORTANT: If JAVA_HOME is pointing to a Java runtime environment, selendroid will produce errors because tools like the jarsigner are not available!

Why isn't this SalesforceCanvasFrameworkSDK “Hello World” application for SFDC Canvas working?

Currently I'm looking in the Force.com Canvas Developer's Guide at "Chapter 3: Quick Start--Advanced".
I've successfully cloned SalesforceCanvasFrameworkSDK from GitHub, and am now trying to Run the Web App Locally.
The build is successful and keystore has been created. However, when I execute target\bin\webapp.bat, I get the following error:
Error: Could not find or load main class Main
Find that the main class seems to be in C:\SalesforceCanvasFrameworkSDK\target\classes, I modified the .bat file, to include this in the CLASSPATH:
set CLASSPATH="C:\SalesforceCanvasFrameworkSDK\target\classes;%BASEDIR%"\etc;"%REPO%"\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;"%REPO%"\org\mortbay\jetty\jsp-2.1-glassfish\2.1.v20100127\jsp-2.1-glassfish-2.1.v20100127.jar;"%REPO%"\org\eclipse\jdt\core\compiler\ecj\3.5.1\ecj-3.5.1.jar;"%REPO%"\org\mortbay\jetty\jsp-api-2.1-glassfish\2.1.v20100127\jsp-api-2.1-glassfish-2.1.v20100127.jar;"%REPO%"\ant\ant\1.6.5\ant-1.6.5.jar;"%REPO%"\org\codehaus\jackson\jackson-mapper-asl\1.9.0\jackson-mapper-asl-1.9.0.jar;"%REPO%"\org\codehaus\jackson\jackson-core-asl\1.9.0\jackson-core-asl-1.9.0.jar;"%REPO%"\org\eclipse\jetty\jetty-webapp\7.6.0.v20120127\jetty-webapp-7.6.0.v20120127.jar;"%REPO%"\org\eclipse\jetty\jetty-xml\7.6.0.v20120127\jetty-xml-7.6.0.v20120127.jar;"%REPO%"\org\eclipse\jetty\jetty-util\7.6.0.v20120127\jetty-util-7.6.0.v20120127.jar;"%REPO%"\org\eclipse\jetty\jetty-servlet\7.6.0.v20120127\jetty-servlet-7.6.0.v20120127.jar;"%REPO%"\org\eclipse\jetty\jetty-security\7.6.0.v20120127\jetty-security-7.6.0.v20120127.jar;"%REPO%"\org\eclipse\jetty\jetty-server\7.6.0.v20120127\jetty-server-7.6.0.v20120127.jar;"%REPO%"\org\eclipse\jetty\jetty-continuation\7.6.0.v20120127\jetty-continuation-7.6.0.v20120127.jar;"%REPO%"\org\eclipse\jetty\jetty-http\7.6.0.v20120127\jetty-http-7.6.0.v20120127.jar;"%REPO%"\org\eclipse\jetty\jetty-io\7.6.0.v20120127\jetty-io-7.6.0.v20120127.jar;"%REPO%"\asm\asm\3.2\asm-3.2.jar;"%REPO%"\org\json\json\20080701\json-20080701.jar;"%REPO%"\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;"%REPO%"\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar;"%REPO%"\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;"%REPO%"\sfdc\sfdc-canvas-sdk\1.0-SNAPSHOT\sfdc-canvas-sdk-1.0-SNAPSHOT.jar
This enables the batch file to execute and initiate Jetty.
However, when I attempt to visit https://localhost:8443/examples/hello-world/index.jsp, after getting past the browser warning message, I get an HTTP ERROR 500 page:
HTTP ERROR 500
Problem accessing /examples/hello-world/index.jsp. Reason:
PWC6033: Unable to compile class for JSP
PWC6199: Generated servlet error: The type java.util.Map$Entry cannot
be resolved. It is indirectly referenced from required .class files
Caused by:
org.apache.jasper.JasperException: PWC6033: Unable to compile class
for JSP
PWC6199: Generated servlet error: The type java.util.Map$Entry cannot
be resolved. It is indirectly referenced from required .class files
at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:123)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:296)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:376)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:437) at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:360)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349) at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
at
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at
org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:665)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:745) Powered by Jetty://
Concurrently, my Jetty server dies with:
ERROR: Compilation error
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.(ClassFileReader.java:372)
at org.apache.jasper.compiler.JDTJavaCompiler$1.findType(JDTJavaCompiler.java:367)
at org.apache.jasper.compiler.JDTJavaCompiler$1.findType(JDTJavaCompiler.java:324)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:102)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1188)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromVariantTypeSignature(LookupEnvironment.java
:1244)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeArgumentsFromSignature(LookupEnvironment.java:1
031)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1193)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createMethod(BinaryTypeBinding.java:495)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createMethods(BinaryTypeBinding.java:577)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:327)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:640)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:619)
at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:295)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:133)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:183)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:465)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:519)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:368)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:444)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:752)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:464)
at org.apache.jasper.compiler.JDTJavaCompiler.compile(JDTJavaCompiler.java:503)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:368)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:360)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:665)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:745) ERROR: Error compiling file:
C:\Users\Brian_Kessler#epam.com\AppData\Local\Temp\jetty-0.0.0.0-8443-webapp-_-any-\jsp\org\apa
che\jsp\examples\hello_002dworld\index_jsp.java 2014-12-11
15:35:48.106:WARN:oejs.ServletHandler:/examples/hello-world/index.jsp
org.apache.jasper.JasperException: PWC6033: Unable to compile class
for JSP||PWC6199: Generated servlet error:|The type java
.util.Map$Entry cannot be resolved. It is indirectly referenced from
required .class files||
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:123)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:296)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:376)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:360)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:665)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:745)
If it is relevant:
OS: Windows 7
Java: 1.8.0_25
Maven: 3.2.2
Any help to resolve this will be appreciated!
I was able to fix this as follows on MacOS Sierra 10.13.6
The problem does seem to be with Java 8, so if you can start the whole installation with Java 7, you'll save a lot of time. In my case, I had already installed Java 8, so I had to do the following:
1- Install java 7 from: https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html . You have to create an Oracle account, it's free.
2- Confirm both versions of java are runningv
Pablos-MacBook-Pro:SalesforceCanvasFrameworkSDK pabloalvarez$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
1.8.0_191, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home
1.7.0_80, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
3- Then
export JAVA_HOME=`/usr/libexec/java_home -v 1.7.0_80`
export JAVACMD=`/usr/libexec/java_home -v 1.7.0_80`
Confirm that Java 7 is the default version now
Pablos-MacBook-Pro:SalesforceCanvasFrameworkSDK pabloalvarez$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
5- Then
export JAVACMD=/usr/bin/java
6- Finally
Pablos-MacBook-Pro:SalesforceCanvasFrameworkSDK pabloalvarez$ sh target/bin/webapp
Looks like we are NOT running on heroku.
2019-01-14 10:54:48.557:INFO:oejs.Server:jetty-7.6.0.v20120127
2019-01-14 10:54:48.863:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/Users/pabloalvarez/SalesforceCanvasFrameworkSDK/src/main/webapp/}
2019-01-14 10:54:49.252:INFO:oejus.SslContextFactory:Enabled Protocols [SSLv2Hello, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
Good luck!