What is the options for antlr.gunit.Interp? How to turn on its verbose option? - antlr

I certainly make wrong, but antlr's gunit seems to have no option for the users.
bash-3.2$ java org.antlr.gunit.Interp --help
Exception in thread "main" java.io.FileNotFoundException: --help (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at org.antlr.runtime.ANTLRFileStream.load(ANTLRFileStream.java:59)
at org.antlr.runtime.ANTLRFileStream.<init>(ANTLRFileStream.java:47)
at org.antlr.runtime.ANTLRFileStream.<init>(ANTLRFileStream.java:42)
at org.antlr.gunit.Interp.main(Interp.java:62)
bash-3.2$
Especially, I would like to turn on verbose option, otherwise it tells really little when error occurs.
Do you know how to turn on its verbose/debug option?
[java] -----------------------------------------------------------------------
[java] executing testsuite for grammar:while with 31 tests
[java] -----------------------------------------------------------------------
[java] 2 failures found:
[java] test15 (variables, line20) -
[java] expected: OK
[java] actual: FAIL
[java]
[java] test20 (read, line27) -
[java] expected: OK
[java] actual: FAIL
[java]

Assuming you're using antlr3, looking at the source on GitHub (https://github.com/antlr/antlr3/blob/master/gunit/src/main/java/org/antlr/gunit/Interp.java) you are correct that there is no verbose option.
A way to verify why your tests are failing would be to run the input through AntlrWorks in debug mode, so that you can see what rules are matching.

Related

how to resolve Error: Relation "schema_version

how to resolve Error: Relation "schema_version
[java] at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98) [dspace-api-7.3.jar:7.3]
[java] Caught exception:
[java] org.postgresql.util.PSQLException: ERROR: relation "schema_version" does not exist
[java] Position: 23
[java] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
[java] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
[java] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
[java] at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
[java] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)

Hybris - Table cxabstractaction doesn't exist

I'm doing system update from hac. But I'm getting following error in the console. I looked in the *-items.xml for cxabstractaction itemtype, but couldn't find it. I am using SAP Hybris 1808 version with mysql 8.x version.
[java] Caused by: java.sql.SQLSyntaxErrorException: Table 'hybrisD2C.cxabstractaction' doesn't exist
[java] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
[java] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[java] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[java] at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1200)
[java] at de.hybris.platform.jdbcwrapper.interceptor.StatementWithJDBCInterceptor.lambda$2(StatementWithJDBCInterceptor.java:53)
[java] at de.hybris.platform.jdbcwrapper.interceptor.recover.SQLRecoverableExceptionHandler.passThrough(SQLRecoverableExceptionHandler.java:101)
[java] at de.hybris.platform.jdbcwrapper.interceptor.recover.SQLRecoverableExceptionHandler.get(SQLRecoverableExceptionHandler.java:59)
[java] at de.hybris.platform.jdbcwrapper.interceptor.JDBCInterceptor.get(JDBCInterceptor.java:69)
[java] at de.hybris.platform.jdbcwrapper.interceptor.StatementWithJDBCInterceptor.executeQuery(StatementWithJDBCInterceptor.java:53)
[java] at de.hybris.platform.jdbcwrapper.StatementImpl.executeQuery(StatementImpl.java:161)
[java] at org.apache.ddlutils.platform.JdbcModelReader.determineAutoIncrementFromResultSetMetaData(JdbcModelReader.java:1064)
[java] at org.apache.ddlutils.platform.mysql.MySqlModelReader.readTable(MySqlModelReader.java:67)
[java] at org.apache.ddlutils.platform.JdbcModelReader.readTables(JdbcModelReader.java:516)
[java] at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:472)
[java] at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
[java] at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
[java] ... 41 more
It is part of personalizationservices extension. Check the hybris/bin/modules/personalization/personalizationservices/resources/personalizationservices-items.xml file.

Flink submit task failed

