[jboss-jira] [JBoss JIRA] (AS7-5172) cannot define service activator in WAR META-INF, must be in WAR WEB-INF/classes/META-INF
John Mazzitelli (JIRA)
jira-events at lists.jboss.org
Fri Jul 13 18:02:12 EDT 2012
[ https://issues.jboss.org/browse/AS7-5172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705992#comment-12705992 ]
John Mazzitelli commented on AS7-5172:
--------------------------------------
well, JIRA won't allow me to attach anything larger than 10MB and while this is a simple hello-world type app, its a GWT app that is 15MB big. I could strip out all the GWT stuff, but I think my description should be clear enough for the developer to know what I'm talking about and it should be easy enough to replicate. I'll attach my ServiceActivator class anyway - so you can see it.
> cannot define service activator in WAR META-INF, must be in WAR WEB-INF/classes/META-INF
> ----------------------------------------------------------------------------------------
>
> Key: AS7-5172
> URL: https://issues.jboss.org/browse/AS7-5172
> Project: Application Server 7
> Issue Type: Bug
> Affects Versions: 7.1.1.Final
> Reporter: John Mazzitelli
> Priority: Minor
> Attachments: ManagementService.java
>
>
> (note: I talked to dmlloyed on this in #jboss-as7 - he thinks its a bug, hence why I am filing this JIRA)
> I have a WAR. I want it to have a service activator in it (I want it to install an MSC service). So, in the WAR's META-INF directory, I create a "services/org.jboss.msc.service.ServiceActivator" file with the appropriate content.
> The service fails to activate.
> However, if I put that same META-INF content in my WAR's WEB-INF/classes directory (that is, my WAR has a WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator), my service activates fine.
> I will attach a .war file that you can use to test this. To see what I'm taking about, take the attached war and explode it inside the standalone/deployments directory in AS 7.1.1.Final. Run the app server - you will see in the output this:
> INFO [stdout] (MSC service thread 1-5) $$$$$$$$$$$$$$$$ SERVICE ACTIVATING!
> (this output comes from my ServiceActivator's activate() method - it does a System.out.println as soon as activate() is entered).
> This shows the WEB-INF/classes/META-INF/services being honored. Now shutdown the app server, cd to the deployments directory and cd down into the exploded war directory. Now move that services/ content directly up to the WAR's own META-INF directory:
> mv WEB-INF/classes/META-INF/services META-INF/
> Now run the app server again. Notice you do NOT see the "SERVICE ACTIVATING" message.
> So it appears the WAR's META-INF/services is ignored when looking for service activators, but when the same services marker file is in WEB-INF/classes/META-INF/services, it works fine.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list