Cannot find any provider supporting AES/CBC/PKCS5Padding - maven

I use IDEA develop my code, and in IDEA environment,the code runs well, but when I use mvn clean install to build the project ,and run the projet with this script
#!/bin/bash
source ~/.bashrc
JAVA_OPTS="$JAVA_OPTS -Drun_dir=$MY_ROOT"
JAVA_OPTS="$JAVA_OPTS -server -Xss256k -Xms1g -Xmx1g"
JAVA_OPTS="$JAVA_OPTS -XX:-OmitStackTraceInFastThrow"
JAVA_OPTS="$JAVA_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
JAVA_OPTS="$JAVA_OPTS -XX:+DisableExplicitGC -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:+UseParNewGC"
JAVA_OPTS="$JAVA_OPTS -XX:CMSFullGCsBeforeCompaction=4 -XX:CMSInitiatingOccupancyFraction=80 -XX:MaxTenuringThreshold=15"
JAVA_OPTS="$JAVA_OPTS -Dclient.enczoding.override=UTF-8 -Dfile.encoding=UTF-8 -Duser.language=zh -Duser.region=CN"
JAVA_OPTS="$JAVA_OPTS -Djava.ext.dirs=./lib -Djava.library.path=./lib -cp ./resources"
java $JAVA_OPTS Main
it comes the error
Cannot find any provider supporting AES/CBC/PKCS5Padding
jdk is the same version, anyone can help?

thanks dave_thompson_085 ,
change the script to
source ~/.bashrc
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
for jar in `ls ./lib`
do
CLASSPATH=$CLASSPATH:./lib/$jar;
done
CLASSPATH=$CLASSPATH:./resources
JAVA_OPTS="$JAVA_OPTS -server -Xss256k -Xms1g -Xmx1g"
JAVA_OPTS="$JAVA_OPTS -XX:-OmitStackTraceInFastThrow"
JAVA_OPTS="$JAVA_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
JAVA_OPTS="$JAVA_OPTS -XX:+DisableExplicitGC -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:+UseParNewGC"
JAVA_OPTS="$JAVA_OPTS -XX:CMSFullGCsBeforeCompaction=4 -XX:CMSInitiatingOccupancyFraction=80 -XX:MaxTenuringThreshold=15"
JAVA_OPTS="$JAVA_OPTS -Dclient.enczoding.override=UTF-8 -Dfile.encoding=UTF-8"
java $JAVA_OPTS -classpath $CLASSPATH Main

Related

how to update if search patten is found

$cat sample.txt
<name>server1</name>
Oracle
/usr/bin/java/jdk64
<class-path>/run1/getd/commn/modules/oracle.jdbc_11.1.1/ojdbc6dms.jar:/run1/getd/commn/util/jdk64/lib/tools.jar</class-path>
-XX:PermSize=128m -XX:MaxPermSize=384m -Xms512m -Xmx512m -XX:NewRatio=2 .............
.............
.............
<name>server2</name>
<java-vendor>Oracle</java-vendor>
<java-home>/usr/bin/java/jdk64</java-home>
<class-path>/run1/getd/commn/modules/oracle.jdbc_11.1.1/ojdbc6dms.jar:/run1/getd/commn/util/jdk64/lib/tools.jar</class-path>
<arguments>-XX:PermSize=128m -XX:MaxPermSize=384m -Xms64m -Xmx256m -XX:NewRatio=2 ............. </arguments>
I have a file for my weblogic server, sample.txt like this, so If I see name as server1, I need to update part of arguments to -Xms1024m -Xmx1024m and If I see name as server2 I need to update part of arguments to -Xms256m -Xmx512m. any help on this would be great.

SonarQube 6.1 stopping itself. Not starting

I have installed Sonar qube 6.1. I have started sonar by executing sonar.sh start and checked status with sonar.sh status. After few seconds, sonar stopping itself by writing below statements in the wrapper.log file. Please help me on this issue to get resolve.
2017.05.04 07:01:13 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-6.1/temp
2017.05.04 07:01:13 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/java/jdk1.8.0_111/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube-6.1/temp -javaagent:/usr/java/jdk1.8.0_111/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonarqube-6.1/temp/sq-process4451619261882420874properties
2017.05.04 07:01:23 INFO app[][o.s.p.m.Monitor] Process[es] is up
2017.05.04 07:01:23 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/java/jdk1.8.0_111/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube-6.1/temp -javaagent:/usr/java/jdk1.8.0_111/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonarqube-6.1/lib/jdbc/h2/h2-1.3.176.jar org.sonar.server.app.WebServer /opt/sonarqube-6.1/temp/sq-process3625744255132410453properties
2017.05.04 07:01:25 INFO app[][o.s.p.m.Monitor] Process[es] is stopping
2017.05.04 07:01:26 INFO app[][o.s.p.m.Monitor] Process[es] is stopped
es is ElasticSearch, a component that indexes your data to accelerate searching. Maybe your indexes are corrupted. You can rebuild them by removing contents of ${SONARQUBE_HOME}/data/es/ directory, and retry.

