I've asked this question in the swagger github repository but the community doesn't look very responsive, so I'm going to try here.
Following the README I'm running this commands to generate a PHP client (but it could be any other language):
git clone https://github.com/swagger-api/swagger-codegen
cd swagger-codegen
mvn clean package
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate
\
-i http://petstore.swagger.io/v2/swagger.json \
-l php \
-o /var/tmp/php_api_client
and I get the following error:
Error: Unable to access jarfile modules/swagger-codegen-cli/target/swagger-codegen-cli.jar
Does anybody have the same error? I'm trying to figure out if it's just me. Maybe I'm missing something.
As of today (1/10/19) it only works with Java version 7 or 8. I had to downgrade from version 10 to make it work.
Related
I am facing issue while generating code via swagger cli using csharp-dotnet2 template.
It is almost same issue as mentioned Here
I am able to generate the code from https://editor.swagger.io/
but when I am using swagger cli as i need to modify the template
I have tried generating code with different version of swagger and currently using swagger-codegen-cli-3.0.27.jar. but it is not working.
Please check attached screenshot here
Command
java -cp swagger-codegen-cli-3.0.27.jar io.swagger.codegen.Codegen -i vendor.yaml -l csharp-dotnet2 -o outputdir.
Use this command instead:
java -jar swagger-codegen-cli-3.0.27.jar generate -i vendor.yaml -l csharp-dotnet2 -o outputdir
When I type in the following command "dse gremlin-console" the system tries to start but then i get the following error:
Exception in thread "main" java.awt.AWTError: Asssitive Technology not found: org.GNOME.Accessibility.AtkWrapper
Do i need to update my Java version?
This is a known issue with Docker images that should be eventually fixed.
The linked issue has 2 workarounds:
Install openjdk-8-jdk into Docker image after it's started
Disable assistive technologies for OpenJDK with something like this:
docker-compose exec --user root dse bash -l \
-c "sed -i -e '/^assistive_technologies=/s/^/#/' /etc/java-*-openjdk/accessibility.properties"
I am new user to use rabbitmq-perf-test, and I seldom use maven.
I git clone the rabbitmq-perf-test from this web site https://github.com/rabbitmq/rabbitmq-perf-test , but I have no idea about what to do afterwards.
The guide mentions little about installation command.
I try to run :
[root#test]$ runjava com.rabbitmq.perf.PerfTest
and get this error:
Error: Could not find or load main class com.rabbitmq.perf.PerfTest
anyone can help? Thanks in advance.
You have to download the binaries from https://github.com/rabbitmq/rabbitmq-perf-test/releases
wget https://github.com/rabbitmq/rabbitmq-perf-test/releases/download/v1.2.0/rabbitmq-perf-test-1.2.0-bin.zip
unzip rabbitmq-perf-test-1.2.0-bin.zip
cd rabbitmq-perf-test-1.2.0/
bin/runjava com.rabbitmq.perf.PerfTest
Am new to lua/luajit. I was looking for a socket api for lua, and luasocket came up in searches, pacman -Ss luasocket doesnt exist so I have to compile it from source. Have not been successful, I was wondering if anyone can provide a makefile to build luasocket on msys2? Thanks in advance
I made a fork to to this using mingw64 and lua 5.3.
It's not as clean I wish it could be but it works : https://github.com/pmalhaire/luasocket
build and install :
$ git clone git#github.com:pmalhaire/luasocket.git
[...]
$ cd luasocket
[...]
$ make LUAV=5.3 PLAT=msys2
[...]
$ make LUAV=5.3 PLAT=msys2 install
[...]
$ make test
lua test/hello.lua
Hello from LuaSocket 3.0-rc1 and MIME 1.0.3!
When I try to start a demo jsvc implementation I get the following error output of jsvc:
jsvc -cp ApacheDeamonDemo.jar -pidfile /mypath/pid.txt -outfile /mypath/log.txt -errfile /mypath/err.log net.example.deamon.DemoDeamon
I get the following error ouput:
Cannot find any VM in Java Home /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home
Cannot locate JVM library file
Service exit with a return value of 1
Actually the path is correct. Therefore I do not understand why jsvc is telling me this. I'm using a mac.
Almost five years later, so probably too late to help the original asker, but I had the same problem today trying to run jsvc with open-jdk-11 for AMD64, so this might help someone later.
To diagnose the problem, I ran jsvc with the --debug flag, and that told me that it was choking on trying to find libjvm.so. I ran find /usr/lib/jvm/java-11-openjdk-amd64 -name libjvm.so and found it at /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so, but jsvc was looking for it at /usr/lib/jvm/java-11-openjdk-amd64//lib/amd64/server/libjvm.so. So, I did this, and then jscv worked:
sudo mkdir /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64
sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/server /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/
It turns out the problem is fixed in later versions of jsvc. I experienced the issue with jsvc version 1.0.6, which is the one you get if you run apt install jsvc on Ubuntu 18.04. After I downloaded the 1.2.0 version commons-daemon src from Apache and compiled jsvc myself, the issue is fixed and I didn't need the symlink anymore.
Don't know why jsvc would try to locate all the dylib files and load them with dlopen, but apparently, this doesn't work well with Apple's Java release. While fixing jsvc might not be too hard, I just went firing up the JVM myself like so,
export JAVA_HOME=$(/usr/libexec/java_home)
export CATALINA_HOME=/Users/rong/Projects/apache-tomcat-8.0.12
export CATALINA_BASE=$CATALINA_HOME
java \
-server \
-classpath $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \
org.apache.catalina.startup.Bootstrap \
> $CATALINA_BASE/logs/catalina.out \
2> $CATALINA_BASE/logs/catalina.err
By wrapping this in a bash script and adding a bit of forking, changing UID stuff, you can forget about jsvc completely.