Export Eclipse Web Service to Tomcat
Hi, I posted a similar message a while ago but didn't get round to fixing the issue. I'm back at this problem again...basically i want to deploy a web service developed and running within Eclipse to a standalone Tomcat Server. The web service runs fine within Eclipse on a Tomcat 6 Server. I want to deploy this to an external Tomcat server(not running within eclipse) but I am unsure how. Below are a list of newbie questions related to deploying. I have developed the service using axis2 in a similar fashion to the tutorial referenced here(my code is completely different but i used similar methodology) http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html I know (I think!) I need to FileExportWebWAR File. Is this correct? There must be more to it!! What do I do with the .jars referenced in Java Build Path and Java EE Module dependencies - do these get added to the WAR or do I need to manually copy this to tomcat server. If so to what folder? The web service references .config files on my c: drive that sets up JDBC driver etc. I probably need to change location of these files to a folder in Tomcat? What is protocol? The service also references a log4j properties stored file in the src folder. Where should I put this on Tomcat server? The log4j properties file sets up a log file on my c: drive. I probabl need to edit location of log file, again what is protocol? Is there an easy way of testing the deployed .war is running correctly? Do I need to put the axis2 .jar on the Tomcat? As you can see they are basically a list of newbie questions. All help appreciated. Thanks... -- View this message in context: http://www.nabble.com/Export-Eclipse-Web-Service-to-Tomcat-tp24823513p24823513.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Export Eclipse Web Service to Tomcat
Hi Mark.. Thanks for your reply... I apologise for the confusion. When I said 'what is the protocol' I wasn't referring to a tech. protocol I just meant..'what is the usual procedure /best practice...where are these files normally stored/referenced and so on...' I'm in work now but I'll attempt to deploy my app tonight when i get home... Best regards and thanks... Mark Thomas-18 wrote: Toriacht wrote: I know (I think!) I need to FileExportWebWAR File. Is this correct? There must be more to it!! What do the Eclipse docs say you need to do? What do I do with the .jars referenced in Java Build Path and Java EE Module dependencies - do these get added to the WAR or do I need to manually copy this to tomcat server. If so to what folder? Sounds like you need to read the Servlet specification. JARs required by your app should be packaged in the WAR. Tomcat will provide the J2EE libraries appropriate for ta Servlet/JSP container. The web service references .config files on my c: drive that sets up JDBC driver etc. I probably need to change location of these files to a folder in Tomcat? What is protocol? What is protocol? doesn't make any sense. Regardless, read the Tomcat docs on JDBC resources. The service also references a log4j properties stored file in the src folder. Where should I put this on Tomcat server? The log4j docs tell you where log4j looks for this file. The Servlet spec will then tell you where to put the file so log4j finds it. The log4j properties file sets up a log file on my c: drive. I probabl need to edit location of log file, again what is protocol? Again What is protocol? doesn't make sense. If you mean Where are log files normally placed? then CATALINA_BASE/logs is the answer. Is there an easy way of testing the deployed .war is running correctly? No error messages in the Tomcat logs == Tomcat thinks everything is OK. Beyond that you'll have to test it yourself. Do I need to put the axis2 .jar on the Tomcat? See answer regarding JARs above. As you can see they are basically a list of newbie questions. All help appreciated. And most of these are answered in the appropriate docs. In terms of help, read the docs, do some research, read this http://www.catb.org/~esr/faqs/smart-questions.html and then ask any remaining questions. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Export-Eclipse-Web-Service-to-Tomcat-tp24823513p24826091.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploy 1st Service to Tomcat proper
Hi Michael... I'm sorry for the confusion. My problem is on Tomcat with NO IDE. I mentioned just the IDE to illustrate that the service does work. It's when I leave the IDE i have problems. There are NO errors in any of the logs! Catilina.log mentions that it is deplying the service on startup. thats it. I only mentioned the Log4j message because.. 1. Its the only message getting printed to any of the logs 2. I know that it is definitely coming from my web service code. Thanks, Tori Michael Ludwig-6 wrote: Toriacht schrieb am 29.01.2009 um 01:24:12 (-0800): When i click on the application in my Tomcat Manager page I get a HTTP Status 404 error telling me that my web service (requested resource) is not available. There is no error in the $Tomcat/logs folder. I checked, manager, catalina, stdout, localhost, jakarta_service,host-manager and admin logs. But I could see no error. In catalina.2009.X.X.log when I start Tomcat it says it deploys the service. When I stop Tomcat I get a message in stdout_2009.X.X, a log4j error message telling me that LogManager.repositorySelector was null. This message is coming from my service as I used to get it within Eclipse before I set up Log4j correctly but I don't think this is the cause.. It's not clear to me what you're describing here. Is the Tomcat you're talking about running inside your IDE? Or standalone? Is it possible that Log4J is improperly configured and thus not showing you error messages? I'd get rid of the IDE and log4j to cut down complexity. Then, you should find error messages in the log files. Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Deploy-1st-Service-to-Tomcat-proper-tp21716925p21801104.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploy 1st Service to Tomcat proper
Hi Michael, Thank you for your reply. I should hasve pasted the error. The reason I didn't wa sthat I assumed that my method of export.wardeploy was incorrect. When i click on the application in my Tomcat Manager page I get a HTTP Status 404 error telling me that my web service (requested resource) is not available. There is no error in the $Tomcat/logs folder. I checked, manager, catalina, stdout, localhost, jakarta_service,host-manager and admin logs. But I could see no error. In catalina.2009.X.X.log when I start Tomcat it says it deploys the service. When I stop Tomcat I get a message in stdout_2009.X.X, a log4j error message telling me that LogManager.repositorySelector was null. This message is coming from my service as I used to get it within Eclipse before I set up Log4j correctly but I don't think this is the cause.. this link would indicate it might not be.. http://www.mail-archive.com/log4j-u...@logging.apache.org/msg09782.html Any ideas welcome, Thanks again, Tori Michael Ludwig-6 wrote: Toriacht schrieb am 28.01.2009 um 14:48:59 (-0800): Exportwar exports a war file with the same name of my project. I can then browse from Tomcat, import and deploy this service. but if I click on teh service it get brought to an error page. Then the error message might give a hint as to what the problem is. It is probably in one of the log files in $Tomcat/logs. Also, the java project had a lot of dependencies on jar files. Do these get exported or do I have to manually deploy/copy these to my Tomcat server? That depends. You can use jar tf your.war to check what's in the JAR. Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Deploy-1st-Service-to-Tomcat-proper-tp21716925p21722963.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Deploy 1st Service to Tomcat proper
Hi, I have developed my first web service. It works fine with Tomcat within my Eclipse IDE and the web service client within Eclipse can connect fine and so on. The service is a particular class name specified by my 'service provider'. The provider will send notifications to my webservice, it expects it to be the name of this class. The majority of the project is standard java classes processing the received messages and storing in a MySQL database. The Eclipse project is called 'mywebservice' and the web service class itself has another name, it's just a very simple java class that I exposed as a service using Eclipse/Axis2. I want to deploy this web service to a live Tomcat server (running on my laptop). I am unsure how to do this. Exportwar exports a war file with the same name of my project. I can then browse from Tomcat, import and deploy this service. but if I click on teh service it get brought to an error page. Also, the java project had a lot of dependencies on jar files. Do these get exported or do I have to manually deploy/copy these to my Tomcat server? Thanks for reading, Tori -- View this message in context: http://www.nabble.com/Deploy-1st-Service-to-Tomcat-proper-tp21716925p21716925.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Beginner - Step 2!
Thanks Alan, I had tried the clean etc. to no avail. The file was there and writeable etc. When I moved my workspace to c:/workspace away from 'documents and settings' folder and created a new project the error disappeared. I'm not sure if it solved because of the new project or new file location. Thanks for the reply. T Alan Chaney wrote: Toriacht Eclipse wst has a number of dfferent ways of working. It looks like you have selected the (default) way in which eclipse creates its own internal copy of the webapps directory - in your case in the folder E:\\ ..\tmp1\service_demo. What the error is saying is that as tomcat starts it can't find the doc base. This is most likely for the following two reasons: 1. the directory really isn't writeable 2. more likely, you've managed to get eclipse out of sync with your project. I suggest that you try the following: Find the 'Server' tab (normally in one of the bottom panes) Find the tomcat server - right click on in and select 'Clean' and then 'Refresh' This will rebuild the internal copy. Try starting it again. If this still doesn't work, then please provide the following: The FULL startup display from the 'console' pane Your web.xml Thanks Alan Toriacht wrote: Thanks guys... I'm not sure if the following is an Eclipse or Tomcat issue. I have a simple webservices demo written from tuorial. It appeared that teh server was started up thru server staus window of eclips..console o/p etc but it never appeared in task manager or the tomcat was not accessable thru a browser. On closer inspection I found the following error..this happens when i try to start the server thru eclipse.. SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base C:\Documents and Settings\Brian\workspace\ganymede\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\service_demo does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141) Any ideas? T p.s. I have another thread on web services that ended up asking the same qn as above. although it started out as a more generic question. I hope this not against policy. I'll delete other thread if required. Caldarale, Charles R wrote: From: g f [mailto:gfo...@gmail.com] Subject: Re: Tomcat Beginner - Step 2! Change your port forwarding(virtual server) to forward port 80 (on the outside) to port 8080 on the inside. If your router/modem doesn't support port forwarding, change the Connector port in conf/server.xml to use 80 rather than 8080. You must restart Tomcat whenever you make changes to the server.xml file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-Beginner---Step-2%21-tp21509364p21526890.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Beginner - Step 2!
Thanks guys... I'm not sure if the following is an Eclipse or Tomcat issue. I have a simple webservices demo written from tuorial. It appeared that teh server was started up thru server staus window of eclips..console o/p etc but it never appeared in task manager or the tomcat was not accessable thru a browser. On closer inspection I found the following error..this happens when i try to start the server thru eclipse.. SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base C:\Documents and Settings\Brian\workspace\ganymede\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\service_demo does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141) Any ideas? T p.s. I have another thread on web services that ended up asking the same qn as above. although it started out as a more generic question. I hope this not against policy. I'll delete other thread if required. Caldarale, Charles R wrote: From: g f [mailto:gfo...@gmail.com] Subject: Re: Tomcat Beginner - Step 2! Change your port forwarding(virtual server) to forward port 80 (on the outside) to port 8080 on the inside. If your router/modem doesn't support port forwarding, change the Connector port in conf/server.xml to use 80 rather than 8080. You must restart Tomcat whenever you make changes to the server.xml file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-Beginner---Step-2%21-tp21509364p21517113.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Beginner - Step 2!
Hi, I have written my first web service which works fine and is visible at //localhost:8080/mywebservice. I still can't make it publicly visible. I have a beginner few questions. 1. What is the default public address of my tomcat server, and the applications on it. Is it just my external IP address/applicationName? Does the address include port number? 2. I am connected thru a DLink wireless modem to my ISP modem. My ISP modem is v simple and lets all thru. I enabled Virtual Server Http on my wireless modem, public port 80, private port 80 and associated with my 192.x.x address I edited my Windows firewall to allow tomcat still nothing. 3. What other steps do I have to take to make my Tomcat publicly visible..? 4. I am intermittently getting a jvm_bindnull error. Is this because I'm not shutting Tomcat down properly? What steps should be taken to avoid this error? Thanks, T -- View this message in context: http://www.nabble.com/Tomcat-Beginner---Step-2%21-tp21509364p21509364.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Beginner - Netbeans IDE
Thanks for the replies guys... I was aware I could uninstall the .exe and install the .zip version. The .exe does not come with a catalina.bat (I think)...am I right? I suppose I was wondering was there a standard catalina.bat example that somebody had that I could point the IDE towards so that my current config. works or I could drop it into one of the Tomcat folders etc? If this is the case would anybody have a catalina.bat file I could use? If this is not the case, I am probably better off uninstalling it and dowloading teh .zip version? Thanks again for the replies... Toriacht mgainty wrote: if you need to use a different catalina.bat go to NetBeans Project Right click properties / run / change target server catalina.bat must be on path make sure CATALINA_HOME/bin is on PATH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 14 Jan 2009 05:42:58 -0800 From: brian.p.gunn...@gmail.com To: users@tomcat.apache.org Subject: Beginner - Netbeans IDE Hi, I am trying to deploy my first webservice. I downloaded Netbeans IDE to develop it (normally use Eclipse). I already had Tomcat downloaded as an .exe, installed and running as a service for a while When i try to deploy my app to my server Netbeans complains that it can't find Catalina.bat...(as it tries to stop tomcat). I presume this is because Tomcat is running as a windows service or something similar and Netbeans can't connect I apologise if these answers are too simple for this forum but... 1 .How do I deploy this to my Tomcat server using my current configuration 2. How do I deploy to a Tomcat server on a different machine Many thanks, Toriacht -- View this message in context: http://www.nabble.com/Beginner---Netbeans-IDE-tp21456213p21456213.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Windows Liveā¢: Keep your life in sync. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_012009 -- View this message in context: http://www.nabble.com/Beginner---Netbeans-IDE-tp21456213p21459949.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Beginner - Netbeans IDE
Thanks again guys... i have removed the .exe version and downloaded the .zip version. I had a look in the bin folder. There seems to be multiple references to CATALINA_HOMA and JAVA_HOME etc. in what files/and where do I need set these variables. Thank Tori Caldarale, Charles R wrote: From: Toriacht [mailto:shatner.will...@gmail.com] Subject: RE: Beginner - Netbeans IDE The .exe does not come with a catalina.bat Correct; there are no scripts in the .exe download (and I don't know why). I suppose I was wondering was there a standard catalina.bat example that somebody had that I could point the IDE towards Yes - the one in the .zip download. Just use that. I am probably better off uninstalling it and dowloading teh .zip version? Yes; the .zip gives you more options and more control over Tomcat, which is what you need when running it under an IDE. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Beginner---Netbeans-IDE-tp21456213p21465783.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Beginner - Netbeans IDE
Hi Chuck, thanks again for all your helpyour help. I'm nearly there...just a few more queries...My user variables setting was taking precendence over system (was set to a 1.6 JRE) so thats why it wasn't starting. to get started.. i ran the service.bat to install as a service (is this permanent?) I then ran the service manager and service runner in the bin folder and tomcat appears in the list of processes in task manager. all seems good so far. Is this all I need to do? Is this how I should always start? Finally...when i run Netbeans and try to add Tomcat as a server it is never visible? just Glassfish and WeRuby. If I select 'add server' it assumes I want to add a Glassfish server and wont let me select Tomcat. Netbeans doesn't know its there... Thanks again, Toriacht Caldarale, Charles R wrote: From: Toriacht [mailto:shatner.will...@gmail.com] Subject: RE: Beginner - Netbeans IDE in what files/and where do I need set these variables. You do not need to set CATALINA_HOME - that is done automatically by the startup.bat script. I normally set JAVA_HOME as a global environment variable, just so I don't have to remember to keep doing it. Set it to the location of your JDK. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Beginner---Netbeans-IDE-tp21456213p21466853.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org