I am using Flink1.6.1 and Hadoop2.7.5. on first I start a flink
bin/yarn-session.sh -n 2 -jm 1024 -tm 1024 -d
then submit a task
./bin/flink run ./examples/batch/WordCount.jar -input hdfs://CS-201:9000/LICENSE -output hdfs://CS-201:9000/wordcount-result.txt
I got a error:
[root#CS-201 flink-1.6.1]# ./bin/flink run
./examples/batch/WordCount.jar -input hdfs://CS-201:9000/LICENSE
-output hdfs://CS-201:9000/wordcount-result.txt 2019-05-19 15:31:11,357 INFO org.apache.flink.yarn.cli.FlinkYarnSessionCli
- Found Yarn properties file under /tmp/.yarn-properties-root. 2019-05-19 15:31:11,357 INFO
org.apache.flink.yarn.cli.FlinkYarnSessionCli - Found
Yarn properties file under /tmp/.yarn-properties-root. 2019-05-19
15:31:11,737 INFO org.apache.flink.yarn.cli.FlinkYarnSessionCli
- YARN properties set default parallelism to 2 2019-05-19 15:31:11,737 INFO org.apache.flink.yarn.cli.FlinkYarnSessionCli -
YARN properties set default parallelism to 2 YARN properties set
default parallelism to 2 2019-05-19 15:31:11,777 INFO
org.apache.hadoop.yarn.client.RMProxy -
Connecting to ResourceManager at CS-201/192.168.1.201:8032 2019-05-19
15:31:11,887 INFO org.apache.flink.yarn.cli.FlinkYarnSessionCli
- No path for the flink jar passed. Using the location of class org.apache.flink.yarn.YarnClusterDescriptor to locate the jar
2019-05-19 15:31:11,887 INFO
org.apache.flink.yarn.cli.FlinkYarnSessionCli - No
path for the flink jar passed. Using the location of class
org.apache.flink.yarn.YarnClusterDescriptor to locate the jar
2019-05-19 15:31:11,891 WARN
org.apache.flink.yarn.AbstractYarnClusterDescriptor -
Neither the HADOOP_CONF_DIR nor the YARN_CONF_DIR environment variable
is set.The Flink YARN Client needs one of these to be set to properly
load the Hadoop configuration for accessing YARN. 2019-05-19
15:31:11,979 INFO org.apache.flink.yarn.AbstractYarnClusterDescriptor
- Found application JobManager host name 'cs-202' and port '52389' from supplied application id 'application_1558248666499_0003' Starting
execution of program
------------------------------------------------------------ The program finished with the following exception:
org.apache.flink.client.program.ProgramInvocationException: Could not
retrieve the execution result. (JobID:
471f0c2d047aba74ea621c5bfe782cbf) at
org.apache.flink.client.program.rest.RestClusterClient.submitJob(RestClusterClient.java:260)
at
org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:486)
at
org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:474)
at
org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:62)
at
org.apache.flink.examples.java.wordcount.WordCount.main(WordCount.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:529)
at
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421)
at
org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:426)
at
org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:804)
at
org.apache.flink.client.cli.CliFrontend.runProgram(CliFrontend.java:280)
at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:215)
at
org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:1044)
at
org.apache.flink.client.cli.CliFrontend.lambda$main$11(CliFrontend.java:1120)
at java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:422) at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1754)
at
org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
at
org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1120)
Caused by: org.apache.flink.runtime.client.JobSubmissionException:
Failed to submit JobGraph. at
org.apache.flink.client.program.rest.RestClusterClient.lambda$submitJob$8(RestClusterClient.java:379)
at
java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:870)
at
java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:852)
at
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at
java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at
org.apache.flink.runtime.concurrent.FutureUtils.lambda$retryOperationWithDelay$5(FutureUtils.java:213)
at
java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at
java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at
java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
at
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:929)
at
java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) Caused by:
java.util.concurrent.CompletionException:
org.apache.flink.runtime.concurrent.FutureUtils$RetryException: Could
not complete the operation. Exception is not retryable. at
java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
at
java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
at
java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:911)
at
java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:899)
... 12 more Caused by:
org.apache.flink.runtime.concurrent.FutureUtils$RetryException: Could
not complete the operation. Exception is not retryable. ... 10 more
Caused by: java.util.concurrent.CompletionException:
org.apache.flink.runtime.rest.util.RestClientException: [Job
submission failed.] at
java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
at
java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
at
java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:911)
at
java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:953)
at
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926)
... 4 more Caused by:
org.apache.flink.runtime.rest.util.RestClientException: [Job
submission failed.] at
org.apache.flink.runtime.rest.RestClient.parseResponse(RestClient.java:310)
at
org.apache.flink.runtime.rest.RestClient.lambda$submitRequest$3(RestClient.java:294)
at
java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952)
... 5 more
why it happen? and How to fix that..

