[jBPM Development] - jbpm-5.4.0.Final-installer-full - Sample application throwing error
by Anand Parthasarathy
Anand Parthasarathy [https://community.jboss.org/people/panand131] created the discussion
"jbpm-5.4.0.Final-installer-full - Sample application throwing error"
To view the discussion, visit: https://community.jboss.org/message/790908#790908
--------------------------------------------------------------
Hi,
Im getting the following error on starting the sample jBPM application which comes along wth the installer.
0 13/01 13:35:02,359[main] ERROR service.hornetq.HornetQTaskClientConnector.connect - Unable to connect to server using configuration org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5153&host=127-0-0-1
org.jbpm.workflow.instance.WorkflowRuntimeException: [com.sample.evaluation:1 - Self Evaluation:2] -- Could not connect task client: on ip: 127.0.0.1 - port: 5153
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:132)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:140)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1098)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320)
at com.sample.ProcessTest.main(ProcessTest.java:31)
Caused by: java.lang.IllegalArgumentException: Could not connect task client: on ip: 127.0.0.1 - port: 5153
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.connect(GenericHTWorkItemHandler.java:158)
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:180)
at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
... 13 more
13 Jan, 2013 1:35:42 PM org.hornetq.core.logging.impl.JULLogDelegate warn
WARNING: I'm closing a core ServerLocator you left open. Please make sure you close all ServerLocators explicitly before letting them go out of scope! 713167
13 Jan, 2013 1:35:42 PM org.hornetq.core.logging.impl.JULLogDelegate warn
WARNING: The ServerLocator you didn't close was created here:
java.lang.Exception
at org.hornetq.core.client.impl.ServerLocatorImpl.<init>(ServerLocatorImpl.java:387)
at org.hornetq.core.client.impl.ServerLocatorImpl.<init>(ServerLocatorImpl.java:484)
at org.hornetq.api.core.client.HornetQClient.createServerLocatorWithoutHA(HornetQClient.java:112)
at org.jbpm.task.service.hornetq.HornetQTaskClientConnector.connect(HornetQTaskClientConnector.java:95)
at org.jbpm.task.service.hornetq.HornetQTaskClientConnector.connect(HornetQTaskClientConnector.java:76)
at org.jbpm.task.service.TaskClient.connect(TaskClient.java:845)
at org.jbpm.task.service.SyncTaskServiceWrapper.connect(SyncTaskServiceWrapper.java:183)
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.connect(GenericHTWorkItemHandler.java:156)
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:180)
at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:140)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1098)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320)
at com.sample.ProcessTest.main(ProcessTest.java:31)
I have performed the foll. steps.
1. ant install.demo
2. ant start.demo
3. Run as Java application ProcessTest.java
On getting this error, I tan the foll. command as per instructions in another post
ant start.human.task
This gave the foll error in the console:
start.human.task:
[javac] C:\projects\jbpm\jbpm-5.4.0.Final-installer-full\jbpm-installer\build.xml:864: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to C:\projects\jbpm\jbpm-5.4.0.Final-installer-full\jbpm-installer\task-service\target
[copy] Copying 5 files to C:\projects\jbpm\jbpm-5.4.0.Final-installer-full\jbpm-installer\task-service\target
[java] 1 13/01 13:34:37,617[main] ERROR task.identity.DefaultUserGroupCallbackImpl.<init> - Error when loading group information for callback from location: file:null/roles.properties
[java] java.io.FileNotFoundException: null\roles.properties (The system cannot find the path specified)
[java] at java.io.FileInputStream.open(Native Method)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:106)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:66)
[java] at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
[java] at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
[java] at java.net.URL.openStream(URL.java:1009)
[java] at org.jbpm.task.identity.DefaultUserGroupCallbackImpl.<init>(DefaultUserGroupCallbackImpl.java:55)
[java] at org.jbpm.task.identity.DefaultUserGroupCallbackImpl.<init>(DefaultUserGroupCallbackImpl.java:40)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at java.lang.Class.newInstance0(Class.java:355)
[java] at java.lang.Class.newInstance(Class.java:308)
[java] at org.jbpm.task.identity.UserGroupCallbackManager.setCallbackFromProperties(UserGroupCallbackManager.java:69)
[java] at org.jbpm.DemoTaskService.main(Unknown Source)
[java] Task service registered usergroup callback ...
[java] Task service started correctly!
[java] Task service running ...
I reran ProcessTest.java and encountered the same error. Could I please get some help regarding this.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/790908#790908]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
10 years, 12 months
[JBoss AS 7 Development] - Undertow - IdentityManager
by Darran Lofthouse
Darran Lofthouse [https://community.jboss.org/people/dlofthouse] created the document:
"Undertow - IdentityManager"
To view the document, visit: https://community.jboss.org/docs/DOC-48628
--------------------------------------------------------------
h1. Undertow - Identity Manager
The purpose of this article is to describe the current IdentityManager interface used by Undertow and to become the base for discussions relating to additional capabilities required.
public interface IdentityManager {
/**
* Verify a previously authenticated account.
*
* Typical checks could be along the lines of verifying that the account is not now locked or that the password has not been
* reset since last verified, also this provides an opportunity for roles to be re-loaded if membership information has
* changed.
*
* @param account - The {@link Account} to verify.
* @return An updates {@link Account} if verification is successful, null otherwise.
*/
Account verify(final Account account);
// TODO Realm / Partitioning information could be specified.
/**
* Verify a supplied {@link Credential} against a requested ID.
*
* @param id - The requested ID for the account.
* @param credential - The {@link Credential} to verify.
* @return The {@link Account} for the user if verification was successful, null otherwise.
*/
Account verify(final String id, final Credential credential);
/**
* Perform verification when all we have is the Credential, in this case the IdentityManager is also responsible for mapping the Credential to an account.
*
* The most common scenario for this would be mapping an X509Certificate to the user it is associated with.
*
* @param credential
* @return
*/
Account verify(final Credential credential);
/**
* A temporary method for the Digest mechanism.
*
* @param id
* @return
*/
Account getAccount(final String id);
/**
* Return the password for an account. This is an optional method, as is only used for digest auth where the original
* password is needed to compute the digest.
*
* This is an optional method. It is recommended that passwords be stored in a hashed format, so for most identity managers
* it will not be possible nor desirable to implement this method.
*
* @param account the account
* @return The accounts password
*/
char[] getPassword(final Account account);
/**
* Return the pre-prepared hash for the account.
* @param account - The account the hash is required for.
* @return The pre-prepared MD5 hash.
*/
byte[] getHash(final Account account);
}
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-48628]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years
[jBPM Development] - Designer characteristics
by Andy McC
Andy McC [https://community.jboss.org/people/andymcc] created the discussion
"Designer characteristics"
To view the discussion, visit: https://community.jboss.org/message/810598#810598
--------------------------------------------------------------
[My config - jBPM 5.4.0.Final, Windows Server, 7 and 8. Eclipse Helios and Juno]
Where possible I'd like to use Designer in preference to the Eclipse editor but it has a number of features which I'm finding are "spoiling my enjoyment" :) and I wondered if they are likely to change in the next release.
Please be assured, these are not complaints and my aim is constructive. Here goes:
* On my Windows set-up, Script tasks may start life as multi-line text, but always seem to end up being collapsed onto a single line which is awkward to work with.* The Eclipse tools seem to maintain multiline editing but for some reason this isn't the case in Designer.
* Is this just a Windows/Unix file-ending issue? (related- https://community.jboss.org/thread/223637 Problem with designer "losing" newline characters in Script Tasks)
* I've not yet been able to import an existing BPMN process using the Designer Import BPMN feature. I can do so using the Eclipse-Drools-Guvnor toolchain but direct import fails, even for diagrams created for jBPM 5.3.* I can export a BPMN file created in Desinger and then reimport it back in, i.e. Designer is able understand it's own output.
* (related - https://community.jboss.org/thread/223567 Guvnor Designer Import BPMN error - "Could not find BPMNDI information")
* After a few minutes of use I get a "Local history cleared" pop-up and after that point it appears very frequently and often intrusively. Although I can disable local history, it resets to "on" whenever I save my diagram which I tend to do quite frequently. Again this may be a quirk of my set-up but it quickly gets in the way.
* On a more positive note, will we be able to define a template to be used by the automatic user task form generator? The current facility is very useful but it would be even better if I could include layouts specific to my project (company information, in-house styles etc.) My apologies if this feature already exists and I've just missed it!
I wondered if these are likely to be addressed in the next release. I'm happy to raise Jira items if that's preferable.
Best regards and thanks,
Andy McC
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810598#810598]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years
[jBPM Development] - JBPM Deployment in Jboss eap
by Marichamy Shanmugakkani
Marichamy Shanmugakkani [https://community.jboss.org/people/maris239] created the discussion
"JBPM Deployment in Jboss eap"
To view the discussion, visit: https://community.jboss.org/message/810461#810461
--------------------------------------------------------------
Hi Friends,
Could you please anyone help me to resolve the below issue/error? I am trying to deploy simple JBPM project into jboss-eap-5.1 server. Below are the stpes that i follwed.
1) Created Sample JBPM project and exported that project into jar file
2) Created Dynamic web project with sample Servlet and placed Sample JBPM jar into lib folder.
a) Created object for ProcessMain class in Servlet class
b) Calling the ProcessMain method to start the process.
3) Created a war file from the Dynamic web project and placed inside the Jboss RTRA instance
4) Placed required jars in Jboss ../jboss-eap-5.1.0\jboss-eap-5.1\jboss-as\server\RTRA\lib
4) Started the server once server starts servlet will be invoked and call the ProcessMain method to start the process but i am getting the below Error
2013/04/25_14:18.44.960 381091 ERROR [STDERR] (main:) java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.drools.compiler.BPMN2ProcessProvider'
2013/04/25_14:18.44.961 381092 ERROR [STDERR] (main:) at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:161)
2013/04/25_14:18.44.961 381092 ERROR [STDERR] (main:) at org.drools.compiler.BPMN2ProcessFactory.loadProvider(BPMN2ProcessFactory.java:29)
2013/04/25_14:18.44.961 381092 ERROR [STDERR] (main:) at org.drools.compiler.BPMN2ProcessFactory.getBPMN2ProcessProvider(BPMN2ProcessFactory.java:21)
2013/04/25_14:18.44.962 381093 ERROR [STDERR] (main:) at org.drools.compiler.BPMN2ProcessFactory.configurePackageBuilder(BPMN2ProcessFactory.java:12)
2013/04/25_14:18.44.962 381093 ERROR [STDERR] (main:) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:476)
2013/04/25_14:18.44.962 381093 ERROR [STDERR] (main:) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
2013/04/25_14:18.44.962 381093 ERROR [STDERR] (main:) at com.test.ProcessMain.readKnowledgeBase(ProcessMain.java:28)
2013/04/25_14:18.44.962 381093 ERROR [STDERR] (main:) at com.test.ProcessMain.processMain(ProcessMain.java:17)
2013/04/25_14:18.44.962 381093 ERROR [STDERR] (main:) at com.test.TestServlet.init(TestServlet.java:17)
2013/04/25_14:18.44.962 381093 ERROR [STDERR] (main:) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
2013/04/25_14:18.44.963 381094 ERROR [STDERR] (main:) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)
2013/04/25_14:18.44.963 381094 ERROR [STDERR] (main:) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)
2013/04/25_14:18.44.963 381094 ERROR [STDERR] (main:) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4417)
In windows, through eclipse i am able to run the program as stanalone, but in jboss its not working. Because in eclipse, i will be having the jbpm installer and from there i will refer the Runtime. Do i miss any setup/jars/plugins for running in Jboss?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810461#810461]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years
[JBoss AS 7 Development] - Hacking on WildFly
by Radoslav Husar
Radoslav Husar [https://community.jboss.org/people/rhusar] modified the document:
"Hacking on WildFly"
To view the document, visit: https://community.jboss.org/docs/DOC-48381
--------------------------------------------------------------
h4.
h4. 1. Create a github account
http://github.com http://github.com
h4. 2. Fork wildfly repository into your account
https://github.com/wildfly/wildfly https://github.com/wildfly/wildfly
h4. 3. Clone your newly forked copy onto your local workspace
$ git clone git@github.com:[your user]/wildfly.git
Cloning into 'wildfly'...
remote: Counting objects: 345847, done.
remote: Compressing objects: 100% (100585/100585), done.
remote: Total 345847 (delta 145130), reused 335339 (delta 136435)
Receiving objects: 100% (345847/345847), 66.59 MiB | 312 KiB/s, done.
Resolving deltas: 100% (145130/145130), done.
$ cd wildfly
h4. 4. Add a remote ref to upstream, for pulling future updates
git remote add upstream git://github.com/wildfly/wildfly.git
h4. 5. As a precaution, disable merge commits to your master
git config branch.master.mergeoptions --ff-only
h4. 6. Use maven (via build.sh or build.bat)
Building WildFly 8 requires Java 7 or newer, make sure you have JAVA_HOME set to point to the JDK7 installation. Build uses Maven 3.
$ ./build.sh
.....
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] WildFly: BOM ..................... SUCCESS [1.834s]
[INFO] WildFly: Parent Aggregator ....... SUCCESS [0.022s]
[INFO] WildFly: Domain Core ............. SUCCESS [3.051s]
[INFO] WildFly: Server Manager .......... SUCCESS [0.204s]
[INFO] WildFly: Server .................. SUCCESS [0.283s]
[INFO] WildFly: Domain Controller ....... SUCCESS [0.084s]
[INFO] WildFly: Process Manager ......... SUCCESS [0.314s]
[INFO] WildFly: Remoting ................ SUCCESS [0.390s]
[INFO] WildFly: Build ................... SUCCESS [5.696s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
h4. 7. Pulling later updates from upstream
$ git pull --rebase upstream master
>From git://github.com/wildfly/wildfly
* branch master -> FETCH_HEAD
Updating 3382570..1fa25df
Fast-forward
{parent => bom}/pom.xml | 70 ++++----------
build/pom.xml | 13 +--
domain/pom.xml | 10 ++
.../src/main/resources/examples/host-example.xml | 2 +-
.../resources/examples/jboss-domain-example.xml | 28 +++---
.../main/resources/schema/jboss-domain-common.xsd | 12 +--
.../main/resources/schema/jboss-domain-host.xsd | 2 +-
domain/src/main/resources/schema/jboss-domain.xsd | 17 ++--
pom.xml | 100 ++++++++++++++++++--
process-manager/pom.xml | 3 +-
10 files changed, 156 insertions(+), 101 deletions(-)
rename {parent => bom}/pom.xml (85%)
(--rebase will automatically move your local commits, if you have any, on top of the latest branch you pull from, you can leave it off if you do not).
Please note that --rebase is very important if you do have commits. What happens is that when git pull can't fast forward, it does a merge commit, and a merge commit puts the sucked in changes ON TOP of yours whereas a rebase puts them BELOW yours. In other words a merge commit makes the history a graph, and we prefer a cleaner, easier to follow linear history (hence the rebasing). Further once you do a merge commit it will be difficult to rebase the history before that commit (say you want to combine two commits to one later) as described in point 13+. Luckily the option set in step 5 will prevent this from happening.+
One way to not forget --rebase the rebase option is you may want to create an alias
$ git config --global alias.up "pull --rebase"
and then just use the new alias instead of pull
$ git up upstream master
One last option, which some prefer, is to avoid using pull altogether, and just use fetch + rebase (this is of course more typing)
For some reasons tags are not updated (e.g. not part of an active branch). Update the tags with
$ git fetch --tags upstream
h4. 8. Pushing pulled updates (or local commits if you aren't using topic branches) to your private github repo (origin)
$ git push
Counting objects: 192, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (44/44), done.
Writing objects: 100% (100/100), 10.67 KiB, done.
Total 100 (delta 47), reused 100 (delta 47)
To git@github.com:[your user]/wildfly.git
3382570..1fa25df master -> master
You might need to say -f to force the changes. Read the note on 12 though before you do it.
If you fetch the tags seperate you have to push the tags also
git push --tags
h4. 9. Discuss your planned changes (if you want feedback)
* On the forums - https://community.jboss.org/en/jbossas/dev/jboss_as7_development http://community.jboss.org/en/jbossas/dev/jboss_as7_development
* On IRC - irc://irc.freenode.org/wildfly or https://webchat.freenode.net/?channels=wildfly https://webchat.freenode.net/?channels=wildfly
h4. 10. Make sure there is a JIRA somewhere for the enhancement/fix
https://issues.jboss.org/browse/WFLY https://issues.jboss.org/browse/WFLY
h4. 11. Create a simple topic branch to isolate that work (just a recommendation)
git checkout -b my_cool_feature
h6. Note: See tips section for how to use a nice git prompt for tracking what branch you are in!
h4. 12. Make the changes and commit one or more times (Don't forget to push)
git commit -m 'WFLY-XXXX Frunubucate the Fromungulator'
git commit -m 'WFLY-YYYY Tripple Performance of Fromungulation'
git push origin my_cool_feature
+Note that git push references the branch you are pushing and defaults to master, *not your working branch*.+
h4. 13. Rebase your branch against the latest master (applies your patches on top of master)
git fetch upstream
git rebase -i upstream/master
# if you have conflicts fix them and rerun rebase
# The -f, forces the push, alters history, see note below
git push -f origin my_cool_feature
The -i triggers an interactive update which also allows you to combine commits, alter commit messages etc. It's a good idea to make the commit log very nice for external consumption. Note that this alters history, which while great for making a clean patch, is unfriendly to anyone who has forked your branch. Therefore you want to make sure that you either work in a branch that you don't share, or if you do share it, tell them you are about to revise the branch history (and thus, they will then need to rebase on top of your branch once you push it out).
h4. 14. Get your changes merged into upstream
1. Make sure your repo is in sync with other unrelated changes in upstream before requesting your changes be merged into upstream by repeating step 13.
2. Send a github pull request, by clicking the pull request link while in your repo's fork
3. An email will automatically be sent to the pull request list ( http://lists.jboss.org/pipermail/jbossas-pull-requests http://lists.jboss.org/pipermail/jbossas-pull-requests)
4. As part of the review you may see an automated test run comment on your request. Currently this link can only be viewed by Red Hat employees, but if you request a copy we can send you one. In the future we hope to make this public
5. After review a maintainer will merge your patch, update/resolve issues by request, and reply when complete
6. Don't forget to switch back to master and pull the updates1. git checkout master
git pull --ff-only upstream master
7. To update the master branch of your github repository (otherwise you will see a message like 'Your branch is ahead of 'origin/master' by XXX commits.'
if you are use 'git status' on your local master branch.1. git push origin master
h4. Appendix A. Adding a new external dependency
1. Edit pom.xml and add a property of the form "version.groupId.artifactId" which contains the Maven version of the dependency. Add your dependency to the <dependencyManagement> section, and use the property for the version. If your new dependency has any transitive dependencies, be sure to <exclude> them (or if possible, update the project so that all its dependencies are of *provided* scope).
2. Add your dependency to any AS modules that require it, but only with group/artifact.
3. Edit build/pom.xml and add your dependency with only group/artifact.
4. Create a directory in build/src/modules corresponding to the *module's* name (which will differ from the Maven group/artifact name; look at other modules to get a feel for the naming scheme), with a version of "main", like this: "build/src/modules/org/jboss/foo/main".
5. Create a module.xml file inside the "main" directory. Use a module.xml from another similar module as a template.
6. Edit build/build.xml and add a <module-def> element. The name listed in the <module-def> element corresponds to the *module* name. The group/artifact listed in the nested maven-resource element(s) refer to the *Maven* group/artifact name.
7. *Important:* Make sure you did not introduce any transitive dependencies by using "mvn dependency:tree". If you did, be sure to add <exclusion>s for each of them to your dependency as described above.
8. *Important:* Do *not* introduce a dependecy on the "*system*" module. If you need access to JDK classes which are not covered by any other dependency, use the "javax.api" module as a dependency.
Please be sure to preserve the alphabetical ordering of all POMs and the build.xml file.
h4. Appendix B. Adding a new AS submodule
1. Create the directory corresponding to the submodule and add it to the root pom.xml file. The convention is to leave off the "jboss-as-" portion, so "jboss-as-remoting" becomes "remoting".
2. Create a POM for your submodule (use another submodule as a template). Make sure all dependencies you specify do *not* include a version. The group ID should be "org.jboss.as", and the artifact ID should begin with "jboss-as-" and there should be a proper <name> for the new module.
3. Add the new submodule to the top section of the <dependencyManagement> of the top-level pom.xml. The version should be set to "${project.version}". This section is sorted alphabetically by artifact name so please preserve that ordering.
4. Add the new submodule to the modules section element of the top-level pom.xml
5. Add your submodule dependency to any AS modules that require it, but only with group/artifact.
6. Edit build/pom.xml and add the new submodule with only group/artifact.
7. Create a directory in build/src/main/resources/modules corresponding to the submodule, with a version of "main", like this: "build/src/main/resources/modules/org/jboss/as/new-subsystem/main".
8. Create a module.xml file inside the "main" directory. Use a module.xml from another subsystem as a template.
9. Edit build/build.xml and add a <module-def> element for the subsystem. Use the module name and Maven coordinates from steps 6 and 2 respectively. Use another submodule as a template.
Please be sure to preserve the alphabetical ordering of all POMs and the build.xml file.
h4. Appendix C. Profiling with JProfiler
Performance tuning is an important part of AS7 development. In order to use JProfiler on a standalone AS 7 instance, first you need to add the following to your standalone.conf file:
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=com.jprofiler -agentlib:jprofilerti -Xbootclasspath/a:/path/to/jprofiler/bin/agent.jar"
The "jboss.modules.system.pkgs" property tells JBoss Modules to allow the "com.profiler" classes to be found from any class loader, which is essential to allow the JProfiler agent to run.
It's easiest to then just set up your JProfiler session as "Remote", and start the server and the profiler in any order. That's it!
h4. Appendix D. Importing into Eclipse
The directory "ide-configs/eclipse" contains both formatter and code templates. Use these to pass the CheckStyle enforcer during the build if coding from Eclipse.
h4. Tips & Tricks!
h4. Creating a Git status prompt in your terminal
This makes it easy to not forget what branch you are working in and quickly tell if you have changes. The following will adjust the PS1 on unix (or cygwin on Windows). Note that it assumes a compiled version of git, which is also the case for the OSX packages. If you are using the bundled rpm version, change the completion path to "/etc/bash_completion.d/git"
GIT_COMPLETION_PATH="/usr/local/git/contrib/completion/git-completion.bash"
if [ -f "$GIT_COMPLETION_PATH" ]; then
GIT_PS1_SHOWDIRTYSTATE=true
. "$GIT_COMPLETION_PATH"
ADD_PS1='$(__git_ps1)'
fi
if [[ ${EUID} == 0 ]] ; then
PS1="\[\033[01;31m\]\h\[\033[01;34m\] \w\[\033[33m\]$ADD_PS1\[\033[34m\] \$\[\033[00m\] "
else
PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[33m\]$ADD_PS1\[\033[34m\] \$\[\033[00m\] "
fi
h4. Partial Builds
It's common when working on a particular module to need to build that module and the overall AS distribution numerous times. Doing a full AS build can be overly time consuming in this situation. The maven rf and pl options can be helpful in limiting the build to a subset of all the AS modules. See http://java.dzone.com/articles/5-maven-tips this quick introduction to both of these maven switches.
A fairly common thing is to work on a single subsystem, so you need that subsystem built, and to also have the full AS dist rebuilt so the new version of the subsystem's jar ends up in build/target. To do this, for example with the ejb3 subsystem, you would:
mvn install -pl ejb3,build
h4. IDE Integration
h5. Eclipse
Follow the steps mentioned here https://community.jboss.org/docs/DOC-16718 http://community.jboss.org/wiki/HackingAS7usingEclipse
h3.
h3. Checkstyle Errors
If you need to first verify that your changes pass the checkstyle audit, do this first.
mvn checkstyle:checkstyle
Then you can proceed with the build.
h3.
h3. Adding Subsystem Scripts
If you have a need to add a script to AS8, then definitely it should finally land inside bin/util directory. One important thing that you will need to have as part of your subsystem pom is the following plugin.
<!-- JAR -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>org.jboss.as.security.vault.VaultTool</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
Substitute your main class.
h3.
h3. How do I ensure that my code does not blow up the testsuite?
First try to run the tests as part of the build before sending a pull request.
$> ./build.sh clean install -DallTests
Sometime there are test failures that are not related to your code changes. Try to discuss this on the mailing list or IRC.
You can get a full run using
$> ./build.sh clean install -DallTests -fae
1. This additional option will allow the build to continue even when there are test failures. Doing this, you can get a stock of all the test failures and figure out how many are related to your code changes.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-48381]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years
Re: [jboss-dev-forums] [JBoss AS 7 Development] - Access control notes
by Brian Stansberry
Brian Stansberry [https://community.jboss.org/people/brian.stansberry] commented on the document
"Access control notes"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-48596#comment-11965
--------------------------------------------------
Now for the second question:
>
> Some questions are:
>
> 1) Do we want to support separate roles for application level security vs administrative security?
>
> 2) If we do, can support for this be deferred to a subsequent iteration of this feature?
>
> 3) If we do, what changes are required to the underlying AS to allow a meaningful separation of the roles?
>
If we want to have a god-like role, then any "split" can be deferred from this iteration. We add the god-like role for this first iteration, and then in a later iteration we add a new role with only application level security permissions. Possibly we could add a 3rd with only administrative security permissions, if that was a valid use case.
A twist on this is the "Auditor" role notion. An Auditor role is someone with read-only access to everything, but is the only person with access to the administrative audit resources. This approach ensures that a god-like administrator still has someone to watch over him/her.
I don't think having an Auditor role either now or in the future precludes having an otherwise god-like Administrator role in the first iteration.
--------------------------------------------------
11 years
Re: [jboss-dev-forums] [JBoss AS 7 Development] - Access control notes
by Brian Stansberry
Brian Stansberry [https://community.jboss.org/people/brian.stansberry] commented on the document
"Access control notes"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-48596#comment-11964
--------------------------------------------------
The fundamental difference between a couple of the role schemes we've looked at is how they deal with permissions for security privileged resources. Basically there are two variants:
1) An admininistrator role that effectively is root.
2) A split-responsibility setup, where there is an Administrator role that can deal with application level security, and an Admin Security Manager role that deals with administrative security.
The rationale for the split-responsibility setup is different parts of an organization deal may deal with application level security versus administrative security; e.g. the application teams will deal with the former while core IT will deal with the latter.
Some questions are:
1) Do we want to support separate roles for application level security vs administrative security?
2) If we do, can support for this be deferred to a subsequent iteration of this feature?
3) If we do, what changes are required to the underlying AS to allow a meaningful separation of the roles?
The first question is open for discussion. I'll address the second in a later post. This post is focused on the 3rd.
The way WildFly currently works, we cannot enforce a valid separation between application security management and core administrative security management. There are two basic issues:
1) Application-level security constructs (i.e. security domains in the security subsystem) leak into core administrative security via the ability to configure a core security-realm resource to delegate to a JAAS security domain configured in the subsystem.
2) Core security constructs leak into application security via a couple paths:
a) Ability to reference core security realms from security subsystem security domains.
b) Ability to reference a core security realm from a remoting subsystem connector.
(There's also a twist where a managed domain server can be configured to use a remoting subsystem endpoint for it's management connection back to its Host Controller. I need to untangle the implications of that.)
In a discussion with Darran and Heiko today, we discussed the following possible tasks for resolving these problems:
A) Remove the need for referencing security subsystem security domains from the core security realm by adding support to security realms for the configuration elements currently only available via security domains (login modules etc).
B) Remove the need for referencing core security realms from subsystem resources by adding the ability to configure security realms within the security subsystem.
This would allow a clean separation between administrative security and application security.
This direction would be contrary to a stated goal of doing everything in a security subsystem. However the intent would be the configuration elements would be consistent (with most code shared as well). Even with everything in a single security subsystem, if a clean separation of application security from administrative security is a valid long term requirement, the configuration of that single subsystem would have to have some construct to reflect that separation.
Following this approach does not allow us to require incompatible changes in this first iteration of the feature. So, an existing config with references between core security realms and subsystem resources will have to still be supported.
However, it is not required that we support configuring the new access control features with such a configuration. It is reasonable to require users who wish to enable access control to update their configs to use the new configuration options mentioned above. Enforcing this would lead to a 3rd task:
C) Detect cases where access control is configured but the config uses legacy model reference that blur the lines between administrative security and application security. Reject such configurations.
Thanks, Heiko, for driving the discussion that showed the need to clarify all this.
Thoughts, everyone?
--------------------------------------------------
11 years