Start webservice on tomcat error - web-services

I am trying to write a webservice with netbeans and when i use tomcat server it can deploy but can not start. the following message is what netbeans says when i try to start the webapp on tomcat in servers tab:
Failed application at context path /webapp could not be started.
this is its log
Jul 22, 2014 9:11:12 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
INFO: WSSERVLET12: JAX-WS context listener initializing
Jul 22, 2014 9:11:12 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/E:/ETC_PlazaStationSoft/WebApp/build/web/WEB-INF/lib/webservices-rt.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
************************************WARNING*************************************
To use JAX-WS 2.1 with JDK 6, newer versions of API jars need to be in bootclasspath
before rt.jar. To do this you can use Java endorsed mechanism to override what is in
Java platform. The easiest way to do so is to put JAX-WS 2.1 and JAXB 2.1 API jars to
C:\Program Files (x86)\Apache Software Foundation\Apache Tomcat 7.0.22\endorsed folder.
java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/E:/ETC_PlazaStationSoft/WebApp/build/web/WEB-INF/lib/webservices-rt.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:173)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:456)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:302)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:106)
at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:109)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:161)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:154)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:153)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:338)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:201)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:505)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Jul 22, 2014 9:11:12 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jul 22, 2014 9:11:12 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/WebApp] startup failed due to previous errors
Jul 22, 2014 9:11:12 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
INFO: WSSERVLET13: JAX-WS context listener destroyed

Related

Cannot connect to 127.0,0.1 - CF Server (ColdFusion 2016) suddenly stopped and will not re-start

