apache drill: "no current connection" error and "could not find or load main class sqlline.sqlline" error - apache-drill

I am using JDK: 1.8.0.281 and Drill: 1.18.0 on m1 Mac.
I cannot start drill downloaded from https://drill.apache.org/download/ directly. It says
could not find or load main class sqlline.sqlline. So I refer to https://github.com/julianhyde/sqlline/issues/69, download and compile sqlline and add these two lines
BINPATH=/Users/fields/Repositories/sqlline-sqlline-1.9.0/bin
exec java -cp $BINPATH/../target/sqlline-1.9.0-jar-with-dependencies.jar sqlline.SqlLine "$#"
to the beginning of drill/bin/sqlline. Then I start drill-embedded and get no current connection every time I enter a query.
Please help me identify the problem. Thanks a lot!!!

Related

Getting logs/more information during start-build command execution

Jenkins pipeline is building Docker images. OpenShift plugin(s) are used for the same.
An example command:
openshift.selector(BUILD_CONFIG_NAME, "${appBcName}").startBuild("--from-dir=${artifactPath}", '--wait','--follow')
While this works smoothly most of the time, whenever this command fails due to some underlying platform issues, almost no information is seen in the Jenkins build job console:
[Pipeline] }
[start-build:buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd] ............................................................
[start-build:buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd] Uploading finished
[start-build:buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd] Error from server (BadRequest): unable to wait for build amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd-857 to run: timed out waiting for the condition
[Pipeline] }
ERROR: Error running start-build on at least one item: [buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd];
{err=, verb=start-build, cmd=oc --server=https://api.scp-west-zone02-z01.net:6443 --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt --namespace=sb-1166-amld5-car-service-se --token=XXXXX start-build buildconfig/amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd --from-dir=./build/libs --wait --follow -o=name , out=Uploading directory "build/libs" as binary input for the build ...
............................................................
Uploading finished
Error from server (BadRequest): unable to wait for build amld5-car-reporting-spacetime-ubi-openshift-java-runtimejd-857 to run: timed out waiting for the condition
, status=1}
[Pipeline] // catchError
I need more verbosity, detailed error information. I checked the start-build command reference, and I thought --build-loglevel [0-5] might help here. When I used it, I got a warning that since I am using source type as 'Binary' in the BuildConfig, logging isn't supported(seriously???)
NOTE: the selector returned when -F/--follow is supplied to startBuild() will be inoperative for the various selector operations.
Consider removing those options from startBuild and using the logs() command to follow the build output.
[start-build:buildconfig/casc-docs-spacetime-ubi-openshift-java-runtimeadoptopenjdk] WARNING: Specifying --build-loglevel with binary builds is not supported.
[start-build:buildconfig/casc-docs-spacetime-ubi-openshift-java-runtimeadoptopenjdk] WARNING: Specifying environment variables with binary builds is not supported.
[start-build:buildconfig/casc-docs-spacetime-ubi-openshift-java-runtimeadoptopenjdk] Uploading directory "build/libs" as binary input for the build ...
[start-build:buildconfig/casc-docs-spacetime-ubi-openshift-java-runtimeadoptopenjdk] ..
How do I get more logs, info. while executing the start-build command?
I was facing the same problem, I just used something like:
def build = openshift.selector(BUILD_CONFIG_NAME, "${appBcName}").startBuild("--from-dir=${artifactPath}", '--wait','--follow')
build.logs('-f')
And so far it seems to work, I got the logs from my openshift build in my Jenkins pipeline. Now I'll try to get the logs only if build does not Complete, to reduce the overall logs.
(for future searchers like me ^^)

Fatal error: Call to undefined function mb_convert_encoding() in /home/abcdef/public_html/folder_name/lib/Pelago/Emogrifier.php on line 556

Fatal error: Call to undefined function mb_convert_encoding() in
/home/abcdef/public_html/folder_name/lib/Pelago/Emogrifier.php on line
556
solve this error in magento code.
this is the code , at return line its showing error.
private function getUnifiedHtml() {
if (!empty($this->unprocessableHtmlTags)) { $unprocessableHtmlTags = implode('|', $this->unprocessableHtmlTags); $bodyWithoutUnprocessableTags = preg_replace('/<\\/?(' . $unprocessableHtmlTags . ')[^>]*>/i', '', $this->html); } else { $bodyWithoutUnprocessableTags = $this->html; }
return mb_convert_encoding($bodyWithoutUnprocessableTags, 'HTML-ENTITIES', self::ENCODING);
}
It looks like you are missing a PHP extension mbstring.
Install it and the error will be rectified.
Ubuntu/Debian
sudo apt-get install php-mbstring
In case you are using PHP 7.x.
sudo apt-get install php7.0-mbstring
For Centos
sudo yum install php-mbstring
I'm updating this thread with the instructions for GoDaddy hosted servers, as I went through a painful day trying to get this resolved. The mbstring extension is used by Magento (I needed it for 1.9) and without it installed, the checkout process will fail, with the shopping cart failing to take the user to the 'Thanks for your order screen' (although the order is sometimes created on the back-end successfully). It was also creating an issue when hitting the 'Send Email' button on the Admin panel on an Order, producing a 500 error.
In my log files, I was seeing the following error:
PHP Fatal error: Call to undefined function mb_convert_encoding() in
/home/yoursite/public_html/lib/Pelago/Emogrifier.php on line 556
Searching for this error gave results that suggested I needed to enable the mbstring extension on the server, but with a GoDaddy hosted virtual server, I ran into a wall of frustration with the package not being found via the php install search, and their tech support unable to assist. Here are the instructions for the current WHM panel (Jan 2019):
Login to your server WHM as root.
Search EasyApache or go to the Software menu on the left and select 'EasyApache 4'.
You will see a list of profiles and at the top of the list, 'Currently Installed Packages'. Select the 'Customize' button.
Select the 'PHP Extensions' link or keep hitting 'Next' until you reach the page.
In the search box, type 'string', you will see 'php56-php-mbstring' and 'php70-php-mbstring'; move the grey slider on the right to install each.
Continue to the 'Review' tab. Here you can simply hit 'Provision' to install the extension. You can also save these options as a custom profile if you'd like.
After the build has completed, the extension should be available on all your domains.
Hopefully this will save someone some time trying to figure this out!

