[JBoss AS7 Development] - Re: Weld-OSGi integration in AS7
by Kevin Pollet
Kevin Pollet [http://community.jboss.org/people/kevinpollet] created the discussion
"Re: Weld-OSGi integration in AS7"
To view the discussion, visit: http://community.jboss.org/message/605472#605472
--------------------------------------------------------------
> Thoughts?
Hi all,
I just want to give you my thinking and Mathieu's thinking about the use of the OSGiService qualifier. First of all, we agree with you that it's possible to get rid of the OSGiService qualifier (if a service is not found in CDI, it's possible to look at the OSGi service registry).
I thought a lot about this and one interrogation comes to my mind. How differentiate the case of a missing CDI binding and the case of a local implementation for a service? The default behavior of CDI is to throw an exception specifying that there is no binding for this injection target but in this case, a proxy waiting for an hypothetical OSGi service will be injected (and obviously will fail at runtime). IMHO, doing this will break the default CDI programming model. I mean that the user applicition will start without any problem in our case but in the default CDI programming model an exception will be thrown. We think that the user have to specify where he wants to use OSGi (so the user will knows where to deal with OSGi dynamism).
On the other hand, as you say in your above comments, this feature has to be enabled by the user. In this case he could be aware of this behavior, but we think it's too much changes for the CDI programming model.
WDYT?
Kevin & Mathieu
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/605472#605472]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[jBPM Development] - JBPM5 - Human task not getting completed
by vmaroli
vmaroli [http://community.jboss.org/people/vmaroli] created the discussion
"JBPM5 - Human task not getting completed"
To view the discussion, visit: http://community.jboss.org/message/610723#610723
--------------------------------------------------------------
I am trying out a sample process with a human task. Configured persistence for both Task server and process instnace in postgresql. Process flow is stopping at the human task as expected. After this I am completing the task using a human task client. Problem is that after this the process is not proceeding to complete. I am using JPAKnowledgeService and CommandBasedWSHumanTaskHandler. Is there anything additional need to be done for completing the process another than invoking the task api at task server ?
Is there any significance to the task name & name we give to the Human Task in the process ?
Code used for starting process.
Logger logger = Logger.getLogger(this.getClass().getName());
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());
logger.info("Loading process definition");
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(processDefinition), ResourceType.BPMN2);
kbase = kbuilder.newKnowledgeBase();
Properties properties = new Properties();
properties.put("drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
logger.info("create session");
ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, config, env );
int sessionId = ksession.getId();
logger.info("Session Id : "+sessionId);
logger.info("Registering Human Task listener");
CommandBasedWSHumanTaskHandler cbHandler = new CommandBasedWSHumanTaskHandler(ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", cbHandler);
ksession.startProcess("com.ht.test");
Human Task Service
public class HumanTaskService {
private TaskService taskService = null;
private TaskServiceSession taskSession = null;
public HumanTaskService(EntityManagerFactory emFactory) {
Logger logger = Logger.getLogger(this.getClass().getName());
logger.info("Initializing Human Task Service");
SystemEventListener systemEventListener = SystemEventListenerFactory.getSystemEventListener();
taskService = new TaskService(emFactory, systemEventListener);
taskSession = taskService.createSession();
taskSession.addUser(new User("Administrator"));
}
public void addUser(String userId) {
Logger logger = Logger.getLogger(this.getClass().getName());
logger.info("Adding user "+userId);
taskSession.addUser(new User(userId));
}
public void startTaskService() {
Logger logger = Logger.getLogger(this.getClass().getName());
logger.info("Starting Human Task Service");
MinaTaskServer server = new MinaTaskServer( taskService );
Thread thread = new Thread( server );
thread.start();
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/610723#610723]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[JBoss ESB Development] - Exception handling between actions and ftp-listener
by Phillip Schulte
Phillip Schulte [http://community.jboss.org/people/phillip.schulte] created the discussion
"Exception handling between actions and ftp-listener"
To view the discussion, visit: http://community.jboss.org/message/564097#564097
--------------------------------------------------------------
Hello.
Thats one service in my jboss-esb.xml
<service category="de.eskalon.kn.garuda.invoice.HistoricalExchangeRates" name="HistoricalExchangeRateImporter" description="Imports historical exchange rates from ftp directory files" invmScope="GLOBAL">
<service category="de.eskalon.kn.garuda.invoice.HistoricalExchangeRates" name="HistoricalExchangeRateImporter" description="Imports historical exchange rates from ftp directory files" invmScope="GLOBAL">
<listeners>
<ftp-listener busidref="currency-ftp-in" is-gateway="true" maxThreads="2" name="ftp-listener-gateway" scheduleidref="everyminute" />
</listeners>
<actions mep="OneWay">
<action name="transform" class="org.jboss.soa.esb.actions.converters.ByteArrayToString">
<property name="encoding" value="UTF-8" />
</action>
<action name="properties" class="de.eskalon.kn.garuda.esb.GetPropertiesFromMessage"> </action>
<action class="org.jboss.soa.esb.actions.EJBProcessor" name="callPersist">
<property name="ejb3" value="true" />
<property name="jndi-name" value="garuda-invoicing/HistoricalExchangeRatesManagerBean/remote" />
<property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory" />
<property name="provider-url" value="localhost:1099" />
<property name="method" value="persistRate" />
<property name="ejb-params">
<arg0 type="java.lang.String">FILE_NAME</arg0>
<arg1 type="java.lang.String">org.jboss.soa.esb.message.defaultEntry</arg1>
</property>
</action>
</actions>
</service>
<listeners>
And here my ftp-provider
<ftp-provider hostname="${currency.ftp.host}" name="currency-provider">
<ftp-bus busid="currency-ftp-in">
<ftp-message-filter directory="${currency.ftp.directory}" error-delete="false" error-suffix=".HAS_ERROR"
input-suffix=".csv"
passive="true" password="${currency.ftp.password}" post-delete="false" post-rename="true"
post-suffix=".COMPLETE" username="${currency.ftp.username}" work-suffix=".garudaWorking" />
</ftp-bus>
</ftp-provider>
So its possible tthat something goes wrong in my persistRate method. But in any case the ftp-listener will rename the file to <filename>.COMPLETE independently of throwing an exception in my method. So my question is how do I handle this correctly. What I want to have is, if anything goes wrong rename the file to <filename>.HAS_ERROR
Best regards
Phillip
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/564097#564097]
Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[JBoss AS7 Development] - How to specify a SAR's module dependencies?
by Matt Drees
Matt Drees [http://community.jboss.org/people/matt.drees] created the discussion
"How to specify a SAR's module dependencies?"
To view the discussion, visit: http://community.jboss.org/message/606619#606619
--------------------------------------------------------------
Hi all,
I'm trying to get a simple SAR deployed to AS7. It has an mbean class in it that implements ServiceMBean. However, when I deploy it, I get a ClassNotFoundException for ServiceMBean. I suspect I need to somehow tell Jboss Modules that my SAR needs to access whichever module has that class. But I don't know how to do that. I suspect http://docs.jboss.org/author/display/MODULES/Manifest+module+information http://docs.jboss.org/author/display/MODULES/Manifest+module+information is what I'd need, except that that page hasn't been written yet. Any suggestions?
Log output:
15:15:00,565 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "jboss-addons-3.0-SNAPSHOT.sar"
15:15:00,633 WARN [org.jboss.modules] (MSC service thread 1-3) Failed to define class org.ccci.ha.HighAvailabilityDataSourceMBean in Module "deployment.jboss-addons-3.0-SNAPSHOT.sar:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/ccci/ha/HighAvailabilityDataSourceMBean (Module "deployment.jboss-addons-3.0-SNAPSHOT.sar:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:398) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:258) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [:1.0.0.CR2]
at org.jboss.modules.Module.loadModuleClass(Module.java:588) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:180) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.CR2]
at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24]
at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_24]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:394) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:258) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [:1.0.0.CR2]
at org.jboss.modules.Module.loadModuleClass(Module.java:588) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:180) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.CR2]
at java.lang.Class.forName0(Native Method) [:1.6.0_24]
at java.lang.Class.forName(Class.java:247) [:1.6.0_24]
at org.jboss.as.service.ReflectionUtils.getClass(ReflectionUtils.java:100)
at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:111)
at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:102)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: java.lang.NoClassDefFoundError: org/jboss/system/ServiceMBean
at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24]
at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_24]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:394) [:1.0.0.CR2]
... 32 more
Caused by: java.lang.ClassNotFoundException: org.jboss.system.ServiceMBean from [Module "deployment.jboss-addons-3.0-SNAPSHOT.sar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.CR2]
... 37 more
Thanks for your time,
-Matt
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/606619#606619]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[JBoss Messaging Development] - Failed to write property - java.lang.NullPointerException - infinity messages
by Alexei J
Alexei J [http://community.jboss.org/people/a_subscriber] created the discussion
"Failed to write property - java.lang.NullPointerException - infinity messages"
To view the discussion, visit: http://community.jboss.org/message/565750#565750
--------------------------------------------------------------
JBoss AS 5.1 - success started
I have a simple jms application
private void run(String customerName) throws Exception {
try {
Context initial = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) initial.lookup("/ConnectionFactory");
Destination notifyTopic = (Destination) initial.lookup("topic/testTopic");
Destination requestTopic = (Destination) initial.lookup("topic/testDurableTopic");
logger.trace("Creating Connection...");
connection = cf.createConnection();
connection.setClientID(customerName);
logger.trace("Creating Session...");
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
logger.trace("Creating MessageProducer to send messages to the specified destination. ...");
producer = session.createProducer(requestTopic);
logger.trace("Creating a MessageConsumer for the specified destination. ...");
consumer = session.createConsumer(notifyTopic);
logger.trace("Starts (or restarts) a connection's delivery of incoming messages...");
connection.start();
for (;;) {
listen(customerName);
}
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
} finally {
if (connection != null)
connection.close();
}
}
jndi.properties file:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://localhost:1099
I create jar and deploy it to the %JBOSS_HOME%/server/default/messaging/myapplication/customers/Xavier/
run application on the jboss:
java -cp myproject.jar;%JBOSS_HOME%/client/jbossall-client.jar com.mycompany.myproject.Customer Xavier
and I get infinity the next messages:
[11 ieo 2010 12:03:00.963] com.mycompany.myproject.Customer.main(Customer.java:123) TRACE:
Start customer
[11 ieo 2010 12:03:01.041] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0
[11 ieo 2010 12:03:01.713] org.jboss.logging.Logger.trace(Logger.java:160) TRACE:
org.jboss.aop.classpool.AOPClassPool@1389188011 [class path: sun.misc.Launcher$AppClassLoader@3326b249;] - dcl:sun.misc.Launcher$AppClassLoader@3326b249 creating pool for loader sun.misc.Launcher$AppClassLoader@3326b249 searchStrategy:org.jboss.aop.classpool.AOPClassPool$SearchAllRegisteredLoadersSearchStrategy@26302a05 isTemp:false
[11 ieo 2010 12:03:01.776] com.mycompany.myproject.Customer.run(Customer.java:69) TRACE:
Creating Connection...
[11 ieo 2010 12:03:01.807] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
Remoting version: 2.5.3.SP1 (Flounder)
[11 ieo 2010 12:03:01.822] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
Client[1699270891:5c4o56o-d5cpbk-gf547yym-1-gf547yym-2].connect(null)
[11 ieo 2010 12:03:01.822] org.jboss.logging.Logger.trace(Logger.java:160) TRACE:
Client[1699270891:5c4o56o-d5cpbk-gf547yym-1-gf547yym-2]: metadata = null
[11 ieo 2010 12:03:01.885] org.jboss.logging.Logger.trace(Logger.java:160) TRACE:
Mapping properties for bean: SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457]
[11 ieo 2010 12:03:01.885] org.jboss.logging.Logger.trace(Logger.java:160) TRACE:
Property editor found for: marshaller, editor: java.beans.PropertyDescriptor@40f7af00, setter: public void org.jboss.remoting.MicroRemoteClientInvoker.setMarshaller(org.jboss.remoting.marshal.Marshaller)
[11 ieo 2010 12:03:01.901] org.jboss.logging.Logger.trace(Logger.java:160) TRACE:
Failed to find property editor for: marshaller
[11 ieo 2010 12:03:01.901] org.jboss.logging.Logger.trace(Logger.java:171) TRACE:
Failed to write property
java.lang.NullPointerException
at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(PropertyEditors.java:377)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.mapJavaBeanProperties(MicroSocketClientInvoker.java:1359)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.setup(MicroSocketClientInvoker.java:533)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.<init>(MicroSocketClientInvoker.java:292)
at org.jboss.remoting.transport.socket.SocketClientInvoker.<init>(SocketClientInvoker.java:78)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.<init>(BisocketClientInvoker.java:166)
at org.jboss.remoting.transport.bisocket.TransportClientFactory.createClientInvoker(TransportClientFactory.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:460)
at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:359)
at org.jboss.remoting.Client$6.run(Client.java:724)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.remoting.Client.connect(Client.java:720)
at org.jboss.remoting.Client.connect(Client.java:668)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:343)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:246)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
at com.mycompany.myproject.Customer.run(Customer.java:70)
at com.mycompany.myproject.Customer.main(Customer.java:127)
[11 ieo 2010 12:03:01.901] org.jboss.logging.Logger.trace(Logger.java:160) TRACE:
Property editor found for: timeout, editor: java.beans.PropertyDescriptor@5f20829f, setter: null
[11 ieo 2010 12:03:01.901] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] setting client socket wrapper class name to org.jboss.jms.client.remoting.ClientSocketWrapper
[11 ieo 2010 12:03:01.901] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] setting shouldCheckConnection to false
[11 ieo 2010 12:03:01.901] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] setting timeout to 300000
[11 ieo 2010 12:03:01.901] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] constructed
[11 ieo 2010 12:03:01.916] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] setting client socket wrapper class name to org.jboss.jms.client.remoting.ClientSocketWrapper
[11 ieo 2010 12:03:01.916] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] setting shouldCheckConnection to false
[11 ieo 2010 12:03:01.916] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] setting timeout to 300000
[11 ieo 2010 12:03:01.916] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] connecting
[11 ieo 2010 12:03:01.916] org.jboss.logging.Logger.debug(Logger.java:228) DEBUG:
Creating semaphore with size 50
[11 ieo 2010 12:03:01.932] org.jboss.logging.Logger.trace(Logger.java:160) TRACE:
SocketClientInvoker[2afa14cb, bisocket://127.0.0.1:4457] added new pool ([]) as ServerAddress[127.0.0.1:4457, NO enableTcpNoDelay timeout 300000 ms, maxPoolSize=50]
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/565750#565750]
Start a new discussion in JBoss Messaging Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[jBPM Development] - jbpm4 integration with webapp
by roxy1987
roxy1987 [http://community.jboss.org/people/roxy1987] created the discussion
"jbpm4 integration with webapp"
To view the discussion, visit: http://community.jboss.org/message/608062#608062
--------------------------------------------------------------
Hi,
I am trying to add workflow to an application.
I am able to deploy the process. But when I call the method to start the process, following trace appears :
javax.servlet.ServletException: Servlet execution threw an exception
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
*root cause*
java.lang.NoClassDefFoundError: de/odysseus/el/util/SimpleResolver
org.jbpm.pvm.internal.script.JuelScriptEngineFactory.getScriptEngine(JuelScriptEngineFactory.java:185)
javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:205)
org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:111)
org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:90)
org.jbpm.pvm.internal.model.ExecutionImpl.resolveAssignmentExpression(ExecutionImpl.java:772)
org.jbpm.pvm.internal.model.ExecutionImpl.initializeAssignments(ExecutionImpl.java:726)
org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:95)
org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:58)
org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217)
org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:61)
org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceById(ExecutionServiceImpl.java:50)
action.AllMethods.startNewProcessInstance(AllMethods.java:31)
action.MainServlet.doPost(MainServlet.java:51)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
*root cause*
java.lang.ClassNotFoundException: de.odysseus.el.util.SimpleResolver from BaseClassLoader@aee53f{VFSClassLoaderPolicy@4cbcaf{name=vfszip:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war domain=ClassLoaderDomain@17fc253{name=vfszip:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war parentPolicy=AFTER_BUT_JAVA_BEFORE parent=ClassLoaderDomain@1568654{DefaultDomain}} roots=[MemoryContextHandler@33014755[path= context=vfsmemory://3j001-x2aob1-godzmi30-1-godzmrc7-1x real=vfsmemory://3j001-x2aob1-godzmi30-1-godzmrc7-1x], ZipEntryHandler(a)22908657[path=CustomJBPM4.war/WEB-INF/classes context=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/ real=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war/WEB-INF/classes], DelegatingHandler(a)22253751[path=CustomJBPM4.war/WEB-INF/lib/jbpm.jar context=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/ real=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war/WEB-INF/lib/jbpm.jar], ZipEntryHandler(a)21097047[path=CustomJBPM4.war/WEB-INF context=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/ real=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war/WEB-INF]] delegates=null exported=[, org.jbpm.jpdl.internal.repository, org.jbpm.pvm.internal.identity.cmd, META-INF.maven.org.jbpm.jbpm4.jbpm-log, org.jbpm.pvm.internal.job, org.jbpm.api.history, META-INF.maven.org.jbpm.jbpm4.jbpm-pvm, org.jbpm.pvm.internal.history, org.jbpm.pvm.internal.wire.usercode, org.jbpm.pvm.internal.wire, org.jbpm.api.model, org.jbpm.api.task, org.jbpm.jpdl.internal.rules, org.jbpm.pvm.internal.cal, org.jbpm.pvm.internal.wire.xml, org.jbpm.pvm.internal.wire.binding, org.jbpm.test, org.jbpm.pvm.internal.repository, action, org.jbpm.pvm.internal.lob, org.jbpm.bpmn.flownodes, META-INF.maven.org.jbpm.jbpm4.jbpm-enterprise, org.jbpm.api.activity, org.jbpm.pvm.internal.stream, org.jbpm.bpmn.model, org.jbpm.bpmn.parser, org.jbpm.bpmn.deployer, org.jbpm.test.assertion, org.jbpm.pvm.internal.spring, org.jbpm.pvm.internal.task, org.jbpm.pvm.internal.id, org.jbpm.enterprise.internal.ejb, org.jbpm.internal.log, org.jbpm.pvm.internal.query, org.jbpm.enterprise.internal.wire.binding, org.jbpm.pvm.internal.history.events, org.jbpm.pvm.internal.xml, org.jbpm.pvm.internal.env, org.jbpm.pvm.internal.wire.descriptor, org.jbpm.pvm.internal.util, org.jbpm.pvm.internal.cfg, org.jbpm.jpdl.internal.activity, org.jbpm.jpdl.internal.model, META-INF.maven.org.jbpm.jbpm4.jbpm-bpmn, META-INF.maven.org.jbpm.jbpm4.jbpm-jpdl, org.jbpm.api.jpdl, org.jbpm.pvm.internal.ant, org.jbpm.pvm.internal.type, META-INF.maven.org.jbpm.jbpm4.jbpm-api, org.jbpm.pvm.internal.model, org.jbpm.api.cmd, org.jbpm.bpmn.common, org.jbpm.pvm.internal.type.variable, org.jbpm.api, org.jbpm.api.listener, org.jbpm.pvm.internal.hibernate, org.jbpm.pvm.internal.migration, org.jbpm.pvm.internal.model.op, org.jbpm.pvm.internal.jobexecutor, org.jbpm.pvm.internal.test, org.jbpm.pvm.internal.email.impl, org.jbpm.pvm.internal.jms, org.jbpm.pvm.internal.history.model, org.jbpm.pvm.internal.svc, org.jbpm.pvm.internal.wire.operation, org.jbpm.pvm.internal.script, org.jbpm.pvm.internal.processengine, org.jbpm.pvm.internal.type.matcher, org.jbpm.pvm.internal.identity.impl, META-INF.maven.org.jbpm.jbpm4.jbpm-test-base, org.jbpm.pvm.internal.cmd, org.jbpm.jpdl.internal.xml, org.jbpm.pvm.internal.tx, org.jbpm.api.job, org.jbpm.pvm.internal.email.spi, org.jbpm.pvm.internal.type.converter, META-INF, org.jbpm.pvm.internal.builder, META-INF.services, org.jbpm.test.jms, org.jbpm.test.ejb, org.jbpm.pvm.internal.session, org.jbpm.pvm.internal.identity.spi, org.jbpm.api.identity, org.jbpm.pvm.internal.client] <IMPORT-ALL>NON_EMPTY}}
org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:385)
java.lang.ClassLoader.loadClass(ClassLoader.java:252)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
org.jbpm.pvm.internal.script.JuelScriptEngineFactory.getScriptEngine(JuelScriptEngineFactory.java:185)
javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:205)
org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:111)
org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:90)
org.jbpm.pvm.internal.model.ExecutionImpl.resolveAssignmentExpression(ExecutionImpl.java:772)
org.jbpm.pvm.internal.model.ExecutionImpl.initializeAssignments(ExecutionImpl.java:726)
org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:95)
org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:58)
org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217)
org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:61)
org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceById(ExecutionServiceImpl.java:50)
action.AllMethods.startNewProcessInstance(AllMethods.java:31)
action.MainServlet.doPost(MainServlet.java:51)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
This is what the method to start the process looks like :
public String startNewProcessInstance(String processDefID)
{
ProcessEngine processEngine = Configuration.getProcessEngine();
ExecutionService executionService = processEngine.getExecutionService();
ProcessInstance processInstance = executionService.startProcessInstanceById(processDefID);
String processInstID = processInstance.getId();
return processInstID;
}
The process instance is however successfully initiated. Gets listed in the database.
Please help because I cant go ahead if this is nt resolved.
regds.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608062#608062]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[jBPM Development] - How to integrate jbpm4.4 into jboss5.1.0.GA?
by frh10 ff
frh10 ff [http://community.jboss.org/people/frh10] created the discussion
"How to integrate jbpm4.4 into jboss5.1.0.GA?"
To view the discussion, visit: http://community.jboss.org/message/610972#610972
--------------------------------------------------------------
I install jbpm4.4 into jboss5 with the ant(build.xml):
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- jBPM: Workflow in Java -->
<!-- -->
<!-- Distributable under LGPL license. -->
<!-- See terms of license at http://www.gnu.org http://www.gnu.org. -->
<!-- ====================================================================== -->
<!-- $Id: build.xml 6507 2010-07-18 06:00:34Z mailto:alex.guizar@jboss.com alex.guizar(a)jboss.com $ -->
<project name="jbpm.install">
<!-- DEVELOPER SPECIFIC CONFIGURATIONS -->
<property file="${user.home}/.jbpm4/build.properties" />
<!-- USER CUSTOMIZABLE PROPERTIES -->
<!-- {hsqldb | mysql | oracle | postgresql} -->
<property name="database" value="mysql" />
<!-- INTERNAL PROPERTY DEFAULTS -->
<condition property="jbpm.home" value="${jbpm.parent.dir}/jbpm-4.x" else="${basedir}/..">
<isset property="jbpm.parent.dir" />
</condition>
<property name="cfg.dest.dir" value="${jbpm.home}/install/generated/cfg" />
<property name="install.src.dir" value="${jbpm.home}/install/src" />
<property name="bind.address" value="localhost" />
<property name="jdbc.properties.dir" value="${jbpm.home}/install/jdbc" />
<property file="${jdbc.properties.dir}/${database}.properties" />
<property name="examples.file" value="${jbpm.home}/examples/target/examples.jar" />
<property name="tomcat.version" value="6.0.26" />
<property name="tomcat.parent.dir" value="${jbpm.home}" />
<property name="tomcat.home" value="${tomcat.parent.dir}/apache-tomcat-${tomcat.version}" />
<property name="tomcat.filename" value="apache-tomcat-${tomcat.version}.zip" />
<property name="tomcat.distro.dir" value="downloads" />
<property name="tomcat.distro.url"
value=" http://www.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/${tomca... http://www.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/${tomca..." />
<property name="tomcat.distro.path" value="${tomcat.distro.dir}/${tomcat.filename}" />
<property name="tomcat.lib.dir" value="${tomcat.home}/lib" />
<property name="tomcat.webapps.dir" value="${tomcat.home}/webapps" />
<property name="hsqldb.server.install.dir" value="${jbpm.home}/hsqldb-server" />
<property name="hsqldb.server.source.dir" value="${jbpm.home}/install/src/hsqldb-server" />
<property name="jboss.version" value="5.1.0.GA" />
<property name="jboss.parent.dir" value="${jbpm.home}" />
<property name="jboss.home" value="F:\jboss-5.1.0.GA" />
<property name="jboss.filename" value="jboss-${jboss.version}.zip" />
<property name="jboss.distro.dir" value="downloads" />
<property name="jboss.distro.url"
value=" http://downloads.sourceforge.net/jboss/${jboss.filename http://downloads.sourceforge.net/jboss/${jboss.filename}" />
<property name="jboss.distro.path" value="${jboss.distro.dir}/${jboss.filename}" />
<property name="jboss.server.configuration" value="all-with-hornetq" />
<property name="jboss.server.config.dir"
value="${jboss.home}/server/${jboss.server.configuration}" />
..................
the red parts are the modifications to fix my jboss and database,
but when i start the jboss,it throw a error:
2011-06-20 14:27:06,729 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.j2ee:module="jbpm-enterprise.jar",service=EjbModule state=Create mode=Manual requiredState=Installed
org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping MS SQLSERVER2005 not found
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:517)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:327)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:80)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:732)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:424)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:368)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:172)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:495)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
How can i solve this problem?Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/610972#610972]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[JBoss AS7 Development] - How do I put an MBean in JNDI?
by Matt Drees
Matt Drees [http://community.jboss.org/people/matt.drees] created the discussion
"How do I put an MBean in JNDI?"
To view the discussion, visit: http://community.jboss.org/message/606799#606799
--------------------------------------------------------------
Hi all,
I'm trying to get a SAR deployed to AS7.
One of my MBeans is trying to bind itself into JNDI using NonSerializableFactory.rebind(name, this, true). This apparently works fine on older jboss releases, but on AS7 I get this:
13:30:22,405 WARN [org.ccci.ha.HighAvailabilityDataSource] (MSC service thread 1-4) Starting up HighAvailabilityDataSource ccpDatasource in PRIMARY mode
13:30:22,406 INFO [stdout] (MSC service thread 1-4) fullName=jdbc/ccpDatasource
13:30:22,406 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.mbean.service."jboss.jca:name=jdbc/ccpDatasource,service=DataSourceBinding".start: org.jboss.msc.service.StartException in service jboss.mbean.service."jboss.jca:name=jdbc/ccpDatasource,service=DataSourceBinding".start: Failed to execute legacy service start() method
at org.jboss.as.service.StartStopService.start(StartStopService.java:51)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
at org.jboss.as.service.AbstractService.invokeLifecycleMethod(AbstractService.java:59)
at org.jboss.as.service.StartStopService.start(StartStopService.java:49)
... 4 more
Caused by: java.lang.UnsupportedOperationException: Naming context is read-only
at org.jboss.as.naming.NamingContext.rebind(NamingContext.java:227)
at javax.naming.InitialContext.rebind(InitialContext.java:408) [:1.6.0_24]
at org.jboss.util.naming.NonSerializableFactory.rebind(NonSerializableFactory.java:185)
at org.jboss.util.naming.NonSerializableFactory.rebind(NonSerializableFactory.java:250)
at org.ccci.ha.HighAvailabilityDataSource.rebind(HighAvailabilityDataSource.java:53)
at org.ccci.ha.HighAvailabilityDataSource.start(HighAvailabilityDataSource.java:34)
... 10 more
So, it looks like JNDI is read-only now. What is the recommended approach for making an MBean available in JNDI?
Or, perhaps I'm just going about this all the wrong way. What I really need is to make a custom javax.sql.Datasource available in JNDI, and I need to be able to do some logic on start-up. (I don't want to use JCA for this, since this datasource simply delegates to one of two other standard (JCA) datasources.) I'm sure I don't need this object to be an MBean, but that seemed the simplest thing at the time. Is there a better way to do this?
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/606799#606799]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 2 months
[JBoss AS7 Development] - Running Seam 2 archives on Jboss 7
by Matt Drees
Matt Drees [http://community.jboss.org/people/matt.drees] created the discussion
"Running Seam 2 archives on Jboss 7"
To view the discussion, visit: http://community.jboss.org/message/608573#608573
--------------------------------------------------------------
Hi all,
My app is a Seam 2 war. I've found I can deploy it to AS7 successfully as an exploded directory, but not as a war archive. When I try to deploy as an archive, I get a stacktrace like this:
15:31:21,837 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ccp]] (MSC service thread 1-3) Exception sending context
initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.RuntimeException: Error handling file /content/ccp.war/WEB-INF/lib/jboss-seam-ui-2.2.2.Final.seam2jsf2.jar
at org.jboss.seam.deployment.URLScanner.handleArchiveByFile(URLScanner.java:134) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
at org.jboss.seam.deployment.URLScanner.handle(URLScanner.java:107) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
at org.jboss.seam.deployment.URLScanner.scanResources(URLScanner.java:90) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:119) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
at org.jboss.seam.init.Initialization.create(Initialization.java:130) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR1.jar:7.0.0.Beta4-SNAPSHOT]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3817) [jbossweb-7.0.0.CR1.jar:7.0.0.Beta4-SNAPSHOT]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method) [:1.6.0_24]
at java.util.zip.ZipFile.<init>(ZipFile.java:127) [:1.6.0_24]
at java.util.zip.ZipFile.<init>(ZipFile.java:144) [:1.6.0_24]
at org.jboss.seam.deployment.URLScanner.handleArchiveByFile(URLScanner.java:123) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
... 12 more
The stacktrace doesn't show it, but the URLScanner is trying to handle this URL:
vfs:/content/ccp.war/WEB-INF/lib/jboss-seam-ui-2.2.2.Final.seam2jsf2.jar/META-INF/components.xml
URLScanner is trying to treat this as if it's a file url, and of course ZipFile.open() can't find this file on the real filesystem.
I believe Jboss AS 5 and 6 had a http://anonsvn.jboss.org/repos/jbossas/projects/jboss-seam-int/tags/6.0.0... special Scanner implementation to enable Seam to read archive deployments.
Is a similar scanner planned for AS 7?
Thanks!
-Matt
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608573#608573]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months