I have been using ColdFusion 2016 for about 5 months without problem. Two days ago I suddenly could not access the built in server, receiving such messages as this in Opera:
127.0.0.1 refused to connect (Opera)
ERR_CONNECTION_REFUSED (Chrome).
When trying to start the server in Control Panel\System and Security\Administrative Tools>Services I get
Error Code 2 (non Microsoft app)
I thought it could be a firewall issue, since when booting up I saw a message saying that another app (Akamai NetSession) was being blocked and that Windows Firewall had made some changes. However on checking the firewall, ColdFusion Server is being allowed through (as are Opera Chrome, etc).
I tried to starting the CF server from a command prompt, but after navigating to the \bin directory, and typing ColdFusion.exe start, I got no message of any kind.
I am on port 8501 with the server (8500 was used by and old version of CF11) but have never had any running problems. I am using the built-in server.
I noted that the IIS start page appears on 127.0.0.1 when I checked the relevant options, so localhost is not completely disabled.
I am not an expert on server issues. Anyone have any ideas? Thanks in advance for comments.
UPDATE:
The full logs are:
May 17, 2017 5:03:28 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\ColdFusion2016\cfusion\lib;C:\ColdFusion2016\cfusion\jintegra\bin;C:\ColdFusion2016\cfusion\jintegra\bin\international;C:\ColdFusion2016\cfusion\lib\oosdk\classes\win
May 17, 2017 5:03:29 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8501"]
May 17, 2017 5:03:29 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
May 17, 2017 5:03:29 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8016"]
May 17, 2017 5:03:29 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
May 17, 2017 5:03:29 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 17, 2017 5:03:29 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.32
May 17, 2017 5:03:31 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
05/17 17:03:32 INFO License Service: Flex 1.5 CF Edition enabled
05/17 17:03:32 INFO Starting Flex 1.5 CF Edition
May 17, 2017 5:03:32 PM org.apache.catalina.core.ApplicationContext log
INFO: ColdFusionStartUpServlet: ColdFusion: Starting application services
May 17, 2017 5:03:32 PM org.apache.catalina.core.ApplicationContext log
INFO: ColdFusionStartUpServlet: ColdFusion: VM version = 25.72-b15
May 17, 2017 17:03:33 PM Information [localhost-startStop-1] - Starting logging...
May 17, 2017 17:03:33 PM Information [localhost-startStop-1] - Starting license...
May 17, 2017 17:03:33 PM Information [localhost-startStop-1] - Developer Edition enabled
May 17, 2017 17:03:33 PM Information [localhost-startStop-1] - Starting crypto...
May 17, 2017 17:03:33 PM Information [localhost-startStop-1] - Installed JSafe JCE provider: Version 6.21 Crypto-J 6.2.1, EMC Corporation. JsafeJCE Security Provider (implements RSA, DSA, ECDSA, Diffie-Hellman, ECDH, AES, DES, Triple DES, DESX, RC2, RC4, RC5, PBE, MD2, MD5, RIPEMD160, SHA1, SHA224, SHA256, SHA384, SHA512, HMAC-MD5, HMAC-RIPEMD160, HMAC-SHA1, HMAC-SHA224, HMAC-SHA256, HMAC-SHA384, HMAC-SHA512, HMACDRBG, HASHDRBG, CTRDRBG, FIPS186PRNG, SHA1PRNG, MD5PRNG; RFC 3394, RFC 5649 AES Key Wrap; X.509 CertificateFactory; PKCS12, PKCS15 KeyStore; X.509V1, PKIX, PKIX-SuiteB, PKIX-SuiteBTLS CertPathValidators; X.509V1, PKIX, PKIX-SuiteB, PKIX-SuiteBTLS CertPathBuilders; LDAP, Collection CertStores)
May 17, 2017 17:03:33 PM Information [localhost-startStop-1] - Starting security...
May 17, 2017 17:03:33 PM Error [localhost-startStop-1] - Unable to initialise Security service: coldfusion.server.ServiceException: [C:\ColdFusion2016\cfusion\lib\neo-security.xml]coldfusion.wddx.WddxDeserializationException: WDDX packet parse error at line 1, column 1. Content is not allowed in prolog..
coldfusion.server.ServiceException: [C:\ColdFusion2016\cfusion\lib\neo-security.xml]coldfusion.wddx.WddxDeserializationException: WDDX packet parse error at line 1, column 1. Content is not allowed in prolog..
at coldfusion.security.SecurityManager.loadSecurity(SecurityManager.java:1418)
at coldfusion.security.SecurityManager.load(SecurityManager.java:1375)
at coldfusion.server.ServiceBase.start(ServiceBase.java:59)
at coldfusion.security.SecurityManager.start(SecurityManager.java:1365)
at coldfusion.server.CFService.setupSecurity(CFService.java:438)
at coldfusion.server.CFService.start(CFService.java:560)
at coldfusion.server.j2ee.CFStartUpServlet.startCFService(CFStartUpServlet.java:565)
at coldfusion.server.j2ee.CFStartUpServlet.init(CFStartUpServlet.java:508)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)
at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:59)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5049)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5341)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
May 17, 2017 17:03:33 PM Error [localhost-startStop-1] - Unable to initialise CFStartupServlet:[C:\ColdFusion2016\cfusion\lib\neo-security.xml]coldfusion.wddx.WddxDeserializationException: WDDX packet parse error at line 1, column 1. Content is not allowed in prolog..
May 17, 2017 17:03:33 PM Information [localhost-startStop-1] - Shutting down servlet container...

CFstart shows warning on "Apache Tomcat Native library"

We I do a command line start of ColdFusion 10, I get the following warning
D:\ColdFusion10\cfusion\bin>cfstart
Oct 29, 2013 6:43:34 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: D:\\ColdFus
ion10\\cfusion\lib;D:\\ColdFusion10\\cfusion\jintegra\bin;D:\\ColdFusion10\\cfus
ion\jintegra\bin\international;D:\\ColdFusion10\\cfusion\lib\oosdk\classes\win
Oct 29, 2013 6:43:53 AM org.apache.coyote.AbstractProtocol init
I am running the built in Server. What is needed to correct this?
Download the APR - http://apr.apache.org/
Follow the docs to install & configure - http://tomcat.apache.org/tomcat-7.0-doc/apr.html

