[JBoss jBPM] - Re: dual jbpm context
by tbeernot
"tbeernot" wrote : When trying to parse a ProcessDefinition from String using the static parseXmlString, underwater JbpmConfiguration.getInstance() is called.
|
The problem basically is with the static ProcessDefinition.createNewProcessDefinition; it accesses a static inner class Configs:
String resource = JbpmConfiguration.Configs.getString("resource.default.modules");
That will result in trying to get the factory, which will see if an instance is available via the depricated method:
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
Which ends up in JbpmConfiguration.jbpmConfigurationsStacks (a ThreadLocal variable).
If no instance is available, it will generate the default one, thus accessing jbpm.cfg.xml.
The approach would then have to be to push the active configuration on the thread local stack before each call and pop it afterwards.
This does not feel right.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199756#4199756
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199756
17 years, 3 months
[JBoss jBPM] - Re: dual jbpm context
by tbeernot
1. Having two JbpmConfigurations runs into some dead ends.
When trying to parse a ProcessDefinition from String using the static parseXmlString, underwater JbpmConfiguration.getInstance() is called.
JbpmConfiguration.getInstance(String) line: 278
JbpmConfiguration.getInstance() line: 257
JbpmConfiguration$Configs.getObjectFactory() line: 425
JbpmConfiguration$Configs.getObject(String) line: 437
JbpmConfiguration$Configs.getString(String) line: 441
ProcessDefinition.createNewProcessDefinition() line: 97
JpdlXmlReader.readProcessDefinition() line: 138
ProcessDefinition.parseXmlString(String) line: 150
Since I do not have a jbpm.cfg.xml anymore, it will revert to the embedded one. That is not the idea with having two separate configurations...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199748#4199748
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199748
17 years, 3 months
[Installation, Configuration & DEPLOYMENT] - Problem with deploying webapp with jpa on JBoss 5 GA.
by skonyahin
Hello, I have JBoss 5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812042121). I try to deploy the following webapp:
nostradamus-webconsole-0.0.1-SNAPSHOT.war
--WEB-INF
----|
----classes
------|
------META-INF
--------|
--------persistence.xml
----lib
-----|
-----nostradamus-model-0.0.1-SNAPSHOT.jar
My persistence.xml:
<persistence 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"
| version="1.0">
|
| <persistence-unit name="quoteService" transaction-type="JTA">
| <jta-data-source>java:/NostradamusXADatasource</jta-data-source>
| <non-jta-data-source>java:/NostradamusDatasource</non-jta-data-source>
| <jar-file>nostradamus-webconsole-0.0.1-SNAPSHOT/WEB-INF/lib/nostradamus-model-0.0.1-SNAPSHOT.jar</jar-file>
| <class>ru.skonyahin.nostradamus.model.Stock</class>
| </persistence-unit>
|
| </persistence>
I deploy it via maven jboss plugin. Deployment fails. Log is here:
2009-01-06 14:42:58,265 DEBUG [org.hibernate.ejb.Ejb3Configuration] (http-127.0.0.1-8080-3) Processing PersistenceUnitInfo [
| name: quoteService
| persistence provider classname: org.hibernate.ejb.HibernatePersistence
| classloader: BaseClassLoader@fdb0a6{vfszip:/C:/Work/nostradamus/nostradamus-webconsole/target/nostradamus-webconsole-0.0.1-SNAPSHOT.war}
| Temporary classloader: null
| excludeUnlistedClasses: false
| JTA datasource: null
| Non JTA datasource: null
| Transaction type: JTA
| PU root URL: vfszip:/C:/Work/nostradamus/nostradamus-webconsole/target/nostradamus-webconsole-0.0.1-SNAPSHOT.war/WEB-INF/classes/
| Jar files URLs [
| vfszip:/C:/Work/nostradamus/nostradamus-webconsole/target/nostradamus-webconsole-0.0.1-SNAPSHOT/WEB-INF/lib/nostradamus-model-0.0.1-SNAPSHOT.jar]
| Managed classes names [
| ru.skonyahin.nostradamus.model.Stock]
| Mapping files names []
| Properties [
| hibernate.jndi.java.naming.factory.url.pkgs: org.jboss.naming:org.jnp.interfaces
| hibernate.cache.provider_class: org.hibernate.cache.HashtableCacheProvider
| hibernate.transaction.manager_lookup_class: org.hibernate.transaction.JBossTransactionManagerLookup
| hibernate.jndi.java.naming.factory.initial: org.jnp.interfaces.NamingContextFactory
| hibernate.jacc.ctx.id: nostradamus-webconsole-0.0.1-SNAPSHOT.war
| hibernate.cache.region_prefix: persistence.unit:unitName=#quoteService
| hibernate.session_factory_name: persistence.unit:unitName=#quoteService
| hibernate.bytecode.use_reflection_optimizer: false
| hibernate.bytecode.provider: javassist]
| 2009-01-06 14:42:58,265 DEBUG [org.hibernate.ejb.Ejb3Configuration] (http-127.0.0.1-8080-3) Detect class: true; detect hbm: true
| 2009-01-06 14:42:58,265 DEBUG [org.hibernate.ejb.Ejb3Configuration] (http-127.0.0.1-8080-3) Detect class: true; detect hbm: true
| 2009-01-06 14:42:58,265 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (http-127.0.0.1-8080-3) Error installing to Start: name=persistence.unit:unitName=#quoteService state=Create
| java.lang.RuntimeException: error trying to scan <jar-file>: vfszip:/C:/Work/nostradamus/nostradamus-webconsole/target/nostradamus-webconsole-0.0.1-SNAPSHOT/WEB-INF/lib/nostradamus-model-0.0.1-SNAPSHOT.jar
| at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:635)
| at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:347)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
| at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:311)
| [... SKIPPED ...]
| org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
| Caused by: java.lang.RuntimeException: Archive browser cannot handle protocol: vfszip:/C:/Work/nostradamus/nostradamus-webconsole/target/nostradamus-webconsole-0.0.1-SNAPSHOT/WEB-INF/lib/nostradamus-model-0.0.1-SNAPSHOT.jar
| at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:63)
| at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:626)
| ... 85 more
Path C:/Work/nostradamus/nostradamus-webconsole/target/nostradamus-webconsole-0.0.1-SNAPSHOT/WEB-INF/lib/nostradamus-model-0.0.1-SNAPSHOT.jar actually exists. When I try to specify jar relative to war-file (not for endorsed dir), I have the same error.
Any ideas?
Thanks,
Sergey
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199745#4199745
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199745
17 years, 3 months