XML parsing error on file /WEB-INF/web.xml - java

I am following the tutorial of Google App Engine for JAVA. I have successfully set up the project. When I run the server on my local machine by typing mvn appengine:devserver in the terminal, I get the following warning:
[INFO] WARNING: Your working directory, (/home/xyz/workspace/appengine/guestbook/guestbook-ear/target/guestbook-ear-1.0-SNAPSHOT) is not equal to your
web application root (/home/xyz/workspace/appengine/guestbook/guestbook-ear/target/guestbook-ear-1.0-SNAPSHOT/guestbook-war-1.0-SNAPSHOT.war)
You will not be able to access files from your working directory on the production server.
After that I receive the message :
INFO: Dev App Server is now running
Now when I try to run the webpage by typing http://localhost:8080/ in my browser, I get the following message:
HTTP ERROR 500
Problem accessing /. Reason:
XML parsing error on file /WEB-INF/web.xml
Caused by:
org.apache.jasper.JasperException: XML parsing error on file /WEB-INF/web.xml
...
Caused by: java.net.SocketTimeoutException: Timeout while fetching: http://java.sun.com/dtd/web-app_2_3.dtd
...
Caused by:
java.net.SocketTimeoutException: Timeout while fetching: http://java.sun.com/dtd/web-app_2_3.dtd
...
What should be done?

Related

WildFly Deployment Error - DeploymentUnitProcessingException

Whenever I'm trying to deploy some .war file using wildfly, I'm getting the following error:
Failed to process phase STRUCTURE of deployment
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to get manifest for deployment "C"/ProgramFiles (x86)/wildfly-19.1.0.Final/bin/content/<FILENAME>.war/WEB-INF//lib/xmlbeans-3.1.0.jar"
Caused by: java.util.zip.ZipException: Invalid LOC header (bad signature)
Please help.
Your jar is signed, unsigned it as iirc you need all the jars to be signed properly for this to work.

WSDL periodically unavailable on Glassfish

Periodically our Glassfish 4.1 installation seems to be unable to allow the WSDL for our Web service to be available. When I try to reach it through my browser it gives a "connection was reset" error. The typical stack trace from our java applications that consume the services get when this happens is included below. Any ideas what could be causing this? Thanks!
javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://venus:9090/USProjectServices/LingoAtTaskService?wsdl. It failed with:
Got Unexpected end of file from server while opening stream from http://venus:9090/USProjectServices/LingoAtTaskService?wsdl.
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:173)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:155)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:260)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:223)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:171)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:96)
at javax.xml.ws.Service.<init>(Service.java:77)
at com.lingosys.ws.LingoAtTaskService.<init>(LingoAtTaskService.java:42)
at com.ws.test.Tester1.<init>(Tester1.java:27)
at com.ws.test.Tester1.main(Tester1.java:45)
Caused by: java.io.IOException: Got Unexpected end of file from server while opening stream from http://venus:9090/USProjectServices/LingoAtTaskService?wsdl
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:842)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:283)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:140)
... 9 more
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:718)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:715)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1322)
at java.net.URL.openStream(URL.java:1037)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:827)
... 11 more

java.io.IOException - Java

