Not able to start Intellij Idea CE: could not find agent library yjpagent64 on the library path - intellij-idea

I was having an issue starting Intellij Idea CE on my MacBook Pro. The error message is:
…/Contents/bin  /Applications/IntelliJ\ IDEA\ CE.app/Contents/MacOS/idea
2019-05-20 22:12:32.647 idea[5029:86633] allVms required 1.8*,1.8+
2019-05-20 22:12:32.651 idea[5029:86638] Value of IDEA_VM_OPTIONS is (null)
2019-05-20 22:12:32.652 idea[5029:86638] Processing VMOptions file at /Users/pengxiao/Library/Preferences/IdeaIC2019.1/idea.vmoptions
2019-05-20 22:12:32.652 idea[5029:86638] Done
-Xms128m
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error occurred during initialization of VM
Could not find agent library yjpagent on the library path, with error: dlopen(libyjpagent.dylib, 1): image not found

I finally found the cause was the idea.vmoptions file. The content of the file was:
…/Contents/bin $ cat ~/Library/Preferences/IdeaIC2019.1/idea.vmoptions
-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:MaxJavaStackTraceDepth=10000
-Xverify:none
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
-Xbootclasspath/a:../lib/boot.jar
-agentlib:yjpagent=probe_disable=*,disablealloc,disabletracing,onlylocal,disableexceptiontelemetry,delay=10000,sessionname=IntelliJIdea2017.2%
I believe it the last line of that file that has caused the issue. After I removed the file, I can start Idea without any issues.

Related

A JNI error has occurred in Serverless DynamoDB Local on Mac

When I try to use DyanmoDB Local (https://www.serverless.com/plugins/serverless-dynamodb-local)
A JNI error has occurred.
Error: A JNI error has occurred, please check your installation and try again
In terminal, java, javac version is samed.
$ java -version
java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode)
$ javac -version
javac 1.8.0_281
And $JAVA_HOME is not set. but it is not problem.
Because it was executed in other Mac without $JAVA_HOME

How to compile mutil-modules in idea2020.1 in once time?

I have a mutil-modules maven project. When I compile the root pom.xml in the maven sidebar in idea2020.1, it does not compile all the modules. If I compile the project in terminal with mvn compile, it can compile all the modules.
Question: How to compile mutil-modules using maven compile sidebar in idea2020.1 in once time?
I notice that the console output is different from mvn compile:
"D:\Program Files\Java\jdk1.8.0_231\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\code_repo\demo "-Dmaven.home=D:\Program Files\apache-maven-3.3.9" "-Dclassworlds.conf=D:\Program Files\apache-maven-3.3.9\bin\m2.conf" "-Dmaven.ext.class.path=D:\Program Files\JetBrains\IntelliJ IDEA 2020.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2020.1\lib\idea_rt.jar=7770:D:\Program Files\JetBrains\IntelliJ IDEA 2020.1\bin" -Dfile.encoding=UTF-8 -classpath "D:\Program Files\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version2020.1 --debug --non-recursive --update-snapshots -s "D:\Program Files\apache-maven-3.3.9\conf\settings.xml" -Dmaven.repo.local=D:\repo\repository -DskipTests=true compile
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: D:\Program Files\apache-maven-3.3.9
Java version: 1.8.0_231, vendor: Oracle Corporation
Java home: D:\Program Files\Java\jdk1.8.0_231\jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
[DEBUG] Included D:\Program Files\JetBrains\IntelliJ IDEA 2020.1\plugins\maven\lib\maven-event-listener.jar
[DEBUG] Populating class realm maven.ext
[DEBUG] Included D:\Program Files\JetBrains\IntelliJ IDEA 2020.1\plugins\maven\lib\maven-event-listener.jar
Choose this option Execute goals recursively in File | Settings | Build, Execution, Deployment

IntelliJ IDEA 2020.1 (Ultimate Edition) hangs my Ubuntu 18.04 LTS