tomcat 7.0.40 deployment severe wsservlet 11 Deployment error

I have tried the tutorial on http://www.mkyong.com/webservices/jax-ws/jax-ws-hello-world-example-document-style/comment-page-1/#comment-133527. This tutorial tells how to create a helloworld web service, publish it and try it by a client code. The tutorial works well. I can publish web service with the publisher (without deploying ???) and I can run the client and call the web service method and get answer.
My web service code is part of another web project. When I deploy the project war file on tomcat I get the error. When I delete the web service code( service, client and publisher ) from project I can deploy my web project.
I checked web.xml file, sun-jaxws.xml file and everything a million times but I can not find anything. Please help..
May 29, 2013 10:33:53 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error during ServletContainerInitializer processing
javax.servlet.ServletException: com.sun.xml.ws.transport.http.servlet.WSServletE
xception: WSSERVLET11: failed to parse runtime descriptor: com.sun.xml.ws.util.S
erviceConfigurationError: com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigura
tor: Provider com.sun.xml.ws.addressing.policy.AddressingFeatureConfigurator is
specified in jar:file:/C:/Program%20Files/Apache/apache-tomcat-7.0.40/webapps/RO
OT/WEB-INF/lib/webservices-rt.jar!/META-INF/services/com.sun.xml.ws.policy.jaxws
.spi.PolicyFeatureConfiguratorbut could not be instantiated: java.lang.ClassCast
Exception: Cannot cast com.sun.xml.ws.addressing.policy.AddressingFeatureConfigu
rator to com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator
at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.o
nStartup(WSServletContainerInitializer.java:70)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5370)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:
1654)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11
: failed to parse runtime descriptor: com.sun.xml.ws.util.ServiceConfigurationEr
ror: com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator: Provider com.sun
.xml.ws.addressing.policy.AddressingFeatureConfigurator is specified in jar:file
:/C:/Program%20Files/Apache/apache-tomcat-7.0.40/webapps/ROOT/WEB-INF/lib/webser
vices-rt.jar!/META-INF/services/com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureCon
figuratorbut could not be instantiated: java.lang.ClassCastException: Cannot cas
t com.sun.xml.ws.addressing.policy.AddressingFeatureConfigurator to com.sun.xml.
ws.policy.jaxws.spi.PolicyFeatureConfigurator
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseA
daptersAndCreateDelegate(WSServletContextListener.java:141)
at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.o
nStartup(WSServletContainerInitializer.java:65)
... 13 more
Caused by: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.policy.
jaxws.spi.PolicyFeatureConfigurator: Provider com.sun.xml.ws.addressing.policy.A
ddressingFeatureConfigurator is specified in jar:file:/C:/Program%20Files/Apache
/apache-tomcat-7.0.40/webapps/ROOT/WEB-INF/lib/webservices-rt.jar!/META-INF/serv
ices/com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfiguratorbut could not be i
nstantiated: java.lang.ClassCastException: Cannot cast com.sun.xml.ws.addressing
.policy.AddressingFeatureConfigurator to com.sun.xml.ws.policy.jaxws.spi.PolicyF
eatureConfigurator
at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:258)
at com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:151)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.jav
a:465)
at com.sun.xml.ws.util.ServiceFinder$CompositeIterator.next(ServiceFinde
r.java:402)
at com.sun.xml.ws.policy.jaxws.PolicyUtil.addServiceProviders(PolicyUtil
.java:97)
at com.sun.xml.ws.policy.jaxws.PolicyUtil.<clinit>(PolicyUtil.java:83)
at com.sun.xml.ws.policy.jaxws.PolicyWSDLGeneratorExtension.loadConfigur
ators(PolicyWSDLGeneratorExtension.java:476)
at com.sun.xml.ws.policy.jaxws.PolicyWSDLGeneratorExtension.start(Policy
WSDLGeneratorExtension.java:124)
at com.sun.xml.ws.wsdl.writer.WSDLGeneratorExtensionFacade.start(WSDLGen
eratorExtensionFacade.java:71)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.generateDocument(WSDLGenerat
or.java:407)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.doGeneration(WSDLGenerator.j
ava:330)
at com.sun.xml.ws.db.DatabindingImpl.generateWSDL(DatabindingImpl.java:2
30)
at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.ja
va:553)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:278
)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.
java:147)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:574)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:557)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapter
s(DeploymentDescriptorParser.java:260)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(Deploy
mentDescriptorParser.java:152)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseA
daptersAndCreateDelegate(WSServletContextListener.java:131)
... 14 more
Caused by: java.lang.ClassCastException: Cannot cast com.sun.xml.ws.addressing.p
olicy.AddressingFeatureConfigurator to com.sun.xml.ws.policy.jaxws.spi.PolicyFea
tureConfigurator
at java.lang.Class.cast(Class.java:3014)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.jav
a:460)
... 31 more
May 29, 2013 10:33:53 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
May 29, 2013 10:33:55 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache\apache-tomcat-
7.0.40\webapps\docs
May 29, 2013 10:33:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jcaptcha.sourceforge.net is already defined
May 29, 2013 10:33:59 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache\apache-tomcat-
7.0.40\webapps\examples
May 29, 2013 10:34:00 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jcaptcha.sourceforge.net is already defined
May 29, 2013 10:34:00 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache\apache-tomcat-
7.0.40\webapps\host-manager
May 29, 2013 10:34:01 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jcaptcha.sourceforge.net is already defined
May 29, 2013 10:34:01 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache\apache-tomcat-
7.0.40\webapps\manager
May 29, 2013 10:34:03 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jcaptcha.sourceforge.net is already defined
May 29, 2013 10:34:03 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 29, 2013 10:34:03 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 29, 2013 10:34:03 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17869 ms
Putting jar files from https://metro.java.net/2.2/ in webinf/lib solved my problem...

