A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Products
»
JBoss/WildFly
Author
Error on deploy
jotremar world
Greenhorn
Joined: Aug 09, 2010
Posts: 3
posted
Aug 09, 2010 13:18:37
0
When i try to deploy my project i have this error (
JBoss
5):
18:32:25,160 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=pruebajpa.ear,jar=pruebajpa-ejb.jar,name=prueba,service=EJB3) to KernelDeployment of: pruebajpa-ejb.jar 18:32:25,162 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@122cae2{name=jboss.j2ee:ear=pruebajpa.ear,jar=pruebajpa-ejb.jar,name=prueba,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true} 18:32:25,291 INFO [TomcatDeployment] deploy, ctxPath=/pruebajpa-war 18:32:25,381 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:ear=pruebajpa.ear,jar=pruebajpa-ejb.jar,name=prueba,service=EJB3" is missing the following dependencies: Dependency "<UNKNOWN jboss.j2ee:ear=pruebajpa.ear,jar=pruebajpa-ejb.jar,name=prueba,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=pruebajpa.ear/pruebajpa-ejb.jar#pruebajpa-ejbPU' **") Deployment "jboss.j2ee:ear=pruebajpa.ear,jar=pruebajpa-ejb.jar,name=prueba,service=EJB3_endpoint" is missing the following dependencies: Dependency "jboss.j2ee:ear=pruebajpa.ear,jar=pruebajpa-ejb.jar,name=prueba,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall") Deployment "persistence.unit:unitName=pruebajpa.ear/pruebajpa-ejb.jar#pruebajpa-ejbPU" is missing the following dependencies: Dependency "jboss.jca:name=pruebaDB,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=pruebaDB,service=DataSourceBinding' **") DEPLOYMENTS IN ERROR: Deployment "<UNKNOWN jboss.j2ee:ear=pruebajpa.ear,jar=pruebajpa-ejb.jar,name=prueba,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=pruebajpa.ear/pruebajpa-ejb.jar#pruebajpa-ejbPU' ** Deployment "jboss.jca:name=pruebaDB,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=pruebaDB,service=DataSourceBinding' ** 18:32:25,682 INFO [Http11Protocol] Arrancando Coyote HTTP/1.1 en puerto http-127.0.0.1-8080 18:32:25,714 INFO [AjpProtocol] Arrancando Coyote AJP/1.3 en ajp-127.0.0.1-8009 18:32:25,724 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 49s:622ms
Files in project:
mysql-ds.xml
<?xml version="1.0" encoding="UTF-8"?> <datasources> <local-tx-datasource> <jndi-name>pruebaDB</jndi-name> <connection-url>jdbc:mysql://localhost:3306/test</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>root</user-name> <password>root</password> <min-pool-size>5</min-pool-size> <max-pool-size>20</max-pool-size> <idle-timeout-minutes>5</idle-timeout-minutes> </local-tx-datasource> </datasources>
persistence.xml
<?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" 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_1_0.xsd"> <persistence-unit name="pruebajpa-ejbPU" transaction-type="JTA"> <jta-data-source>java:/pruebaDB</jta-data-source> </persistence-unit> </persistence>
EJB
@Stateful public class prueba implements pruebaLocal { @PersistenceContext(unitName="pruebajpa-ejbPU") private EntityManager em; public int fila() { Query consulta = em.createNamedQuery("Zona.findAll"); return ((Zona)(consulta.getResultList().get(1))).getPresupuestoMes(); //return 0; } // Add business logic below. (Right-click in editor and choose // "Insert Code > Add Business Method") }
I don't understand why it fail
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Error on deploy
Similar Threads
Problem with EJB 3. Name not bound error
Connecting to MySql in JBOSS5.1.0.GA
Exception while deploying JPA Application
Cannot cast org.hibernate.validator.util.LazyValidatorFactory to javax.validation.ValidatorFactory
Change DefaultDS in JNDI Name
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter