The REST Interface feature is not available in this Bugzilla - rest

I have installed Bugzilla 5.0.2 and tried accessing it through REST Api but I'm not able to access it.
I'm getting the following message.
"The REST Interface feature is not available in this Bugzilla."
I tried to access
http://bugzillaserver/bugzilla/rest.cgi from the browser
But that also displays the same message.

The issue was with optional perl modules.
Installed optional perl modules, now it is working fine.

The main module that cures this problem is JSON::RPC (any) for the JSON-RPC interface

Same issue solved by
all SOAP,RCP related perl modules
and
ppm install Test-Taint
Perl version use ActivePerl-5.24.3.2404

I already had JSON::RPC installed; the missing bit was Test::Taint, installed with cpanm Test::Taint.
It is also reported by checksetup.pl in this box:
***********************************************************************
* OPTIONAL MODULES *
***********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. Below that table are the *
* commands to install each module. *
***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* ... *
* Test-Taint * JSON-RPC Interface, XML-RPC Interface, REST Interface *
***********************************************************************

Related

Can't include <I2S.h> on ESP32 on neither VSCode PIO nor Arduino IDE

I've tried to get my ESP32 LOLIN32 with Arduino framework working, but I can't even upload code to it. I'm including nothing but Arduino and I2S but it doesn't understand what I mean with I2S.
I have only written:
#include <I2S.h>
#include <Arduino.h>
void setup(){
}
void loop(){
}
but it fails to compile and gives:
src\main.cpp:1:17: fatal error: I2S.h: No such file or directory
*************************************************************
* Looking for I2S.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:I2S.h"
* Web > https://registry.platformio.org/search?q=header:I2S.h
*
*************************************************************
Arduino IDE can't find it eather, I get the same error.
I've tried adding build_flags = -I and lib_deps in platform.ini:
[env:lolin32]
platform = espressif32
board = lolin32
framework = arduino
build_flags = -I include
lib_deps =
I2S
to no avail.
I2S.h was added to arduino-esp32 from version 2.0.3-RC1.
The OP does not describe the used version, but I guess it is older than the mentioned 2.0.3
I suggest updating arduino-esp32

Deploy Shiny application with older version of particular package

This may be a stupid question, but I'm unable to solve the following issue:
I'm working on a Shiny-app and need an older version of lavaan to obtain the same results as a few weeks ago. I used the following code to install the older version locally: install_version("lavaan",version = "0.5-23.1097"), and I loaded this old version using library(lavaan) into my server.R file. I also added all possible dependencies to my list in the server.R file so that everything works fine locally.
However, when I try to deploy my application, I obtain the following at the end of my task log:
[2018-08-16T17:00:24.569989191+0000] Installing R package: quadprog (1.5-5)
* installing to library �/opt/R/3.4.0/lib/R/library�
* installing *binary* package �quadprog� ...
* DONE (quadprog)
[2018-08-16T17:00:24.749745586+0000] Building R package: lavaan (0.5-23.1097)
/mnt/packages/build /mnt
* installing to library �/opt/R/3.4.0/lib/R/library�
* installing *source* package �lavaan� ...
** package �lavaan� successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/opt/R/3.4.0/lib/R/library/quadprog/libs/quadprog.so':
libRblas.so: cannot open shared object file: No such file or directory
ERROR: lazy loading failed for package �lavaan�
* removing �/opt/R/3.4.0/lib/R/library/lavaan�
Apparently, it is able to find the old lavaan version and unpack it, but as soon as it performs this lazy loading action, it breaks down.
Does anybody know where I could eliminate this lazy loading or perhaps where to find this quadprog.so or libRblas.so file? I assume that something more essential is going on, but I can't figure it out. Below, you can find my sessionInfo() output.
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=Dutch_Belgium.1252 LC_CTYPE=Dutch_Belgium.1252 LC_MONETARY=Dutch_Belgium.1252 LC_NUMERIC=C
[5] LC_TIME=Dutch_Belgium.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lavaan_0.5-23.1097 quadprog_1.5-5 MASS_7.3-47 numDeriv_2016.8-1 htmlwidgets_1.0 jsonlite_1.5 htmltools_0.3.6
[8] yaml_2.2.0 tibble_1.4.2 DT_0.2 ggplot2_2.2.1 rmarkdown_1.8 stringi_1.1.7 foreign_0.8-67
[15] magrittr_1.5 rsconnect_0.8.5 shinyjs_0.9.1 shinythemes_1.1.1 shiny_1.1.0 devtools_1.13.6
loaded via a namespace (and not attached):
[1] Rcpp_0.12.18 git2r_0.18.0 pillar_1.3.0 compiler_3.4.0 later_0.7.3 plyr_1.8.4 bitops_1.0-6 tools_3.4.0
[9] digest_0.6.12 memoise_1.1.0 evaluate_0.10.1 gtable_0.2.0 rlang_0.2.1 rstudioapi_0.6 curl_3.1 pbivnorm_0.6.0
[17] httr_1.2.1 withr_1.0.2 stringr_1.2.0 knitr_1.17 stats4_3.4.0 rprojroot_1.2 grid_3.4.0 R6_2.2.2
[25] RJSONIO_1.3-0 backports_1.1.0 scales_0.4.1 promises_1.0.1 mnormt_1.5-5 mime_0.5 xtable_1.8-2 colorspace_1.3-2
[33] httpuv_1.4.5 miniUI_0.1.1 RCurl_1.95-4.8 lazyeval_0.2.0 munsell_0.4.3 crayon_1.3.4
Many thanks in advance!!
Kind regards
Apparently, my issue had nothing to do with managing package versions.
The solution can be found on this link, thanks to Joshua Spiewak.
The gist is that the package quadprog was improperly compiled, although it was successfully installed. Flushing the package from the cache for R 3.4.0 solved the issue.
Thank you all for helping out!
Try using packrat to manage you package versions. This is how I run shiny apps with different versions of packages and it makes them deployable to connect servers in a way that maintains the correct package.