migrate Apache OFBiz from Apache Derby to mysql

I am using ofbiz in my organization. I want to migrate ofbiz from derby to MySQL.
I refer the steps from
(https://cwiki.apache.org/confluence/display/OFBIZ/How+to+migrate+OfBiz+from+Derby+to+MySQL+database) here, but at the i got stuck at the end.
At the end when I type (java -jar ofbiz.jar -install) this command I am getting an exception,
C:\Users\sagar_vinod_khanke\Sagar\Apache OFBiz\Ofbiz\13.07>java -jar ofbiz.jar -
install
Exception in thread "main" org.ofbiz.base.start.StartupException: Couldn't not f
etch config instance
at org.ofbiz.base.start.Start.init(Start.java:202)
at org.ofbiz.base.start.Start.main(Start.java:127)
Caused by: java.io.IOException: Cannot load configuration properties : org/ofbiz
/base/start/-install.properties
at org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229)
at org.ofbiz.base.start.Config.readConfig(Config.java:297)
at org.ofbiz.base.start.Config.getInstance(Config.java:58)
at org.ofbiz.base.start.Start.init(Start.java:200)
... 1 more
Can you please help me?
don't use - with install.
See revised Step-V
Step-V
1. Run the following command from command prompt:
java -jar ofbiz.jar install
2. Start OfBiz
3. Use webtools to import all data from XML:
a. Navigate to http://localhost:8080/catalog/
b. Go to Applications>WebTools
c. Go to section 'Entity XML Tools' and click the link 'XML Data Import Dir' -> In the 'Absolute directory path:' enter the full path of the directory where you exported the data in Step - II

MSDeploy gulp build package

Is it possible to deploy a Single Page App project build using grunt to IIS using MSDeploy from TeamCity? The project is not any kind of Visual Studio solution and doesn't get built using MSBuild.
My Command parameters which are not working are:
-source:package='%teamcity.build.checkoutDir%\Dist.%build.number%.zip' -dest:auto,computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -setParamFile:"%teamcity.build.checkoutDir%\Dist.%build.number%.zip.SetParameters.xml"
-AllowUntrusted -setParam:"IIS Web Application Name"="%system.WebSiteName%" -verbose
The error I am getting is:
[11:47:31][Step 3/3] Error Code: ERROR_EXCEPTION_WHILE_CREATING_OBJECT
[11:47:31][Step 3/3] More Information: Object of type 'package' and
path 'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' cannot
be created. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.
[11:47:31][Step 3/3] Error: The Zip package
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' could not
be loaded. [11:47:31][Step 3/3] Error: Could not find file
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip'.
[11:47:31][Step 3/3] Error count: 1. [11:47:31][Step 3/3] Process
exited with code -1 [11:47:31][Step 3/3] Step Deploy (Command Line)
failed
My build process is working as I end up with the correct artefacts, I just don't seem to be able to deploy my generated artefacts using MSDeploy
This is a screenshot of my artefacts:
I managed to get this working by changing my parameters to the following:
-source:iisapp='%teamcity.build.checkoutDir%\dist' -dest:iisapp='C:\www\xxxx-website',computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -AllowUntrusted -verbose
And changing my user to an admin user rather than an IIS user. Note use of iisapp - the key was to read the MSDeploy api using msdeploy -help
FYI - a good test is to use the intended command against msdeploy.exe in console and check output errors then push command into teamcity when it's working.
I created a grunt and gulp plugin to do just what you are looking to do. gulp-mswebdeploy-package and grunt-mswebdeploy-package will create a ms webdeploy package from any folder and do not require your build to be running on windows.
https://www.npmjs.com/package/gulp-mswebdeploy-package
https://www.npmjs.com/package/grunt-mswebdeploy-package

How to debug the cartridge scripts in Openshift?

I want to develop a new cartridge for my own use. I use OpenShift Cartridge Development Kit to start my work. My building script is written in .openshift/action_hooks/build and it can be successfully executed.
But when I tried to use the command displayed on the homepage of the CDK project - "rhc create-app mynewcart http://##YOUR-DOMAIN##/manifest/##YOUR-COMMIT-ID##" - to create an app, I got the following error: "Unable to complete the requested operation due to: An invalid exit code (1) was returned from the server ex-std-node161.prod.rhcloud.com. This indicates an unexpected problem during the
execution of your request."
How can I trace the progress of deploying and find out where is the code that caused the problem? Is there any log file available for me to analyse?
Use the --debug option when running the command and you'll get much more detailed output:
rhc create-app mynewcart http://##YOUR-DOMAIN##/manifest/##YOUR-COMMIT-ID## --debug