[JBoss AS7 Development] - Hibernate 3 validation: Unable to find a default provider
by guinotphil
guinotphil [http://community.jboss.org/people/guinotphil] created the discussion
"Hibernate 3 validation: Unable to find a default provider"
To view the discussion, visit: http://community.jboss.org/message/619053#619053
--------------------------------------------------------------
Hello !
I'm trying to deploy an EAR application running on Hibernate 3.
I've been following the steps on https://docs.jboss.org/author/display/AS7/JPA+Reference+Guide https://docs.jboss.org/author/display/AS7/JPA+Reference+Guide by adding a module org.hibernate3 and adding in my persitence.xml:
<property name="jboss.as.jpa.providerModule" value="org.hibernate3"/>
My module org.hibernate3 contains the following jar and dependencies:
<module xmlns="urn:jboss:module:1.0" name="org.hibernate3">
<resources>
<resource-root path="hibernate-core-3.6.6.Final.jar"/>
<resource-root path="hibernate-entitymanager-3.6.6.Final.jar"/>
<resource-root path="hibernate-validator-3.1.0.GA.jar"/>
<resource-root path="hibernate-commons-annotations-3.2.0.Final.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="asm.asm"/>
<module name="javax.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="org.antlr"/>
<module name="org.apache.ant"/>
<module name="org.apache.commons.collections"/>
<module name="org.dom4j"/>
<module name="org.infinispan"/>
<module name="org.javassist"/>
<module name="org.jboss.as.jpa.hibernate3"/>
<module name="org.jboss.logging"/>
<module name="org.slf4j"/>
</dependencies>
</module>
My trouble is that when I try to deploy the application I get the following error:
javax.persistence.PersistenceException: [PersistenceUnit: entityManagerFactory] Unable to configure EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:378) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]
at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam.jar:]
at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:]
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:]
at org.jboss.seam.Component.callComponentMethod(Component.java:2257) [jboss-seam.jar:]
at org.jboss.seam.Component.callCreateMethod(Component.java:2172) [jboss-seam.jar:]
at org.jboss.seam.Component.newInstance(Component.java:2132) [jboss-seam.jar:]
... 63 more
Caused by: org.hibernate.HibernateException: Unable to get the default Bean Validation factory
at org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:127) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.Configuration.applyBeanValidationConstraintsOnDDL(Configuration.java:1704) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.Configuration.applyConstraintsToDDL(Configuration.java:1654) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1445) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1375) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1519) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1100) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:282) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:366) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]
... 77 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
at org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:118) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
... 86 more
Caused by: org.hibernate.HibernateException: Unable to build the default ValidatorFactory
at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:383) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(TypeSafeActivator.java:109) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
... 91 more
Caused by: javax.validation.ValidationException: Unable to find a default provider
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:264) [validation-api-1.0.0.GA.jar:]
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111) [validation-api-1.0.0.GA.jar:]
at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:380) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]
... 92 more
I've also tried to upgrade hibernate-validator to hibernate-validator-4.2.0.Final.jar + hibernate-validator-legacy-4.0.2.GA.jar, but I'm still getting the same error.
Is there a way to make validation working with Hibernate 3 on JBoss AS 7 ? Or should I disable validation (how?) ?
Thank you very much !
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619053#619053]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[JBoss ESB Development] - Minor issue with ESB 4.10 and HttpGateway
by Chua Khoon Yong
Chua Khoon Yong [http://community.jboss.org/people/chuaky] created the discussion
"Minor issue with ESB 4.10 and HttpGateway"
To view the discussion, visit: http://community.jboss.org/message/619020#619020
--------------------------------------------------------------
hi,
I was porting my project from ESB 4.9 to 4.10, and encountered the following minor issue.
To simulate the issue, in the "http_gateway" sample code, i did this change to the "build.xml" file:
*** original
<project name="Quickstart_http_gateway" default="run" basedir=".">
*** new
<project name="abc" default="run" basedir=".">
After i built and deploy this project, and i saw this error message in the jboss 4.2.3 AS
2011-08-03 17:01:51,075 WARN [org.jboss.system.ServiceController] Problem creating service jboss.esb:deployment=abc.esb
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at org.jboss.internal.soa.esb.listeners.war.HttpGatewayDeploymentFactory.addEndpointAddress(HttpGatewayDeploymentFactory.java:89)
at org.jboss.internal.soa.esb.listeners.war.HttpGatewayDeploymentFactory.updateWebModel(HttpGatewayDeploymentFactory.java:75)
at org.jboss.soa.esb.listeners.config.ModelUtil.updateWebModel(ModelUtil.java:97)
at org.jboss.soa.esb.listeners.config.WebGatewayBuilder.build(WebGatewayBuilder.java:115)
at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.createService(JBoss4ESBDeployment.java:196)
:
:
It seems that the cause is because i changed the project name to a 3 letter word "abc". It so happens that my project name is just 3 letter words :(
The line of code that cause the issue is at
| | at org.jboss.internal.soa.esb.listeners.war.HttpGatewayDeploymentFactory.addEndpointAddress(HttpGatewayDeploymentFactory.java:89) |
| | path = path.substring(0, path.length() - 4) + urlMapping; // remove ".war" and add urlMapping |
So, for temporary workaround, i change my project name to 4 letter word.
Hope you could fix it, because the project name is also part of the http url that invoke this service.
Thank you.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619020#619020]
Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[jBPM Development] - BPM Process Deployment Issues on selecting the java folder
by Radha S
Radha S [http://community.jboss.org/people/sradha] created the discussion
"BPM Process Deployment Issues on selecting the java folder"
To view the discussion, visit: http://community.jboss.org/message/619001#619001
--------------------------------------------------------------
HI , I m beginner to JBPM and facing basic errors as described below.
*BPM Process Deployment Issues:*
I have installed the JBPM with the following configurations.
JBPM Runtime version : JBPM-3.2.8 , JRE:1.6
App Server : jboss-5.1.0.GA
Database : Oracle 10g XE
*Issue Description*:
Created new project which has default simple processdefinition file. With out doing any changes, while trying to deploy the process by selecting the src/main/java folder, I m getting the unexpected deployment fail error.
Strange is that, If I unselect the java and test folder, deployment is success. But in the workspaces, while signaling the token from start node, the class not found exception is coming.
Can any one help to resolve this.
Note: I *m not able to deploy* any of the existing example process by selecting the src/main/java folder.
Attachment holds the screen print, please suggest.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619001#619001]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months