How to fix PyException error in Sikulix 1.1.1? - sikuli

I am facing the below error in my sikuli script
+++ running this Java
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing)
+++ trying to run SikuliX
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar
C:\Users\Administrator\Desktop\UI_testing\Setup\sikulix.jar
[info] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[info] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
[error] IDE: Remembered window not valid. Going to primary screen
Exception: **org.python.core.PyException thrown from the UncaughtExceptionHandler
in thread "Thread-13"**
Checked and found the code is getting stuck at a line where I used image as a dictionary element
for i in menubar:
exists(menubar[i]).highlight(3)
menubar is a python dictionary which contains images which are stored with their name as key.
PS : code
from sikuli import *
menubar={"file":"menubar_file.png","edit":"menubar_edit.png","view":"menubar_view.png","administration":"menubar_administration.png","tools":"menubar_tools.png","help":"menubar_help.png"}
for i in menubar:
assert exists(menubar[i]).highlight(2)

The assert statement is testing a boolean expression that evaluates to True or False. The Sikuli exists() function however returns a Match object if a pattern found or None in the pattern was not found. You need to rewrite your code accordingly.
Also, I wouldn't use the highlight() like this as it is not clear what it is highlighting.

Related

Get frequent chrome driver error: driver config / start failed: chrome server returned empty list from http://localhost:(port) in karate standalone

I used to get frequent chrome driver error in karate UI tests. I have been using karate tests in VS code for the past 5 months. Now, I used to get driver config / start failed: chrome server returned empty list from http://localhost:[port] frequently. Sometimes, I need to run 20 times to run the same test to succeed. All other runs throws either "driver config / start failed: chrome server returned empty list" / "ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed"
I have installed chrome multiple times but I get the same error. Also I have re-imaged my laptop due this issue and through something went wrong. Even now I used to get the above errors often.
I have installed Chrome 64 bit in windows laptop, it get installed in "C:\Program Files\Google\Chrome\Application\chrome.exe" but karate standalone will always check the Chrome path "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" in runtime which doesn't exists.
Note: I have set the chrome.exe installed path in my system environment PATH but karate not considering the path variable. Please advise me on this.
So I have modified the driver config as given below:-
* configure driver = { type: 'chrome', headless: true }
[To]
* configure driver = { type: 'chrome', executable: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: true }
Karate version: 0.9.6.RC3
OS : Windows 10 Home
JDK Version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
Chrome Driver config
configure driver = { type: 'chrome', executable: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: true }
Chrome Driver Errors
testui.feature:8 - driver config / start failed: chrome server returned empty list from http://localhost:54311, options: {type=chrome, executable=C:/Program Files/Google/Chrome/Application/chrome.exe, headless=true, target=null}
ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed:
[1.1:33] test_page.feature:9 - driver config / start failed: chrome server returned empty list from http://localhost:55676, options: {type=chrome, executable=C:/Program Files/Google/Chrome/Application/chrome.exe, headless=true, target=null}
ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed:
[1.1:33] test_page.feature:11 - evaluation (js) failed: input('#username', 'admin'), failed to get reply for: [id: 23, method: Input.dispatchKeyEvent, params: {modifier=0, type=keyDown, text=k}]
Please guide me how to resolve this issue.
Thanks,
Chandra
I was same error. Actually its finding chrome.exe in different location where actually its not located.
In default it's looking at "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
but actual path was 'C:/Users/ues/AppData/Local/Google/Chrome/Application/chrome.exe'
So check your chrome.exe path.
Hope it's helpful.
I have solved my problem by defining in the config file as;
"karate.configure('driver', { type: 'chrome', port: 9222,
executable: 'C://Program Files//Google//Chrome//Application//chrome.exe' });"
maybe assigning a port help me to solve the issue but one thing to consider here is that u need to use forward slashes in the executable command.
No one else has reported this, so you'll need to figure this out maybe with the help of someone who can troubleshoot your machine. Maybe there are some permission restrictions. Maybe your old processes are still running, so make sure you go to your task manager and kill them etc, this is quite common on Windows.
And please upgrade to 1.0 before trying anything else, because that may help: https://github.com/intuit/karate/wiki/1.0-upgrade-guide
Otherwise we will need your help to maybe debug and suggest changes to the framework. Ideally you should contribute code to Karate, and remember - it is an open source project. If you are able to replicate your problems, follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue - but I'm not sure that is possible with the kinds of issues you are describing.
If none of the above options work, you may need to consider switching to some other framework.
EDIT: most teams run on CI + Docker which is much more stable: https://stackoverflow.com/a/62325328/143475

Failed to build libmysql on windows using vc2008