Cannot open firefox in Docker container

I am trying to run a selenium test inside a Docker container. I created the image on top of a base image of Oracle Linux 6.7 and with Firefox 24 on it. Set the Display in the entry-point script which also runs the selenium test. But when it runs the tests, it errors out saying
[java] org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
[java] *** LOG addons.manager: Application has been upgraded
[java] *** LOG addons.xpi: startup
[java] *** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous9132988696593276996webdriver-profile/extensions/webdriver-staging
[java] *** LOG addons.xpi: checkForChanges
[java] *** LOG addons.xpi-utils: Opening database
[java] *** LOG addons.xpi-utils: Creating database schema
[java] *** LOG addons.xpi: New add-on fxdriver#googlecode.com installed in app-profile
[java] *** Blocklist::_loadBlocklistFromFile: blocklist is disabled
[java] *** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
[java] *** LOG addons.xpi: Updating database with changes to installed add-ons
[java] *** LOG addons.xpi-utils: Updating add-on states
[java] *** LOG addons.xpi-utils: Writing add-ons list
[java] *** LOG addons.manager: shutdown
[java] *** LOG addons.xpi: shutdown
[java] *** LOG addons.xpi-utils: shutdown
[java] *** LOG addons.xpi-utils: Database closed
[java] *** LOG addons.xpi: startup
[java] *** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous9132988696593276996webdriver-profile/extensions/webdriver-staging
[java] *** LOG addons.xpi: checkForChanges
[java] *** LOG addons.xpi: No changes found
[java] process 149: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
[java] See the manual page for dbus-uuidgen to correct this issue.
[java] D-Bus not built with -rdynamic so unable to print a backtrace
This is how I set the display in the entry point script
#Set the Display
vncserver :1
export DISPLAY=:1
Can anyone please advise on what I might be doing wrong?
Additional Info and Troubleshooting I did:
I thought this might be the version compatibility issue with Firefox and Selenium (using selenium 2.44.0 and firefox 24), but looks like it is not.
This test runs fine with the same version of firefox and selenium when ran from my VM. fails only if I run it as a docker image.
Tried to upgrade the firefox version to 44, but did not help.
Exposed the right ports in my docker file. 5900,5901,5902,5903.

Selenium RC - grid hub is not listening