TYPO3 #dontverifyrequesthash

In one of our extensions we have this snippet:
/**
* action main
*
* #return void
* #dontverifyrequesthash
*/
TYPO3 Version 8 with PHP 7.1 works.
TYPO3 Version 9 with PHP 7.2 we get this error:
[Semantical Error] The annotation "#dontverifyrequesthash" in method X\Y\Controller\Z::mainAction() was never imported. Did you maybe forget to add a "use" statement for this annotation?
can someone help please?
The annotation #dontverifyrequesthash died before TYPO3 version 6.2, so you can remove it.

It errors when specifying the user defined java library into RED robot framework eclipse editor

My requirement is to make use of user defined java libraries in robot framework using RED eclipse editor. When trying to specify library in the robot framework, the system errors as no such library available(shown underline in red for library name). Please correct my mistakes done. I have followed the below steps,
Updated Eclipse with RED Editor(Eclipse Neon (v 4.6), RED - Robot Editor v0.7.5)
Created a class file just as Project in the same eclipse. (Package name: org.robot.KCCKeywords and Class Name: LogonToKCC)
Converted the class file into the type '.JAR' and stored it in jython folder(C:\jython2.7.0\Lib\site-packages\KCCLibraries)
Integrated RED with Maven plugin using launch4j-3.8-win32(using https://github.com/nokia/RED/blob/9d62dccce18ee7f3051162d05bf3d027e33dccef/red_help/user_guide/maven.html.md)
Integrated RED with Robot framework and Jython. (using https://github.com/nokia/RED/blob/9d62dccce18ee7f3051162d05bf3d027e33dccef/red_help/user_guide/maven.html.md)
CLASS PATH updated for below jars,
a) jython.jar
b) robotframework-3.0.2.jar
c) myOwnJavaLibrary.jar ( The jar that i created in step 3)
d) jdk and jre path
Verified the same class paths in red.xml too.
Created RED Project and started initializing key words as below,
a) Library Selenium2Library
b) Library org.robot.KCCKeywords.LogonToKCC
Here is where the system couldn't read my own library.
I also referred to below blogs and adjusted my steps accordingly. But didn't help me. Referring to multiple blogs and stacks also confusing me. Finally I'm here.
robot framework user java libraries error Test Library "mavenPackage.MyKeyWords.java" does not exist
Robot Framework-RIDE,Import Java Libraries
Stuck with creating Keyword library using Java in Eclipse and using that JAR file in RIDE
Robot Framework - using User Libraries
Using the codecentric blog: Robot Framework Tutorial – Writing Keyword Libraries in Java as a base with some specific steps for RED in stead of RIDE. This walkthrough will allow you to setup Jython, create a simple library in Java and run it from Robot script.
After the installation of Eclipse (NEON) and RED Feature in Eclipse create a new Java project in Eclipse. With that done continue to create a new Java class with the following content.
package org.robot.sample.keywords;
import java.util.Stack;
/**
* This is an example for a Keyword Library for the Robot Framework.
* #author thomas.jaspers
*/
public class SampleKeywordLibrary {
/** This means the same instance of this class is used throughout
* the lifecycle of a Robot Framework test execution.
*/
public static final String ROBOT_LIBRARY_SCOPE = "GLOBAL";
//</editor-fold>
/** The Functionality to be tested */
private Stack<String> testStack;
/**
* Keyword-method to create an empty stack.
*/
public void createAnEmptyStack() {
testStack = new Stack<String>();
}
/**
* Keyword-method to add an element to the stack.
* #param element The element
*/
public void addAnElement(String element) {
testStack.push(element);
}
/**
* Keyword-method to remove the last element from the stack.
*/
public void removeLastElement() {
testStack.pop();
}
/**
* Keyword-method to search for an element position.
* #param element The element
* #param pos The expected position
*/
public void elementShouldBeAtPosition(String element, int pos)
throws Exception {
if (testStack.search(element) != pos) {
throw new Exception("Wrong position: " + testStack.search(element));
}
}
/**
* Keyword-method to check the last element in the stack.
* #param result Expected resulting element
*/
public void theLastElementShouldBe(String result) throws Exception {
String element = testStack.pop();
if (!result.equals(element)) {
throw new Exception("Wrong element: " + element);
}
}
}
Please ensure that you have Jython installed using the Windows Installer. In my example Jython is installed in c:\Jython. As with the regular Python Interpreter Robot Framework still needs to be installed. Assuming that your machine has access to the internet, in the command line go to c:\Jython\bin\ and run the command pip install robotframework. This will install Robot Framework in the Jython environment.
Now create a new Robot Framework project in Eclipse. Please make sure that you have Window > Perspective > Open Perspective > Robot or Other > Robot.
In the project the default Robot Framework is one based on Python and we need to configure the Jython Interpreter. In Eclipse go to Window > Preferences and then select Robot Framework > Installed Frameworks from the tree-menu. Click on Add and point to c:\Jython\bin\. Click on OK.
Open Red.XML from the Robot Project and go to the general tab. This is where the project Interpreter is set. If it is set to Python (like the example below) then click on use local settings for this project and check the Jython interpreter. Save the settings to the file (CTRL-S).
With Robot Framework project setup it is time to export the Java class to a Jar file. Right click the class file and click export. Then choose JAR file and click next. Click on Browse and set the location and file name of the JAR file. In this case I picked ExampleLibrary.jar and the folder of my Robot Project. Press Finish to complete the export.
Go Back to Red.XML and click on Referenced Libraries then proceed to click on Add Java library, pick the exported Jar file (ExampleLibrary.jar) and press OK. This will proceed to load the jar and read the keywords from the Jar file. Save the file (CTRL-S). This should result to the below reference.
Now it's time to create a Robot file and use the library. In the referenced blog the following example script is given that uses the java functions/keywords.
*** Settings ***
Library org.robot.sample.keywords.SampleKeywordLibrary
*** Test Cases ***
ExampleJava
Create An Empty Stack
Add An Element Java
Add An Element C++
Remove Last Element
The Last Element Should Be Java
With the already loaded library no red lines should appear, but otherwise right-click on the library and click quick-fixand autodiscover the library.
Then using the regular Eclipse/RED Run menu run the script. This will then run the script successfully and output the following:
Command: C:\jython2.7.0\bin\jython.exe -J-Dpython.path=C:\jython2.7.0\Lib\site-packages -J-cp .;C:\Eclipse\Workspace\ExamplJava\ExampleLibrary.jar -m robot.run --listener C:\Users\User\AppData\Local\Temp\RobotTempDir8926065561484828569\TestRunnerAgent.py:57292:False -s ExamplJava.ExampleJava C:\Eclipse\Workspace\ExamplJava
Suite Executor: Robot Framework 3.0.2 (Jython 2.7.0 on java1.8.0_60)
==============================================================================
ExamplJava
==============================================================================
ExamplJava.ExampleJava
==============================================================================
ExampleJava | PASS |
------------------------------------------------------------------------------
ExamplJava.ExampleJava | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
ExamplJava | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output: C:\Eclipse\Workspace\ExamplJava\output.xml
Log: C:\Eclipse\Workspace\ExamplJava\log.html
Report: C:\Eclipse\Workspace\ExamplJava\report.html
I finally followed the below for a great journey with robot framework.
1 Installed Java, Eclipse, RED Eclipse plugin.
a) Java(JDK 1.8.0/JRE 1.8.0)
b) Eclipse Neon (v 4.6)
c) RED - Robot Eclipse Editor v0.7.5.2(Eclipse Plugin)
2 Downloaded and Installed Python 2.7.12 using windows. A folder created automatically after installation in C:\python27
3 "Installed Robot Framework using pip command in Command Prompt.
Command: C:\python27\scripts>pip install robotframework"
4 Downloaded and installed Jython 2.7.0 using windows. A folder created automatically after installation in C:\jython2.7.0
5 "Installed Robot Framework using pip command in Command Prompt.
Command: C:\jython2.7.0\bin>pip install robotframework"
6 "Installed Selenium2Library using pip command in Command Prompt.
Command: C:\jython2.7.0\bin>pip install robotframework-selenium2library"
7 "Set the below,
a) Goto Window-Preferences-Robot Framework-Installed Framework
b) Map Robot framework with Jython Interpreter
I used c:\jython2.7.0\bin"
8 Created JavaProject and export it into a jar file. Right click on the class name, click on export-Java-Jarfile. Select the path name where the new jar file to be put including the new file name.jar. Click Ok.
9 Open RED.xml Click Add Java Library and select the newly created jar file.
10 "Set up this before proceeding with robot framework
goto Windows - Perspective - Open Perspective-Other-Robot"
11 Create a robot suite, import library selenium2library & user defined library, Write Test cases.

