EclipseLink
no longer has a dependency on a temp classloader being provided. But as it seems weaving is still not
working, it seems Netweaver is not allowing for weaving in some other way?
My guess
is NetWeaver is either,
- loading
the entity classes before letting EclipseLink provide a class transformer,
- or,
ignore the transformer that EclipseLink returns.
Could you
determine which is the case?
It looks
like we need to continue to disable weaving if there is no temp class loader,
as it seems to be an indication of general lack of server support for
performing any transformation of the entity classes.
Could you
also ensure a bug is logged on NetWeaver that it is not compliant with the EJB
3 container requirements.
-----Original
Message-----
From: Heider, Sabine
[mailto:sabine.heider@xxxxxxx]
Sent: Monday, November 16, 2009
10:17 AM
To: eclipselink-dev@xxxxxxxxxxx
Subject: [eclipselink-dev] Running
EclipseLink server tests without weaving?
Hi,
I’m trying to run the EclipseLink server tests inside a NetWeaver
engine using the NetWeaver platform from the incubator. As a result, I get lots
of errors that seem to be related with weaving, e.g.:
javax.persistence.PersistenceException: Exception [EclipseLink-0]
(Eclipse Persistence Services - 2.0.0.qualifier):
org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions:
---------------------------------------------------------
Exception [EclipseLink-60] (Eclipse Persistence Services - 2.0.0.qualifier):
org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The method [_persistence_setconcurrencyC_vh] or
[_persistence_getconcurrencyC_vh] is not defined in the object
[org.eclipse.persistence.testing.models.jpa.advanced.ConcurrencyA].
Internal Exception: java.lang.NoSuchMethodException:
org.eclipse.persistence.testing.models.jpa.advanced.ConcurrencyA._persistence_getconcurrencyC_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[concurrencyC]
Descriptor:
RelationalDescriptor(org.eclipse.persistence.testing.models.jpa.advanced.ConcurrencyA
--> [DatabaseTable(CONCURRENCYA)])
The NetWeaver server is not able to provide a temporary
classloader, so dynamic weaving doesn’t work. The NetWeaver platform contains
the following method (AFAIK taken from the JBoss platform), which should
indicate to EL that there is no temp classloader, but apparently that mechanism
doesn’t work:
public JPAClassLoaderHolder
getNewTempClassLoader(PersistenceUnitInfo puInfo) {
ClassLoader
realClassLoader = puInfo.getClassLoader();
AbstractSessionLog.getLog().log(AbstractSessionLog.WARNING,
"persistence_unit_processor_sap_temp_classloader_bypassed",//
puInfo.getPersistenceUnitName(), realClassLoader);
return new
JPAClassLoaderHolder(realClassLoader, NO_TEMP_CLASS_LOADER);
}
So what is the correct mechanism to run the server tests with
weaving being disabled?
I experimented with the settings in test.properties
(test.agent=-Dignore and test.weaving=-DTEST_NO_WEAVING=true), which had some
effect on the number of failing tests, but the NoSuchMethodExceptions remained.
For testing purposes, I edited the persistence.xml file of one of the test
applications to disable weaving, but that can’t be the proper way to do it...
What would you suggest?
Thanks and best regards,
Sabine
Sabine Heider
SAP AG
Pflichtangaben/Mandatory
Disclosure Statements:
http://www.sap.com/company/legal/impressum.epx