Expand my Community achievements bar.

Not able to build a sample tile project on standalone

Avatar

Level 1

hi,

I am trying to build a sample project which is created in my separate project orhter than sample sxample given by adobe. I created my project in the root directory (c:/97004525/MyProject) and created same directory structure as

C:\97004525\MyProject

              --   build.xml

              --   applications  /SampleTile.xml

              ---  catalogs

                       --  descriptor.xml

                       --  Resources

                       --  Tiles   / SampleTile.swf

and files as build.xml :

<project name="Deploy projects to myserver" default="deploy">
<taskdef resource="mosaic.tasks" classpath="../../bin/mosaicTasks.jar" />
  <property name="protocol" value="http" />
  <property name="server" value="localhost" />
  <property name="port" value="8080" />

<target name="deploy" depends="deploy-catalogs, deploy-applications" />

<target name="deploy-catalogs">
  <delete file="sample_catalog.zip" />
  <zip destfile="sample_catalog.zip">
   <zipfileset dir="catalogs" />
  </zip>
  <mosaic-catalog action="import" name="sample_catalog"
    file="sample_catalog.zip"
    property="response"
    server="${server}"
    port="${port}"
    username="designer"
    password="password" />
  <echo message="${response}" />
</target>
<target name="deploy-applications">
  <mosaic-application action="import"
    name="SampleTile"
    file="applications/SampleTile.xml"
    property="response"
    server="${server}"
    port="${port}"
    username="designer"
    password="password" />
  <echo message="${response}" />
</target>
</project>

------------------------------------------------------

SampleTile.xml as :

<?xml version="1.0" encoding="UTF-8"?>
<app:Application name="Basic" label="Basic" xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/" xmlns:app="http://ns.adobe.com/Mosaic/Application/1.0/">
<crx:Metadata>
  <crx:Description>SampleTile Application</crx:Description>
</crx:Metadata>
<app:Shell name="SampleTile" label="Sample Tile">
<catalog:CatalogReference name="myproject" uri="sample_catalog"/>
<view:ViewManager width="100%" height="100%">
  <view:View label="View 1" width="100%" height="100%">
   <view:Panel label="Panel 1" width="100%" height="100%">
    <view:Layout name="FlowLayout"/>
    <tile:TileReference catalog="myproject" name="RetrieveData" label="RetrieveData"/>
   </view:Panel>
  </view:View>
  <view:Layout name="TabNavigatorLayout"/>
</view:ViewManager>
</app:Shell>
</app:Application>
------------------------------------------------------

descriptor.xml as

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<catalog:Catalog name="sample_catalog"
     label="Sample Catalog"
     xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/"
     xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/"
     xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/"
     xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/"
     xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/">
    <crx:Metadata>
     <crx:Description>Sample Catalog</crx:Description>
    </crx:Metadata>
    <catalog:Categories>
        <catalog:Category name="Component"/>
        <catalog:Category name="Utility"/>
    </catalog:Categories>
    <tile:TileClassList>
        <tile:TileClass initialHeight="400" initialWidth="680" label="Sample Tile" name="SampleTile" catalog="sampleCatalog" fitContent="true">
            <crx:Metadata>
                <crx:Description>Sample Tile</crx:Description>
                <crx:Category>Component</crx:Category>
                <crx:Tag>component</crx:Tag>
                <crx:Tag>menu</crx:Tag>
            </crx:Metadata>
        <tile:Content loadAs="default" contentType="application/x-shockwave-flash" uri="/mosaic/catalogs/sample_catalog/tiles/SampleTile/content"/>
       </tile:TileClassList>
</catalog:Catalog>

--------------------------------------------------

While building I am getting my builds failed as


C:\97004525\MyProject>ant
Buildfile: build.xml
  [taskdef] Could not load definitions from resource mosaic.tasks. It could not
be found.

deploy-catalogs:
   [delete] Deleting: C:\97004525\MyProject\sample_catalog.zip
      [zip] Building zip: C:\97004525\MyProject\sample_catalog.zip

BUILD FAILED
C:\97004525\MyProject\build.xml:20: Problem: failed to create task or type mosai
c-catalog
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

I don't see any mosaictask.jar in lib folder also don ot gave any wrong name. please help me to come out from this stuck.

