-
1. Re: PrefixDeploymentSorter in Jboss 5
fredmaster Apr 7, 2008 8:37 PM (in response to fatbatman)
Somebody can reply this post ?
Tanks,
Fred -
2. Re: PrefixDeploymentSorter in Jboss 5
dastraub Apr 12, 2010 8:57 AM (in response to fredmaster)The PrefixDeploymentSorter pops up again in JBoss 6 (https://jira.jboss.org/jira/browse/JBAS-7614).
I used this cass with JBoss 5 (added to lib/jboss-system.jar and modified conf/bootstrap/deployers.xml).
-
3. Re: PrefixDeploymentSorter in Jboss 5
mikefinkenzeller Apr 14, 2010 12:01 PM (in response to dastraub)What exactly did you change in the deployers.xml file? I copied the class into the jboss-system.jar file and change the class in the deployers.xml file but am getting a NullPointerException on deployment.
-
4. Re: PrefixDeploymentSorter in Jboss 5
jaikiran Apr 15, 2010 4:35 AM (in response to mikefinkenzeller)I guess, he changed this:
<!-- use legacy ordering --> <bean name="topContextComparator"> <constructor factoryClass="org.jboss.system.deployers.LegacyDeploymentContextComparator" factoryMethod="getInstance"/> </bean>
to
<!-- use legacy ordering --> <bean name="topContextComparator"> <constructor factoryClass="org.jboss.system.deployers.LegacyPrefixDeploymentContextComparator" factoryMethod="getInstance"/> </bean>
-
5. Re: PrefixDeploymentSorter in Jboss 5
dastraub Apr 15, 2010 5:22 AM (in response to mikefinkenzeller)Yes, that's my change. I don't get an NPE with this change, but I tested only a little deployment which I use in a class.
-
6. Re: PrefixDeploymentSorter in Jboss 5
dastraub Apr 17, 2010 3:15 PM (in response to mikefinkenzeller)Now I get the same NPE if I deploy an EAR with some JAR's. I described this also in the https://jira.jboss.org/jira/browse/JBAS-7614.
If we change the bootstrap/deployers.xml in this way, the singelton instance of the LegacyDeploymentContextComparator doesn't exist (
who is used inside of a EAR).
In this case the AbstractStructureBuilder creates an new instance for the current deployment, but this instance of LegacyDeploymentContextComparator isn't initialized. This wil happen only during an lifecycle-callback ("create").
To fix this, I added also the LegacyDeploymentContextComparator in the bootstrap/deployers.xml :
<!-- use legacy ordering -->
<bean name="topContextComparator">
<constructor factoryClass="org.jboss.system.deployers.LegacyPrefixDeploymentContextComparator" factoryMethod="getInstance"/>
</bean><bean name="otherContextComparator">
<constructor factoryClass="org.jboss.system.deployers.LegacyDeploymentContextComparator" factoryMethod="getInstance"/>
</bean>in this case the singelton of the LegacyDeploymentContextComparator is created and used by nested deployments.
-
7. Re: PrefixDeploymentSorter in Jboss 5
mikefinkenzeller Apr 19, 2010 2:35 PM (in response to dastraub)Thanks for getting back to me on this. I will give that a try.
-
8. Re: PrefixDeploymentSorter in Jboss 5
m.wigge May 27, 2010 5:07 AM (in response to mikefinkenzeller)I compiled a LegacyPrefixDeploymentContextComparator.class and put it into jboss-system.jar. After I've updated my deployers.xml I got this Exception:
2010-05-26 12:35:08,427 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Failed to load profile:
java.lang.IllegalStateException: Deployers are shutdown
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkShutdown(DeployersImpl.java:187)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:778)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
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(Thread.java:619)Any ideas?
Could anyone upload a working jboss-system.jar (with LegacyPrefixDeploymentContextComparator) to check if i made a misstake?
Thanks in advance
EDIT:
Found a misstake in my deployers.xml
It seems to work!