[
https://issues.jboss.org/browse/AS7-5419?page=com.atlassian.jira.plugin.s...
]
Marek Goldmann commented on AS7-5419:
-------------------------------------
This issue is related to the Hibernate 3 JPA provider. I'm using Hibernate
3.6.10.Final. If you Hibernate 3 module, as [described in the JPA Reference
Guide|https://docs.jboss.org/author/display/AS71/JPA+Reference+Guide#JPAR...]
or [like we have it in
Fedora|https://github.com/fedora-jboss-as/jboss-as/blob/f3c52ccc483abf34d...]
it'll fail with the message once you try to access the entity. The [entity I used for
testing is on
GitHub|https://github.com/goldmann/jboss-as-hibernate3-openjpa/blob/maste...]
and the validations are very basic. You can find there the full [source code for my
app|https://github.com/goldmann/jboss-as-hibernate3-openjpa] (bear in mind that it's
not a master piece...)
If I don't add the dependency to {{jtype}} I always see the exception. Once I add the
{{jtype}} module it goes immediately away.
I know that JBoss AS isn't shipping Hibernate 3, but it's [prepared to be used
with this JPA
provider|https://github.com/jbossas/jboss-as/tree/master/jpa/hibernate3]. I
would like still have it fixed upstream since this looks for me clearly as a missing
dependency. Please consider once again pulling my request.
Related blog post:
http://goldmann.pl/blog/2012/08/22/openjpa-and-hibernate-3-on-jboss-as-7-...
org.hibernate.validator module is missing jtype dependency
----------------------------------------------------------
Key: AS7-5419
URL:
https://issues.jboss.org/browse/AS7-5419
Project: Application Server 7
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 7.1.1.Final
Reporter: Marek Goldmann
Assignee: Scott Marlow
The {{org.hibernate.validator}} module is missing the {{com.googlecode.jtype}}
dependency. Without it, the code throws a {{NoClassDefFoundError:
com/googlecode/jtype/TypeUtils}}:
{code}
Caused by: java.lang.NoClassDefFoundError: com/googlecode/jtype/TypeUtils
at
org.hibernate.validator.engine.ConstraintTree.findSuitableValidatorTypes(ConstraintTree.java:402)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ConstraintTree.findMatchingValidatorClass(ConstraintTree.java:362)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ConstraintTree.getInitializedValidator(ConstraintTree.java:313)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:144)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ConstraintTree.validateComposingConstraints(ConstraintTree.java:233)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:128)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:117)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:84)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:452)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:397)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:361)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:313)
[hibernate-validator.jar:4.2.0.Final]
at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:139)
[hibernate-validator.jar:4.2.0.Final]
at
org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:136)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreInsert(BeanValidationEventListener.java:94)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:160)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:65)
[hibernate-core.jar:3.6.10.Final]
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:320)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:69)
[hibernate-entitymanager.jar:3.6.10.Final]
at
org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:201)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:147)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:71)
[hibernate-core.jar:3.6.10.Final]
at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:808)
[hibernate-core.jar:3.6.10.Final]
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:782)
[hibernate-core.jar:3.6.10.Final]
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:786)
[hibernate-core.jar:3.6.10.Final]
at
org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:839)
[hibernate-entitymanager.jar:3.6.10.Final]
at
org.jboss.as.jpa.container.AbstractEntityManager.persist(AbstractEntityManager.java:563)
[jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at pl.goldmann.as7.jpa.impl.AbstractDatabase.saveChair(AbstractDatabase.java:33)
[classes:]
at
pl.goldmann.as7.jpa.impl.Hibernate3Database$Proxy$_$$_WeldClientProxy.saveChair(Hibernate3Database$Proxy$_$$_WeldClientProxy.java)
[classes:]
at pl.goldmann.as7.bean.impl.AbstractBean.saveChair(AbstractBean.java:49) [classes:]
at
pl.goldmann.as7.bean.impl.Hibernate3Bean$Proxy$_$$_WeldClientProxy.saveChair(Hibernate3Bean$Proxy$_$$_WeldClientProxy.java)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.7.0_05-icedtea]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_05-icedtea]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_05-icedtea]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_05-icedtea]
at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jboss-web.jar:]
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
[jboss-web.jar:]
at
org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
[weld-core.jar:2012-04-02 17:08]
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
[weld-core.jar:2012-04-02 17:08]
at com.sun.faces.facelets.el.TagMethodExpression.invoke(Unknown Source)
[jsf-impl.jar:2.1.7-SNAPSHOT]
at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
[jboss-jsf-2.1-api.jar:2.0.2.Final]
... 25 more
{code}
Hibernate Validator specifies jtype as depednency here:
https://github.com/hibernate/hibernate-validator/blob/4.2.0.Final/pom.xml...
Please note that I found it on Fedora's version of JBoss AS.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira