Java error Java_java_lang_ClassLoader_00024NativeLibrary_load0 - java

Have large spring boot app and seeing the following message every few seconds in Kibana logs for Java app.
WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
I suspect something that has come in between Java 11 OpenJdk version after 22nd Apr 2022 and on/at 25th Apr 2022.
11-jre-slim: Pulling from library/openjdk
Looked in the code and can not see anything standing out.
Looked at the Java source code and can see C code (oh no!)
Lots of these:
Showing entries from Apr 25, 20:11:32
20:11:32.492. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
20:11:37.500. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
20:11:37.702. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
20:11:42.701. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
20:11:42.905. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
20:11:47.913 WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
20:11:48.099. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load

For anyone waiting for a fix for this, Elastic APM Agent has been updated to include a new version of async-profiler which avoids the problem on the mentioned JDKs: https://github.com/elastic/apm-agent-java/issues/2759#issuecomment-1246507167

We opened a new Bug in Oracle because of this problem.
In our case we are using ElasticAPM with java 11.0.15 and that's causing this error. We checked the java source code and found that is probably related to the last changes in openJDK11
Here is the link to the bug in Oracle.

Highly likely that this is a bug in async-profiler, not in java.
Async profiler does try to intercept NativeLibraries::load resp. load0 and replace the original implementation the JVM provides with its own. See https://github.com/jvm-profiling-tools/async-profiler/blob/5312a793ec22106420883e8a274d10c390e6e4b1/src/profiler.cpp#L582-L615
Not sure if they still do this, but they did for a while.
See comments in bug report https://bugs.openjdk.org/browse/JDK-8288547.

Related

Oracle 11gR2 Design Center Can't find Java Virtual Machine

