[JBoss jBPM] - Deploying jbpm-enterprise.ear from jbpm-jpdl-suite-3.2.Beta1
by crussell42
Rather than using the "out of the box" jboss as delivered with jbpm 3.2.Beta1, I would like to deploy the ear delivered in the deploy directory to my jboss as with ejb3 and messaging enabled.
Has anyone had any experience with this?
I have had limited success and ultimately the jbpm-console seems to work but never actually logs me in just tells me the login failed.
Documentation on this subject seems very limited and fragmented.
The only hint I get when deploying the ear is that there may be some compatibility issue with JSF packaged with the jbpm-console and the default jboss as's.
Log Hint
13:00:14,334 ERROR [STDERR] Jan 17, 2007 1:00:14 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b09-FCS) for context 'null'
13:00:14,650 ERROR [STDERR] Jan 17, 2007 1:00:14 PM com.sun.faces.spi.InjectionProviderFactory createInstance
WARNING: JSF1033: Resource injection is DISABLED.
Otherwise everything seems to load fine.
Below are my notes on how to do this so far but am at an impasse and could really use some help. If I get all the steps put together correctly I would gladly contribute them "unless it turns out that I have been a total boob".
DEPLOYING JBPM TO AN EXISTING JBOSS SERVER
==========================================
Philosophy. I know that the starter kit includes a preconfigured jboss but that is not good enough.
We have to be able to deploy jbpm, drools, and jboss messaging for production servers (hell for development too).
The download site for jbpm has a "suite" 3.2.beta1 that it seems to be touting as the next great thing so
I have used a combination of the starter kit and the suite to come to all the following conclusions.
Downloaded jbpm-jpdl-suite-3.2.Beta1.zip
unzip it. (call this unzipped dir $suite)
Under there there is a deploy directory that contains the jbpm ear we want to deploy.
$suite/deploy/jbpm-enterprise.ear
In there there is a jbpm-enterprise.ear which contains (in theory) a complete deployable ear
that includes jbpm, jbpm-identity, jbpm-console.
On deploying this beast however I ran into many issues.
There does not seem to be any good documentation on how to actually deploy this but here is what I learned from
watching the jboss logs.
I think I am close to getting this to work but the console app just wont let me log in.
JBPM REQUIRED MESSAGE QUEUE (JBOSS CONFIG CHANGE)
=================================================
1. When deployed logs showed need for a message queue. So I just added one identical to the one added for
the appentity.
/usr/local/jboss/server/messaging/deploy/jboss-messaging.sar/destinations-service.xml
<!--I ADDED THIS-->
<mbean code="org.jboss.jms.server.destination.Queue"
name="jboss.messaging.destination:service=Queue,name=JbpmCommandQueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
This cleared up that error.
Note that I had to create a queue named JbpmCommandQueue first.
Then I was able to go to http://localhost:8080/jbpm-console/
and the web service seemed to start ok. took me to a login screen.
I'm sure that within the ear we could put a jbpm-service.xml file with this queue definition
but I knew it would work editing the default jboss one so I did that.
JBPM SECURITY DOMAIN (JBOSS CONFIG CHANGE)
==========================================
Now when I deploy I start seeing in the jboss log.
ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
After a lot of googleing I found a few hints here:
Describes the error with users.properties
http://www.magnolia.info/wiki/Wiki.jsp?page=MagnoliaJBossAndJAAS
ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
WHAT THIS TOLD ME was that the security domain that jbpm-console and jbpm-identity module uses
was not correct.
If you look at expand/jbpm-console-war/WEB-INF/jboss-web.xml it looks like this:
---------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>java:/jaas/other</security-domain>
</jboss-web>
---------------------------------------------
So the jbpm-console is using the security domain other.
Therefore we need for the security domain other config to look like that sent in the
preconfigured jbpm starter kit server so I copied the following from the
starter kit/server/jbpm/conf/login-config.xml
Forced me to edit /usr/local/jboss/server/messaging/conf/login-config.xml
Changed the definition of the application-policy "other" to match that found
int the jbpm configured server.
<application-policy name = "other">
<!-- A simple server login module, which can be used when the number
of users is relatively small. It uses two properties files:
users.properties, which holds users (key) and their password (value).
roles.properties, which holds users (key) and a comma-separated list of
their roles (value).
The unauthenticatedIdentity property defines the name of the principal
that will be used when a null username and password are presented as is
the case for an unuathenticated web client or MDB. If you want to
allow such users to be authenticated add the property, e.g.,
unauthenticatedIdentity="nobody"
-->
<!-- RUSSELL added this to match the jbpm server config given. Changed JbpmDS to DefaultDS so we can see stuff.-->
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="dsJndiName">java:/DefaultDS</module-option>
<module-option name="principalsQuery">
SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
</module-option>
<module-option name="rolesQuery">
SELECT g.NAME_ ,'Roles'
FROM JBPM_ID_USER u,
JBPM_ID_MEMBERSHIP m,
JBPM_ID_GROUP g
WHERE g.TYPE_='security-role'
AND m.GROUP_ = g.ID_
AND m.USER_ = u.ID_
AND u.NAME_=?
</module-option>
</login-module>
</application-policy>
<!-- RUSSELL remove for now.
<login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required" />
</application-policy>
-->
This would seem to make sense and wa la, when we deploy now we dont see the
error about user.properties as before.
Which leads us to the other bofongoo. Particularly the initial creation of all the jbpm tables
including the identity tables. Please see CREATING JBPM AND IDENTITY TABLES.
MAKE JBPM USE OUR STAND ALONE HSQLDB INSTEAD OF inmemory. (JBPM EAR CONFIG CHANGE)
===================================================================================
copy the jbpm-enterprise.ear to this directory.
ant expand
edit expand/lib/jbpm-configs-jar/hibernate.cfg.xml
<!-- RUSSELL DID THIS -->
<!--property name="hibernate.connection.datasource">java:/JbpmDS</property-->
java:/DefaultDS
<!-- DataSource properties (end) -->
<!-- RUSSELL UNCOMMENTED THIS logging properties (begin) === -->
true
true
true
<!-- ==== logging properties (end) -->
(Ultimately I hope we are just telling jbpm to use the DefaultDS here)
ant build
sudo ant deploy.
CREATING JBPM AND INDETITY TABLES IN OUR STAND ALONE HSQLDB
===========================================================
copied $dir/db/jbpm.jpdl.hsqldb.sql to /home/hsqldb
Then as hsqldb run the java -cp lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing
And connected to Server mode localhost:1701 (Jboss's instance).
Then load and execute the script to get the schema loaded into jboss for jbpm.
All the tables are named JBPM_*.
Note I had to remove all the ALTER commands in the begining of the script since none of the tables initially exist.
Now I dont think the identity component schema is added though.
However, this script does not seem to include the identity tables.
So I mutated a copy of $starter-kit/jbpm-db/hsqldb/upgrade.scripts/hsqldb.create.jbpm.3.1.sql which does
create them.
However, the identity component loaded with jbpm-enterprise.ear seems to be defaulting to
text file based stuff.
SO IN THE END I HAVE CREATED SOME SQL SCRIPTS THAT CAN BE RUN FROM
SQUIRRELL because it would seem that the $suite does not include creates for identity and note
also that you need to config squirrell session properties to not abort on error.
# Create or remove the core jbpm tables, indexes, and constraints
# these were extracted from the ~/jbpm-jpdl-3.2.Beta1/db/jbpm.jpdl.hsqldb.sql
create-jbpm.sql
remove-jbpm.sql
# Create or remove the identity jbpm tables, indexes, and constraints
# This sql extracted from jbpm-starters-kit/jbpm-db/hsqldb/upgrade.scripts/hsqldb.create.jbpm.3.1.sql
create-identity.sql
remove-identity.sql
# Create the sample users for the jbpm-console app (bert, ernie, etc).
identity-users.sql
Chapter 8 of the users guide on DB crap says
Making the default webapp talk to the correct datasource is again not very difficult. The first step in doing this is simply locate the 'jboss-service.xml' file in the folder '${JBPM_SDK_HOME}/jbpm-server/server/jbpm/deploy/jbpm.sar/META-INF'. Change the contents of this file with the contents of the listing below. An attentive reader will notice that the only difference is an exchange of the token 'DefaultDS' by 'JbpmDS'.
<?xml version="1.0" encoding="UTF-8"?>
java:/jbpm/JbpmConfiguration
jboss.jca:service=DataSourceBinding,name=DefaultDS
But hey, in the jbpm-enterprise.ear there does not seem to be such a beast. Not sure how to force this
or if they associate a jndi name with. However since we changed the jbpm-configs jar to use DefaultDS as above,
I assume we are ok there.
I can post the sql scripts if that helps but I'm just not seeing any access to sql as though trying to log in is failing before any queries are issued.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003457#4003457
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003457
19 years, 3 months
[JBoss Messaging] - Messaging 1.0.1SP2 problems
by alfred.rsa
Hi
I have installed messaging 1.0.1 SP2 on JBoss 4.0.5GA. And I keep getting the following exception:
20:14:23,921 ERROR [ServerThread] failed to process invocation.
java.io.IOException: Can not read data for version 6. Supported versions: 1,2
at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:426)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:478)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:631)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:293)
I have read somewhere that SP2's installer does not copy the right jboss-remoting.jar in the lib folder but I have tried replacing that manually and that still does not work. Does anyone have any ideas?
I also see on JIRA that SP3 is finished. When will this be available?
Regards
Alfred Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003455#4003455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003455
19 years, 3 months
[Installation, Configuration & Deployment] - JBOSS Installation Problems
by system
Hi,
I'm trying to install JBOSS and it seems go out well, because of I write //localhost:8080 and the JOBoss page appears.....
But during the installation procedure, visualized on the screen, a lot of errors appear concerning the "deployment" of the services contained into /server/default/deploy/ directory (that I don't touch). And when I try to click on some links like "JMX Console", I received the error page:
HTTP Status 500 -
Exception: org.apache.jasper.JasperException: Unable to compile class for JSP
Then, I watched on the screan at installation time and I notice that at first time, it seems the directories, like "jboss-aop.deployer", "jboss-bean.deployer", etc..., are deployed well, but then it seems the deployment of the same directories starts again.....with the message:
"ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/jboss_home/server/default/deploy/jboss-aop.deployer/
org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.aop:service=AspectManager
And the same thing hppens with "/jboss-bean.deployer/", "/http-invoker.sar/", "/jbossweb-tomcat55.sar/".....and all directories into server/default/deploy/.
Really sorry, I hope I made myself clear about the problems.....but I'm novice about JBoss and I'm not able to understand what's happenig.....
Is there anybody who colud give me some advice?
Thanks to everyone...
Dona.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003440#4003440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003440
19 years, 3 months
[JBoss Seam] - Conversation in request parameter
by andrew.rw.robinson
I just started having issues with the conversation IDs with AjaxAnywhere:
Below is in the format of: Action (AJAX state, Conversation action, conversation ID)
1) create new report (AJAX, Begin/join, #22)
2) Next page (AJAX-redirect, same, #22)
3) Add new item (AJAX, Begin/nested, #25)
4) Finish item (AJAX, End, #22)
5) Add new item (AJAX, Begin/nested, #26)
6) Finish item (AJAX, End, #26)
7) Finish editing report (AJAX, no conversation #26 found !)
It always happens the 2nd time (never the first). If I take a look at the HTML code after step #6, the conversation ID stored in the hidden input element is that of the nested one that just ended instead of the outside conversation that is the one that is currently active.
Therefore, on step #7, the conversation ID is that of one that has been ended, and I loose my original conversation (in my example, #22).
On the page that is re-rendered after step 6, there is a link that has:
<f:param name="conversationId" value="#{conversation.id}"/>
This renders the wrong conversation ID (in this case 26 instead of 22). If I delete this parameter everything works fine. Any ideas on why the #{conversation.id} is picking up the nested conversation that just ended instead of the outer/current conversation that is active?
-Andrew
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003423#4003423
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003423
19 years, 3 months