SOAP Fault recieved by JAX-WS Client is not throwing Exception - soap

I refactored a JAX-WS client to run on Java11 (from Java8). The refactored code now uses jax-ws\jaxb from jaxws-rt-2.3.2.jar instead of the java8 rt.jar. The client is able to handle responses successfully when there isn't a fault but when a fault is received, it does NOT throw an Exception.
I have both old and new apps in 2 eclipse workspaces. cxf-codegen-plugin 3.3.1 was used to generate the client artifacts in both. In debug mode, I am able to see that the same request is handled differently in both. While unmarshalling the response, the Java11 workspace creates the SOAP11Fault object w/o setting any of the object attributes (faultcode, faultstring, detail). This is causing the SOAPFaultBuilder.createException() method to attempt to return a ProtcolException (which it does not find). The Java8 workspace creates the SOAP11Fault with the necessary attributes and causes the SOAPFaultBuilder.createException() method to handle the exception correctly. It appears that jaxb is not unmarshalling the XML message correctly in the jaxws-rt distribution.
W:
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Service.ACME.v10.SomeProduct" xmlns:dt="urn:Data.ACME.v10.SomeProduct" xmlns:ft="urn:Fault.ACME.v10.SomeProduct" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="SomeProduct" targetNamespace="urn:Service.ACME.v10.SomeProduct">
<wsdl:types>
<xs:schema targetNamespace="urn:Data.ACME.v10.SomeProduct" xmlns:dt="urn:Data.ACME.v10.SomeProduct" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
...
</xs:schema>
</wsdl:types>
<wsdl:portType name="SomeProduct">
<wsdl:operation name="CallExpressInquiry">
<wsdl:input message="tns:ExpInq_InMsg"/>
<wsdl:output message="tns:ExpInq_OutMsg"/>
<wsdl:fault message="tns:InvalidInputErr_FaultMsg" name="InvalidInputErrFault"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SomeProductSOAP" type="tns:SomeProduct">
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SomeProductPolicy"/>
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="CallExpressInquiry">
<soap:operation soapAction="http://www.acme.org/SomeProduct/CallExpressInquiry"/>
<wsdl:input>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SomeProductPartsPolicy"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SomeProductPartsPolicy"/>
</wsdl:output>
<wsdl:fault name="InvalidInputErrFault">
<soap:fault use="literal" name="InvalidInputErrFault"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SomeProductService">
<wsdl:port binding="tns:SomeProductSOAP" name="SomeProductSOAP">
<soap:address location="https://uat.services.SomeProduct.com:8444/SomeProduct"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Response Payload:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>The Following Sender Id Not Registered: 12345</faultstring>
<detail>
<ns2:InvalidInputError xmlns:ns2="urn:Fault.ACME.v10.SomeProduct" xmlns="urn:Data.ACME.v10.SomeProduct">
<ns2:responseCode>307</ns2:responseCode>
</ns2:InvalidInputError>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Code from jaxws-rt package (StubHandler class):
public JavaCallInfo readResponse(Packet p, JavaCallInfo call) throws Throwable {
Message msg = p.getMessage();
if(msg.isFault()) {
->>> SOAPFaultBuilder faultBuilder = SOAPFaultBuilder.create(msg);
->>> Throwable t = faultBuilder.createException(checkedExceptions);
call.setException(t);
throw t;
} else {
initArgs(call.getParameters());
Object ret = responseBuilder.readResponse(msg, call.getParameters());
call.setReturnValue(ret);
return call;
}
}
Old Workspace w/Java8 logs (working):
Sep 17, 2019 3:34:26 PM com.sun.xml.internal.ws.api.pipe.Fiber dumpFiberContext
FINE: engine-JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e: Stub for https://uat.services.ensurebill.com:8444/EnsureBillfiber-1 After tube execution with NO ACTION or MSG ID and 'current' tube com.sun.xml.internal.ws.handler.ClientLogicalHandlerTube#571f07be.processResponse() from thread SwingWorker-pool-1-thread-1 with Packet: com.sun.xml.internal.ws.api.message.Packet#6ac6209f
Sep 17, 2019 3:34:26 PM com.sun.xml.internal.ws.api.pipe.Fiber dumpFiberContext
FINE: engine-JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e: Stub for https://uat.services.ensurebill.com:8444/EnsureBillfiber-1 After tube execution with NO ACTION or MSG ID and 'current' tube null.processResponse() from thread SwingWorker-pool-1-thread-1 with Packet: com.sun.xml.internal.ws.api.message.Packet#6ac6209f
Sep 17, 2019 3:34:26 PM com.sun.xml.internal.ws.api.pipe.Fiber _doRun
FINE: Thread leaving _doRun(): Thread[SwingWorker-pool-1-thread-1,5,main]
Sep 17, 2019 3:34:26 PM com.sun.xml.internal.ws.api.pipe.Fiber completionCheck
FINE: engine-JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e: Stub for https://uat.services.ensurebill.com:8444/EnsureBillfiber-1 completed
Sep 17, 2019 3:34:28 PM java.awt.DefaultKeyboardFocusManager dispatchEvent
FINE: sun.awt.TimedWindowEvent[WINDOW_LOST_FOCUS,opposite=null,oldState=0,newState=0] on frame0
Sep 17, 2019 3:34:28 PM java.awt.DefaultKeyboardFocusManager dispatchEvent
FINE: Active javax.swing.JFrame[frame0,0,0,1216x732,invalid,layout=java.awt.BorderLayout,title=Ensurebill SDK Sandbox v14.1.00.3 | Java Version: 1.8,resizable,normal,defaultCloseOperation=EXIT_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,1200x693,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true], Current focused javax.swing.JFrame[frame0,0,0,1216x732,invalid,layout=java.awt.BorderLayout,title=Ensurebill SDK Sandbox v14.1.00.3 | Java Version: 1.8,resizable,normal,defaultCloseOperation=EXIT_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,1200x693,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true], losing focus javax.swing.JFrame[frame0,0,0,1216x732,invalid,layout=java.awt.BorderLayout,title=Ensurebill SDK Sandbox v14.1.00.3 | Java Version: 1.8,resizable,normal,defaultCloseOperation=EXIT_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,1200x693,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true] opposite null
Sep 17, 2019 3:34:28 PM java.awt.DefaultKeyboardFocusManager dispatchEvent
FINE: java.awt.FocusEvent[FOCUS_LOST,temporary,opposite=null,cause=ACTIVATION] on javax.swing.JTextArea[,0,0,440x640,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder#2a127b2a,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],colums=40,columWidth=11,rows=40,rowHeight=16,word=true,wrap=true]
Sep 17, 2019 3:34:28 PM java.awt.DefaultKeyboardFocusManager dispatchEvent
FINE: java.awt.event.WindowEvent[WINDOW_DEACTIVATED,opposite=null,oldState=0,newState=0] on frame0
Keep-Alive-Timer, called close()
Keep-Alive-Timer, called closeInternal(true)
Keep-Alive-Timer, SEND TLSv1.2 ALERT: warning, description = close_notify
Keep-Alive-Timer, WRITE: TLSv1.2 Alert, length = 80
Keep-Alive-Timer, called closeSocket(true)
Sep 17, 2019 3:34:39 PM javax.xml.bind.ContextFinder find
FINE: Trying to locate com/sun/xml/internal/ws/fault/jaxb.properties
Sep 17, 2019 3:34:39 PM javax.xml.bind.ContextFinder find
FINE: not found
Sep 17, 2019 3:34:39 PM javax.xml.bind.ContextFinder find
FINE: Trying to locate com/sun/xml/internal/ws/fault/jaxb.properties
Sep 17, 2019 3:34:39 PM javax.xml.bind.ContextFinder find
FINE: not found
Sep 17, 2019 3:34:39 PM javax.xml.bind.ContextFinder find
FINE: Checking system property javax.xml.bind.context.factory
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder find
FINE: not found
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder find
FINE: Checking system property javax.xml.bind.JAXBContext
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder find
FINE: not found
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder lookupJaxbContextUsingOsgiServiceLoader
FINE: Unable to find from OSGi: javax.xml.bind.JAXBContext
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder find
FINE: Checking META-INF/services
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder find
FINE: Unable to find: META-INF/services/javax.xml.bind.JAXBContext
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder find
FINE: Trying to create the platform default provider
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder safeLoadClass
FINE: Trying to load com.sun.xml.internal.bind.v2.ContextFactory
Sep 17, 2019 3:34:40 PM javax.xml.bind.ContextFinder newInstance
FINE: loaded com.sun.xml.internal.bind.v2.ContextFactory from jar:file:/C:/Program%20Files/Java/jdk1.8.0_171/jre/lib/rt.jar!/com/sun/xml/internal/bind/v2/ContextFactory.class
Sep 17, 2019 3:34:40 PM com.sun.xml.internal.bind.v2.ContextFactory createContext
FINE: Property com.sun.xml.internal.bind.XmlAccessorFactoryis not active. Using JAXB's implementation
Sep 17, 2019 3:35:19 PM com.sun.xml.internal.bind.v2.util.XmlFactory createTransformerFactory
FINE: TransformerFactory instance: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl#5fd6be83
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: Trying to locate com/sun/xml/internal/ws/fault/jaxb.properties
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: not found
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: Checking system property javax.xml.bind.context.factory
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: not found
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: Checking system property javax.xml.bind.JAXBContext
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: not found
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder lookupJaxbContextUsingOsgiServiceLoader
FINE: Unable to find from OSGi: javax.xml.bind.JAXBContext
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: Checking META-INF/services
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: Unable to find: META-INF/services/javax.xml.bind.JAXBContext
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder find
FINE: Trying to create the platform default provider
Sep 17, 2019 3:35:50 PM javax.xml.bind.ContextFinder safeLoadClass
FINE: Trying to load com.sun.xml.internal.bind.v2.ContextFactory
Sep 17, 2019 3:35:51 PM javax.xml.bind.ContextFinder newInstance
FINE: loaded com.sun.xml.internal.bind.v2.ContextFactory from jar:file:/C:/Program%20Files/Java/jdk1.8.0_171/jre/lib/rt.jar!/com/sun/xml/internal/bind/v2/ContextFactory.class
Sep 17, 2019 3:35:51 PM com.sun.xml.internal.bind.v2.ContextFactory createContext
FINE: Property com.sun.xml.internal.bind.XmlAccessorFactoryis not active. Using JAXB's implementation
ensurebill.v10.tsysa.service.InvalidInputErrFaultMsg: The Following Sender Id Not Registered:F1273E49D2CA45C6AFD1413C1F0EF800
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:135)
at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
New Workspace w/Java11 logs (not throwing exception):
Sep 17, 2019 3:51:30 PM com.sun.xml.ws.api.pipe.Fiber dumpFiberContext
FINE: engine-JAX-WS RI 2.3.2 git-revision#3d0bba4: Stub for https://uat.services.ensurebill.com:8444/EnsureBillfiber-1 After tube execution with NO ACTION or MSG ID and 'current' tube com.sun.xml.ws.handler.ClientLogicalHandlerTube#3d400f20.processResponse() from thread SwingWorker-pool-1-thread-1 with Packet: com.sun.xml.ws.api.message.Packet#211f3a60
Sep 17, 2019 3:51:30 PM com.sun.xml.ws.api.pipe.Fiber dumpFiberContext
FINE: engine-JAX-WS RI 2.3.2 git-revision#3d0bba4: Stub for https://uat.services.ensurebill.com:8444/EnsureBillfiber-1 After tube execution with NO ACTION or MSG ID and 'current' tube null.processResponse() from thread SwingWorker-pool-1-thread-1 with Packet: com.sun.xml.ws.api.message.Packet#211f3a60
Sep 17, 2019 3:51:30 PM com.sun.xml.ws.api.pipe.Fiber _doRun
FINE: Thread leaving _doRun(): Thread[SwingWorker-pool-1-thread-1,5,main]
Sep 17, 2019 3:51:30 PM com.sun.xml.ws.api.pipe.Fiber completionCheck
FINE: engine-JAX-WS RI 2.3.2 git-revision#3d0bba4: Stub for https://uat.services.ensurebill.com:8444/EnsureBillfiber-1 completed
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder find
FINE: Searching jaxb.properties
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder getSystemProperty
FINE: Checking system property javax.xml.bind.JAXBContextFactory
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder getSystemProperty
FINE: not found
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder getSystemProperty
FINE: Checking system property javax.xml.bind.context.factory
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder getSystemProperty
FINE: not found
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder getSystemProperty
FINE: Checking system property javax.xml.bind.JAXBContext
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder getSystemProperty
FINE: not found
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder firstByServiceLoaderDeprecated
FINE: Searching META-INF/services
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder firstByServiceLoaderDeprecated
FINE: Configured factorty class:com.sun.xml.bind.v2.ContextFactory
Sep 17, 2019 3:51:30 PM javax.xml.bind.ContextFinder newInstance
FINE: loaded com.sun.xml.bind.v2.ContextFactory from jar:file:/C:/Users/layanij/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.jar!/com/sun/xml/bind/v2/ContextFactory.class
Sep 17, 2019 3:51:30 PM com.sun.xml.bind.v2.ContextFactory createContext
FINE: Property com.sun.xml.bind.XmlAccessorFactoryis not active. Using JAXB's implementation
Sep 17, 2019 3:51:30 PM javax.xml.soap.FactoryFinder getSystemProperty
FINE: Checking system property javax.xml.soap.SAAJMetaFactory
Sep 17, 2019 3:51:30 PM javax.xml.soap.FactoryFinder logFound
FINE: found com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl
Expecting the exception to be thrown in Java11 version workspace.