I don't know why but sometimes my IDE hangs for some seconds, my settings are:
-Xms128m
-Xmx2046m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
-Dsun.tools.attach.tmp.only=true
Any ideas ?
Thanks
It's a known Kernel bug. See also a bug report in YouTrack.
The workaround is to downgrade kernel to 5.3.0-45 version. Check the linked issues for the other possible solutions.
The issue started to occur with 5.3.0-46 kernel update. IDE thread dumps will have something like this:
"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 runnable
java.lang.Thread.State: RUNNABLE
(in native)
at java.desktop#11.0.6/sun.java2d.loops.Blit.Blit(Native Method)
at java.desktop#11.0.6/sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:158)
at java.desktop#11.0.6/sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:366)
at java.desktop#11.0.6/sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:972)
at java.desktop#11.0.6/sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:583)
at java.desktop#11.0.6/sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:86)
at java.desktop#11.0.6/sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1043)
at java.desktop#11.0.6/sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:196)
at java.desktop#11.0.6/sun.java2d.SunGraphics2D.copyImage(SunGraphics2D.java:3325)
at java.desktop#11.0.6/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3368)
at java.desktop#11.0.6/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3310)
You will also see the following in the system logs (dmesg output):
[ 1177.290924] i915 0000:00:02.0: GPU HANG: ecode 11:1:0x85dffffb, in Xorg [1857], hang on rcs0
[ 1177.292069] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
[ 1488.251067] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
[ 1786.262953] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0

Unable to resolve com.sun.jna when running Sonatype Nexus Repository Manager 3.6 on Linux for ARM architecture

