com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Deploying and Debugging

After creating your projects, you are ready to test them by deploying and then debugging them.

Creating a Carbon Application Archive (CAR) file

There are two ways you can create a .car file. One way is to right click on the C-App project and select Export Carbon Application Project from the pop-up menu.

New Server Runtime

The other way is to select the option from the pom.xml. Open the pom.xml in Carbon Application Project POM Editor and there is a button to create the Carbon Application Archive [CAR] at the right most top corner.

New Server Runtime

Specify the location to save the Carbon Application Archive [CAR] file.


New Server Runtime

Then select the artifacts you want to include to the Carbon Application Archive [CAR] and click finish.


New Server Runtime

Now you have successfully created a Carbon Application Archive [CAR] file which is ready to be deployed in to a Carbon Server.

To deploy the created CAR file in to a Carbon Server, start the carbon server. Once the server being started, log in to management console, and go to Application -> Add and browse for the CAR file that you have created.


New Server Runtime


New Server Runtime

Once you click Upload, it will ask you to Refresh the browser.


New Server Runtime

Once you refresh, you will see that the CAR file has been deployed.


New Server Runtime

Deploying a C-App to a Running Server Inside Eclipse

Before you deploy the created CApp project, you have to choose the artifacts you need to deploy. For that, double click on the pom.xml and select artifacts you need to deploy and save the changes.

New Server Runtime

Go to Servers view, right click and select New -> Server .

New Server Runtime

Select the relevant version of the server under the WSO2 category. For example, WSO2 Carbon 3.2 based server. 

To see the relevant version of the Carbon based server, refer to the Release Matrix.

New Server Runtime

If you have not added WSO2 Server instances before, you will need to specify the location of the downloaded WSO2 Server instance.

New Server Runtime

Now you will see your version of the server (for example WSO2 Carbon 3.2 based server) added to the Server Runtime Environments. Then click OK.

New Server Runtime

You can change ports if you want. If the default ports are not used by any other application, you can keep them as they are. After setting the ports click Next.

New Server Runtime

Add the CApp project and click Finish.

New Server Runtime

Now you will see newly added server is listed in the Servers view. Right click on the WSO2 Carbon x.x.x based server at localhost and select Start from the menu.

New Server Runtime

Redeploying a C-App to a Running Server Inside Eclipse

After you have deployed your C-App to a running server inside Eclipse, you may want to change the content of your C-App. In that case you do not need to remove the deployed C-App from the server and deploy again to the server. Instead you can re-deploy an already deployed C-App.

Deploy the C-App project according to the instructions given above and then do the necessary changes to your C-App project.

Open the Servers view in Eclipse using Window => Show View => Servers.

Click on the expandable icon of the Server you are running inside Eclipse. (This expandable icons available only if you have deployed a project in that server)

Right click on the project and Select Re-deploy option from the popup menu.



Redeploy C-App project.

Then you will see that your Eclipse console is updated and you can notice that your C-App project is deployed again.

Debugging a Carbon Application

Suppose I develop a simple Apache Axis2 Service and I want to debug my service when I invoke it. Let's see how we can achieve this using WSO2 Developer Studio.

First, I create a simple GreetingService.



Redeploy C-App project.

Then I create a Carbon Application Project to group it.



Redeploy C-App project.

Now I'm going to add a WSO2 Application Server instance to my Eclipse workspace. Steps to add a Carbon Server is described in Deploy C-App to a running Server inside Eclipse section. After adding the server, I'm going to start the server in the debug mode.


Redeploy C-App project.

After server being successfully started, add the GreetingServiceCApp project.


Redeploy C-App project.

When your application being deployed successfully, you will see following messages in your console.


Redeploy C-App project.

Now go to your web browser and check whether your application being deployed under Web Services Listing page.


Redeploy C-App project.

Now click on Try This Service option at the right hand corner. Once you click it, it will go to a seperate page where it lists all the operations related to the web service you choose.


Redeploy C-App project.

Before invoke the service, go back to your Eclipse Workspace and put a debug point inside your method.


Redeploy C-App project.

Now go back to your web console and invoke the service. Once you invoke the service, it will ask whether to change in to the Debug Perspective in Eclipse.


Redeploy C-App project.

Click Yes. If your Eclipse instance could not find the relavent source for the class, it will show a blank page as below.


Redeploy C-App project.

Click on Edit Source Lookup Path....


Redeploy C-App project.

Click on Add button and select Java Project.


Redeploy C-App project.

Select GreetingService project from the list and click OK.


Redeploy C-App project.

Now you will see the source being attached and you will see the debug point is being hit.


Redeploy C-App project.

In the similar manner, you can debug any application which will be associated with Java Sources.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.