I want to build libmysql.dll, so I got source code mysql-connector-c-6.1.6-src.zip from http://dev.mysql.com/downloads/connector/c/.
Then cmake-gui.exe to configure and generate vc 2008 sln, leave all settings default.
Then got errors and warnings when building, like this:
mysql-connector-c-6.1.6-src\include\thr_cond.h(109) : error C2065: “ETIMEDOUT”: 未声明的标识符(an unspecified identifier)
mysql-connector-c-6.1.6-src\include\thr_rwlock.h(80) : warning C4013: “TryAcquireSRWLockShared” 未定义(not defined)
mysql-connector-c-6.1.6-src\include\thr_rwlock.h(102) : warning C4013: “TryAcquireSRWLockExclusive” 未定义(not defined)
I searched the source, and find ETIMEDOUT is defined in my_pthread.h, so I include this header in thr_cond.h, but still error.
And TryAcquireSRWLockShared and TryAcquireSRWLockExclusive seem only supported on Win7 and later !
Do I have done something wrong?
How can I build libmysql?
Any help will be appreciated.
Download the previous version (6.0.2), it doesn's use the TryAcquireSRWLockShared() API function.
With a few minor tweeks, it compiles clean with MSVC 2008.
Here are the modifications (based on the extracted zip file root):
Replace line 306 of include/config-win.h with:
// avoid annoying warning
#ifndef HAVE_COMPRESS
# define HAVE_COMPRESS
#endif
Comment lines 350-367 of CMakeLists.txt (CPack instructions cause CMake to fail)
Follow instructions in BUILD.win

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!

How to setup Robot Framework standalone jar with SwingLibrary?

I'm using Robot Framework with SwingLibrary to test a Java Swing based application. Since I'm not used to Python and also don't want to setup the Python environment, I decided to go with the Robot standalone JAR version (current version 2.8.4).
My problem is the setup in combination with SwingLibrary (version 1.8.0). I don't know where to put the library such that it gets recognized by Robot.
So far, I have the following test case (mytest.txt):
*** Settings ***
Library SwingLibrary
*** Test Cases ***
MyTestCase
Start Application MyApp
I tried with putting the standalone jar in conjunction with the test case in a folder, and created one subfolder (called it Lib) where I put the SwingLibrary JAR (and later also extracted the JAR).
I added the SwingLibrary as well as my own application to the classpath, tried executing robot the following way:
java -Xbootclasspath/a:Lib/swinglibrary-1.8.0.jar:Lib/MyApp.jar -jar robotframework-2.8.4.jar mytest.txt
and also with
java -jar robotframework-2.8.4.jar mytest.txt
I always get one of the following errors:
[ WARN ] Imported library 'SwingLibrary' contains no keywords
==============================================================================
Mytest
==============================================================================
MyTestCase | FAIL |
No keyword with name 'Start Application' found.
or
[ ERROR ] Error in file 'mytest.txt': Importing test library 'SwingLibrary' failed: ImportError: No module named SwingLibrary
You can use the standalone jar without the -jar option, allowing you to specify the classpath in the standard manner. The main class for the standalone jar is org.robotframework.RobotFramework, so the syntax would be
java -cp robotframework-2.8.4.jar:Lib/swinglibrary-1.8.0.jar:Lib/MyApp.jar org.robotframework.RobotFramework
Slightly more verbose but it's standard and so avoids any oddnesses caused by using the non-standard -Xbootclasspath option.

rg.codehaus.groovy.control.MultipleCompilationErrorsException when I have 2 different jdbc jars on classpath [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Manifest.MF issue with MSSQLSERVER 2008 and Groovy
I have a very simple groovy script with 2 database connections:
One db connection to Oracle
Another db connection to SQLServer
Problem
When I run the program through the GGTS Editor (The groovy and grails version of SpringSource Tool Suite), the two queries run and return results fine. But, when I run the program from the command line, from the project folder as follows:
groovy -cp lib\jtds-1.3.0.jar lib\ojdbc6-11g.jar src\Starter.groovy
I get the following error:
C:\workspace-ggts\Test>groovy -cp lib\jtds-1.3.0.jar lib\ojdbc6-11g.jar src\Star
ter.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\workspace-ggts\Test\lib\ojdbc6-11g.jar: 1: unexpected char: 0x3 # line 1, col
umn 3.
PK♥ ßî∟9 ♦ META-INF/■╩ ♥ ☻ PK♥♦ ßî∟9 ¶ M
ETA-INF/MANIFEST.MF?æ┴N├0►D∩æ≥☼½₧α►7)R[rúΘÑá☻R½^æq6─òcç╡SΦ▀π4◄ → ─╒3;π}╗µ
Z▬h]┤C▓╥Φ¶↕▬ç┴¬¬§V¿↔w■╤ï:7ö┬♥qí►2C╡íôtf▌Jº0♣│╧ƒ┼öφ9
^
1 error
What I have Tried
I have tried using the jtds driver to connect to SQLServer as I thought the problem was the sqljdbc4.jar from Microsoft site based on this same problem reported differently here
I have tried putting semicolons to separate the classpath dependencies, and still same error.
I have upgraded java version to 1.7. Groovy version is 2.0.5
From the IDE it runs fine, but from command line I get the error.
If I comment out one of the db access code (connection, query, println of resultset) leaving my groovy script with only one db connection & access the program runs fine from command line. For example:
This
groovy -cp lib\jtds-1.3.0.jar src\Starter.groovy
or this:
groovy -cp lib\ojdbc6-11g.jar src\Starter.groovy
does work. As soon as I add the code and the jar in the classpath for that second db access I get the error reported above.
I am out of thoughts or ideas
Files in your classpath need to be separated with a semi-colon on Windows. On unix-like platforms like Linux or OSX, the separator is a colon. Groovy is treating the second jar file as the script, and the script name as the first command line parameter.
Try this:
groovy -cp lib\jtds-1.3.0.jar;lib\ojdbc6-11g.jar src\Starter.groovy
Do you get a different error with that?