Home » Support » Forum » AttachNotSupportedException

AttachNotSupportedException

#1

Good morning,

OS: Windows Server 2008 R2 64 bit

Java: Java Server JRE 8u121 for Windows x64

ObjectDB: version 2.6.9 build 5

Problem description:

ObjectDB server will start and function normally (?) but an exception is logged:

"java.lang.NoClassDefFoundError: com/sun/tools/attach/AttachNotSupportedException" (see attachment to this thread).

I also added C:\Java\jdk8\lib\tools.jar to the classpath, but that did not make any difference.

What am I doing wrong?

Best regards,

Rui

#2

Enhancement requires the availiability of classes that are referenced from enhanced classes, and probably AttachNotSupportedException is referenced from an enhanced class.

Usually the ObjectDB server doesn't need any external class. It uses enhancement internally to prepare classes based on the object model that is stored in the database.

Do you get the same error when you open the database in the Explorer?

Can you post a sample database that demonstrates the problem?

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Thank you for your assistance.

We are experiencing this error when opening any database. Also when we open a database from Explorer.

An example db is in the attachment to this post.

Could this have anything to do with the fact that we are running on windows 2008 server x64 OS with java 1.8 x64?

We were using the same databases before (= last week :) on a windows10 x64 OS with java 1.7 x32 and had no problem at all.

BTW:

  • we included the path to \objectdb\bin in the CLASSPATH environment variable
  • we are using 'server-b.exe' and also 'explorer-b.exe' instead of 'server.exe' and 'explorer.exe', because starting the last two exe's will fail with an error: 'Error starting Java VM'.
#4

We 'solved' the problem:

  • this error disappeared after we uninstalled java 1.8 from the server at our datacenter. After reinstalling and resetting the classpath this message did not appear again.
  • we had a subsequent problem: objectdb was trying to enhance quite some (about 183) classes in the lib folder of Apache TomEE. That was caused because we had '-javaagent:c:\objectdb\bin\objectdb.jar' as default VM argument for the JRE in Eclipse. After removing the javaagent, everything works fine.
  • FYI: Eclipse Neon, Java JDK 1.8, Apache TomEE 7.0.2-plume. We start ObjectDB by calling server-b.exe and we use explorer-b.exe (server.exe and explorer.exe will not start with JDK 1.8: 'Failed to find Java VM').

Now we can start all our web applications on the remote server.

Regards,

Rui

#5

Thank you for the update. We can comfirm that the sample database in #3 above has no errors, and we could open it with no issues using Java 8 on Windows 10.

Apparently this error message is related to issues with the Java installation rather than with ObjectDB, as understood from some threads on the Internet and from your new report.

server-b.exe and explorer-b.exe are provided because server.exe and explorer.exe fail to work on some systems. Unfortunately on other systems server-b.exe and explorer-b.exe fail. So currently both of these pairs are provided.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login