Thanks.

6 Replies

Avatar

Level 1

I changed path for the mosaictasks.jar to the local root where it reside. it made build successfully

But now I am not able to see the page while I am calling app as http://localhost:8080/mosaic/#/applications/SampleTile .

is this correct path I am giving?

Avatar

Level 8

Generally that's the correct path.  Do you get a login screen? Is there anything in the tomcat log?  If you have the samples installed can you get access to them?  Have you tried using the AIR tool to access your application?

Avatar

Level 1

I did not use AIR. But i remember it was instaled while I was installing Flash Builder 4.

But It seems my build is just showing BUILS SUCCESSFUL. But actually it has error in that . Please check below log and tell me error solutions.


C:\97004525\MyProject>ant
Buildfile: build.xml

deploy-catalogs:
   [delete] Deleting: C:\97004525\MyProject\sample_catalog.zip
      [zip] Building zip: C:\97004525\MyProject\sample_catalog.zip
     [echo] <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     [echo] <crx:Response timestamp="2010-05-05T15:38:28.118-04:00" method="POST
" result="failure" request="/mosaic/catalogs/sample_catalog" xmlns:crx="http://n
s.adobe.com/Mosaic/CRXTypes/1.0/">
     [echo]     <crx:Error code="CAT_E40017">
     [echo]         <crx:Message>Error validating catalog {}.</crx:Message>
     [echo]         <crx:Key position="0">sample_catalog</crx:Key>
     [echo]         <crx:StackTrace>com.adobe.livecycle.mosaic.common.MosaicServ
erException: Error validating catalog [sample_catalog].
     [echo]     at com.adobe.livecycle.mosaic.service.schema.CRXConsumeRequestHe
lper.consumeCatalogDescriptor(CRXConsumeRequestHelper.java:627)
     [echo]     at com.adobe.livecycle.mosaic.service.rest.catalogservice.Catalo
gServiceImportResourceRestHandler$CatalogServiceAppModelImportFilter.terminate(C
atalogServiceImportResourceRestHandler.java:150)
     [echo]     at com.adobe.livecycle.mosaic.appmodel.impl.AppModelFacade.impor
tArchive(AppModelFacade.java:132)
     [echo]     at com.adobe.livecycle.mosaic.service.rest.catalogservice.Catalo
gServiceImportResourceRestHandler.handleRequest(CatalogServiceImportResourceRest
Handler.java:84)
     [echo]     at com.adobe.livecycle.rest.RestRequestRouter.routeRequest(RestR
equestRouter.java:19)
     [echo]     at com.adobe.livecycle.rest.RestServlet.doAction(RestServlet.jav
a:46)
     [echo]     at com.adobe.livecycle.rest.RestServlet.doPost(RestServlet.java:
37)
     [echo]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
     [echo]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     [echo]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFil
ter(ApplicationFilterChain.java:290)
     [echo]     ... 41 more
     [echo] Caused by: com.adobe.livecycle.mosaic.crxm.CRXMException: Parse erro
r consuming Mosaic XML.
     [echo]     at com.adobe.livecycle.mosaic.crxm.Executive.consume(Executive.j
ava:164)
     [echo]     at com.adobe.livecycle.mosaic.service.schema.CRXConsumeRequestHe
lper.consumeCatalogDescriptor(CRXConsumeRequestHelper.java:624)
     [echo]     at com.adobe.livecycle.mosaic.service.rest.catalogservice.Catalo
gServiceImportResourceRestHandler$CatalogServiceAppModelImportFilter.terminate(C
atalogServiceImportResourceRestHandler.java:150)
     [echo]     at com.adobe.livecycle.mosaic.appmodel.impl.AppModelFacade.impor
tArchive(AppModelFacade.java:132)
     [echo]     at com.adobe.livecycle.mosaic.service.rest.catalogservice.Catalo
