-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: JPA2 deploy error in JBoss
PostPosted: Wed Jun 23, 2010 12:38 pm 
Newbie

Joined: Wed Jun 23, 2010 11:57 am
Posts: 1
Hello,

I'm trying to use a Hibernate3 project as JPA2 in JBoss 6.0.0.M3. My entities where mapped using .hbm.xml files, not annotations, they are used in a JSE environment and work fine.
I've added a persistence.xml file in my jar and I can see the deployer mapping the classes. However there's an error at deploy time:

Code:
2010-06-23 14:17:27,638 WARN  [org.hibernate.cfg.AnnotationConfiguration] (HDScanner) Unable to apply constraints on DDL for foo.bar.MyEntity: java.lang.reflect.InvocationTargetException
   at sun.reflect.GeneratedConstructorAccessor122.newInstance(Unknown Source) [:1.6.0_11]
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_11]
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_11]
   at org.hibernate.cfg.AnnotationConfiguration.applyHibernateValidatorLegacyConstraintsOnDDL(AnnotationConfiguration.java:457) [:3.5.0-CR-1]
   at org.hibernate.cfg.AnnotationConfiguration.applyConstraintsToDDL(AnnotationConfiguration.java:422) [:3.5.0-CR-1]
   at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:397) [:3.5.0-CR-1]
   at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1206) [:3.5.0-CR-1]
   at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1416) [:3.5.0-CR-1]
   at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193) [:3.5.0-CR-1]
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1044) [:3.5.0-CR-1]
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:640) [:3.5.0-CR-1]
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72) [:3.5.0-CR-1]
   at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) [:1.0.2-alpha-1]
   at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) [:1.0.2-alpha-1]

[...]
Caused by: java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void
   at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXType(JavaReflectionManager.java:207) [:6.0.0.20100429-M3]
   at org.hibernate.annotations.common.reflection.java.JavaXMethod.create(JavaXMethod.java:42) [:6.0.0.20100429-M3]
   at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getXMethod(JavaReflectionManager.java:171) [:6.0.0.20100429-M3]
   at org.hibernate.annotations.common.reflection.java.JavaXClass.getDeclaredMethods(JavaXClass.java:137) [:6.0.0.20100429-M3]
   at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:215) [:4.0.2.GA]
   at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:133) [:4.0.2.GA]
   ... 71 more


I have added a breakpoint and in debug I can see that this happens upon analysing a method with signature:

Code:
private double[][] computeStuff(...)


I wonder why it is analysed because it's not a mapped field (no getter nor setter). I explicitly disabled validation in the persistence.xml file but it does not seem to work either.

Code:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
   version="2.0">
   <persistence-unit name="entityManager" transaction-type="JTA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/myDS</jta-data-source>
      <validation-mode>NONE</validation-mode>
      <properties>
      </properties>
   </persistence-unit>
</persistence>


I realize that I'm using alpha versions but I'd appreciate if anyone could give me pointers on how to solve this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.