Posts

Showing posts from October, 2010

Run two/more Apache tomcat servers in your machine at the same time

Image
If you have currently configured a single tomcat server and you need to add more tomcat servers, first remove the CATALINA_HOST environmental variable. The configure more tomcat servers in new ports. ( How to change the Tomcat running port ) Now go to Command Line. Go to the first tomcat server directory through command line and go to bin directory. Type "startup" and execute Tomcat. Then your tomcat server will start. Now go to the next Tomcat server dirctory through cmd and as same as the first one execute it through command line. Here as we haven't created CATALINA_HOME variable , we can not execute Tomcat straghtly double clicking startup.bat file. So when we execute Tomcat from cmd, it creates required environmental variables at that time and starts tomcat.

How to change Apache Tomcat running port

Go to conf folder of your apache tomcat installation. Open server.xml file. Method 1 Search for (Ctl+F) "Connector port" key word there. In the first matching occurence change the port value to the value which you wish. For better accuracy make sure the current port value in the first matching occurence is equal to the port which the tomcat currently running. restart tomcat. Method 2 Find the port which tomcat currently running. Search for (Ctl+F) the current port in server.xml file and change it to the value you want. restart tomcat.

AXIS2 Web Service in eclipse through Top Down Approach-java.lang.RuntimeException: Element QName is null

Image
Based on this tutorial, But used my own WSDL file. I used Top Down approach where to create java codes from the WSDL file. But at “Axis 2 Web Service Skeleton Java Bean Configuration” wizard window I clicked next and there occurred an exception as follows saying Element QName is null. SOLUTION Add the following XML element within tags and inside tag which has a wsdl:fault (Particular operation should throw an exception). So I had to add, It appears as follows, <binding> <operation name="GetBalance"> <operation soapaction="http://it4110.itfac.mrt.ac.lk/2010/074005N/GetBalance"></operation> <input /> <output> </output> <fault name="fault"> <fault name="fault" use="literal"></fault> </fault> </operation> </binding> Here the getBalance operation throws

Axis 2 web services in eclipse: Exception java.lang.NoClassDefFoundError: org/apache/http/HttpResponseFactory thrown when Services link clicked

I created the web service using axis2 and deploy through tomcat in eclipse following a Tutorial . Then axis2 homepage get displayed OK. But when the Services link clicked an exception page will get displayed as follows. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet.init() for servlet AxisServlet threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Unknown Source) root cause java.lang.NoClassDefFoundError: org/apache/http/HttpResponseFactory org.apache.axis

AXIS2 web service in eclipse: Web Service created, but when executed HTTP Status 404 page get displayed

Web Service project name= SimpleATMService http://localhost:8080/ATMService/ : HTTP Status 404 page SOLUTION Try This URL: http://localhost:8080/ATMService/axis2-web/