The following error appears after extracting the Linux archive (nexus-3.6.2-01-unix.tar.gz)
then, nexus run
ERROR: Bundle com.sun.jna [9] Error starting reference:file:system/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar (org.osgi.framework.BundleException: Unable to resolve com.sun.jna [9](R 9.0): missing requirement [com.sun.jna [9](R 9.0)] osgi.native; (|(&(osgi.native.osname~=win32)(osgi.native.processor~=x86))(&(osgi.native.osname~=win32)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=wince)(osgi.native.processor~=arm))(&(osgi.native.osname~=sunos)(osgi.native.processor~=x86))(&(osgi.native.osname~=sunos)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=sunos)(osgi.native.processor~=sparc))(&(osgi.native.osname~=sunos)(osgi.native.processor~=sparcv9))(&(osgi.native.osname~=aix)(osgi.native.processor~=ppc))(&(osgi.native.osname~=aix)(osgi.native.processor~=ppc64))(&(osgi.native.osname~=linux)(osgi.native.processor~=ppc))(&(osgi.native.osname~=linux)(osgi.native.processor~=ppc64))(&(osgi.native.osname~=linux)(osgi.native.processor~=x86))(&(osgi.native.osname~=linux)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=linux)(osgi.native.processor~=arm))(&(osgi.native.osname~=linux)(osgi.native.processor~=ia64))(&(osgi.native.osname~=freebsd)(osgi.native.processor~=x86))(&(osgi.native.osname~=freebsd)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=openbsd)(osgi.native.processor~=x86))(&(osgi.native.osname~=openbsd)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=macosx)(|(osgi.native.processor~=x86)(osgi.native.processor~=x86-64)(osgi.native.processor~=ppc)))) Unresolved requirements: [[com.sun.jna [9](R 9.0)] osgi.native; (|(&(osgi.native.osname~=win32)(osgi.native.processor~=x86))(&(osgi.native.osname~=win32)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=wince)(osgi.native.processor~=arm))(&(osgi.native.osname~=sunos)(osgi.native.processor~=x86))(&(osgi.native.osname~=sunos)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=sunos)(osgi.native.processor~=sparc))(&(osgi.native.osname~=sunos)(osgi.native.processor~=sparcv9))(&(osgi.native.osname~=aix)(osgi.native.processor~=ppc))(&(osgi.native.osname~=aix)(osgi.native.processor~=ppc64))(&(osgi.native.osname~=linux)(osgi.native.processor~=ppc))(&(osgi.native.osname~=linux)(osgi.native.processor~=ppc64))(&(osgi.native.osname~=linux)(osgi.native.processor~=x86))(&(osgi.native.osname~=linux)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=linux)(osgi.native.processor~=arm))(&(osgi.native.osname~=linux)(osgi.native.processor~=ia64))(&(osgi.native.osname~=freebsd)(osgi.native.processor~=x86))(&(osgi.native.osname~=freebsd)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=openbsd)(osgi.native.processor~=x86))(&(osgi.native.osname~=openbsd)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=macosx)(|(osgi.native.processor~=x86)(osgi.native.processor~=x86-64)(osgi.native.processor~=ppc))))])
org.osgi.framework.BundleException: Unable to resolve com.sun.jna [9](R 9.0): missing requirement [com.sun.jna [9](R 9.0)] osgi.native; (|(&(osgi.native.osname~=win32)(osgi.native.processor~=x86))(&(osgi.native.osname~=win32)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=wince)(osgi.native.processor~=arm))(&(osgi.native.osname~=sunos)(osgi.native.processor~=x86))(&(osgi.native.osname~=sunos)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=sunos)(osgi.native.processor~=sparc))(&(osgi.native.osname~=sunos)(osgi.native.processor~=sparcv9))(&(osgi.native.osname~=aix)(osgi.native.processor~=ppc))(&(osgi.native.osname~=aix)(osgi.native.processor~=ppc64))(&(osgi.native.osname~=linux)(osgi.native.processor~=ppc))(&(osgi.native.osname~=linux)(osgi.native.processor~=ppc64))(&(osgi.native.osname~=linux)(osgi.native.processor~=x86))(&(osgi.native.osname~=linux)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=linux)(osgi.native.processor~=arm))(&(osgi.native.osname~=linux)(osgi.native.processor~=ia64))(&(osgi.native.osname~=freebsd)(osgi.native.processor~=x86))(&(osgi.native.osname~=freebsd)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=openbsd)(osgi.native.processor~=x86))(&(osgi.native.osname~=openbsd)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=macosx)(|(osgi.native.processor~=x86)(osgi.native.processor~=x86-64)(osgi.native.processor~=ppc)))) Unresolved requirements: [[com.sun.jna [9](R 9.0)] osgi.native; (|(&(osgi.native.osname~=win32)(osgi.native.processor~=x86))(&(osgi.native.osname~=win32)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=wince)(osgi.native.processor~=arm))(&(osgi.native.osname~=sunos)(osgi.native.processor~=x86))(&(osgi.native.osname~=sunos)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=sunos)(osgi.native.processor~=sparc))(&(osgi.native.osname~=sunos)(osgi.native.processor~=sparcv9))(&(osgi.native.osname~=aix)(osgi.native.processor~=ppc))(&(osgi.native.osname~=aix)(osgi.native.processor~=ppc64))(&(osgi.native.osname~=linux)(osgi.native.processor~=ppc))(&(osgi.native.osname~=linux)(osgi.native.processor~=ppc64))(&(osgi.native.osname~=linux)(osgi.native.processor~=x86))(&(osgi.native.osname~=linux)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=linux)(osgi.native.processor~=arm))(&(osgi.native.osname~=linux)(osgi.native.processor~=ia64))(&(osgi.native.osname~=freebsd)(osgi.native.processor~=x86))(&(osgi.native.osname~=freebsd)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=openbsd)(osgi.native.processor~=x86))(&(osgi.native.osname~=openbsd)(osgi.native.processor~=x86-64))(&(osgi.native.osname~=macosx)(|(osgi.native.processor~=x86)(osgi.native.processor~=x86-64)(osgi.native.processor~=ppc))))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4132)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
Despite the error, from a quick test, nexus appears to run normally. However, a solution or a workaround for the error would be very welcome.
Nexus Version: Sonatype Nexus OSS 3.6.2-01
System info
uname -a
Linux arm-host 3.14.79-27-ARCH #1 SMP PREEMPT Mon Jul 10 19:29:37 MDT 2017 aarch64 GNU/Linux
Java version
java -version
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
Related post: Cannot run Sonatype Nexus Repository Manager 3.0 on Windows 2012
An issue was opened here:
https://issues.sonatype.org/browse/NEXUS-15107
After testing the latest version of the Linux archive (nexus-3.10.0-04-unix.tar.gz) I can no longer reproduce the issue, therefore it has been resolved.

JBOSS 7.1 server is not starting in linux mint 17.3

I am using Linux Mint 17.3 . i want to configure JBOSS server in my system. whenever i command sh.standalone.sh it is showing following screen but doesnot starting server.
indra#Jarvis ~/jboss-as-7.1.1.Final/bin $ sh standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/indra/jboss-as-7.1.1.Final
JAVA: /usr/lib/jvm/java-8-oracle/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
09:45:02,152 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
09:45:02,517 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
09:45:02,629 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
^C09:47:05,537 INFO [org.jboss.as] JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 1ms
i wait for 15 min but it is not starting .
please someone guide me.
JBoss AS 7.1.1.Final does not work with Java 8, https://developer.jboss.org/message/926279#926279. You consider migrating to WildFly 10 as it requires Java 8.