Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3297

Hibernate with enabled enhancer throws error at deployment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 8.1.0.CR1
    • JPA / Hibernate

      When I enable the enhancer in the persistence.xml then I receive an error from javassist at deployment.

      https://community.jboss.org/message/871056#871056

      public class TornadoStrikeSkill extends SelfTargetSkill {
      	private static final long serialVersionUID = 1123460060768124078L;
      
      	public TornadoStrikeSkill() {	}
      
      	@Override
      	protected void executeSkill() {
      		.....
      		GameObjectService gameObjectService = BeanLocator.lookup(GameObjectService.class);
                      // getting the characters from an EJB
      		for(GameCharacter victim : gameObjectService.calculateVictims()) {
      			
      		}
      	}
      
      public class GameCharacter extends GameObject {
      	@OneToMany(mappedBy = "caster")
      	private List<Skill> skills = new ArrayList<Skill>();
      

      When I remove the for loop the error is gone. When I deploy the same application on JBoss 7.1 it works. So I guess the classloading has changed.

      Maybe the cyclic dependency messes with the javassist?

              smarlow1@redhat.com Scott Marlow
              max_kuffs Markus D (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: