Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Running EclipseLink server tests without weaving?

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.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 Heider
Pflichtangaben/Mandatory Disclosure Statements:

Back to the top