FAQ
General Developer Studio Questions
How to resolve "missing import javax.servlet.annotation.WebServlet" error in WSO2 Developer Studio?
The reason for this error is that you are using an older version of servlet-api jar. Please download javax.servlet-api-3.0.1.jar and add it to your build path.
What is the use of Remote Dependencies in Developer Studio?
Remote dependencies exist just to specify the third party libraries that are associated with the .car. But it does not handle uploading of the dependencies, and it is assumed that the user will somehow make the dependencies available during the runtime. If you want to deploy the dependencies then you have to make those dependencies a library artifact.
Why do data service artifacts not show as a group under data service project when exporting the composite app?
If you consider artifacts like ESB, the actual deployable artifact via a composite app is the "synapse directory" which contains ESB artifacts such as proxy services, endpoints etc. Therefore, all the separate ESB artifacts of a given ESB project will be shown under the base ESB project group name.
This is different in the case of Data services. What is actually getting deployed as a data service is a .dbs file. Therefore, the grouping concept is not valid for a .dbs. Also please note that multiple .dbs files cannot reside in a single data service project in Dev Studio. Hence data service related artifacts are shown as separate files without any grouping.Â
Are the BRS artifacts that I created in Developer Studio 3.0.0 compatible with BRS 1.2.0 (based on Carbon 3.x)?
No, this is not possible due to a change in the configuration language. You can use Developer Studio 3.0.0 based BRS artifacts with BRS 2.0.0
Mediation-Related Questions
How can I write a Custom mediator for WSO2 ESB using Developer Studio?
You can write a Custom Class mediator using a Developer Studio Custom Mediator project.
But if you are writing a complete custom mediator with custom serializers and deserializers, then you need to deploy to ESB_HOME/repository/components/extensions location and in that case you cannot use CAR file based approach yet as explained in [2].
[2]Â http://stackoverflow.com/questions/10824602/wso2-custom-mediator-inside-carbon-app
What is the best way to define and refer to a registry resource within a proxy service (as you may need to refer to an xslt file or endpoint or a local entry or any other resource file)?
First we can add the resource files to the registry.
Then when we are defining those resources (endpoints, xslt files, WSDLs, sequences, etc) inside the proxy services we can go to the option "Pick From registry" and select the resource from the registry.
This is the best way to refer to resources through proxy services since we can change those files without changing the service and also we can reuse them.
Deployment Questions
Does WSO2 Developer Studio support Hot Deployment in a developer environment on a local machine with debug support from within Eclipse IDE?
Yes, This is possible with WSO2 Developer Studio, The WSO2 Developer Studio provides complete support for debugging. Yes, you can add single artifacts into a Composite Application Project and deploy it to a running Carbon server inside Eclipse. You can simply start the carbon server in debug mode inside Developer studio (debug button in the servers view) as described in following [1] developer studio documentation.
[1] http://dist.wso2.org/products/developer-studio/2.1.0/docs/testing_deploying_category.html#debug
How to implement 'build once deploy everywhere' for WSO2 artifacts?
How can we organize one development environment with multiple servers for development, acceptance and production? What steps you think a service runs until it is taken into production, and how you would organize this. Our vision is 'build once deploy everywhere'. How can we achieve this for WSO2 artifacts?
A Composite Application (.car file) created using WSO2 Developer Studio facilitates deployment in multiple environments such as staging/production. This single unit can contain Axis2 services, data services, synapse configurations, proxy services, mediators, registry resources, BPEL workflows etc related to a given use case and it is deployable on a Carbon instance. Endpoints, Data Sources and other environment-specific items are created as Registry Resources and maintained in a separate C-App project.
All of these sources can be committed to SVN and the same CAR can be deployed to multiple Remote Servers as well as StratosLive PaaS via Maven (maven-car-deploy-plugin) by the DevOps. For more information, see Deploying a C-App.
How can I avoid Java version problems when creating axis2 services and deploying in AS?
The current version of Developer Studio runs on Java 1.7 whereas Application Server 5.2.1 runs on Java 1.6 or later. This can lead to Java compliance issues during runtime if you are using different Java versions between Developer Studio and Application Server. For example:
Error: java.lang.UnsupportedClassVersionError: org/wso2/sample/application : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) . . .
To solve this, follow the steps below when building artifacts using Developer Studio:
Â
- Right click on the Axis2 service project and click Properties.
- Under Java Compiler, set the compiler compliance level to the Java version that your Application Server runs on.