How to deploy Clojure/Luminus uberwar in Weblogic 12.c - clojure

I have created a microservice PoC using Clojure & Luminus web framework and packaged into a WAR via lein uberwar.
It has been tested and it is properly deployed and run in Immutant and Tomcat servers. Our production environment is an Oracle Weblogic 12c. In order to avoid some errors I've created a weblogic.xml file inside the war with the content:
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<container-descriptor>
<filter-dispatched-requests-enabled>false</filter-dispatched-requests-enabled>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
However I get this internal error as if the server would not detect the entry point of the application.
<Nov 10, 2016 9:25:57 AM UTC> <Warning> <HTTP> <BEA-101162> <User defined listener mu_publisher.listener failed: java.lang.RuntimeException: could not start [#'mu-publisher.handler/init-app] due to.
java.lang.RuntimeException: could not start [#'mu-publisher.handler/init-app] due to
at mount.core$up$fn__4349.invoke(core.cljc:92)
at mount.core$up.invokeStatic(core.cljc:92)
at mount.core$up.invoke(core.cljc:90)
at mount.core$bring.invokeStatic(core.cljc:206)
at mount.core$bring.invoke(core.cljc:198)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: No implementation of method: :enabled? of protocol: #'clojure.tools.logging.impl/Logger found for class: org.slf4j.impl.JDK14LoggerAdapter
at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:568)
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:560)
at clojure.tools.logging.impl$fn__51$G__44__58.invoke(impl.clj:16)
at mu_publisher.env$fn__225.invokeStatic(env.clj:7)
at mu_publisher.env$fn__225.invoke(env.clj:6)
Truncated. see log file for complete stacktrace

As an update. I modified the weblogic.xml as:
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<container-descriptor>
<filter-dispatched-requests-enabled>false</filter-dispatched-requests-enabled>
<prefer-application-packages>
<package-name>org.slf4j</package-name>
<package-name>org.joda.*</package-name>
</prefer-application-packages> </container-descriptor>
So I no longer get the error message. But when I try to access the webapp via http://localhost:8001/mu-publisher, I get an ERROR 500: Something very bad happened, and in the console log's no errors are reflected or printed.

Related

org.xml.sax.SAXParseException while initializing JAXWS consumer

I'm getting the below exception when the JAXWS Java consumer stub constructor is invoked. When I try via. SOAPUI everything is working fine and able to get correct response. It is a web server to multiple app server (Websphere 7.x clustered) setup. Consumer code looks fine. Provider code is fine, since it works in SOAPUI. There is some problem with Web Server and web server may respond with a HTML rather then XML. App Server doesn't get the request when trying via Java consumer and no logs are there. We tested in local app server without web server setup, it works. Don't know where the problem lies? Anybody can help? I'm using Axis2 that comes with WebSphere for hosting web service. Web Sphere reads annotations in implementation class to deploy web service. Generate WSDL automatically. WSDL Location I've not specified in implementation file, if it specified not works. No configuration file (web.xml, etc.,) i provide. It is not an HTTPS web service. I'm able to telnet to the web service server and get the WSDL via telnet.
javax.xml.ws.WebServiceException: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://ip:port/AppName/ServiceName'.: (http://ip:port/AppName/ServiceName%27.:) org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.loadDefinition(WSDL4JWrapper.java:754)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.getDefinition(WSDL4JWrapper.java:670)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:224)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.<init>(WSDL4JWrapper.java:156)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:1191)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:245)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:168)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:142)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:79)
at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescription(DescriptionFactory.java:76)
at org.apache.axis2.jaxws.spi.ServiceDelegate.<init>(ServiceDelegate.java:212)
at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:71)
at javax.xml.ws.Service.<init>(Service.java:67)
at somepackage.servicename.<init>(servicename.java:42)...more are here hidden to maintain confidential
Caused by:
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://ip:port/AppName/ServiceName'.: (http://ip:port/AppName/ServiceName%27.:) org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2315)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2356)
at org.apache.axis2.jaxws.util.WSDL4JWrapper$13.run(WSDL4JWrapper.java:745)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.loadDefinition(WSDL4JWrapper.java:742)
... 70 more
Caused by:
org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2305)
... 75 more </pre>
I'm not sure what's going wrong with wsdl retrieval for you, but if you can extract the wsdl (and any files it imports) from the remote service and just package them with your client directly, that will avoid retrieving the wsdl from the remote service for each invocation, which besides not working in your case, also degrades performance. Your client wsdllocation would change to file:///(something). If you're using a developer tool like RAD or WDT, it has an option to automatically retrieve the wsdl and package it with the client.

Creating Web Service Reference in Visual Studio to PayPal SOAP API

I am trying to update an existing system to use a WCF Web Service reference for its PayPal SOAP API proxy classes.
According to this API documentation, the proper WSDL URL is the following:
https://www.paypal.com/wsdl/PayPalSvc.wsdl
I have tried using the Add Service Reference dialog in Visual Studio, and also the svcutil command. This can be reproduced (for me) in a new console application project, or really any type of project. In all cases, I get the following errors.
There was an error downloading 'https://www.paypal.com/wsdl/PayPalSvc.wsdl/_vti_bin/ListData.svc/$metadata'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'https://www.paypal.com/wsdl/PayPalSvc.wsdl'.
The content type text/plain of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
ns:version="204.0"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
(removed the rest of the beginning of the wsdl file)
I don't understand why there are non-resolved references, or why a content type mismatch would cause the process to fail.
Any ideas or even sharing your repro results would be helpful.
There are 3 XSDs referenced by the WSDL which are available at the following URLs-
eBLBaseComponents.xsd
CoreComponentTypes.xsd
EnhancedDataTypes.xsd
Download the WSDL and the 3 xsds into a folder locally on your machine and add a reference to this local copy of the WSDL. It should work

