JProfiler> ERROR unknown frame type in StackMapTable Exception and core dumped - jboss

When I start the Jprofiler v7.2.3 in instrumentation mode for my application, system crashes and throws below hs_err_pid.log and at times core dumps too
Internal Error (jvmtiRedefineClasses.cpp:2312), pid=19786, tid=52
Error: ShouldNotReachHere()
Also I get below entry in nohup.out
JProfiler> ERROR unknown frame type in StackMapTable attributeAbort
Application details
Java version "1.6.0_23"
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
jboss-5.1.0
sun4v sparc SUNW,T5140 sunOS
Please suggest the possible root cause and fix. Thanks

Summing up the comments: In this case, another agent has produced an invalid StackMapTable attribute in the class file of an instrumented class and JProfiler did not know how to deal with that.

Related

System.TypeLoadException in IBM.Data.DB2Types.DB2DynArray

I am new to use the DB2. I have added a reference for IBM.Data.DB2 DLL. The Path of the DLL is from X86 directory and also the Local Copy is set to False.
I am using the VisualStudio 2015 with the debug property of is set for x86.
I am able to build the project successfully, but getting following runtime error:
Server Error in '/' Application.
Could not load type 'IBM.Data.DB2Types.DB2DynArray' from assembly 'IBM.Data.DB2, Version=9.7.4.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'IBM.Data.DB2Types.DB2DynArray' from assembly 'IBM.Data.DB2, Version=9.7.4.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208'.
Let me know if anyone can help me on it or need any other details to investigate it.
If your code explicitly uses the class DB2DynArray , it looks like IBM removed that class from Db2 starting from V9.7 (i.e. DB2DynArray was available in versions up to V9.5 only).
Note that Db2-LUW V9.5 and V9.7 are no longer supported by IBM (current Db2 for Linux/Unix/Windows version is V11.x).
Consider an alternate solution unless the risks of running an unsupported version are signed-off by the business.
IBM registration is required to download Db2-versions(including fixpack) from this site.

Error Mapping Shared Libraries with Eclipse CDT and GDB

I'm trying to debug a program using a Ubuntu 12.04 host and an ARM client with Eclipse Kepler, CDT, and GDB. The host is running GDB 7.4 and the client 7.0.1.
In my .gdbinit file I set sysroot /usr/local/arm-none-gnueabi/arm-none-linux-gnueabi/
However, when I try to debug I get the following error:
Warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
The target endianness is set automatically (currently little endian)
Error while mapping shared library sections:
/usr//lib/libstdc++.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/libm.so.6: No such file or directory.
Warning: .dynamic section for "/usr/local/arm-none-linux-gnueabi/arm-none-linux-gnueabi/lib/libgcc_s.so.1" is not at the expected address (wrong library or version mismatch?)
Error while mapping shared library sections:
/lib/libc.so.6: No such file or directyory.
Error while mapping shared library sections:
/lib/ld-linux.so.3: No such file or directory.
I've searched this problem to death and can't seem to resolve it. Any answers would be most appreciated!

Running SimpleOpenNI and leJOS in same project

We have a project in which we want to control a Lego Mindstorms robot with the Microsoft Kinect sensor. We decided to use SimpleOpenNI with Processing to read the sensor and leJOS to control the robot for a simple reason: since both is in Java, we can specifiy a kind of RoboHandler and call its methods from the sensor reading class.
In order to achieve that, we downloaded the leJOS plugin for eclipse, created a new leJOS NXT project and put the processing and SimpleOpenNI libraries in the build path. Note that to use SimpleOpenNI, it is required an old processing version without Java.
Now the problem is, that when installing leJOS, it strictly requires a 32-bit Java JDK, so I had to download this and point to it at installation.
At this point, following build paths are in the project:
LeJOS NXT Runtime (which has among others java.awt classes)
core.jar (used to run Processing in eclipse)
SimpleOpenNI.jar
Having all this, and setting up a first Processing sketch like
import processing.core.*;
public class Test extends PApplet{
(....)
}
results in following error code:
Multiple markers at this line
- The type java.awt.event.MouseMotionListener cannot be resolved. It is indirectly referenced from
required .class files
- The type java.applet.Applet cannot be resolved. It is indirectly referenced from required .class files
- The type java.awt.event.MouseListener cannot be resolved. It is indirectly referenced from required .class files
- The hierarchy of the type FirstTry is inconsistent
- The type java.awt.event.FocusListener cannot be resolved. It is indirectly referenced from required .class files
- The type java.awt.event.KeyListener cannot be resolved. It is indirectly referenced from required .class files
When I downloaded the Processing without Java version, I wasn't able to choose from 32bit- or 64bit version. The SimpleOpenNI is installed as 64bit-version.
When adding the 64bit-JDK (eclipse workspace default) as workspace too, the error disappears, but when trying to run a sketch, following error gets printed in the console:
Invalid layout of java.lang.Thread at name
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (javaClasses.cpp:128), pid=9176, tid=8740
# fatal error: Invalid layout of preloaded class
#
# JRE version: 7.0_04-b22
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0-b21 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\Valentino\Desktop\workspaces\workspace_processing\RoboZeugs\bin\hs_err_pid9176.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
So in my oppinion there is a problem with the JDK versions (32 and 64 bit), but there must be a way to handle this. Has anyone experience on this specific topic, maybe even with Kinect -> Mindstorms? Can anybody tell me what this error exactly means?
You're mixing classes that are designed to run with the JVM on the NXT brick (i.e. everything in classes.jar) with classes that are designed to run with a fully fledged JVM on the PC.
Don't do that. If you want to remote control an NXT, use pccomms.jar and everything else in lib/pc. But never add classes.jar or anything else in lib/nxt to the classpath when you're starting a Java program on your PC.
The error message about java.lang.Thread is probably due to the fact, that java.lang.Thread in classes.jar in by no means compatible with java.lang.Thread that comes with the JVM on your PC.

