[JBoss AS7 Development] - Hacking on AS7
by David Lloyd
David Lloyd [http://community.jboss.org/people/david.lloyd%40jboss.com] modified the document:
"Hacking on AS7"
To view the document, visit: http://community.jboss.org/docs/DOC-15596
--------------------------------------------------------------
h4. 1. Create a github account
http://github.com http://github.com
h4. 2. Fork jboss-as into your account
http://github.com/jbossas/jboss-as http://github.com/jbossas/jboss-as
h4. 3. Clone your newly forked copy onto your local workspace
$ git clone git@github.com:[your user]/jboss-as.git
Initialized empty Git repository in /devel/jboss-as/.git/
remote: Counting objects: 2444, done.
remote: Compressing objects: 100% (705/705), done.
remote: Total 2444 (delta 938), reused 2444 (delta 938)
Receiving objects: 100% (2444/2444), 1.71 MiB | 205 KiB/s, done.
Resolving deltas: 100% (938/938), done.
$ cd jboss-as
h4. 4. Add a remote ref to upstream, for pulling future updates
git remote add upstream git://github.com/jbossas/jboss-as.git
h4. 5. Use maven (make sure you use maven 3)
$ mvn install
.....
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] JBoss Application Server: BOM ..................... SUCCESS [1.834s]
[INFO] JBoss Application Server: Parent Aggregator ....... SUCCESS [0.022s]
[INFO] JBoss Application Server: Domain Core ............. SUCCESS [3.051s]
[INFO] JBoss Application Server: Server Manager .......... SUCCESS [0.204s]
[INFO] JBoss Application Server: Server .................. SUCCESS [0.283s]
[INFO] JBoss Application Server: Domain Controller ....... SUCCESS [0.084s]
[INFO] JBoss Application Server: Process Manager ......... SUCCESS [0.314s]
[INFO] JBoss Application Server: Remoting ................ SUCCESS [0.390s]
[INFO] JBoss Application Server: Build ................... SUCCESS [5.696s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
h4. 6. Pulling later updates from upstream
$ git pull upstream master
>From git://github.com/jbossas/jboss-as
* 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%)
h4. 7. Pushing pulled updates or local commits 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]/jboss-as.git
3382570..1fa25df master -> master
h4. 8. Discuss your planned changes (if you want feedback)
* On the forums - http://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/jboss-as7 or https://webchat.freenode.net/?channels=jboss-as7 (http://webchat.freenode.net/?channels=jboss-as7)
h4. 9. Make sure there is a JIRA somewhere for the enhancement/fix
http://jira.jboss.org http://jira.jboss.org
h4. 10. Make the changes and commit one or more times (Don't forget to push)
git commit -m 'JBAS-XXXX Frunubucate the Fromungulator'
git commit -m 'JBAS-YYYY Tripple Performance of Fromungulation'
git push
h4. 11. 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 1. git pull upstream master
2. Email a pull request to mailto:jbossas-pull-requests@lists.jboss.org jbossas-pull-requests(a)lists.jboss.org (if I haven't subscribed the list, do it https://lists.jboss.org/mailman/listinfo/jbossas-pull-requests here) with a link to your repo, a description of the changes, and who reviewed (if any)
3. If you have other work going on, consider using a branch to isolate the pull changes from the other work (git branch mychange)
4. After review a maintainer will merge your patch, and reply
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.
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 bom/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 your submodule dependency to any AS modules that require it, but only with group/artifact.
5. Edit build/pom.xml and add the new submodule with only group/artifact.
6. Create a directory in build/src/modules corresponding to the submodule, with a version of "main", like this: "build/src/modules/org/jboss/as/new-subsystem/main".
7. Create a module.xml file inside the "main" directory. Use a module.xml from another subsystem as a template.
8. 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.
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-15596]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 8 months
[jBPM Development] - Help with Custom Business Calendar
by Richard Gu
Richard Gu [http://community.jboss.org/people/gujade] created the discussion
"Help with Custom Business Calendar"
To view the discussion, visit: http://community.jboss.org/message/561705#561705
--------------------------------------------------------------
Hi,
I need some help with getting custom business calendar to work in my application using jbpm 4.4.
I have implemented a custom business calendar as follows
public class MercedBusinessCalendarImpl extends BusinessCalendarImpl implements
BusinessCalendar
{
public MercedBusinessCalendarImpl()
{
super();
}
public class MyBusinessCalendarImpl extends BusinessCalendarImpl implements
BusinessCalendar
{
public MercedBusinessCalendarImpl()
{
super();
}
public Date add(Date date, String duration)
{
...
}
}
I have configured the custom business calendar in the jbpm.cfg.xml as directed by http://docs.jboss.com/jbpm/v4/devguide/html_single/#businesscalendar http://docs.jboss.com/jbpm/v4/devguide/html_single/#businesscalendar
<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration>
<import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<import resource="jbpm.tx.hibernate.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
<import resource="jbpm.bpmn.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
<!-- Job executor is excluded for running the example test cases. -->
<!-- To enable timers and messages in production use, this should be included. -->
<import resource="jbpm.jobexecutor.cfg.xml" />
<jbpm-context>
<service name='logging' factory='org.jbpm.logging.db.DbLoggingServiceFactory' />
</jbpm-context>
<process-engine-context>
<job-executor threads="4" idle="30000" idle-max="600000" lock="3600000" />
</process-engine-context>
<process-engine-context>
<object class="my.test.MyBusinessCalendarImpl" />
</process-engine-context>
</jbpm-configuration>
I tried to access the business calendar in my code
Configuration jbpmCfg = new Configuration();
ProcessEngine processEngine = jbpmCfg.buildProcessEngine();
BusinessCalendar bizCal = processEngine.get(BusinessCalendar.class);
System.out.println(bizCal.class);
And the result I get is org.jbpm.pvm.internal.cal.BusinessCalendarImpl instead of
my.test.MyBusinessCalendarImpl. I would expect the calendar getting back is an instance of MyBusinessCalendarImpl.
So I am wonder what I have done wrong? Or can someone help me with the correct way to get an instance of MyBusinessCalendarImpl working with the process engine.
Thanks in advance for your time and help!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561705#561705]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss AS7 Development] - < nic name=" eth1" >
by Kabir Khan
Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] created the discussion
"<nic name="eth1">"
To view the discussion, visit: http://community.jboss.org/message/561780#561780
--------------------------------------------------------------
I get problems starting up the current master (I'm on OS X):
11:53:35,758 ERROR [server] Service [service jboss.network.external] start failed: org.jboss.msc.service.StartException in service service jboss.network.external: failed to resolve interface for external, <unknown-TODO> line 80, column 36
at org.jboss.as.services.net.NetworkInterfaceService.start(NetworkInterfaceService.java:70)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1001)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]
at java.lang.Thread.run(Thread.java:637) [:1.6.0_20]
11:53:35,758 ERROR [server] Service [service jboss.network.external] start failed: org.jboss.msc.service.StartException in service service jboss.network.external: failed to resolve interface for external, <unknown-TODO> line 80, column 36
at org.jboss.as.services.net.NetworkInterfaceService.start(NetworkInterfaceService.java:70)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1001)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]
at java.lang.Thread.run(Thread.java:637) [:1.6.0_20]
This is due to the following in domain.xml:
<interface name="external">
<!--
Here we name the NIC; the IP address associated with NIC whose
byte representation has the lowest
-->
<nic name="eth1"/>
</interface>
If I change that to
<interface name="external">
<!--
Here we name the NIC; the IP address associated with NIC whose
byte representation has the lowest
-->
<!-- nic name="eth1"/ -->
<inet-address value="127.0.0.1"/>
</interface>
it starts fine. Not sure if I need to add a NIC alias or something like that (or how to do that if that is the case). This is my setup:
$ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:1e:c2:1c:42:41
media: autoselect
status: inactive
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:1e:c2:bc:4f:91
inet6 fe80::21e:c2ff:febc:4f91%en1 prefixlen 64 scopeid 0x5
inet 192.168.1.69 netmask 0xffffff00 broadcast 192.168.1.255
media: <unknown subtype>
status: active
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078
lladdr 00:1f:5b:ff:fe:28:9c:f2
media: autoselect <full-duplex>
status: inactive
vnic0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:1c:42:00:00:08
inet 10.211.55.2 netmask 0xffffff00 broadcast 10.211.55.255
media: autoselect
status: active
vnic1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:1c:42:00:00:09
inet 10.37.129.2 netmask 0xffffff00 broadcast 10.37.129.255
media: autoselect
status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
inet 10.36.7.86 --> 10.36.7.86 netmask 0xfffffc00
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561780#561780]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss Portal Development] - Deployment errors with JBOSS
by Cass Harris
Cass Harris [http://community.jboss.org/people/d0mufasa] created the discussion
"Deployment errors with JBOSS"
To view the discussion, visit: http://community.jboss.org/message/561645#561645
--------------------------------------------------------------
Hello all,
Attempting to deploy a *simple* Web application and get the following listed below.
What is the problem?
TIA
2010-09-13 12:22:36,382 DEBUG [org.jboss.system.ServiceCreator] (main) Removing mbean from server: jboss.web.deployment:war=/KDC1
2010-09-13 12:22:36,382 DEBUG [org.jboss.system.ServiceController] (main) destroying service: jboss.web.deployment:war=/KDC1
2010-09-13 12:22:36,382 DEBUG [org.jboss.system.ServiceController] (main) Ignoring destroy request for service: jboss.web.deployment:war=/KDC1 at state FAILED
2010-09-13 12:22:36,382 DEBUG [org.jboss.system.ServiceController] (main) removing service: jboss.web.deployment:war=/KDC1
2010-09-13 12:22:36,382 DEBUG [org.jboss.system.deployers.ServiceDeployer] (main) Error during deploy: jboss.web.deployment:war=/KDC1
org.jboss.deployers.spi.DeploymentException: URL file:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/tmp/5c4o125-dc6ic9-ge1lpfyt-1-ge1lqhak-9n/KDC1.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:333)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:206)
at $Proxy36.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:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
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:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
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:698)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Unknown Source)
2010-09-13 12:22:36,382 DEBUG [org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext] (main) Removed component jboss.web.deployment:war=/KDC1 from vfszip:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/deploy/KDC1.war/
2010-09-13 12:22:36,382 DEBUG [org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext] (main) Removed component jboss.jacc:id="vfszip:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/deploy/KDC1.war/",service=jacc from vfszip:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/deploy/KDC1.war/
2010-09-13 12:22:36,398 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfszip:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/deploy/KDC1.war/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: URL file:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/tmp/5c4o125-dc6ic9-ge1lpfyt-1-ge1lqhak-9n/KDC1.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:333)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:206)
at $Proxy36.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:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
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:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
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:698)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Unknown Source)
2010-09-13 12:22:36,461 DEBUG [org.jboss.classloader.spi.base.BaseClassLoaderDomain] (main) mailto:ClassLoaderDomain@f687a3{vfszip:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/deploy/KDC1.war/ ClassLoaderDomain@f687a3{vfszip:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/deploy/KDC1.war/} unregisterClassLoader mailto:BaseClassLoader@142f772{vfszip:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/deploy/KDC1.war/ BaseClassLoader@142f772{vfszip:/C:/DEVELOP/SOFTWARE/JBOSS_5_0_1_GA/INSTALL/openlogic-jboss-5.0.1.GA-all-bin-1/jboss-5.0.1.GA/server/default/deploy/KDC1.war/}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561645#561645]
Start a new discussion in JBoss Portal Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss Microcontainer Development] - AbstractStructureDeployer.getRelativePath fails to handle unrelated paths
by Flavia Rainone
Flavia Rainone [http://community.jboss.org/people/flavia.rainone%40jboss.com] created the discussion
"AbstractStructureDeployer.getRelativePath fails to handle unrelated paths"
To view the discussion, visit: http://community.jboss.org/message/561697#561697
--------------------------------------------------------------
For the weld-int https://community.jboss.org/message/561400 tests I've been working on, I ended up finding a problem involving the case where a classpath entry in the manifest file generates a faulty classpath entry in the deployment context.
In the test I'm performing, I deploy a file named weld-translator.jar that lacks a class. The class needed for the deployment to be successful is in weld-translator-lib.jar, located in $JBOSS_HOME/server/all (or anywhere you name in the filesystem, except in the deploy dir). This jar is referenced by a relative classpath entry in the weld-translator.jar manifest file.
The problem is noticed when WeldFilesDeployer checks on whether the file weld-translator-lib.jar/META-INF/beans.xml exists. The exists method returns false when it should return true.
What I discovered is that:
1. VFSUtils.addManifestLocations transforms the relative Classpath entry found in the manifest file (../weld-translator-lib.jar) into an absolute path ($JBOSS_HOME/server/all/weld-translator-lib.jar)
2. AbstractStructureDeployer.getRelativePath was supposed to revert it to a relative path, but fails to do so, instead, it returns the absolute path $JBOSS_HOME/server/all/weld-translator/lib.jar
3. VFSStructureBuilder assumes that the path is relative, and, for that reason, it assembles the following classpath with the goal of getting the absolute classpath: $JBOSS_HOME/server/all/deploy/weld-translator.jar/$JBOSS_HOME/server/all/weld-translator-lib.jar
4. WeldFilesDeployers uses the path generated in the step above to append the suffix META-INF/beans.xml. That's why it fails to find it.
I created a https://jira.jboss.org/browse/JBDEPLOY-265 Jira to fix AbstractStructureDeployer.getRelativePath, and I wrote a fix for it as well.
// Assuming that child and parent don't have a parent -> child relationship
// but instead, have a common path with different suffixes
VirtualFile tempFile = parent;
StringBuilder relativePath = new StringBuilder();
// find the prefix that child shares with parent (in tempFile)
while(!childPath.startsWith(tempFile.getPathName()))
{
relativePath.append("/.."); // for every level we need to go up in the file system
tempFile = tempFile.getParent();
}
relativePath.append(childPath.substring(tempFile.getPathName().length()));
childPath = relativePath.toString().substring(1);
Ales, can you please let me know if everything is ok? I couldn't find tests for getRelativePath... should I write one for JBDEPLOY-265? Where should that test be added to?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561697#561697]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months