invoke external webservice in openesb

I have created a simple webserivce locally.
Imported its wsdl in the bpel project and tried to invoke it.
I tested the webservice directly from the browser and it works fine.
However running the test case in the CA gives me the following error.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;jbi:message xmlns:sxeh=&quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&quot; type=&quot;sxeh:faultMessage&quot; version=&quot;1.0&quot; xmlns:jbi=&quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&quot;&gt;&lt;jbi:part&gt;The server sent HTTP status code 500: Unable to connect&lt;/jbi:part&gt;&lt;/jbi:message&gt;. Sending errors for the pending requests in the process scope before terminating the process instance</faultstring>
<faultactor>sun-bpel-engine</faultactor>
<detail>
<detailText>BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;jbi:message xmlns:sxeh=&quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&quot; type=&quot;sxeh:faultMessage&quot; version=&quot;1.0&quot; xmlns:jbi=&quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&quot;&gt;&lt;jbi:part&gt;The server sent HTTP status code 500: Unable to connect&lt;/jbi:part&gt;&lt;/jbi:message&gt;. Sending errors for the pending requests in the process scope before terminating the process instance
Caused by: BPCOR-6131: An Error status was received while doing an invoke (partnerLink=PartnerLink2, portType={http://testWs/}TestWebService, operation=hello)
BPCOR-6129: Line Number is 44
BPCOR-6130: Activity Name is Invoke1
Caused by: The server sent HTTP status code 500: Unable to connect</detailText>
</detail>
</SOAP-ENV:Fault>
Could you precise the version and the edition you are using.
Could you first use a tools such as SOAP UI to see if your WSDL (concrete part: port, IP) is ok.
Then if the wsdl is ok, What you try to do must work.
Did you have a look on OpenESB documentation ?
www.open-esb.net You must be logged to access to the documentation.
If you don't success try to contact the community on contact#open-esb.net
regards
Paul

Call Web Service and Return Error in Delphi 7

I have import a WSDL in Delphi 7 and Call a function on it and an error message will be displayed:
Project Project1.exe raised exception class ERemotableException with message 'Server was unable to process request. ---> Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.'. Process stopped. Use Step or Run to continue.
When I call WebService method (in Delphi 7), with Fiddler software I got the message contents(XML) posted :
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:Save xmlns:NS1="http://tempuri.org/"><from xsi:type="xsd:string">1</from><to xsi:type="xsd:string">2</to><body xsi:type="xsd:string">ServiceTest</body></NS1:Save></SOAP-ENV:Body></SOAP-ENV:Envelope>
And then I call the same method and web service in Delphi XE5 with no error and this XML content :
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><Save xmlns="http://tempuri.org/"><from>1</from><to>2</to><body>ServiceTest</body></Save></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP Server Response :
SOAP Web Service write in .NET framework and support SOAP 1.1 and 1.2
Any ideas?
I have use THTTPRIO.OnBeforeExecute for change SOAPResponse.Then delete unnecessary attribute and type in XML source and packing again and assign it to SOAPResponse and send it.
In this method the problem was solved.

Weblogic WebService client dependencies

I would like to ask which would be the correct jar files needed to a functional ws client to an authenticated weblogic JAX-RPC.
Situation:
I created the same WS client on Jdeveloper and on OEPE. When I run in the IDE, my client only works on Jdeveloper. Then I generated a Jar file from Jdeveloper and the same error from OEPE ocurrs when I run that jar.
I suppose this happens because there are some libs missing. I really need help! After putting many libs on the classpath, this is the mistake:
"Exception in thread "main" javax.xml.rpc.ServiceException: Failed to
parse WSDL htp://url?WSDL weblogic.wsee.wsdl.WsdlException: Failed to
read wsdl file from url due to -- java.net.ConnectException:
Connection refused: connect
at weblogic.wsee.jaxrpc.ServiceImpl.throwServiceException(ServiceImpl.java:185)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:492)
at weblogic.wsee.jaxrpc.ServiceImpl.(ServiceImpl.java:126)
at br.com.scopus.teste.ServicoAssinaturaImplService_Impl.(ServicoAssinaturaImplService_Impl.java:21)
at br.com.scopus.teste.Client.main(Client.java:26) Caused by: weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url d
ue to -- java.net.ConnectException: Connection refused: connect
at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:313)
at weblogic.wsee.wsdl.internal.WsdlDefinitionsImpl.parse(WsdlDefinitions
Impl.java:432)
at weblogic.wsee.wsdl.internal.WsdlDefinitionsImpl.parse(WsdlDefinitions
Impl.java:417)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:81)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:68)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:
483)
... 3 more"
Maybe Important information:
These are the jar I am using: wlfullclient.jar wsclient.jar adf-config.xml weblogic.jar wseeclient.jar wsclient_extended.jar glassfish.jaxws.rt_1.2.0.0_2-1-5.jar
Weblogic version: 10.3.5
Thanks!
This is probably not a library issue.
You are getting "java.net.ConnectException: Connection refused". So the web service stack managed to perform the call to the WSDL URL but couldn't get through. One reason could be that your URL is incorrect, referring the incorrect interface (localhost rather than actual hostname or vice versa) or anything else.
Try to copy-paste the URL it is telling you it can't access in a web-browser and you should see the same problem.