glassfish
  1. glassfish
  2. GLASSFISH-13688

Enable weaving while running in GlassFish Embedded

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      13,688

      Description

      Currently weaving is disabled while running in GlassFish embedded. This is because
      it is not possible to ensure that user has already loaded an entity class using
      apps's class loader before a persistence provider bootstraps. Need to work towards
      a solution to enable weaving

        Activity

        Hide
        ljnelson added a comment -
        Show
        ljnelson added a comment - Please also see http://java.net/jira/browse/GLASSFISH-15769
        Hide
        ljnelson added a comment -

        Please note that when I run embeddable Glassfish, I get weaving exceptions--that is, it appears that it's looking for weaved methods, even though (as this bug reports) weaving is disabled.

        Here's an example:

        Exception [EclipseLink-60] (Eclipse Persistence Services - 2.2.0.v20110114-r8831): org.eclipse.persistence.exceptions.DescriptorException
        Exception Description: A NullPointerException would have occurred accessing a non-existent weaved vh method [_persistence_get_nameType_vh]. The class was not weaved properly - for EE deployments, check the module order in the application.xml deployment descriptor and verify that the module containing the persistence unit is ahead of any other module that uses it.
        Exception Description: The method [_persistence_set_nameType_vh] or [_persistence_get_nameType_vh] is not defined in the object [com.jenzabar.ngp.constituent.jpa.DefaultNameTemplateEntity].

        If I explicitly disable weaving in my persistence.xml, via eclipselink.weaving=false, then this error goes away.

        Show
        ljnelson added a comment - Please note that when I run embeddable Glassfish, I get weaving exceptions--that is, it appears that it's looking for weaved methods, even though (as this bug reports) weaving is disabled. Here's an example: Exception [EclipseLink-60] (Eclipse Persistence Services - 2.2.0.v20110114-r8831): org.eclipse.persistence.exceptions.DescriptorException Exception Description: A NullPointerException would have occurred accessing a non-existent weaved vh method [_persistence_get_nameType_vh] . The class was not weaved properly - for EE deployments, check the module order in the application.xml deployment descriptor and verify that the module containing the persistence unit is ahead of any other module that uses it. Exception Description: The method [_persistence_set_nameType_vh] or [_persistence_get_nameType_vh] is not defined in the object [com.jenzabar.ngp.constituent.jpa.DefaultNameTemplateEntity] . If I explicitly disable weaving in my persistence.xml, via eclipselink.weaving=false, then this error goes away.

          People

          • Assignee:
            Mitesh Meswani
            Reporter:
            Mitesh Meswani
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: