dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27657
Need help in developing one web service in web api under dhis2 framework
Hello Devs,
I am working to develop some web api in dhis-web-api module and have been stuck in between.
My issue is i have finished writing controllers and have annotated specific api's and have written
appropriate .xls templates and have done every thing as the structure followed while developing
web api. But when i am trying to run, it comes with exception as given below which is saying
"modelTypeAttributeGroup.xls"
above file does't exist in the classpath, although i have checked several times and it exist in directory
structure as i have attached in the attachment given below.
After closely observing log at one instance it says,
The element type "xsl:template" must be terminated by the matching end-tag "</xsl:template>".
But when i am trying to edit and see the modelTypeAttributGroup.xls, it does't appear any mistake in appropriately closing
element tag xls:template. I have attached two .xls file for the kind reference. Please let me know what need to be done
to make it correct and working as expected.
* INFO 2014-01-18 16:48:41,355 Executing startup routine [11 of 11, runlevel 7]: I18nLocalePopulator (DefaultStartupRoutineExecutor.java [main])
* INFO 2014-01-18 16:48:41,393 All startup routines done (DefaultStartupRoutineExecutor.java [main])
[INFO] Initializing Spring FrameworkServlet 'mobile'
[INFO] Initializing Spring FrameworkServlet 'webapi'
[Fatal Error] :23:5: The element type "xsl:template" must be terminated by the matching end-tag "</xsl:template>".
* WARN 2014-01-18 16:48:59,379 Could not compile stylesheet (LoggingErrorListener.java [main])
* WARN 2014-01-18 16:48:59,380Invalid URI 'modelTypeAttributeGroup.xls
Resource /templates/html/modelTypeAttributeGroup.xls does not exist in classpath.'. (LoggingErrorListener.java [main])
* ERROR 2014-01-18 16:48:59,433 Context initialization failed (FrameworkServlet.java [main])
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transformCacheImpl' defined in URL [jar:file:/F:/java/src/trunk/dhis2/dhis-2/dhis-web/dhis-web-portal/target/work/webapp/WEB-INF/lib/dhis-web-api-2.15-SNAPSHOT.jar!/org/hisp/dhis/api/view/TransformCacheImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.hisp.dhis.api.view.TransformCacheImpl]: Constructor threw exception; nested exception is javax.xml.transform.TransformerConfigurationException: Invalid URI 'modelTypeAttributeGroup.xls
Resource /templates/html/modelTypeAttributeGroup.xls does not exist in classpath.'.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1037)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
Regards,
Brajesh Murari
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:d="http://dhis2.org/schema/dxf/2.0">
<xsl:template match="d:modelTypeAttributeGroup">
<div class="modelTypeAttributeGroup">
<h2> <xsl:value-of select="@name" /> </h2>
<table>
<tr>
<td>ID</td>
<td> <xsl:value-of select="@id" /> </td>
</tr>
<tr>
<td>Created</td>
<td> <xsl:value-of select="@created" /> </td>
</tr>
<tr>
<td>Last Updated</td>
<td> <xsl:value-of select="@lastUpdated" /> </td>
</tr>
<tr>
<td>Code</td>
<td> <xsl:value-of select="@code" /> </td>
</tr>
</table>
</div>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:d="http://dhis2.org/schema/dxf/2.0"
exclude-result-prefixes="d" >
<xsl:output method="html" />
<!-- html page level settings -->
<xsl:include href="html-wrapper.xsl" />
<!-- for list views -->
<xsl:include href="list.xsl" />
<!-- for rendering elements -->
<xsl:include href="equipment.xsl" />
<xsl:include href="equipmentType.xsl" />
<xsl:include href="equipmentAttributeValue.xls" />
<xsl:include href="equipmentDataValue.xls" />
<xsl:include href="equipmentStatus.xls" />
<xsl:include href="equipmentType_Attribute.xls" />
<xsl:include href="equipmentTypeAttribute.xls" />
<xsl:include href="equipmentTypeAttributeGroup.xls" />
<xsl:include href="equipmentTypeAttributeOption.xls" />
<xsl:include href="model.xls" />
<xsl:include href="modelType.xls" />
<xsl:include href="modelTypeAttribute.xls" />
<xsl:include href="modelAttributeValue.xls" />
<xsl:include href="modelTypeAttributeGroup.xls" />
<!--xsl:include href="modelTypeAttributeOption.xls" /-->
<xsl:include href="resource.xsl" />
<xsl:include href="relativePeriods.xsl" />
<xsl:include href="map.xsl" />
<xsl:include href="mapView.xsl" />
<xsl:include href="mapLegend.xsl" />
<xsl:include href="mapLegendSet.xsl" />
<xsl:include href="mapLayer.xsl" />
<xsl:include href="chart.xsl" />
<xsl:include href="constant.xsl" />
<xsl:include href="category.xsl" />
<xsl:include href="categoryOption.xsl" />
<xsl:include href="categoryCombo.xsl" />
<xsl:include href="categoryOptionCombo.xsl" />
<xsl:include href="dataElement.xsl" />
<xsl:include href="dataElementGroup.xsl" />
<xsl:include href="dataElementGroupSet.xsl" />
<xsl:include href="document.xsl" />
<xsl:include href="indicator.xsl" />
<xsl:include href="indicatorType.xsl" />
<xsl:include href="indicatorGroup.xsl" />
<xsl:include href="indicatorGroupSet.xsl" />
<xsl:include href="organisationUnit.xsl" />
<xsl:include href="organisationUnitLevel.xsl" />
<xsl:include href="organisationUnitGroup.xsl" />
<xsl:include href="organisationUnitGroupSet.xsl" />
<xsl:include href="dataSet.xsl" />
<xsl:include href="attributeType.xsl" />
<xsl:include href="report.xsl" />
<xsl:include href="reportTable.xsl" />
<xsl:include href="validationRule.xsl" />
<xsl:include href="validationRuleGroup.xsl" />
<xsl:include href="sqlView.xsl" />
<xsl:include href="user.xsl" />
<xsl:include href="userGroup.xsl" />
<xsl:include href="userAuthorityGroup.xsl" />
<xsl:include href="userCredentials.xsl" />
<xsl:include href="messageConversations.xsl" />
<xsl:include href="messageConversation.xsl" />
<xsl:include href="interpretation.xsl" />
<xsl:include href="dataValueSets.xsl" />
<xsl:include href="optionSets.xsl" />
<xsl:include href="program.xsl" />
<xsl:include href="programStage.xsl" />
<xsl:include href="event.xsl" />
<xsl:include href="dashboard.xsl" />
<!--@author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>-->
<xsl:include href="filter.xsl" />
<!-- Config elements -->
<xsl:include href="config/sms.xsl" />
</xsl:stylesheet>
Follow ups