Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Deploying sample applications in mosaic

Avatar

Former Community Member

Hello, i want to deploy the applications in Mosaic. I'm following these instructions:

Use the Ant build files provided with the Mosaic ES2 installation to deploy sample applications to the server.

To run Ant, type ant from the command line. When you do not provide arguments, Ant looks for a build.xml file in the current directory.

For descriptions of the sample applications, see Sample applications.

Deploy all samples and demos

In the following directory, run Ant:

  • [Mosaic ES2 install directory]/samples/

Deploy the general sample applications

In the following directory, run Ant:

  • [Mosaic ES2 install directory]/samples/general/

Deploy the MAX2009 application

In the following directory, run Ant:

  • [Mosaic ES2 install directory]/samples/max2009/

I've set the ant_home enviromment variable but it still gives me the 'ant' is not recognized as an internal or external command,
operable program or batch file.

Thanks.

9 Replies

Avatar

Former Community Member

I've done it, but now when deploying i have this error.

BUILD FAILED
C:\MOSAIC_HOME\samples\general\build.xml:21: Post failed: Connection refused: co
nnect

This is communication with server?

Somebody helps me ?

Thanks in advance.

Avatar

Level 8

Usually this is because the build.xml file is not able to point to the mosaicTasks.jar.

For example:

<project name="LiveCycle Mosaic MySamples" default="deploy">
    <taskdef resource="mosaic.tasks" classpath="../bin/mosaicTasks.jar" />

....

If the classpath statement in the second line can't find the jar file then it will fail.  The jar file is used to upload catalogs and applications to the mosaic server

Avatar

Former Community Member

Hodmi, i've done that but now i got this error:

C:\MOSAIC_HOME\samples>ant

Buildfile: build.xml

deploy:

deploy-catalogs:

   [delete] Deleting: C:\MOSAIC_HOME\samples\general\sample_catalog.zip

      [zip] Building zip: C:\MOSAIC_HOME\samples\general\sample_catalog.zip

[mosaic-catalog] Exception in thread "Thread-2" C:\MOSAIC_HOME\samples\general\b

uild.xml:21: Read failed: Server returned HTTP response code: 403 for URL: http:

//localhost:9080/mosaic/catalogs/sample_catalog

[mosaic-catalog]        at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask

.java:413)

[mosaic-catalog] Caused by: java.io.IOException: Server returned HTTP response c

ode: 403 for URL: http://localhost:9080/mosaic/catalogs/sample_catalog

[mosaic-catalog]        at sun.net.www.protocol.http.HttpURLConnection.getInputS

tream(HttpURLConnection.java:1313)

[mosaic-catalog]        at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask

.java:407)

[mosaic-catalog] --- Nested Exception ---

[mosaic-catalog] java.io.IOException: Server returned HTTP response code: 403 fo

r URL: http://localhost:9080/mosaic/catalogs/sample_catalog

[mosaic-catalog]        at sun.net.www.protocol.http.HttpURLConnection.getInputS

tream(HttpURLConnection.java:1313)

[mosaic-catalog]        at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask

.java:407)

     [echo] ${response}

deploy-applications:


[mosaic-application] Exception in thread "Thread-4" C:\MOSAIC_HOME\samples\gener
al\build.xml:33: Read failed: Server returned HTTP response code: 403 for URL: h
ttp://localhost:9080/mosaic/applications/Basic
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:413)
[mosaic-application] Caused by: java.io.IOException: Server returned HTTP respon
se code: 403 for URL: http://localhost:9080/mosaic/applications/Basic
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
[mosaic-application] --- Nested Exception ---
[mosaic-application] java.io.IOException: Server returned HTTP response code: 40
3 for URL: http://localhost:9080/mosaic/applications/Basic
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
     [echo] ${response}