Good news, bad news. The good news is that I was able to get it working. The bad news is that I don't have any idea what did it. After many hours trying to resolve it, I decided to create a new workspace from scratch and re-apply my changes manually. I ran it and the fault response finally threw an exception in my client "faultCode argument for createFault was passed NULL" which confirmed my prior observation. I was able to find info online that suggested that the response might not be inline with the schema. I validated the XML payload against the schema and it was valid. I rebuilt the project with maven from the command prompt (outside of eclipse) and restarted the retested the application. The attributes of the fault where now populated correctly and my client is able to handle faults as expected. My only advise here for those developing in eclipse is that if all else fails, build a new workspace and see if that helps.

Related

Tomcat not starting in eclipse - no timeout issue - PFB logs

Tomcat starting from command prompt but not from eclipse.
No problem shown in logs. logs shows server started successfully.
Tomcat staring from command prompt but not from eclipse.
No problem shown in logs. logs shows server started successfully.
Mar 23, 2019 1:53:07 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:spring-interceptor' did not find a matching property.
Mar 23, 2019 1:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.5.28
Mar 23, 2019 1:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\FILES\Softwares\NewACFEclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Mar 23, 2019 1:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.5
Mar 23, 2019 1:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\FILES\Softwares\NewACFEclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Mar 23, 2019 1:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.5\endorsed
Mar 23, 2019 1:53:07 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Mar 23, 2019 1:53:07 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:\Program Files (x86)\Java\jre1.8.0_161\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files (x86)/Java/jre1.8.0_161/bin/client;C:/Program Files (x86)/Java/jre1.8.0_161/bin;C:/Program Files (x86)/Java/jre1.8.0_161/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\RSA SecurID Token Common;C:\Program Files\Java\jdk1.6.0_24\jre\bin\client;C:\oms\bb\cord9software\ant\bin;O:\ora1106w\BIN;C:\PROGRA~2\CA\SC\etpki\lib;C:\Program Files (x86)\CA\SharedComponents\PEC\bin;C:\Program Files\CA\SharedComponents\PEC\bin;c:\progra~1\ca\sc\etpki\lib;C:\Program Files\Java\jdk1.8.0_161\bin;C:\AmdocsProcessManager\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\WINDOWS\system32\windowspowershell\v1.0\;c:\program files\provision networks\virtual access client\;c:\oms\hotdeployment;C:\Bea10.3.4\wlserver_10.3;C:\Program Files (x86)\CA\Cryptography\;C:\Program Files (x86)\CA\SCM;O:\ora11202w\jdbc\lib\ojdbc6.jar;C:\Program Files\Perforce;C:\Python27;C:\Python27\Scripts;C:\Python27\GnuWin32\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Java\jdk1.8.0_161\bin;C:\Program Files (x86)\Apache Software Foundation\apache-maven-3.6.0\bin;C:\Users\akashmu\AppData\Local\Microsoft\WindowsApps;;C:\FILES\Softwares\NewACFEclipse;;.]
Mar 23, 2019 1:53:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Mar 23, 2019 1:53:08 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 23, 2019 1:53:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Mar 23, 2019 1:53:08 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 23, 2019 1:53:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1216 ms
Mar 23, 2019 1:53:08 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Mar 23, 2019 1:53:08 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.28
Mar 23, 2019 1:53:19 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.
Mar 23, 2019 1:53:19 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Mar 23, 2019 1:53:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Mar 23, 2019 1:53:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Mar 23, 2019 1:53:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 11105 ms
If you are staring the Tomcat server from the Java app then make sure it is attached to the app. Otherwise, start the server independently and the console logs will print the error if any.

