[RESOLVIDO]Deploy projeto erro scope of the module called

1 resposta
E

pessoal,

estou fazendo um deploy do meu projeto, porem esta dando o erro abaixo:
cannot Deploy projectejb
deploy is failing=Error occurred during deployment: Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [br.com.caelum.livraria.dao.AutorDao/manager] in the scope of the module called [projectejb]. Please verify your application… Please see server.log for more details.

obs: estou utilizando, eclipse, ejb e glassfish.
alguem jah passou por isso ?

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.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_2_0.xsd">
	<persistence-unit name="projectejb" transaction-type="RESOURCE_LOCAL">
	<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
		<properties>
			<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/notafiscal"/>
			<property name="javax.persistence.jdbc.user" value="postgres"/>
			<property name="javax.persistence.jdbc.password" value="xavier"/>
			<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
			<property name="javax.persistence.schema-generation.database.action" value="drop-and-create" />
			<property name="javax.persistence.schema-generation.create-source" value="metadata" />
			
			<property name="hibernate.show_sql" value="true"/>
			<property name="hibernate.format_sql" value="true"/>
			
			<property name="hibernate.cache.region.factory_class" value="org.hibernate.testing.cache.CachingRegionFactory"/>
		</properties>
	</persistence-unit>
</persistence>
--------------------------------------------------------------

@Stateless
public class AutorDao {
	@PersistenceContext(unitName="myPU")
	private EntityManager manager;
	public void salva(Autor autor) {
		this.manager.merge(autor);
	}

1 Resposta

E

consegui resolver criando um datasource

Criado 10 de setembro de 2014
Ultima resposta 11 de set. de 2014
Respostas 1
Participantes 1