[mosaic-application] Exception in thread "Thread-6" C:\MOSAIC_HOME\samples\gener
al\build.xml:42: Read failed: Server returned HTTP response code: 403 for URL: h
ttp://localhost:9080/mosaic/applications/Brokerage
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:413)
[mosaic-application] Caused by: java.io.IOException: Server returned HTTP respon
se code: 403 for URL: http://localhost:9080/mosaic/applications/Brokerage
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
[mosaic-application] --- Nested Exception ---
[mosaic-application] java.io.IOException: Server returned HTTP response code: 40
3 for URL: http://localhost:9080/mosaic/applications/Brokerage
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
     [echo] ${response}
[mosaic-application] Exception in thread "Thread-8" C:\MOSAIC_HOME\samples\gener
al\build.xml:51: Read failed: Server returned HTTP response code: 403 for URL: h
ttp://localhost:9080/mosaic/applications/TileGame
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:413)
[mosaic-application] Caused by: java.io.IOException: Server returned HTTP respon
se code: 403 for URL: http://localhost:9080/mosaic/applications/TileGame
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
[mosaic-application] --- Nested Exception ---
[mosaic-application] java.io.IOException: Server returned HTTP response code: 40
3 for URL: http://localhost:9080/mosaic/applications/TileGame
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
     [echo] ${response}
[mosaic-application] Exception in thread "Thread-10" C:\MOSAIC_HOME\samples\gene
ral\build.xml:60: Read failed: Server returned HTTP response code: 403 for URL:
http://localhost:9080/mosaic/applications/Default
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:413)
[mosaic-application] Caused by: java.io.IOException: Server returned HTTP respon
se code: 403 for URL: http://localhost:9080/mosaic/applications/Default
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
[mosaic-application] --- Nested Exception ---
[mosaic-application] java.io.IOException: Server returned HTTP response code: 40
3 for URL: http://localhost:9080/mosaic/applications/Default
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
     [echo] ${response}

deploy:

deploy-catalogs:
   [delete] Deleting: C:\MOSAIC_HOME\samples\max2009\max2009_catalog.zip
      [zip] Building zip: C:\MOSAIC_HOME\samples\max2009\max2009_catalog.zip
[mosaic-catalog] Exception in thread "Thread-12" C:\MOSAIC_HOME\samples\max2009\
build.xml:21: Read failed: Server returned HTTP response code: 403 for URL: http
://localhost:9080/mosaic/catalogs/max2009_catalog
[mosaic-catalog]        at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:413)
[mosaic-catalog] Caused by: java.io.IOException: Server returned HTTP response c
ode: 403 for URL: http://localhost:9080/mosaic/catalogs/max2009_catalog
[mosaic-catalog]        at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-catalog]        at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
[mosaic-catalog] --- Nested Exception ---
[mosaic-catalog] java.io.IOException: Server returned HTTP response code: 403 fo
r URL: http://localhost:9080/mosaic/catalogs/max2009_catalog
[mosaic-catalog]        at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-catalog]        at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
     [echo] ${response}

deploy-applications:
[mosaic-application] Exception in thread "Thread-14" C:\MOSAIC_HOME\samples\max2
009\build.xml:33: Read failed: Server returned HTTP response code: 403 for URL:
http://localhost:9080/mosaic/applications/MAX2009
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:413)
[mosaic-application] Caused by: java.io.IOException: Server returned HTTP respon
se code: 403 for URL: http://localhost:9080/mosaic/applications/MAX2009
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
[mosaic-application] --- Nested Exception ---
[mosaic-application] java.io.IOException: Server returned HTTP response code: 40
3 for URL: http://localhost:9080/mosaic/applications/MAX2009
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
     [echo] MAX2009 : ${response}
[mosaic-application] Exception in thread "Thread-16" C:\MOSAIC_HOME\samples\max2
009\build.xml:42: Read failed: Server returned HTTP response code: 403 for URL:
http://localhost:9080/mosaic/applications/RedMAX2009
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:413)
[mosaic-application] Caused by: java.io.IOException: Server returned HTTP respon
se code: 403 for URL: http://localhost:9080/mosaic/applications/RedMAX2009
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
[mosaic-application] --- Nested Exception ---
[mosaic-application] java.io.IOException: Server returned HTTP response code: 40
3 for URL: http://localhost:9080/mosaic/applications/RedMAX2009
[mosaic-application]    at sun.net.www.protocol.http.HttpURLConnection.getInputS
tream(HttpURLConnection.java:1313)
[mosaic-application]    at com.adobe.mosaic.ant.MosaicTask$Reader.run(MosaicTask
.java:407)
     [echo] RedMAX2009 : ${response}