Matlab crashes on library initialize when called from Java

The setup I have is I'm using a Java application to call native C-code with JNI, which in turn starts up the MATLAB runtime and calls functions on it (I know there are other solutions to call MATLAB methods from Java).
The problem is that the MATLAB engine crashes at some point during the initialization and I don't know what's causing it exactly. The crash causes my jvm to terminate, I assume it's some kind of memory corruption.
The C++ code calling MATLAB functions that is actually crashing is
JNIEXPORT void JNICALL
some_jni_vodoo_initializeLibrary(JNIEnv* env, jclass thisClass) {
try {
if (!mclInitializeApplication(NULL, 0)) {
THROW_EXCEPTION(env, "Could not initialize the application properly.");
return;
}
if (!<library>Initialize()) {
THROW_EXCEPTION(env, "Could not initialize the library.");
return;
}
} ...
The function <library>Initialize() crashes here, the Java error log reads
Stack Trace:
[0] jmi.dll:0x793f4175(0x7934cdca, 1, 0x7937e67c "à;.y`E.y#E.ychar in C:\BUILD_ARE..", 0x792d6a32)
[1] jvm.dll:0x792df9a5(0xc0000005, 0x79356791, 0x4961b400 "Ð\8y", 0x6d8b29de)
[2] jvm.dll:0x792e0431(0x8b515008, 0x70f0e8ce, 0x8b5ffffa, 0xc25d5ec6)
------------------------------------------------------------------------
Fatal Java Exception detected at Fri Apr 30 11:08:08 2010
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.8.0.347 (R2009a)
MATLAB License: unknown
Operating System: Microsoft Windows Vista
Window System: Version 6.0 (Build 6002: Service Pack 2)
Processor ID: x86 Family 6 Model 10 Stepping 5, GenuineIntel
Virtual Machine: Java is not enabled
Default Encoding: windows-1252
Java is not enabled
I really have no idea what could be wrong. Is there not enough memory from the jvm? I guess the problem is somehow related to Java, since calling the JNI functions from a simple test C++ program works fine...
Thanks
Initial Ideas
The only similar thing I've ever seen is a silent exit from MATLAB due to an invalid license.
Another possibility is the nested Java environments. Since MATLAB expects its own Java environment, perhaps there is some problem here. Edit: See below!
Are you running the MATLAB Engine? Or are you calling separate MATLAB commands using some "system" or "exec" call? This might give a good clue.
Answer
The answer appears below in the comments. It is copied here for readability:
When nesting an invocation of MATLAB's engine in a process that has its own JVM, you must either tell MATLAB to run without a JVM by passing -nojvm to mclInitializeApplication or tell it which JVM to use by setting the global MATLAB_JAVA to the location of the JVM you wish to use, C:\Program Files\Java\jre6 for example.
The first option will disable any functionality in MATLAB that requires the JVM, so the second option is preferable.

jruby rails memcached unmarshalling error with java classes

I have a rails app that is communicating with some java services over JMS. I'm caching a few of these objects in memcached on the rails side like so:
#my_objects = MEMCACHE["some_key"] || #service.retrieve_objects
MEMCACHE.set("some_key",#my_objects) if MEMCACHE["some_key"].nil?
where MEMCACHE is
MEMCACHE = MemCache.new(['localhost'], :namespace=>"namespace-#{RAILS_ENV}")
Now, I'm trying to write tests to verify that my memcache is storing these properly and updating properly. Unfortunately when I try to access the objects in the cache I get
MemCache::MemCacheError: Class not found unmarshaling Java type: my/java/package/Classname
What's odd is that referencing the cache in script/console works fine. When I run the app and my unit tests however, I get this error. I didn't think there was any difference between the console and the app when in the same env.
I've included the full stack trace below. It appears to come from deep down in ActiveSupports Memcache client. I've tried all combination of things, even instantiating this particular class right before accessing the cache, but none of it works.
Rails obviously knows about the class as I can retrieve, instantiate and create these java objects directly in my test with no problems, it's only when accessing it from MEMCACHE that I get this error.
Setup
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-13 6586) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_17) [x86_64-java]
Rails 2.2.2
OSX 10.6
Full test stack trace
1) Error:
test_testing_memcache_and_settings(MyTest):
MemCache::MemCacheError: Class not found unmarshaling Java type: my/java/package/Classname
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb:241:in `marshal_load'
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb:241:in `load'
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb:241:in `get'
./test/unit/my_test.rb:54:in `test_testing_memcache_and_settings'
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:60:in `run_with_callbacks_and_testunit'