openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frederic Jeanneau (JIRA)" <>
Subject [jira] Created: (OPENJPA-318) Auto-enhancement within a Web Application
Date Thu, 16 Aug 2007 14:09:30 GMT
Auto-enhancement within a Web Application

                 Key: OPENJPA-318
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc, jpa, sql
    Affects Versions: 0.9.7
         Environment: Java JRE 1.5
OpenJPA 0.9.7
IDE Eclipse
Tomcat 5.0
MySQL 4.1.9 DataBase (EasyPhp
            Reporter: Frederic Jeanneau

I'm still french, so excuse my english one more time.

I have a problem while trying to persist a very simple object, within a web application.
With a web form I create an object, and then the web app try to persist it.

I have just a message with a number and a text.
My Message class is :

@Inheritance (strategy = InheritanceType.TABLE_PER_CLASS)
@Table(name = "MESG")
@Column(name = "NUM_MESG", nullable = false, length = 10)
@Column(name = "TXT_MESG", nullable = false, length = 60)

The table is created, but when I send an object to the EntityManager, it fails, because :

Attempt to cast instance "2 [mesobjets.Message]" to PersistenceCapable failed.  Ensure that
it has been enhanced.

I tried to launch the server whith -the javaagent argument, but the launching fail, because

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at Source)
	at Source)
	at$100(Unknown Source)
	at$ Source)
	at Method)
	at Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at org.apache.openjpa.enhance.PCEnhancerAgent.premain(
	... 5 more
FATAL ERROR in native method: processing of -javaagent failed

So, if someone know how to auto-enhance on a server, I'm waiting for their ideas, and i'm
still trying to solve the problem. Thanks for your help

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message