deploy:

BUILD SUCCESSFUL
Total time: 7 seconds
C:\MOSAIC_HOME\samples>

I'm using websphere 6.1.0.2.

I've got the 403 server in websphere.

Is there any procedure or any example to workaround this problem in websphere?

Thanks

Avatar

Level 8

humm, interesting.  WebSphere is obviously blocking the file upload.

Are there other LiveCycle products deployed to that WebSphere instance?

Avatar

Former Community Member

I have the Livecycle deployed there with output es2 and pdf generator.

thanks.

Avatar

Level 8

Okay, that's good.  It means that the LiveCycle UserManager and Repository components are deployed.

The other thing I would check is the username and password sections of the build.xml file.  They will need to be set to a user that has the ROLE_MOSAIC_DESIGNER role in Mosaic.  By default there should be a user called designer with a password of password that has that role.

....

<mosaic-catalog action="import"
                        name="FADesktop_catalog"
                        file="FADesktop_catalog.zip"
                        property="response"
                        server="${server}"
                        port="${port}"
                       username="designer"
                        password="password"
/>
        <echo message="${response}" />
    </target>

....

<mosaic-application action="import"
                            name="FADesktop"
                            file="applications/FADesktop.xml"
                            property="response"
                            server="${server}"
                            port="${port}"
                           username="designer"
                            password="password"
/>
        <echo message="${response}" />

....

Avatar

Former Community Member

I already had it well configured i think, and it's not working. 403 error.

<project name="LiveCycle Mosaic Deploy General Samples" default="deploy">
     <taskdef resource="mosaic.tasks" classpath="C:\MOSAIC_HOME\bin\mosaicTasks.jar" />
     <property name="protocol" value="http" />
     <property name="server" value="localhost" />
     <property name="port" value="9080" />

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

    <target name="deploy-catalogs">
         <delete file="max2009_catalog.zip" />
         <zip destfile="max2009_catalog.zip">
             <zipfileset dir="catalogs" />
         </zip>
         <mosaic-catalog action="import"
                         name="max2009_catalog"
                         file="max2009_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="MAX2009"
                             file="applications/MAX2009.xml"
                             property="response"
                             server="${server}"
                             port="${port}"
                             username="designer"
                             password="password" />
         <echo message="MAX2009 : ${response}" />
         <mosaic-application action="import"
                             name="RedMAX2009"
                             file="applications/RedMAX2009.xml"
                             property="response"
                             server="${server}"
                             port="${port}"
                             username="designer"
                             password="password" />
         <echo message="RedMAX2009 : ${response}" />
     </target>

</project>

Avatar

Level 8

Darn, well so much for the easy stuff.

There is another spot where the security may have gotten screwed up, but by default this should be okay.  In the mosaic.war file that you deployed to WebSphere is a security.xml file.  (You can open the war file using a zip program.)  the file is located in the WEB-INF directory.

This file is where the roles are set for each user (like "designer").  Look for a tag marked security:authentication-provider.  Make sure the "designer" user has the ROLE_MOSAIC_DESIGNER role.  Should look something like:

<security:authentication-provider>
        <security:user-service>
            <security:user name="user" password="password" authorities="ROLE_MOSAIC_END_USER"/>
            <security:user name="designer" password="password" authorities="ROLE_MOSAIC_END_USER, ROLE_MOSAIC_DESIGNER"/>
        </security:user-service>
    </security:authentication-provider>

If that is set properly then I can only imagine that its something on the IBM side.  Perhaps additional security has been attached to the mosaic application when the WAR file was deployed.

Avatar

Level 1

I have the exact same error with JBoss turnkey LC ES2. I've checked the items in the thread and installed according to the instructions to the letter. What likely causes this?