java - Using EJB to persist. How do I configure the Persistence Unit on it? -
i've been learning j2ee tech. i'm trying out crud in ejb, when try deploy web application, have these problems. don't have clue one. can give me tips it?
this actual persistence.xml:
<?xml version="1.0" encoding="utf-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="usuariopu" transaction-type="resource_local"> <provider>org.hibernate.ejb.hibernatepersistence</provider> <jta-data-source>lp3</jta-data-source> <class>mack.entities.usuarioimpl</class> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties> <property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/lp3"/> <property name="javax.persistence.jdbc.user" value="lp3"/> <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.clientdriver"/> <property name="javax.persistence.jdbc.password" value="lp3"/> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.nocacheprovider"/> </properties> </persistence-unit> </persistence>
and wildfly error when try deploy application:
12:26:09,070 info [org.jboss.weld.deployer] (msc service thread 1-6) jbas016002: processing weld deployment atividade_1.war 12:26:09,285 error [org.jboss.as.controller.management-operation] (xnio-1 task-2) jbas014613: operation ("add") failed - address: ([{"deployment" => "atividade_2enterprise.ear"}]) - failure description: {"jbas014771: services missing/unavailable dependencies" => [ "jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean.validatorfactory missing [jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean]", "jboss.deployment.unit.\"atividade_2enterprise.ear\".weld.weldclassintrospector missing [jboss.deployment.unit.\"atividade_2enterprise.ear\".beanmanager]", "jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean.inappclientcontainer missing [jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean]", "jboss.deployment.subunit.\"atividade_2enterprise.ear\".\"atividade_2ejb.jar\".weld.weldclassintrospector missing [jboss.deployment.subunit.\"atividade_2enterprise.ear\".\"atividade_2ejb.jar\".beanmanager]", "jboss.persistenceunit.\"atividade_2enterprise.ear/ejbpersistencia.jar#usuariopu\".__first_phase__ missing [jboss.naming.context.java.lp3]", "jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean.validator missing [jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean]", "jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean.instancename missing [jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean]" ]} 12:26:09,367 error [org.jboss.as.server] (xnio-1 task-2) jbas015870: deploy of deployment "atividade_2enterprise.ear" rolled following failure message: {"jbas014771: services missing/unavailable dependencies" => [ "jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean.validatorfactory missing [jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean]", "jboss.deployment.unit.\"atividade_2enterprise.ear\".weld.weldclassintrospector missing [jboss.deployment.unit.\"atividade_2enterprise.ear\".beanmanager]", "jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean.inappclientcontainer missing [jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean]", "jboss.deployment.subunit.\"atividade_2enterprise.ear\".\"atividade_2ejb.jar\".weld.weldclassintrospector missing [jboss.deployment.subunit.\"atividade_2enterprise.ear\".\"atividade_2ejb.jar\".beanmanager]", "jboss.persistenceunit.\"atividade_2enterprise.ear/ejbpersistencia.jar#usuariopu\".__first_phase__ missing [jboss.naming.context.java.lp3]", "jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean.validator missing [jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean]", "jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean.instancename missing [jboss.naming.context.java.comp.atividade_2enterprise.atividade_2ejb.atividade_2bean]" ]} 12:26:09,398 info [org.jboss.as.server.deployment] (msc service thread 1-5) jbas015974: stopped subdeployment (runtime-name: ejbpersistencia.jar) in 35ms 12:26:09,396 info [org.jboss.as.server.deployment] (msc service thread 1-4) jbas015974: stopped subdeployment (runtime-name: atividade_2ejb.jar) in 33ms 12:26:09,647 info [org.jboss.as.server.deployment] (msc service thread 1-3) jbas015974: stopped subdeployment (runtime-name: atividade_1.war) in 285ms 12:26:09,785 info [org.jboss.as.server.deployment] (msc service thread 1-3) jbas015877: stopped deployment atividade_2enterprise.ear (runtime-name: atividade_2enterprise.ear) in 423ms
thank guys!
redfive, attention! i'm talking teacher, , remembered me problem netbeans has hibernate jpa. i've tried changing eclpiselink provider, , ran on glassingfish server. worked!
thanks once more!
Comments
Post a Comment