[jBPM] - FIXME: I don't know how to use JBPM
by Davi Baldin
Davi Baldin [http://community.jboss.org/people/dbht] created the discussion
"FIXME: I don't know how to use JBPM"
To view the discussion, visit: http://community.jboss.org/message/569572#569572
--------------------------------------------------------------
Hi all,
I believe my problem is the same problem of people who is not using jBPM yet. I don't know how to use it.
Scenario:
1. On going web application development;
2. Knowledge of Hibernate, EJB, WEB 2.0, RESTEasy, jBoss 5.1;
3. Businees knowledge and expertise;
4. Hands-on experience installing JBPM.
Problem:
1. How can JBPM help me implementing a process engine into my application?
2. How to connect the application usabilitiy and interface with the JBPM powerfull engine?
3. How to mixing them?
I'm on the point of starting my own BP engine because of I could't figure out how I can bring things working toguether. I want to, for example, when the user saves an entity, triggers a "process chain" called REQUEST_SAVED. However, this "event" follows a process well defined by the jbpm editor. And if this process fails, the previous transaction (the entity change) is rolled back and the user get a notice about it. I'm also expecting that JBPM take care of events like that and take control of the application life cycle (like before/after calling the DB)
Also, I want to write (and of course, to delegate to being wrote) peaces of my business logic to external classes (like inside a particular context). Thus, I expect that the process designed loads these classes when appropriated and then, follow the process and the logic inside these classes. On my first impression using JBPM I get some class loading hell between the EAR (with my EJBs) and the JBoss's quartz service (when the precess was scheduled) and the JPBM context (war and service). The major issue was "class cannot be cast" during EAR redeploying, which forced me to restart the entire application server every application redeploy.
So, I guess the powerfull tool is here, but I'm unable to used it!
Can I (and my system) be saved?
Cheers,
Davi
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/569572#569572]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - how to deploy jBPM console along with existing application
by Ladislav Gazo
Ladislav Gazo [http://community.jboss.org/people/lgazo] created the discussion
"how to deploy jBPM console along with existing application"
To view the discussion, visit: http://community.jboss.org/message/569510#569510
--------------------------------------------------------------
Hello,
I have a question regarding deploying jbpm-console with my application. Let's suppose there is myapp.war that contains and runs process engine. I would like to deploy the console as new application able to access my process engine in different application context.
Based on the documentation http://community.jboss.org/docs/DOC-13839 http://community.jboss.org/wiki/BPMConsoleReference#Integration_with_the_... I:
* deployed gwt-console.war and gwt-console-server.war as separate application contexts,
* configured jbpm.cfg.xml (in my application) to contact through correct port (Tomcat runs on 8888 port)* <string name="jbpm.console.server.host" value="localhost" />
* <string name="jbpm.console.server.port" value="8888" />
* and also put gwt-console-rpc.jar and gwt-console-server-integration.jar into my application's WEB-INF/lib.
The problem is that after server startup it tries and accessing console I get exception where it says it tries to locate jbpm.cfg.xml which cannot be found:
SEVERE: Servlet.service() for servlet Resteasy threw exception
org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalStateException: Failed to load org.jboss.bpm.console.server.plugin.FormDispatcherPlugin: org.jbpm.integration.console.forms.FormDispatcherComposite
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: Failed to load org.jboss.bpm.console.server.plugin.FormDispatcherPlugin: org.jbpm.integration.console.forms.FormDispatcherComposite
at org.jboss.bpm.console.server.util.ServiceLoader.loadFromServices(ServiceLoader.java:94)
at org.jboss.bpm.console.server.util.ServiceLoader.loadService(ServiceLoader.java:56)
at org.jboss.bpm.console.server.plugin.PluginMgr.load(PluginMgr.java:54)
at org.jboss.bpm.console.server.InfoFacade.getServerStatus(InfoFacade.java:83)
at org.jboss.bpm.console.server.InfoFacade.getServerInfo(InfoFacade.java:72)
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.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
... 21 more
Caused by: org.jbpm.api.JbpmException: resource jbpm.cfg.xml does not exist
at org.jbpm.pvm.internal.stream.ResourceStreamInput.openStream(ResourceStreamInput.java:60)
at org.jbpm.pvm.internal.xml.Parse.getInputSource(Parse.java:146)
at org.jbpm.pvm.internal.xml.Parser.buildDocument(Parser.java:453)
at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:425)
at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.parse(ConfigurationImpl.java:137)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:116)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:50)
at org.jbpm.api.Configuration.setResource(Configuration.java:79)
at org.jbpm.api.Configuration.getProcessEngine(Configuration.java:126)
at org.jbpm.integration.console.forms.AbstractFormDispatcher.initializeProcessEngine(AbstractFormDispatcher.java:71)
at org.jbpm.integration.console.forms.AbstractFormDispatcher.<init>(AbstractFormDispatcher.java:61)
at org.jbpm.integration.console.forms.TaskFormDispatcher.<init>(TaskFormDispatcher.java:49)
at org.jbpm.integration.console.forms.FormDispatcherComposite.<init>(FormDispatcherComposite.java:43)
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 java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.bpm.console.server.util.ServiceLoader.loadFromServices(ServiceLoader.java:89)
... 35 more
Can you help with configuring such scenario? Is it possible to deploy it like that or there is another way?
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/569510#569510]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[Beginner's Corner] - Java.util.logging.logger issue
by Karthick M
Karthick M [http://community.jboss.org/people/karthick_123] created the discussion
"Java.util.logging.logger issue"
To view the discussion, visit: http://community.jboss.org/message/569502#569502
--------------------------------------------------------------
Hi,
I am new to Jboss EAP. Currently we are in process of migrating application into Jboss EAP 5.1.0. While application trying to print log message using java.util.logging.Logger info() method, it is throwing NULL pointer exception.
Please help me to resolve this issue:
Sample code from app:
import java.util.logging.Logger;
public class sampleServlet
{
Logger debug = Logger.getAnonymousLogger();
debug.info("----------- start web stats ------------");
}
Error message:
16:58:32,188 ERROR [[SSNValidationServlet]] Servlet.service() for servlet SSNValidationServlet threw exception
java.lang.NullPointerException
at org.apache.log4j.CategoryKey.<init>(CategoryKey.java:31)
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:261)
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:242)
at org.apache.log4j.LogManager.getLogger(LogManager.java:188)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.jboss.logbridge.LogBridgeHandler.publish(LogBridgeHandler.java:71)
at java.util.logging.Logger.log(Logger.java:458)
at java.util.logging.Logger.doLog(Logger.java:480)
at java.util.logging.Logger.log(Logger.java:503)
at java.util.logging.Logger.info(Logger.java:1022)
at com.putnaminv.corpapps.ElinkingApp.SSNValidationServlet.doPost(SSNValidationServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
at java.lang.Thread.run(Thread.java:619)
16:59:59,314 INFO [ServerImpl] Runtime shutdown hook called, forceHalt: true
16:59:59,314 INFO [Http11Protocol] Pausing Coyote HTTP/1.1 on http-127.0.0.1-8080
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/569502#569502]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[Beginner's Corner] - FORM-based declarative authentication against MySQL JDBCRealm
by RS Prasad
RS Prasad [http://community.jboss.org/people/rsprasad] modified the document:
"FORM-based declarative authentication against MySQL JDBCRealm"
To view the document, visit: http://community.jboss.org/docs/DOC-16020
--------------------------------------------------------------
This article is about FORM-Based authentication for jboss for securing admin related pages.
The attached web application uses declarative authentication against mysql security realm.
Add following *security-constraint* section to *web.xml*:
<security-constraint>
<display-name>require valid user</display-name>
<web-resource-collection>
<web-resource-name>internal application</web-resource-name>
<!-- secure only admin pages-->
<url-pattern>/admin/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<!--Admin pages secured only for admin-->
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
Add following *login-config* section to *web.xml*:
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginInvalid.jsp</form-error-page>
</form-login-config>
</login-config>
Find and replace following realm config section in <JBOSS_HOME>\server\default\deploy\jbossweb.sar\*server.xml*:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/jaasrealm"
connectionName="root"
connectionPassword=""
userTable="users"
userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles"
roleNameCol="role_name" />
>From the above, realm requires DB Class name, DB Driver class, DB URL,
DB name, DB username, DB password and
userTable is users,
userNameCol is user_name,
userRoleTable is user_roles,
userCredCol is user_pass and
roleNameCol is role_name
Setting up security realm:
Have mysql running.
mysql> create database jaasrealm;
mysql> use jaasrealm;
mysql> create table users (
user_name varchar(15) not null primary key,
user_pass varchar(15) not null
);
mysql> create table user_roles (
user_name varchar(15) not null,
role_name varchar(15) not null,
primary key (user_name, role_name)
);
mysql> insert into users values('hari','good');
mysql> insert into users values('hara','better');
mysql> insert into user_roles values('hari','usergroup');
mysql> insert into user_roles values('hara','admin');
In case more roles to be added to same user, hara keep adding more user_role records to hara:
mysql> insert into user_roles values('hara','editor');
mysql> insert into user_roles values('hara','publisher');
Ensure mysql driver in JBoss classpath, browser setting for cookies and modify JBossIPAddress in links in JSPs.
Deploy the application after extracting it to JBOSS_HOME/server/default/deploy/.
Reach the application at URL: http://%3cjbossipaddress%3e:8080/auth/index.jsp http://<JBossIPAddress>:8080/auth/index.jsp
The first two links are to user pages that require no authentication.
The last two links are to admin pages which require authentication.
Clicking on admin links will cause login.jsp to be displayed as configured by login-config section of web.xml.
The pages are authenticated by j_security_check with textboxes for j_username and j_password.
A j_security_check servlet reserved by JBoss for authentication handles the request and the security-constraints associated with it.
On successful authentication, the secured admin page will be displayed.
On unsuccessful authentication, loginInvalid.jsp as configured by login-config section of web.xml will be displayed.
Thanks
Saravana Prasad
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16020]
Create a new document in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
14 years, 2 months