NullPointerException from org.cloudfoundry.runtime.env.CloudEnvironment.getServiceInfo at Server startup

I am trying to deploy a tomcat 7.0 web app as a standalone application based on the blog http://blog.cloudfoundry.org/2012/06/18/deploying-tomcat-7-using-the-standalone-framework/ with my-sql service. While this app works fine without a service, the server fails to start when I bind a MySQL service to the app. Below is the exception I get on server start up:
Mar 22, 2013 8:03:49 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 22, 2013 8:03:49 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 22, 2013 8:03:49 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCa
che', 'org.apache.jasper.compiler.TldLocationsCache#2fe6e305')
Mar 22, 2013 8:03:49 AM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = [/var/vcap/data/dea/apps
/log-app-0-0466f9837a2ada3db95aef1b77a78787/app/webapps/ROOT/]
Mar 22, 2013 8:03:49 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Mar 22, 2013 8:03:50 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of clas
s org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'mysql1': Invocation of init method failed; nested exception is java.lang
.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:4797)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:1114)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig
.java:1673)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
**Caused by: java.lang.NullPointerException
at org.cloudfoundry.runtime.env.CloudEnvironment.getServiceInfo(CloudEnv
ironment.java:150)**
at org.cloudfoundry.runtime.service.AbstractCloudServiceFactory.createIn
stance(AbstractCloudServiceFactory.java:54)
at org.springframework.beans.factory.config.AbstractFactoryBean.afterPro
pertiesSet(AbstractFactoryBean.java:130)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 26 more
Mar 22, 2013 8:03:50 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Mar 22, 2013 8:03:50 AM org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
This is the localhost log obtained using
vmc files log-app app/logs/localhost.2013-03-22.log
Any help and insight on this issue is much appreciated.
Also, I would like to add that I am binding the service to the application during push. Here is the result of vmc app log-app command:
C:\Users\kinjal.doshi\apache-tomcat-7.0.35>vmc app log-app
log-app: running
platform: standalone on java
usage: 256M x 1 instance
urls: log-app.cloudfoundry.com
services: mysql-2
I have been able to resolve this issue. Just needed to add mysql connector jar to the tomcat 7.0 lib folder