I'm having an issue with Oracle 11g R2 Design Center feature. When I click it, it gives me the error below:
C:\app[username]\product\11.2.0\dbhome_1\owb\bin\win32>call setowbenv.bat
WARNING: Unknown directive: SetSkipJ2SDKCheck
WARNING: Could not find jvm.cfg! in 'C:\app[username]\product\11.2.0\dbhome_1\jdk\jre\lib\jvm.cfg'
WARNING: Cannot find default VM "client" at C:\app[username]\product\11.2.0\dbhome_1\jdk
ERROR: Cannot find VM at: C:\app[username]\product\11.2.0\dbhome_1\jdk
Aborting!
I've tried many things to resolve this, as listed below:
Download 32b version of JDK (actually, I've downloaded multiple to rule out the version issue, both 32 and 64)
Point environment variable and path to JDK installation
Change sqldeveloper.cfg file to include SetJavaHome {path to JDK}
Move the jvm.cfg file to the directory it's expected to be at
Checked the paths to ensure the expected files were there
With step 4, after doing so I receive a different error message:
"Client VM is unsupported"
With step 5, after doing so I realized the path to the executable was not in:
C:\app[username]\product\11.2.0\dbhome_1\jdk
But instead in:
C:\app[username]\product\11.2.0\dbhome_1\jdk\bin
So, from all of this I feel that if I can change the path the Oracle Design Center is using to the correct path, then this should resolve. Problem is, I'm unsure where to find this. Also, if it helps I believe the Design Center uses JDeveloper, since the error suggests to view the Oracle 9i JDeveloper Install Guide at jdev\install.html. I tried going to this link but I'm not sure if it exists anymore because it took me to Google. I chose the most relevant link but still, I did not find any information regarding this issue. If anyone can help I'd be very thankful, this has been running me in circles for 3 days now.
TIA

gluon app does not find method in jdk, how is that possible?

I made an android gluon app, testing the validity of the model before going "big boy".
I had some struggles, mainly due to how different a gluon app on desktop and mobile (android) react.
I was able to overcome all of them, except one.
When my app starts, i open some websockets connections and get this exception
[Thu Aug 11 08:39:13 CEST 2022][INFO] [SUB] D/GraalCompiled(22536): Caused by: java.lang.NoSuchMethodException: java.lang.Byte.valueOf(java.lang.String)
[Thu Aug 11 08:39:13 CEST 2022][INFO] [SUB] D/GraalCompiled(22536): at java.lang.Class.getMethod(DynamicHub.java:1114)
[Thu Aug 11 08:39:13 CEST 2022][INFO] [SUB] D/GraalCompiled(22536): at org.eclipse.jetty.util.TypeUtil.<clinit>(TypeUtil.java:147)
[Thu Aug 11 08:39:13 CEST 2022][INFO] [SUB] D/GraalCompiled(22536): ... 35 more
I've had lots of reflection problems, but this one i don't know how to tackle.
Here are the various parameters:
app compiled on linux (ubuntu)
netbeans 13
jdk 17.0.4
gluon plugin 2.8.4
graalvm-svm-java17-linux-gluon-22.0.0.3-Final
javaStaticSdkVersion='18-ea+prep18-8
galaxy tab A8, android 11
Don't know what else to say, i don't have a clue as to where to start, there are too many paths i can go and search.
Thanks for any input.
You're seeing this error because Jetty's TypeUtil class uses reflection for some String-to-basic type conversions.
Access via reflection is difficult to resolve upon compilation time, which is probably why your GraalVM native-image build fails: native-image only includes classes that are deemed necessary, and in this case it just missed to include it.
A proper fix would be to change TypeUtil to use method references instead of reflection (I ran into the same problem, and I've just filed Jetty pull request #9115).
However, you will most likely want to run your code now, and can't wait for this to be merged. Additionally, you may probably encounter more of these reflection issues even if this particular one is fixed.
In order for GraalVM native-image to know which classes and methods are accessed via reflection, you can specify them via configuration files in the resource classpath, under META-INF/native-image/com.yourdomain/your-project/reflect-config.json. Upon assembly, native-image will pick up this configuration from the classpath.
You can also use the GraalVM native-image Tracing Agent to create this file automatically.
To do this, invoke your app with the GraalVM JRE (i.e., using Hotspot, not native-image), and specify the following VM argument:
-agentlib:native-image-agent=config-output-dir=/tmp/native-image.{pid}
Interact with your app like you normally would (cover as much as possible), then terminate the VM.
You will see a bunch of JSON files created under /tmp/native-image.(PID). Copy all of them under the META-INF path described above and rebuild your native image.
For details see the GraalVM documentation, e.g., Reflection Use in Native Images
and Native Image Tracing Agent.

Delta XML- Dita compare getting Caught com.deltaxml.dita.FilterProcessingException

I am using deltaxml for some time and it is working fine. But for a specific dita topics , I am getting these warnings in the logs:
WARNING: Caught com.deltaxml.dita.FilterProcessingException: Exception thrown when attempting to run the ‘input-a/9-dxp-9-cals-table-checker.xsl’ step (source: ‘/dita-xsl/cals-tables/cals-table-checker.xsl’) whilst performing DCE[BEINGPROCESSED: file:/home/nxf36037/crrbcompareissue/trydirecttmp5/a-0-file-/regs/d ipflexcan3syn.dita, file:/home/nxf36037/crrbcompareissue/trydirecttmp5/b-0-file-/regs/d ipflexcan3syn.dita.bak, file:/home/nxf36037/crrbcompareissue/trydirecttmp5/b-0-file-/regs/d ipflexcan3syn.dita]
Feb 09, 2018 2:37:55 PM com.deltaxml.dita.ditabb ditaa
WARNING: Cannot find ids within file:/home/nxf36037/crrbcompareissue/trydirecttmp5/b-0-file-/regs/d ipflexcan3syn.dita Cause: java.io.FileNotFoundException: /home/nxf36037/crrbcompareissue/trydirecttmp5/b-0-file-/regs/dipfl excan3syn.dita (No such file or directory)
Feb 09, 2018 2:37:55 PM com.deltaxml.dita.ditaq ditaa
WARNING: Cannot prepare topics for comparison. Cause: com.deltaxml.util.href.ditab: Cannot construct target (concerning hrefs file:/home/nxf36037/crrbcompareissue/trydirecttmp5/b-0-file-/regs/d ipflexcan3syn.dita, file:/home/nxf36037/crrbcompareissue/trydirecttmp5/b-0-file-/regs/d ipflexcan3syn.dita.dxml-p1)
Feb 09, 2018 2:38:02 PM com.deltaxml.dita.ditaq ditaa
WARNING: Skipping topicref /home/nxf36037/crrbcompareissue/trydirecttmp5/b-0-file-/regs/dipfl excan3syn.dita. Cause: Cannot determine whether file:/home/nxf36037/crrbcompareissue/trydirecttmp5/b-0-file-/regs/d ipflexcan3syn.dita contains change.
I am not able to find the cause of this issue, I have tried almost all the arguments which I felt could be the cause.
The command line I am using is:
java -jar /pkg/deltaxml-dita-/2017.09.21/lib/deltaxml-dita.jar compare mts B1518165232953/dipflexcan3syn/specsource/maps/dipflexcan3synbg .ditamap B1518165232953/dipflexcan3syn/specsource/maps/dipflexcan3syn_bg .ditamap output-format=dita-markup map-result-structure=map-pair map-result-origin=B trydirecttmp5
I have also checked the dita files, they gets validated and there are no errors. Could you please help here?
The schematron code at: https://github.com/nigelwhitaker/cals-table-schematron can be used to detect and report, in a fairly user-friendly manner, table validation issues, either inside an editor or using the schematron skeleton.
As discussed with Mohit over in https://github.com/nigelwhitaker/cals-table-schematron/issues/4 it does however depend on XSLT 2.0 or 3.0 features and therefore is not suitable for all schematron systems.

This application does not exist (app_id) in Java Netbeans Glassfish web application

I am a new programmer trying to deploy my Java web application to a web host for the first time. I started trying to do it with Jelastic but I need file storage, not just a .jar file, and it looks like you have to pay a LOT to upgrade.
If you know of a way I can upload my application and also store a single .png (image) file so my application can overwrite it by accessing the URL please let me know. I don't mind paying X money for a host but $150 or whatever is crazy.
In the meantime I found that Google App Engine lets you upload a Java application. I have been trying to do this for maybe 3 hours.
I am stuck with the error:
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=animelist1&version=1&
404 Not Found
This application does not exist (app_id=u'animelist1').
I have checked that I am logged in under the correct Google account (no others, and rebooted and used CCleaner to clear my browser cache), that I have an empty project in Google App Engine called "animelist1" and have checked that my application is called "animelist1" with the appengine-web.xml with "animelist".
I am using the netbeans plugin to deploy to Google. I have the correct email set there.
There are many people with this issue who fixed it the same way. However as I am a beginner I am unable to figure out how to do this method. The method is
This application does not exist (app_id=xxx)
Google App Engine : this application does not exist
(and many others with similar answers)
The method is "appcfg.py update --no_cookies MyProjectDirectory/" or "appcfg.py update . --no_cookies"
Can you please assist me in doing this?
I have located appcfg.py at
C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine
there is another one at
C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools
there is also a appcfg_java.py here but we can come to that later if need be.
I have tried using the Google Cloud SDK Shell (which looks like the cmd console) to navigate to the directory and type those commands. This opens the file in a text file and doesn't seem to do anything else.
I believe I may have to find the appcfg relevant to my application/project (but I'm not sure). When I do a computer search for the file I get 8 files with that name returned:
image
All I want to do really is upload my Java Glassfish web application, then upload a .png file so I can point my application to it (it will overwrite the file).
I thought about changing my application to run on Tomcat because I thought I saw there was a free Java host that allows tomcat. That was several hours ago now because I have been headbutting this thing so maybe I should just abort and try that instead. Or if you know of a host that doesn't cost $150+ let me know. I don't know why they said they cost that, I thought you could host really cheaply.
Please help, thankyou!!!!
The full code of my error is below. I don't know why there is an error about System Java Compiler, I just checked my environment after messing it up, saw it hadn't saved, then rebooted, and now it is saved. I have a JAVA_HOME system variable set to C:\Program Files\Java\jdk1.8.0_40 and my Path system variable is
C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Java\jdk1.8.0_40
(maybe I don't need both, not sure). I have nothing else set there, nothing in User Variables though I will double check if that is needed.
Here is my full error log:
********************************************************
There is a new version of the SDK available.
-----------
Latest SDK:
Release: 1.9.19
Timestamp: Thu Feb 19 23:57:40 GMT 2015
API versions: [1.0]
-----------
Your SDK:
Release: 1.9.18
Timestamp: Thu Feb 12 19:30:16 GMT 2015
API versions: [1.0]
-----------
Please visit https://developers.google.com/appengine/downloads for the latest SDK.
********************************************************
Reading application configuration data...
Apr 20, 2015 6:51:40 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:/Users/J/Documents/NetBeansProjects/g5/target/animelist1-1.0-SNAPSHOT\WEB-INF/appengine-web.xml
Apr 20, 2015 6:51:40 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:/Users/J/Documents/NetBeansProjects/g5/target/animelist1-1.0-SNAPSHOT\WEB-INF/web.xml
Beginning interaction for module default...
Apr 20, 2015 6:51:40 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=animelist1&version=1&
404 Not Found
This application does not exist (app_id=u'animelist1').
This is try #0
Apr 20, 2015 6:51:40 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=animelist1&version=1&
404 Not Found
This application does not exist (app_id=u'animelist1').
This is try #1
Apr 20, 2015 6:51:41 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=animelist1&version=1&
404 Not Found
This application does not exist (app_id=u'animelist1').
This is try #2
Apr 20, 2015 6:51:41 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=animelist1&version=1&
404 Not Found
This application does not exist (app_id=u'animelist1').
This is try #3
0% Created staging directory at: 'C:\Users\J\AppData\Local\Temp\appcfg8900677438454325367.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.
Error Details:
Apr 20, 2015 6:51:42 AM org.apache.jasper.JspC processFile
INFO: Built File: \index.jsp
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Unable to update app: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Please see the logs [C:\Users\J\AppData\Local\Temp\appcfg6599854602413633444.log] for further information.
I have an empty project in Google App Engine called "animelist1"
If you mean that you've used the SDK set up a local project, then you might have missed a step. When you visit http://appengine.google.com/ , does "animelist1" appear in the list of your applications? If not, you'll need to click the Create Application button (and hope that someone else hasn't already used that appid).
No project with ID 'animelist1' currently exists, but this ID is not available (it could exist in the past, but was deleted). If you already created the project your App ID is the same as Project ID, not Project name. If you didn't yet create the project, create one either in the old App Engine console as suggested by Dave or as per manual.
This is an credentials issue in most cases when you download code from already exsit project.
Make sure you have only one google account login your default browser.
Go to your lib/appengine-java-sdk-<version>/bin/ and run:
appcfg --no_cookies update <project-dir>
Note: early appcfg version command may like :appcfg update --no_cookies <project-dir>

Newrelic Install for WebSphere - ClassNotFoundException

We've installed the NewRelic java agent on our WebSphere Application / WebSphere Commerce system and in the NewRelic logs we are seeing this:
Sep 3, 2013 22:47:53 -0400 NewRelic 14 INFO: The data collector is temporarily unavailable. This can happen periodically. In the event that availability of our servers is not restored after a period of time, then please report this to New Relic. java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:11)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:6)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:161)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:36)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1184)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:390)
at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:75)
at com.newrelic.agent.transport.DataSenderImpl.connectAndSend(DataSenderImpl.java:550)
at com.newrelic.agent.transport.DataSenderImpl.send(DataSenderImpl.java:600)
at com.newrelic.agent.transport.DataSenderImpl.invoke(DataSenderImpl.java:480)
at com.newrelic.agent.transport.DataSenderImpl.invokeNoRunId(DataSenderImpl.java:475)
at com.newrelic.agent.transport.DataSenderImpl.getRedirectHost(DataSenderImpl.java:203)
at com.newrelic.agent.transport.DataSenderImpl.connect(DataSenderImpl.java:193)
at com.newrelic.agent.RPMService.launch(RPMService.java:194)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask.attemptConnection(RPMConnectionServiceImpl.java:301)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask.access$1100(RPMConnectionServiceImpl.java:101)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask$3.run(RPMConnectionServiceImpl.java:235)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:452)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:328)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:161)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:109)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:191)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:215)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:738)
Caused by: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.SSLJsseUtil.b(SSLJsseUtil.java:125)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:3)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:41)
at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:46)
at com.ibm.net.ssl.www2.protocol.https.b.<init>(b.java:26)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:1)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:5)
at java.net.URL.openConnection(URL.java:957)
at com.newrelic.agent.transport.DataSenderImpl.createConnection(DataSenderImpl.java:676)
at com.newrelic.agent.transport.DataSenderImpl.connectAndSend(DataSenderImpl.java:540)
... 18 more
There seems to be some documentation about how to update an Eclipse based IDE environment to overcome this error in other situations, but nothing specific to NewRelic. Has anyone seen this before that can offer suggestions on how to fix the issue?
The next release of New Relics Java agent should make it possible to run without any configuration changes. With version 2.21.X and earlier please submit a request for support at support.newrelic.com
Read and see if this publication gives you a hint:
http://www-01.ibm.com/support/docview.wss?uid=swg21584437
I went through the same thing. As you might have gathered from the article liked by Robban WebSphere has some restriction in the SSLConnectionFactory, so a quit fix would be to just edit the newrelic.yml and configure:
# The agent communicates with New Relic via https by
# default. If you want to communicate with newrelic via http,
# then turn off SSL by setting this value to false.
# This work is done asynchronously to the threads that process your
# application code, so response times will not be directly affected
# by this change.
# Default is true.
ssl: false
Good luck.
Version 3.0.0 or later of New Relic's Java Agent should completely resolve this issue without any custom configuration, certainly without turning off SSL! Release notes.

Categories