regarding about export of neptune data - amazon-web-services

I am trying to export Neptune RDF data using the following tools.
amazon-neptune-tools/neptune-export at master · awslabs/amazon-neptune-tools
https://github.com/awslabs/amazon-neptune-tools/tree/master/neptune-export
But, Error occurs.
Error
[ec2-user#bastin neptune-export]$ sh ./bin/neptune-export.sh export-rdf -e neptestdb-cluster.cluster-xxxxxx.ap-northeast-1.neptune.amazonaws.com -d /home/ec2-user/output
Creating statement files
Completed export-rdf in 1 seconds
An error occurred while exporting from Neptune:
java.lang.RuntimeException: java.lang.NullPointerException
at com.amazonaws.services.neptune.rdf.NeptuneSparqlClient.executeQuery(NeptuneSparqlClient.java:166)
at com.amazonaws.services.neptune.rdf.io.ExportRdfGraphJob.execute(ExportRdfGraphJob.java:31)
at com.amazonaws.services.neptune.ExportRdfGraph.run(ExportRdfGraph.java:55)
at com.amazonaws.services.neptune.NeptuneExportCli.main(NeptuneExportCli.java:54)
Caused by: java.lang.NullPointerException
at com.amazonaws.services.neptune.rdf.io.EnhancedTurtleWriter.handleStatement(EnhancedTurtleWriter.java:42)
at com.amazonaws.services.neptune.rdf.NeptuneSparqlClient$2.handleSolution(NeptuneSparqlClient.java:161)
at org.eclipse.rdf4j.query.resultio.binary.BinaryQueryResultParser.parse(BinaryQueryResultParser.java:192)
at org.eclipse.rdf4j.query.resultio.AbstractTupleQueryResultParser.parseQueryResult(AbstractTupleQueryResultParser.java:48)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.getTupleQueryResult(SPARQLProtocolSession.java:693)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendTupleQuery(SPARQLProtocolSession.java:372)
at org.eclipse.rdf4j.repository.sparql.query.SPARQLTupleQuery.evaluate(SPARQLTupleQuery.java:55)
at com.amazonaws.services.neptune.rdf.NeptuneSparqlClient.executeQuery(NeptuneSparqlClient.java:126)
... 3 more
[ec2-user#bastin neptune-export]$
The procedure is as follows.
Command
1. download tool
git clone https://github.com/awslabs/amazon-neptune-tools.git
2. install mvn for build
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
3. execute build
cd /home/ec2-user/amazon-neptune-tools/neptune-export
mvn clean install
4. exexute neptune-export.sh
cd /home/ec2-user/amazon-neptune-tools/neptune-export
sh ./bin/neptune-export.sh export-rdf -e https://neptestdb-cluster.cluster-xxxxxxx.ap-northeast-1.neptune.amazonaws.com -d /home/ec2-user/output
If you have any idea, please contact us.
thank you for your cooperation.

Thanks for reporting this. I've identified the problem and will push an update to the repository later today or tomorrow. In the meantime, you can replace line 42 in EnhancedTutleWriter.java with the following:
Resource context = statement.getContext();
if (context != null){
prefixes.parse(context.stringValue(), this);
}

Related

pathspec 'tools/n64 splat' did not match any file(s) known to git

so i tried castlevania game decomp and I follow this steps and I'm new to git
Inside the folder of your choice git clone https://github.com/Xeeynamo/sotn-decomp.git
Run sudo apt-get install -y $(cat tools/requirements-debian.txt) and everything worked
until this happen after i run this command: make update-dependencies
I got this error pathspec 'tools/n64 splat' did not match any file(s) known to git any idea on how to fix it, plz? I searched so much.
And this is the link to the decomp: https://github.com/Xeeynamo/sotn-decomp

How does one install a specific ocaml compiler when it doesn't appear on the opam switch list?

I've installed this compiler before in a docker container, but I don't understand why it's missing right now. Command and error:
(iit_synthesis) brando9~ $ opam switch create ocaml-variants.4.07.1+flambda_coq-serapi.8.11.0+0.11.1 ocaml-variants.4.07.1+flambda
[ERROR] No compiler matching `ocaml-variants.4.07.1+flambda' found, use `opam switch list-available' to see what is available, or use `--packages' to
select packages explicitly.
but it's not in the list:
(iit_synthesis) brando9~ $ opam switch list-available
# Listing available compilers from repositories: default
# Name # Version # Synopsis
ocaml-option-32bit 1 Set OCaml to be compiled in 32-bit mode for 64-bit Linux and OS X hosts
ocaml-option-flambda 1 Set OCaml to be compiled with flambda activated
ocaml-option-nnpchecker 1 Set OCaml to be compiled with --enable-naked-pointers-checker
ocaml-option-spacetime 1 Set OCaml to be compiled with spacetime activated
ocaml-options-vanilla 1 Ensure that OCaml is compiled with no special options enabled
Opam update fails
Output:
$ opam update --all
<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
Processing 1/1: [default: http]
Processing 1/1: [default: http]
[default] synchronised from https://opam.ocaml.org
[ERROR] Could not update repository "default": "~/anaconda/bin/patch -p1 -i /dfs/scratch0/brando9/.opam/log/patch-99014-0624b6" exited with code 2
I probably should have started with this but I installed opam with "manually" with deb because I don't have sudo. In particular I did this:
# - opam (snap, no sudo)
# ref: https://askubuntu.com/questions/339/how-can-i-install-a-package-without-root-access
apt-get download opam
#apt-get download opam_1.2.2-4_amd64
# manually checked the opam name
#ls | less
mkdir -p ~/.local
dpkg -x opam_1.2.2-4_amd64.deb ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc.user
source ~/.bashrc.user
tr ':' '\n' <<< "$PATH"
opam --version
before that I did try installing opam with conda (which has worked in the past) but it failed. I wonder if that screwed things up :/. Will try to reproduce to post the conda error. But I ran conda install -c conda-forge opam.
related:
How to install a specific version of ocaml compiler with opam
https://discuss.ocaml.org/t/why-doesnt-my-server-show-the-ocaml-compiler-that-i-need/10917
https://www.reddit.com/r/ocaml/comments/zed88p/how_does_one_install_a_specific_ocaml_compiler/
How does one install opam without sudo priveledges on linux/ubuntu?

Gazebo crashing when subscribing to /scan

I am running ros kinetic in Ubuntu 16.04 on Oracle VM Virtual Box.
I am launching gazebo with:
roslaunch turtlebot_gazebo turtlebot_world.launch
I then try to echo the /scan topic with: (I have checked that it's being published):
rostopic echo /scan
It outputs:
WARNING: no messages received and simulated time is active.
Is /clock being published?
/clock is indeed being published.
And then gazebo crashes with the following:
gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): Assertion `bAttached && "A new DepthBuffer for a RenderTarget was created, but after creation" "it says it's incompatible with that RT"' failed.
Aborted (core dumped)
[gazebo-2] process has died [pid 8979, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /opt/ros/kinetic/share/turtlebot_gazebo/worlds/playground.world __name:=gazebo __log:=/home/joshua/.ros/log/409e3080-4711-11e9-abe9-0800270fc685/gazebo-2.log].
log file: /home/joshua/.ros/log/409e3080-4711-11e9-abe9-0800270fc685/gazebo-2*.log
I have tried setting my VM to accelerate 3D graphics, create my own rosnode that subscribes to /scan and look at help threads I can find yet I still cannot solve this issue. Any assistance would be great.
Additional note:
I can rostopic echo /clock perfectly fine, and control the turtlebot with teleop perfectly fine as well.
To solve this issue I was required to update gazebo:
Step 1:
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
Step 2:
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
Step 3:
sudo apt-get update
Step 4:
sudo apt-get install gazebo7
Accessing the /scan topic with rostopic echo /scan now works as intended.

C++ linux install executable file on deploy environment

Hello every one i need to deploy linux(centos) c++ project with make file or script. By one makefile or script install dependency and project executable binary.
my dependency applications libboost-devel,gcc-g++ and pcre. my excuteble binary file is run_excute
Yip sure - put the below commands into a file. At the top of the file add:
#!/bin/bash
Save the file - lets say you call it install; on the command line type:
chmod +x ./install
Then to build and install your program type:
sudo ./install
Alternatively, if you've got some time on your hands:
http://www.rpm.org/max-rpm/ch-rpm-build.html
As an example the basic rpm build process for fedora is:
Step 1: setup your machine to do packaging:
dnf install #development-tools fedora-packager rpmdevtools
rpmdev-setuptree
Step 2: source and Makefile
Place these in ~/rpmbuild/SOURCES
Step 3: Create a spec file
In ~/rpmbuild/SPECS create file called myname.spec. It should contain something like:
Summary: My program description
Name: myname
Version: 0.0.0
Release: 0
License: GPLv2
Group: Applications/Databases
Source: https://xyz.tar.gz
URL: http://myurl
BuildRequires: libicu-devel
BuildRequires: pcre-devel
%description
A couple of lines describing the package
%prep
%setup -q
%build
cd %{myname}/source
make %{?_smp_mflags}
%install
%make_install
%files
%{_bindir}/*
%changelog
* Tue Nov 10 2015 Yours Truly <me#somewhere.com> - 0.0.0-0
- Some change comments
Step 4: create the source and binary rpm
cd ~/rpmbuild/SPECS
rpmbuild -ba myname.spec
Step 5: use the rpm
cd ~/rpmbuild/RPMS/x86_64
rpm -Uvh ./myprogram-version-release.a.whole.lot.of.stuff.rpm
To install the dependencies use yum, so:
sudo yum install libboost-devel
sudo yum group install "Development Tools"
sudo yum install pcre-devel
To build the application, move to the directory with the makefile in it and do:
make
sudo make install
Finally to run the application
./run_excute
or if your lucky
run_excute
will work.

apktool build apk fails

I am experiencing very annoying problems with the application apktool problem.
I do not understand what i am doing wrong, or what the problem is.
I tried this on debian , and on linux mint. I used different versions of apktool,
resulting in the same error:
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL3630495287059303807.tmp, -I, /home/awesomename/apktool/framework/1.apk, -S, /home/awesomename/out/./res, -M, /home/awesomename/out/./AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL3630495287059303807.tmp, -I, /home/windows/apktool/framework/1.apk, -S, /home/windows/out/./res, -M, /home/windows/out/./AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
... 8 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 10 more
It seems it can not use aapt , but i read about apktool.
And it seems that aapt is build inside apktool , why is it not working ?
It seems there's some problem in building the resources while recompiling the apk.
what you can do is, when you decompile your apk use this command
apktool d -f -r apkfilename.apk
here -f is to replace previous decompiled apk's code and -r is to ignore the decompiling of resources.
this would prevent the resources from being decompiled and will simply copy the same resources when you recompile the apk.
In case you've been using v1 and now upgraded to v2, try manually deleting the framework file.
On windows 8 it's normally at C:\Users\YourName\apktool\framework\1.apk.
The file should be regenerated once you try to build something.
My problem was solved by deleting the \framework\1.apk, making a backup on the files I modified, ereasing the dir and decompiling the *.apk again, etc... (on linux, the path is home/[user]/apktool/...). After the update, apktool always loaded the old resource table. N
For me, I solved this problem by first clearing apktool's framework directory by typing in the terminal.
$ apktool empty-framework-dir
Afterwards I uninstalled apktool and related files by typing
$ sudo apt purge apktool
Then i went to https://bitbucket.org/iBotPeaches/apktool/downloads/ to get the latest jar file for apktool(apktool_2.5.0.jar as at the time of writing this).
On first run
$ java -jar apktool_2.5.0.jar b <MyAPP.apk> #Without ><
it works.
since I work with apktool most of the times I needed a situation where I can run apktool from anywhere so I gave the jar file execute permissions by typing
$ sudo chmod +x apktool_2.5.0.jar
Afterwards I moved it /usr/bin/ by typing
$ sudo apktool_2.5.0.jar /usr/bin/
Definitely seems like the aapt PATH problem I had awhile back. Have you added aapt to PATH? If you still have problems, I have made a good apk kit in bash to avoid all these dependency problems. It supports apktool, signapk, zipalign,adb, fastboot, and heimdall. Check it out. All you need is a current java install.
http://forum.xda-developers.com/android/development/toolkit-apk-munky-rench-t3026757/post58747626#post58747626
There isn’t really enough information to give you a definite answer.
How ever you mentioned using different versions but the aapt issue was solved in version 2.4. Dependencies have been reduced to java version 1.8 or greater and the framework.
I use Debian and have the following:
Apktool 2.4
java version 11
Android framework
That’s all it took to get rid of the aapt path error.
The last error I came across was unrelated to aapt but was on the framework so I ran this command
apktool empty-framework-dir
And it solved it.
try to put the dir which include aapt file to your PATH. for example, export PATH=$PATH:./ ./apktool b
try to install ia32-libs and update latest version of apktool. (if possible restart)
apktool requires "ia32-libs" which is not available after Ubuntu 12.04. install ia32-libs
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Download latest version of apktools.jar - https://bitbucket.org/iBotPeaches/apktool/downloads
apktool complete installation guide - http://ibotpeaches.github.io/Apktool/install/
I just encounter same problem when run apktool d foo.apk(decompiled success) and then apktool b foo(recompile failed with similar error).
The apktool tool above was installed via sudo apt-get install apktool on Kali Linux.
So, the solution was visits apktool's official site, e.g. https://connortumbleson.com/2017/01/23/apktool-v2-2-2-released/ (it's latest version at this time of writing), download it, md5sum it, e.g. md5sum apktool_2.2.2.jar to verify, then rename that apktool_2.2.2.jar to apktool.jar.
Then do java -jar ./apktool.jar b foo to recompile, it success without error (the generated apk located at ./foo/dist/foo.apk).
The main issue is apktool version you need 2.4.0
You must manually install it from ibotpeaches git hub
here some good info
https://www.youtube.com/watch?v=kB6s10Uwpcs
and a automated script for kali
https://github.com/catenatedgoose?tab=repositories
In my mind the problem is how you install apktool...
I had the same problem and I did this and it worked very well:
For installation you first have to remove any installed apktool by the command:
sudo apt purge apktool
Then you'll have to install apktool but in a different way.
To continue save the link bellow as apktool in a directory.
[https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool]
Then open this link below and download the latest apktool.jar file: https://bitbucket.org/iBotPeaches/apktool/downloads/
Then rename the file as apktool.jar
After that give both files the permission by the command:
Sudo chmod -x apktool.jar
And for the saved script:
Sudo chmod -x apktool
At the end copy both files in the directory:
/usr/local/bin
By the command:
Sudo cp apktool.jar /usr/local/bin
And the script file:
Sudo cp apktool /usr/local/bin
After that try running apktoolin the terminal.
The solution is to include your apktool directory into your system PATH.