gServiceImportResourceRestHandler.handleRequest(CatalogServiceImportResourceRest
Handler.java:84)
     [echo]     at com.adobe.livecycle.rest.RestRequestRouter.routeRequest(RestR
equestRouter.java:19)
     [echo]     at com.adobe.livecycle.rest.RestServlet.doAction(RestServlet.jav
a:46)
     [echo]     at com.adobe.livecycle.rest.RestServlet.doPost(RestServlet.java:
37)
     [echo]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
     [echo]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     [echo]     ... 42 more
     [echo] Caused by: javax.xml.bind.UnmarshalException
     [echo]  - with linked exception:
     [echo] [org.xml.sax.SAXParseException: The end-tag for element type "tile:T
ileClass" must end with a '&gt;' delimiter.]
     [echo]     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarsh
alException(AbstractUnmarshallerImpl.java:315)
     [echo]     at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.cre
ateUnmarshalException(UnmarshallerImpl.java:506)
     [echo]     at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unm
arshal0(UnmarshallerImpl.java:215)
     [echo]     at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unm
arshal(UnmarshallerImpl.java:184)
     [echo]     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Abs
tractUnmarshallerImpl.java:137)
     [echo]     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Abs
tractUnmarshallerImpl.java:184)
     [echo]     at com.adobe.livecycle.mosaic.crxm.Executive.consume(Executive.j
ava:152)
     [echo]     at com.adobe.livecycle.mosaic.service.schema.CRXConsumeRequestHe
lper.consumeCatalogDescriptor(CRXConsumeRequestHelper.java:624)
     [echo]     at com.adobe.livecycle.mosaic.service.rest.catalogservice.Catalo
gServiceImportResourceRestHandler$CatalogServiceAppModelImportFilter.terminate(C
atalogServiceImportResourceRestHandler.java:150)
     [echo]     at com.adobe.livecycle.mosaic.appmodel.impl.AppModelFacade.impor
tArchive(AppModelFacade.java:132)
     [echo]     ... 48 more
     [echo] Caused by: org.xml.sax.SAXParseException: The end-tag for element ty
pe "tile:TileClass" must end with a '&gt;' delimiter.
     [echo]     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Sou
rce)
     [echo]     at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unkn
own Source)
     [echo]     at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unm
arshal0(UnmarshallerImpl.java:211)
     [echo]     at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unm
arshal(UnmarshallerImpl.java:184)
     [echo]     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Abs
tractUnmarshallerImpl.java:137)
     [echo]     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Abs
tractUnmarshallerImpl.java:184)
     [echo]     at com.adobe.livecycle.mosaic.crxm.Executive.consume(Executive.j
ava:152)
     [echo]     at com.adobe.livecycle.mosaic.service.schema.CRXConsumeRequestHe
lper.consumeCatalogDescriptor(CRXConsumeRequestHelper.java:624)
     [echo]     at com.adobe.livecycle.mosaic.service.rest.catalogservice.Catalo
gServiceImportResourceRestHandler$CatalogServiceAppModelImportFilter.terminate(C
atalogServiceImportResourceRestHandler.java:150)
     [echo]     at com.adobe.livecycle.mosaic.appmodel.impl.AppModelFacade.impor
tArchive(AppModelFacade.java:132)
     [echo]     ... 48 more
     [echo] </crx:StackTrace>
     [echo]     </crx:Error>
     [echo] </crx:Response>

deploy-applications:
     [echo] <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     [echo] <crx:Response timestamp="2010-05-05T15:38:28.165-04:00" method="POST
" result="success" request="/mosaic/applications/SampleTile" xmlns:crx="http://n
s.adobe.com/Mosaic/CRXTypes/1.0/"/>

deploy:

BUILD SUCCESSFUL
Total time: 0 seconds

Avatar

Employee

There is a typo in the catalog xml associated with the <tile:TileReference> element for your tile. If you have a validating XML editor such as XMLSpy you can view the XML and get a highlight on the error.

To get a build failure in this case, set the failonerror=true flag in the build.xml that is calling the mosaic-catalog task.

Don

Avatar

Level 1

Yes!

Thanks you Hodmi, Don.

I corrected type and got successfull build.

But again, while calling page getting message as parsing error with line "can not parse deep link ".

What does it mean? Do I need to remove some thing from my code?

untitled.JPG

Avatar

Level 8

That just means that it can't find the application - pretty much the same as a 404 error.

I noticed a typo in your link in the screen shot.  You have too may "p"s in applications (you have it as appplications)