I'm new to selenium.
I am running an existing selenium RC code.
When i try to launch the hub I got the following error
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
Buildfile: build.xml does not exist!
Build failed
So I downloaded JDK files. Then I changed the system variables
Now it is pointing to
C:\>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.7.0_11
C:\>echo %PATH%
c:\ruby\bin;C:\ant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C
:\Program Files\Windows Imaging\;C:\Program Files\Common Files\Roxio Shared\DLLS
hared\;C:\Program Files\Java\jre1.6.0_05\bin;C:\Program Files\Java\jdk1.7.0_11
C:\>echo %ANT_HOME%
C:\ant\bin\ant.bat
I ran the following bat file to launch the hub - launch hub.bat
title Hub
cd C:\selenium\Grid\selenium-grid-1.0.4
c:\ant\bin\ant launch-hub
OUTPUT
C:\selenium\Grid\selenium-grid-1.0.4>c:\ant\bin\ant launch-hub
Buildfile: build.xml
launch-hub:
[java] jan 16, 2013 2:45:25 PM com.thoughtworks.selenium.grid.hub.HubRegist
ry gridConfiguration
[java] INFO: Loaded grid configuration:
[java] ---
[java] hub:
[java] environments:
[java] -
[java] browser: "*firefox"
[java] name: Firefox on Windows
[java] -
[java] browser: "*firefox"
[java] name: Firefox on OS X
[java] -
[java] browser: "*firefox"
[java] name: Firefox on Linux
[java] -
[java] browser: "*iehta"
[java] name: IE on Windows
[java] -
[java] browser: "*safari"
[java] name: Safari on OS X
[java] -
[java] browser: "*firefox"
[java] name: "*firefox"
[java] -
[java] browser: "*firefox2"
[java] name: "*firefox2"
[java] -
[java] browser: "*firefox3"
[java] name: "*firefox3"
[java] -
[java] browser: "*chrome"
[java] name: "*chrome"
[java] -
[java] browser: "*iexplore"
[java] name: "*iexplore"
[java] -
[java] browser: "*iehta"
[java] name: "*iehta"
[java] -
[java] browser: "*safari"
[java] name: "*safari"
[java] -
[java] browser: "*opera"
[java] name: "*opera"
[java] -
[java] browser: "*googlechrome"
[java] name: "*googlechrome"
[java] -
[java] browser: "*firefoxproxy"
[java] name: "*firefoxproxy"
[java] -
[java] browser: "*pifirefox"
[java] name: "*pifirefox"
[java] -
[java] browser: "*iexploreproxy"
[java] name: "*iexploreproxy"
[java] -
[java] browser: "*piiexplore"
[java] name: "*piiexplore"
[java] -
[java] browser: "*safariproxy"
[java] name: "*safariproxy"
[java]
[java] 2013-01-16 14:45:25.161::INFO: Logging to STDERR via org.mortbay.lo
g.StdErrLog
[java] 2013-01-16 14:45:25.224::INFO: jetty-6.0.x
[java] 2013-01-16 14:45:25.364::WARN: failed SocketConnector # 0.0.0.0:444
4
[java] java.net.BindException: Address already in use: JVM_Bind
[java] at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
[java] at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl
.java:376)
[java] at java.net.TwoStacksPlainSocketImpl.bind(TwoStacksPlainSocketIm
pl.java:101)
[java] at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:175)
[java] at java.net.ServerSocket.bind(ServerSocket.java:376)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:237)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:181)
[java] at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketC
onnector.java:78)
[java] at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.ja
va:72)
[java] at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector
.java:251)
[java] at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector
.java:145)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at org.mortbay.jetty.Server.doStart(Server.java:239)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at com.thoughtworks.selenium.grid.hub.HubServer.main(HubServer.j
ava:39)
[java] 2013-01-16 14:45:25.364::WARN: failed Server#d38c3d
[java] java.net.BindException: Address already in use: JVM_Bind
[java] at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
[java] at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl
.java:376)
[java] at java.net.TwoStacksPlainSocketImpl.bind(TwoStacksPlainSocketIm
pl.java:101)
[java] at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:175)
[java] at java.net.ServerSocket.bind(ServerSocket.java:376)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:237)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:181)
[java] at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketC
onnector.java:78)
[java] at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.ja
va:72)
[java] at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector
.java:251)
[java] at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector
.java:145)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at org.mortbay.jetty.Server.doStart(Server.java:239)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at com.thoughtworks.selenium.grid.hub.HubServer.main(HubServer.j
ava:39)
[java] Exception in thread "main" java.net.BindException: Address already i
n use: JVM_Bind
[java] at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
[java] at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl
.java:376)
[java] at java.net.TwoStacksPlainSocketImpl.bind(TwoStacksPlainSocketIm
pl.java:101)
[java] at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:175)
[java] at java.net.ServerSocket.bind(ServerSocket.java:376)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:237)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:181)
[java] at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketC
onnector.java:78)
[java] at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.ja
va:72)
[java] at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector
.java:251)
[java] at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector
.java:145)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at org.mortbay.jetty.Server.doStart(Server.java:239)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at com.thoughtworks.selenium.grid.hub.HubServer.main(HubServer.j
ava:39)
My training document says I should
• Wait to see the ‘started Socket Connector’ statement and ‘44’;
But I didn't get it.
I think it is because of failed SocketConnector.
Please help me to fix it.
These lines tells you that the port 4444 is already opened by another process
[java] 2013-01-16 14:45:25.364::WARN: failed SocketConnector # 0.0.0.0:4444
[java] java.net.BindException: Address already in use: JVM_Bind
You should check what this process could be and shut it, or modify your build.xml to change the port on which the hub is to start
Use netstat -an on Windows
NOTE : If you've run your ant file multiple times, the process that opened the 4444 port is maybe the same that you're trying to launch, which has no yet be terminated.