No endpoint mapping found when setting up Spring Web Service

I'm a beginner at setting up spring web-applications. I got this far but now I find myself stuck.
I get the following error:
WARNING: No endpoint mapping found for [SaajSoapMessage {http://mycompany.com/weather/schemas}GetCities]
The main problem is that I have run out of ideas where to look for debug information. I fixed as many errors that I've seen, but now I can't even find something wrong in the logs. So I'm getting bit desperate.
This my web.xml
<web-app>
<display-name>Weather report webservice</display-name>
<servlet>
<servlet-name>spring-ws</servlet-name>
<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-ws-servlet.xml</param-value>
</init-param>
<init-param>
<param-name>transformWsdlLocations</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>spring-ws</servlet-name>
<url-pattern>/weatherws</url-pattern>
</servlet-mapping>
</web-app>
This is what my spring-ws-servlet.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:sws="http://www.springframework.org/schema/web-services"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="path.to.weather"/>
<sws:annotation-driven/>
</beans>
This is what my endpoint looks like:
#Endpoint
public class WeatherEndpoint {
private static final String NAMESPACE_URI = "http://mycompany.com/weather/schema";
private WeatherReportManager manager;
#Autowired
public WeatherEndpoint(WeatherReportManager manager) throws JDOMException {
this.manager = manager;
}
#PayloadRoot(namespace = NAMESPACE_URI, localPart = "GetCities")
#ResponsePayload
public Element getCities() {
Element toReturn = null;
for(City city : manager.getCities()) {
//To some stuff
}
return toReturn;
}
}
This is the catalina.log as I see it right now. I tried to get Tomcat to output DEBUG messages by editing the logging.properties. This did not give any additional effect.
INFO: Deploying web application archive weather.war
Feb 15, 2012 3:28:51 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'spring-ws': initialization started
Feb 15, 2012 3:28:51 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'spring-ws-servlet': startup date [Wed Feb 15 15:28:51 EET 2012]; root of context hierarchy
Feb 15, 2012 3:28:52 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-ws-servlet.xml]
Feb 15, 2012 3:28:52 PM org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping afterPropertiesSet
INFO: Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
Feb 15, 2012 3:28:52 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#36496381: defining beans [weatherEndpoint,weatherReportManagerWWW,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping#0,org.springframework.ws.soap.server.endpoint.mapping.SoapActionAnnotationMethodEndpointMapping#0,org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping#0,org.springframework.ws.server.endpoint.adapter.method.dom.DomPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.SourcePayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.jaxb.XmlRootElementPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.jaxb.JaxbElementPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.dom.JDomPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter#0,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
Feb 15, 2012 3:28:52 PM org.springframework.ws.soap.saaj.SaajSoapMessageFactory afterPropertiesSet
INFO: Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
Feb 15, 2012 3:28:52 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'spring-ws': initialization completed in 714 ms
Feb 15, 2012 3:28:52 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Feb 15, 2012 3:28:52 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory lib
Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Feb 15, 2012 3:28:53 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 15, 2012 3:28:53 PM org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8777 ms
Feb 15, 2012 3:29:07 PM org.springframework.ws.server.MessageDispatcher dispatch
WARNING: No endpoint mapping found for [SaajSoapMessage {http://mycompany.com/weather/schemas}GetCities]
I would be very grateful for any assistance. If you need to see anything additional, just let me know.
In your endpoint code you have :
private static final String NAMESPACE_URI = "http://mycompany.com/weather/schema";
but your message is from http://mycompany.com/weather/schemas namespace. Note the final s.