SonarQube version 6.2 will not start on amazon Linux

After rebooting our Sonar Server running an up-to-date Amazon Linux it would not start.
2017.01.27 10:36:42 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonar/temp
2017.01.27 10:36:42 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121 0.b13.29.amzn1.x86_64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.29.amzn1.x86_64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonar/temp/sq-process7514074371677370036properties
2017.01.27 10:36:51 INFO app[][o.s.p.m.Monitor] Process[es] is up
2017.01.27 10:36:51 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.29.amzn1.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.29.amzn1.x86_64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonar/lib/jdbc/postgresql/postgresql-9.4.1209.jre7.jar org.sonar.server.app.WebServer /opt/sonar/temp/sq-process6553321235832962376properties
2017.01.27 10:36:54 INFO app[][o.s.p.m.Monitor] Process[es] is stopping
2017.01.27 10:36:54 ERROR app[][o.s.p.m.Monitor] Process[web] failed to start
2017.01.27 10:36:54 INFO app[][o.s.p.m.Monitor] Process[es] is stopped
<-- Wrapper Stopped
The above indicates you need to read /var/log/sonar/web.log
The postgres jar above /opt/sonar/lib/jdbc/postgresql/postgresql-9.4.1209.jre7.jar is a bad smell, so on a hunch I downloaded the latest version,
which fixed the problem.
I imagine this will be fixed by the Sonar team pretty soon but this posted here in the hope that it helps.

Upgrade and SonarQube not listening on network

Upgraded from 5.6 to 6.1. Sonar.properties are, and they match what was there before:
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://10.120.8.27:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.web.javaOpts=-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError
sonar.web.host=10.120.8.27
sonar.web.context=/sonar
sonar.web.port=9000
SonarQube starts and is running but it's not listening on port 9000. OS is CentOS 6.6, SElinux disabled. I can find no errors in the logs, indeed sonar.log has no entries at all. What have I missed?
ps -ef|grep sonar
sonar 1325 1 0 12:06 ? 00:00:00
/opt/sonar/bin/linux-x86-64/./wrapper
/opt/sonar/bin/linux-x86-64/../../conf/wrapper.conf
wrapper.syslog.ident=SonarQube
wrapper.pidfile=/opt/sonar/bin/linux-x86-64/./SonarQube.pid
wrapper.daemonize=TRUE
sonar 1327 1325 2 12:06 ? 00:00:25 java
-Djava.awt.headless=true -Xms3m -Xmx3m -Djava.library.path=./lib -classpath
../../lib/jsw/wrapper-3.2.3.jar:../../lib/sonar-application-6.1.jar
-Dwrapper.key=byv_fqDBq6Ok__mi -Dwrapper.port=32000
-Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999
-Dwrapper.debug=TRUE -Dwrapper.pid=1325 -Dwrapper.version=3.2.3
-Dwrapper.native_library=wrapper -Dwrapper.service=TRUE
-Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
org.tanukisoftware.wrapper.WrapperSimpleApp org.sonar.application.App
sonar 1545 1327 99 12:06 ? 00:24:20
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64/jre/bin/java
-Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly
-XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonar/temp
-javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64/jre/lib/management-agent.jar
-cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer
/opt/sonar/temp/sq-process7944098912777335007properties
Was a permissions problem on the logs. From there log tracing lead to other, but clear problems.

CLion Out of Memory Issues

I ran a simple CLion project with only two directories which each contain a single file. However, I was getting this message “Out of Memory”. I increased the Xmx from 2GB to 4GB. I believe this is more than enough. How can I fix this problem?
This is the settings in the clion64.exe.vmoptions file:
-Xss2m
-Xms256m
-Xmx4000m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
try there settings:
-Xss2m
-Xms256m
-Xmx2000m
-XX:NewSize=128m
-XX:MaxNewSize=128m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
refer to this page for more info:
link

Resources