Why is Eclipse - Tomcat 7 displaying all text in color red in console

I'm using Eclipse Kepler with Tomcat 7, I'm just testing a simple JSP page (test.jsp). It runs well in browser however all text in console is displayed in color red.
I have checked in Window/Preferences/(Run/Debug) properties and all seams to be fine.
The text from the console is the following:
Jan 07, 2015 3:31:07 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance
in production environments was not found on the java.library.path:
C:\Java\jdk1.8.0_05\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;...etc
Jan 07, 2015 3:31:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 07, 2015 3:31:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 07, 2015 3:31:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1676 ms
Jan 07, 2015 3:31:08 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 07, 2015 3:31:08 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.56
Jan 07, 2015 3:31:11 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took
[1,076] milliseconds.
Jan 07, 2015 3:31:12 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor
C:\MauricioFiles\ECLIPSE\Eclipse_JEE7_I\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf
\Catalina\localhost\Servlets_JSP_chapter21_musicII.xml
Jan 07, 2015 3:31:12 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to
'org.eclipse.jst.jee.server:
Servlets_JSP_chapter21_musicII' did not find a matching property.
Jan 07, 2015 3:31:12 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor
C:\MauricioFiles\ECLIPSE\Eclipse_JEE7_I\.metadata\.plugins
\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\Servlets_JSP_chapter21_musicII.xml has
finished in 862 ms
Jan 07, 2015 3:31:12 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 07, 2015 3:31:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 07, 2015 3:31:13 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4236 ms
Is something wrong with the proyect or is there a way to display text in black (just error in red)?
Thank you a lot!!
The text that is in red is being written to the System.err stream, the text in black is written to System.out. Nothing is inherently wrong, that's just how the system is differentiating the output streams. You can configure the display to your liking by right clicking in the console and selecting "Preferences"

