[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 791
  • Last Modified:

How can I run Apache Tomcat 6 as a Windows Service - little more complicated than just running the prepackaged Windows Service package?

We have Vertex (a Java based tax calculation software) installed on a Windows 2008 Std (non-R2) server. We installed Tomcat 6 and Axis2 on the webserver to run a soap service for our website to be able to communicate with and get tax quotes.
When I run Tomcat from the bin directory via the startup.bat everything is fine, but we need Tomcat to be started as a Windows Service, and not tied to any individual user account.
When the precompiled "Tomcat as a Service" package is installed to a different instance, and all the pieces used in the other instance (Axis2, Vertex) are installed to it, Axis2 works fine and their sample soap service works, but the Vertex service does not. It is throwing a bunch of class not defined errors. The Vertex service does need one classpath variable defined so it can find the Vertex software. I tried setting it in the bin and I can echo it with no probolem, but I still can't get the Vertex service to work.
Where should I declare this classpath for the service to work (it is already in the environment variables)?
Please let me know if you need more info
Below is the beginning of the explicit error messages:

Error: java.lang.NoClassDefFoundError: com/vertexinc/equantum/qsut/exception/VertexRuntimeException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.(DefaultSchemaGenerator.java:136) at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:499) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:386) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:101) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:143) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:659) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:337) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:241) at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:331) at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64) at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71) at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:90) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: Class Not found : com.vertexinc.equantum.qsut.exception.VertexRuntimeException at org.apache.axis2.deployment.DeploymentClassLoader.findClass(DeploymentClassLoader.java:86) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 19 more
1 Solution
Copy the Vertex jar files to the Tomcat "lib" folder. Everything in it is automatically available to all user applications.
callis610Author Commented:
Great answer, thanks for the feedback.

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now