jboss-user
[Arriba] [Todas las Listas]

[jboss-Usuario] [jBPM] - Re: Cuestión de API Básico

To: User development <jboss-user@xxxxxxxxxxxxxxx>
Subject: [jboss-Usuario] [jBPM] - Re: Cuestión de API Básico
From: Diogo Saad <do-not-reply@xxxxxxxxx>
Date: Tue, 13 Sep 2011 11:52:38 -0400
Auto-submitted: yes
Delivery-date: Tue, 13 Sep 2011 11:53:41 -0400
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <2-625495-3-90008-1315484233138.jivesbs.jivemailuser@http://community.jboss.org>
List-archive: <http://lists.jboss.org/pipermail/jboss-user>
List-help: <mailto:jboss-user-request@lists.jboss.org?subject=help>
List-id: The JBoss User main mailing list <jboss-user.lists.jboss.org>
List-post: <mailto:jboss-user@lists.jboss.org>
List-subscribe: <https://lists.jboss.org/mailman/listinfo/jboss-user>, <mailto:jboss-user-request@lists.jboss.org?subject=subscribe>
List-unsubscribe: <https://lists.jboss.org/mailman/listinfo/jboss-user>, <mailto:jboss-user-request@lists.jboss.org?subject=unsubscribe>
References: <2-625495-3-90008-1315484233138.jivesbs.jivemailuser@http://community.jboss.org>
Reply-to: The JBoss User main mailing list <jboss-user@xxxxxxxxxxxxxxx>
Sender: jboss-user-bounces@xxxxxxxxxxxxxxx
*Diogo *Saad [*http://Comunidad.*jboss.*org/Personas/*diogosaad] creó la discusión

"*Re: Cuestión de API Básico"

para ver la discusión, visita: *http://comunidad.*jboss.*org/Mensaje/626293#626293

--------------------------------------------------------------
estoy intentando seguir el camino indicado por Demian (salva y recuperar información de mesas de BAM) pero sencillamente no puedo hacer trabajo de persistencia.
Consigo esta excepción donde pruebo a *excute el siguiendo *junit prueba :


                    *SimpleNamingContextBuilder constructor = *SimpleNamingContextBuilder.*emptyActivatedContextBuilder();

  // Construye *DataSource
                    *JdbcDataSource *ds = nuevo *org.*h2.*jdbcx.*JdbcDataSource();
                    *ds.*setURL("*jdbc:*h2:*jdbc/*DataSource");
                    *ds.*setUser("*sa");
                    *ds.*setPassword("*sa");
                     Constructor.Liga("*jdbc/*DataSource", *ds);


Entorno *env = *KnowledgeBaseFactory.*newEnvironment();
*env.Conjunto( *EnvironmentName.FÁBRICA_de DIRECTOR_de la ENTIDAD, Persistencia.*createEntityManagerFactory("*org.*jbpm.Persistencia.*jpa"));
*env.Conjunto( *EnvironmentName.DIRECTOR_de TRANSACCIÓN, *TransactionManagerServices.*getTransactionManager() );
Sesión = *JPAKnowledgeService.*newStatefulKnowledgeSession(*kbase, *null, *env);


:
+Causado por: *java.*lang.Refleja.*InvocationTargetException+
+          En sol.Refleja.*NativeConstructorAccessorImpl.*newInstance0(Método Nativo)+
+          en sol.Refleja.*NativeConstructorAccessorImpl.*newInstance(*NativeConstructorAccessorImpl.*java:39)+
+          en sol.Refleja.*DelegatingConstructorAccessorImpl.*newInstance(*DelegatingConstructorAccessorImpl.*java:27)+
+          en *java.*lang.Refleja.Constructor.*newInstance(Constructor.*java:513)+
+          en *org.*drools.Persistencia.*jpa.*KnowledgeStoreServiceImpl.*buildCommanService(*KnowledgeStoreServiceImpl.*java:116)+
+          ... 33 más+
+Causado por: *java.*lang.*RuntimeException: No podría cometer sesión o *rollback+
+          en *org.*drools.Persistencia.*SingleSessionCommandService.*rollbackTransaction(*SingleSessionCommandService.*java:317)+
+          en *org.*drools.Persistencia.*SingleSessionCommandService.<*init>(*SingleSessionCommandService.*java:130)+
+          ... 38 más+
+Causado por: *java.*lang.*RuntimeException: Incapaz a *rollback transacción+
+          en *org.*drools.Persistencia.*jta.*JtaTransactionManager.*rollback(*JtaTransactionManager.*java:189)+
+          en *org.*drools.Persistencia.*SingleSessionCommandService.*rollbackTransaction(*SingleSessionCommandService.*java:314)+
+          ... 39 más+
+Causado por: *java.*lang.*NullPointerException+
+          En *org.*drools.Persistencia.*jta.*JtaTransactionManager.*rollback(*JtaTransactionManager.*java:185)+


tengo:
1) Creó una persistencia.*xml Archivo bajo *META-*INF (sujetado)
2) 
--------------------------------------------------------------

Respuesta a este mensaje por ir a Comunidad
[*http://comunidad.*jboss.*org/Mensaje/626293#626293]

Empieza una discusión nueva en *jBPM en Comunidad
[*http://comunidad.*jboss.*org/Escoge-contenedor!Entrada.*jspa?*contentType=1&*containerType=14&contenedor=2034]

Diogo Saad [http://community.jboss.org/people/diogosaad] created the discussion

"Re: Basic API Question"

To view the discussion, visit: http://community.jboss.org/message/626293#626293

--------------------------------------------------------------
I'm trying to follow the path indicated by Demian (save and retrieve information from BAM tables) but I simply can not make persistence work.
I get this exception where I try to excute the following junit test :


                    SimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();

  // Construct DataSource
                    JdbcDataSource ds = new org.h2.jdbcx.JdbcDataSource();
                    ds.setURL("jdbc:h2:jdbc/DataSource");
                    ds.setUser("sa");
                    ds.setPassword("sa");
                     builder.bind("jdbc/DataSource", ds);


Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa"));
env.set( EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager() );
session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);


:
+Caused by: java.lang.reflect.InvocationTargetException+
+          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
+          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)+
+          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)+
+          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)+
+          at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:116)+
+          ... 33 more+
+Caused by: java.lang.RuntimeException: Could not commit session or rollback+
+          at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:317)+
+          at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:130)+
+          ... 38 more+
+Caused by: java.lang.RuntimeException: Unable to rollback transaction+
+          at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:189)+
+          at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:314)+
+          ... 39 more+
+Caused by: java.lang.NullPointerException+
+          at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:185)+


I have:
1) Created a persistence.xml file under META-INF (attached)
2) 
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/626293#626293]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
*jboss-Usuario *mailing lista
*jboss-user@xxxxxxxxxxxxxxx
*https://listas.*jboss.*org/*mailman/*listinfo/*jboss-Usuario
_______________________________________________
jboss-user mailing list
jboss-user@xxxxxxxxxxxxxxx
https://lists.jboss.org/mailman/listinfo/jboss-user
<Anterior por Tema] Tema Actual [Siguiente por Tema>