Find localhost tomcat link of application

I have found an old jsf project I coded. However, I cannot find the right tomcat localhost link. It seems that everything runs fine, like:
Sep 15, 2014 10:02:13 PM org.apache.catalina.core.AprLifecycleListener init
Sep 15, 2014 10:02:14 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
Warnung: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TestProject' did not find a matching property.
Sep 15, 2014 10:02:14 PM org.apache.coyote.AbstractProtocol init
Information: Initializing ProtocolHandler ["http-bio-8080"]
Sep 15, 2014 10:02:14 PM org.apache.coyote.AbstractProtocol init
Information: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 15, 2014 10:02:14 PM org.apache.catalina.startup.Catalina load
Information: Initialization processed in 1790 ms
Sep 15, 2014 10:02:14 PM org.apache.catalina.core.StandardService startInternal
Information: Starting service Catalina
Sep 15, 2014 10:02:14 PM org.apache.catalina.core.StandardEngine startInternal
Information: Starting Servlet Engine: Apache Tomcat/7.0.47
Sep 15, 2014 10:02:16 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
Information: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [123] milliseconds.
Sep 15, 2014 10:02:28 PM org.apache.catalina.core.ApplicationContext log
Information: No Spring WebApplicationInitializer types detected on classpath
Sep 15, 2014 10:02:28 PM com.sun.faces.config.ConfigureListener contextInitialized
Information: Mojarra 2.2.0-m08 (-SNAPSHOT 20130107-2105 https://svn.java.net/svn/mojarra~svn/tags/2.2.0-m08#11337) für Kontext '/TestProject' wird initialisiert.
Information: Mojarra 2.2.0-m08 (-SNAPSHOT 20130107-2105 https://svn.java.net/svn/mojarra~svn/tags/2.2.0-m08#11337) für Kontext '/TestProject' wird initialisiert.
Sep 15, 2014 10:02:29 PM com.sun.faces.spi.InjectionProviderFactory createInstance
Information: JSF1048: PostConstruct/PreDestroy-Annotationen vorhanden. Verwaltete Bean-Methoden, die mit diesen Annotationen markiert sind, lassen die entsprechenden Annotationen verarbeiten.
log4j:WARN No appenders could be found for logger (org.hibernate.validator.util.Version).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Sep 15, 2014 10:02:31 PM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
Information: Running on PrimeFaces 3.5
Sep 15, 2014 10:02:32 PM org.apache.coyote.AbstractProtocol start
Information: Starting ProtocolHandler ["http-bio-8080"]
Sep 15, 2014 10:02:32 PM org.apache.coyote.AbstractProtocol start
Information: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 15, 2014 10:02:32 PM org.apache.catalina.startup.Catalina start
Information: Server startup in 17609 ms
However, I do not know how to open the index.xhtml in this folder:
I thought that the goes like that:
http://localhost:8080/TestProject/site/public/master/index.xhtml
However, I get:
HTTP Status 404
type Status report
message /TestProject/site/public/master/index.xhtml
description The requested resource is not available.
Is there any way to find out the correct URL in eclipse?
I really appreciate your replies!

cannot browse Eclipse-deployed Spring webapp in Tomcat (using OSX 10.8)

I've used these 2 guides to install/configure eclipse and Tomcat.
http://wolfpaulus.com/jounal/mac/tomcat7
http://www.banym.de/eclipse/install-tomcat-with-eclipse
I can start Tomcat via the server tab in Eclipse. But when I try to browse my webapp, I can't see it in the browser. I looked into the deployed folder and my webapp is there. I even created a hello.jsp inside it and I'm getting a 404 HTTP error when I try to view it.
Here's a screenshot of my Eclipse configured to use tomcat. It also shows the deployed directory and the hello.jsp file I created.
http://i.imgur.com/omcWpdH.jpg
Here's a screenshot of my browser not being able to see hello.jsp.
http://i.imgur.com/qCaNoEN.jpg
I created another hello.jsp and put this in the $TOMCAT_INSTALL_FOLDER/webapps/ROOT and I can see it on my browser.
Any ideas what could be wrong?
Thanks
ps. Here's the console eclipse output when I start tomcat. There is a warning somewhere at the top but reading another discussion here in stackoverflow, supposedly I can ignore it.
Aug 12, 2013 2:37:31 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/vill0042/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Aug 12, 2013 2:37:31 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:directory' did not find a matching property.
Aug 12, 2013 2:37:31 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 12, 2013 2:37:31 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 12, 2013 2:37:31 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 868 ms
Aug 12, 2013 2:37:31 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 12, 2013 2:37:31 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Aug 12, 2013 2:37:34 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [144] milliseconds.
log4j:WARN No appenders could be found for logger (org.springframework.web.servlet.DispatcherServlet).
log4j:WARN Please initialize the log4j system properly.
Aug 12, 2013 2:37:34 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'spring'
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/docs
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/examples
Aug 12, 2013 2:37:39 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Aug 12, 2013 2:37:39 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Aug 12, 2013 2:37:39 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache#25c5738d')
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/host-manager
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/manager
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/ROOT
Aug 12, 2013 2:37:39 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 12, 2013 2:37:39 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8157 ms

Issue with Axis2 WebService running on Apache Tomcat 7

I have a web service application that I deployed successfully on Apache Tomcat using Eclipse IDE. However after a restart to my computer is not working any more. While trying to the list of services I get the following.
HTTP Status 404 - /ScWS/services/listServices
type Status report
message /ScWS/services/listServices
description The requested resource (/ScWS/services/listServices) is not available.
Apache Tomcat/7.0.11
When Tomcat is loading I see the following in the console logs:
Mar 19, 2011 10:46:57 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
Mar 19, 2011 10:47:05 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 19, 2011 10:47:05 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Mar 19, 2011 10:47:05 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 10342 ms
Mar 19, 2011 10:47:06 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 19, 2011 10:47:06 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.11
Mar 19, 2011 10:47:08 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ScWS.xml from /home/blueprint/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf/Catalina/localhost
Mar 19, 2011 10:47:08 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ScWS' did not find a matching property.
Mar 19, 2011 10:47:11 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 19, 2011 10:47:11 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Mar 19, 2011 10:47:11 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5593 ms
Anyone have any ideas what might be the Issue?
I deleted everything about Tomcat and installed again and everything was up and running.