Error when compiling custom OpenDaylight API

I am trying to create a custom API based on an API tutorial on https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Startup_Project_Archetype
Tools: OpenDaylight Lithium, Eclipse, Maven 3.3.9
I am able to compile the folder in api but not in impl (FlowImpl.java).
This is the error message:
[INFO] Starting audit...
/home/shaoxu/Desktop/distribution-karaf-0.3.3-Lithium-SR3/flow/impl/src/main/java/org/opendaylight/flow/impl/FlowImpl.java:1: Line does not match expected header line of '^/[*]+$'.
Audit done.
[INFO] There is 1 error reported by Checkstyle 6.2 with check-license.xml ruleset.
[ERROR] src/main/java/org/opendaylight/flow/impl/FlowImpl.java[1] (header) RegexpHeader: Line does not match expected header line of '^/[*]+$'.
There is no error message in Eclipse.
This is the source code:
package org.opendaylight.flow.impl;
import java.util.concurrent.Future;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathOutputBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
public class FlowImpl implements FlowService {
#Override
public Future<RpcResult<FlowPathOutput>> flowPath(FlowPathInput input) {
FlowPathOutputBuilder flowBuilder = new FlowPathOutputBuilder();
flowBuilder.setPath(input.getNodes());
return RpcResultBuilder.success(flowBuilder.build()).buildFuture();
}
}
What is the error?
The error you're getting is caused by an enforced format for a copyright/license header at the start of every file in OpenDaylight:
/*
* Copyright (c) 2016 ... and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
If you used the archetype, this header should have been generated for you. There are two ways of fixing the problem: either add the license header as above (if you're happy with the license), or disable the license check — if you want to do the latter, edit your question and add the POM you're using for impl so I can explain how to go about it.
You mention you're using Lithium, I'd strongly recommend switching to Beryllium or even Boron for new development. The wiki pages are currently mostly up-to-date for Beryllium.
In my Beryllium, I usually skip checkstyle tests when running my build. Add -Dcheckstyle.skip=true parameter to your command to do the maven build.