-
1. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
georgesg May 14, 2013 1:26 AM (in response to georgesg)I have also tried the method of setting systemproperties tag in standalone.xm like below,
<system-properties>
<property name="web.root.context" value="mmtxprv"/>
</system-properties>
But still it is unable to pickup when i access the web application through the browser. Problem is that the context root configured in the application.xml using expressions is unable to pickup the value when attempted to access through web browser.
In jboss4.3, we access the property using jboss-service.xml using an mbean as below,
<mbean code="org.jboss.varia.property.SystemPropertiesService"
name="jboss.util:type=Service,name=SystemProperties">
<!-- Load properties from each of the given comma seperated URLs -->
<attribute name="URLList">
${mobilematrix.home}/config/Config-System.properties
</attribute>
</mbean>
-
2. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
sfcoy May 14, 2013 2:19 AM (in response to georgesg)Please attach the complete server.log
-
3. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
georgesg May 14, 2013 2:36 AM (in response to sfcoy)Thanks for your quick reply. I have attached the complete server logs for your reference.
-
4. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
sfcoy May 14, 2013 3:08 AM (in response to georgesg)The attached server.log looks incomplete. Maybe it has rolled over? Are there any preceding logs you can attach.
I'm interested in seeing the deployment diagnostics.
-
5. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
georgesg May 14, 2013 3:20 AM (in response to sfcoy)No Stephen. This is the complete log. To avoid confusion, i deleted the old log & restarted the server . I got the logs after the server is completely Up !
So let me know what settings i should do to get complete and detailed deployment diagnostics
Maybe i will turn all the component logging levels to DEBUG , get the server logs and get back to you shortly.
Thanks
-
6. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
georgesg May 14, 2013 3:33 AM (in response to georgesg)Stephen, Detailed log is attched here now.
I also noticed that i am able to access the web portal using
http://10.65.9.240:8080/${web.root.context}/mmadmin
which means, the value of this parameter is not getting replaced So, To me it looks like a bug in Jboss AS 7.1.3.Final. Because, i noticed that the Expressions are not working well with Jboss 7.1.3.final. When i used expression in Jboss-app.xml, i got a NullPointerException and i also saw a Jira for the same. Now, expressions are not getting recognized for application.xml and jboss-web.xml. This is my suspicion.
-
7. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
sfcoy May 14, 2013 3:48 AM (in response to georgesg)I seem to recall that expression evaluation only ever worked in the JBoss deployment descriptors, and not in the standard ones (because that would make them non-portable).
You might try removing jboss-web.xml and adding a jboss-app.xml (conforming to jboss-app_7_0.xsd, which essentially extends the standard application.xml schema), with the web context expression set within that.
-
8. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
georgesg May 14, 2013 4:32 AM (in response to sfcoy)Stephen, when i try removing jboss-web.xml and introduced jboss-app.xml instead, i got the below error which is a Bug in Jboaa 7.1.3.Final already. It got a JIRA.
Please find the contents of the deployment descriptors below after putting the Web context in jboss-app.xml.
application.xml contents:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
<description>Mobile Matrix Projects</description>
<display-name>CmsEAR</display-name>
</application>
jboss-app.xml contents:
<?xml version="1.0" encoding="UTF-8"?>
<jboss:jboss-app xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-app_7_0.xsd
http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"
version="6">
<initialize-in-order>true</initialize-in-order>
<module>
<ejb>MobilematrixCX_ejb-1.0.0-SNAPSHOT.jar</ejb>
</module>
<module>
<web>
<web-uri>MobileMatrixWEB-1.0.0-SNAPSHOT.war</web-uri>
<context-root>${web.root.context}/mmadmin</context-root>
</web>
</module>
<library-directory>lib</library-directory>
</jboss:jboss-app>
Exception:
16:04:31,690 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."CMS.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."CMS.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "CMS.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011059: Failed to parse "/content/CMS.ear/META-INF/jboss-app.xml"
at org.jboss.as.ee.structure.EarMetaDataParsingProcessor.handleJbossMetadata(EarMetaDataParsingProcessor.java:126)
at org.jboss.as.ee.structure.EarMetaDataParsingProcessor.deploy(EarMetaDataParsingProcessor.java:67)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
... 5 more
Caused by: java.lang.NullPointerException
at org.jboss.metadata.property.DefaultPropertyReplacer.replaceProperties(DefaultPropertyReplacer.java:110)
at org.jboss.metadata.parser.util.MetaDataElementParser.getElementText(MetaDataElementParser.java:194)
at org.jboss.metadata.parser.spec.EarModuleMetaDataParser.parseWeb(EarModuleMetaDataParser.java:134)
at org.jboss.metadata.parser.spec.EarModuleMetaDataParser.parse(EarModuleMetaDataParser.java:79)
at org.jboss.metadata.parser.spec.EarMetaDataParser.handleElement(EarMetaDataParser.java:164)
at org.jboss.metadata.parser.jboss.JBossAppMetaDataParser.parse(JBossAppMetaDataParser.java:99)
at org.jboss.as.ee.structure.EarMetaDataParsingProcessor.handleJbossMetadata(EarMetaDataParsingProcessor.java:123)
... 7 more
-
9. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
sfcoy May 14, 2013 5:09 AM (in response to georgesg)I suggest you try the EAP6.1.0 Beta from http://www.jboss.org/jbossas/downloads.
-
10. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
sfcoy May 14, 2013 5:11 AM (in response to georgesg)1 of 1 people found this helpfulAlso, if you have an EAP licence then Red Hat should be able to provide you with a patch for EAP 6.0.1
-
11. Re: jboss AS 7.1.3 Reading system property file using Expression in Deployment descriptors
georgesg May 15, 2013 1:40 AM (in response to sfcoy)Hello Stephen, Finallly i made it working.
I upgraded to Jboss EAP 6.1.0. Alpha, then even in this version the expressions are not getting recognized in application.xml . But the bug AS7-5517 with expressions in jboss-app.xml is fixed in this version. So i used jboss-app.xml and succeded. After the upgrade, the contents of my application.xml and jboss-app.xml below....
Thanks for your suggestions !!
application.xml
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
<description>Mobile Matrix Projects</description>
<display-name>CmsEAR</display-name>
</application>
jboss-app.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss:jboss-app xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-app_7_0.xsd
http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"
version="6">
<initialize-in-order>true</initialize-in-order>
<module>
<ejb>MobilematrixCX_ejb-1.0.0-SNAPSHOT.jar</ejb>
</module>
<module>
<web>
<web-uri>MobileMatrixWEB-1.0.0-SNAPSHOT.war</web-uri>
<context-root>${web.root.context}/mmadmin</context-root>
</web>
</module>
<library-directory>lib</library-directory>
</jboss:jboss-app>