I am getting repeatedly below error while running java application on IBM - WebSphere Application Server.
[ 00000024 TCP E org.jgroups.protocols.TP$IncomingPacket run failed handling incoming message
java.io.IOException: failed reading header
at org.jgroups.Message.readHeader(Message.java:757)
at org.jgroups.Message.readFrom(Message.java:643)
at org.jgroups.protocols.TP.readMessage(TP.java:1502)
at org.jgroups.protocols.TP.access$700(TP.java:49)
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1804)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:906)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:929)
at java.lang.Thread.run(Thread.java:773)
Caused by: java.io.EOFException
at java.io.DataInputStream.readShort(DataInputStream.java:309)
at org.jgroups.Message.readHeader(Message.java:734)
... 7 more
java.io.IOException: failed reading header
at org.jgroups.Message.readHeader(Message.java:757)
at org.jgroups.Message.readFrom(Message.java:643)
at org.jgroups.protocols.TP.readMessage(TP.java:1502)
at org.jgroups.protocols.TP.access$700(TP.java:49)
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1804)
at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:1763)
at org.jgroups.util.ShutdownRejectedExecutionHandler.rejectedExecution(ShutdownRejectedExecutionHandler.java:39)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:779)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:667)
at org.jgroups.protocols.TP.dispatchToThreadPool(TP.java:1354)
at org.jgroups.protocols.TP.receive(TP.java:1321)
at org.jgroups.protocols.BasicTCP.receive(BasicTCP.java:258)
at org.jgroups.blocks.BasicConnectionTable.receive(BasicConnectionTable.java:239)
at org.jgroups.blocks.BasicConnectionTable$Connection.run(BasicConnectionTable.java:664)
at java.lang.Thread.run(Thread.java:773)
Caused by: java.io.EOFException
at java.io.DataInputStream.readShort(DataInputStream.java:309)
at org.jgroups.Message.readHeader(Message.java:734)
... 14 more
Application has file export operation. Somehow files are deleted from specified location and whenever I try to run application through above exception continuously. I tried killing java but that too do not help.
Please suggest how to resolve.
Stop IBM Webservice application already started services from services.msc :)

Issue in creating an instance of JAX-WS client to access the service

Iam new to Webservices.
Iam trying to create a JAX- WS client from a WSDL file . Using RAD 8.0 , I generated the classes including the proxy ,SEI and the Webservice client .Now iam trying to hit the exposed webservice methods as a standalone application .
I have added jaxws-rt-2.1.4.jar to the classpath also .
From the main class ,if i try to create an instance of the client to access the service iam getting the following error .
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:227)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1345)
at java.util.ServiceLoader$ServiceIterator.next(ServiceLoader.java:195)
at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146)
at javax.xml.ws.spi.Provider.provider(Provider.java:106)
at javax.xml.ws.Service.<init>(Service.java:57)
at com.royalbank.wcm_ap.ws_client.rbcauth.v1.AnPAuth.<init>(AnPAuth.java:35)
at com.royalbank.wcm_ap.ws_client.rbcauth.v1.TestClass.main(TestClass.java:53)
Caused by: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference.
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:222)
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:218)
at java.security.AccessController.doPrivileged(AccessController.java:203)
at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:217)
at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
... 8 more
Caused by: javax.xml.bind.JAXBException
- with linked exception:
[java.lang.ClassNotFoundException: com.ibm.xml.xlxp2.jaxb.JAXBContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:207)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:401)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:565)
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:220)
Am i missing something here with regard to the configurations ? thanks in advance :)
The Missing class "com.ibm.xml.xlxp2.jaxb.JAXBContextFactory" is available in the jar "com.ibm.jaxws.thinclient_8.5.0.jar" which will be available in the server runtime directory for Websphere App server : C:\Program Files\IBM\WebSphere\AppServer\runtimes.
Please include this jar for compile purpose only and donot include this in your WAR or EAR as it will conflict with your server runtime library jar.
For server WAS 8.0 the path jar would be "com.ibm.jaxws.thinclient_8.0.0.jar".

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL?

I get the following error while trying to generate a web-services client stub...
When I log into Apache Admin page and I can see the web service and the service end point of 'http://localhost:8080/axis2/services/HelloWorldService?wsdl' - why cant WSDL2Java.bat find the wsdl file..?
C:\AAA\HelloWorld\client\client>WSDL2Java.bat -uri http://localhost:8080/axis2/services/HelloWorldService?wsdl -o client
Using AXIS2_HOME: C:\Axis2\axis2-1.5.6
Using JAVA_HOME: C:\Program Files (x86)\Java\jdk1.6.0_23
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL Location
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:58)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22)
Caused by: java.io.FileNotFoundException: http:\localhost:8080\axis2\services\HelloWorldService?wsdl (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.getWOM(CodeGenerationEngine.java:110)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:52)
... 2 more
C:\AAA\HelloWorld\client\client>
Clearly exception says, it can not find the file
http:\localhost:8080\axis2\services\HelloWorldService?wsdl.
Please check if there is any file and run it.

Categories