Wildfly default value for blocking-timeout-wait-millis - jboss

I have searched the wildfly documentation but didn't find any information on the default value of a datasource blocking-timeout-wait-millis. So if the element is not specified in the configuration what default value does it get? (since the name contain 'millis' at least it is clear what the unit is) I also checked the value via jmx however the field is just empty...

Ok, found it in the wildfly datasource schemas:
<xs:complexType name="timeoutType">
<xs:sequence>
<xs:element name="blocking-timeout-millis" type="xs:nonNegativeInteger" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
The blocking-timeout-millis element indicates the maximum time in
milliseconds to block while waiting for a connection before throwing an exception.
Note that this blocks only while waiting for a permit for a connection, and
will never throw an exception if creating a new connection takes an inordinately
long time. The default is 30000 (30 seconds).
]]>
</xs:documentation>
</xs:annotation>
</xs:element>
...

Related

org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (but works on 7th call)

I'm facing the following error:
org.apache.cxf.interceptor.Fault: Unmarshalling Error:
unexpected element (uri:"URL1", local:"cdrNummer")
Expected elements are <{URL2}cdrNummer>,<{URL2}meldingen>,<{URL2}akteafschrift>
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:932) ~[cxf-rt-databinding-jaxb-3.3.5.jar:3.3.5]
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:738) ~[cxf-rt-databinding-jaxb-3.3.5.jar:3.3.5]
at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:170) ~[cxf-rt-databinding-jaxb-3.3.5.jar:3.3.5]
Setup using stub service running locally, which returns data. Using apache.cxf version 3.3.5.
When I hit that service for the first 6 times - it fails with above error even though I see successful response (SOAP envelope) in the logs. Hitting service for the 7th time returns a successful response "Without" throwing the above error and then things work fine until I restart the application.
I have verified the schema definition and it seems correct:
<xs:complexType name="opvragenAkteafschriftAntwoord">
<xs:sequence>
<xs:element name="cdrNummer" type="types:cdrNummer">
<xs:annotation>
<xs:documentation>useful</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="akteafschrift" type="types:akteafschrift"/>
<xs:element minOccurs="0" name="meldingen" type="types:meldingen"/>
</xs:sequence>
</xs:complexType>
First argument cdrNummer is mandatory, where as the other two are optional. Also tried to supply the other two optional arguments, then also just URL value changes, but I get the same unmarshalling error.

Issues generating Enterprise jar for Salesforce Soap API; issue with generated WSDL XML from Salesforce

I've recently made some databasae changes to custom objects, and I'm trying to generate a new enterprise.jar to reflect these changes. I'm following all documentation located here for the process. I'll also note, with the exception of some new dependencies, I've followed this process before with no errors to generate the enterprise.jar file. So this is a process that has worked for my sandbox in the past, but we haven't had any structural changes to the database in a solid 5 years.
Following along with the steps is simple enough. I generate the XML file from my Salesforce login in my developer sandbox utilizing Enterprise WSDL (we clearly have Enterprise level service, just so that's established). From there, I go to the Maven repository, get force-wsc-48.0.0.jar from there (as per the current API version of my sandbox), and then download a few dependencies like rhino, ST, and antlr-runtime. I get all files together in a temp folder in my C drive and try running command:
java -classpath C:\temp\force-wsc-48.0.0.jar;C:\temp\rhino1_7R4\js.jar;C:\temp\ST-4.3.1.jar;\jdk\jdk1.8.0_251\lib\tools.jar;C:\temp\antlr-runtime-3.5.jar com.sforce.ws.tools.wsdlc C:\temp\enterprise.wsdl C:\temp\enterprise.jar
Here's where the trouble begins. Once I run this, I hit the following error:
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: Parse error: Found invalid XML. could not determine namespace bound to element prefix xsd (position: TEXT seen ...ration value="ACTIONCALL_DUPLICATE_INPUT_PARAM">\r\n<xsd:annotation>... #17360:17)
at com.sforce.ws.wsdl.WsdlParser.next(WsdlParser.java:94)
at com.sforce.ws.wsdl.Definitions.read(Definitions.java:111)
at com.sforce.ws.wsdl.WsdlFactory.createFromInputStream(WsdlFactory.java:69)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:49)
at com.sforce.ws.codegen.Generator.generate(Generator.java:94)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:115)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:149)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:71)
Caused by: com.sforce.ws.ConnectionException: Found invalid XML. could not determine namespace bound to element prefix xsd (position: TEXT seen ...ration value="ACTIONCALL_DUPLICATE_INPUT_PARAM">\r\n<xsd:annotation>... #17360:17)
at com.sforce.ws.parser.XmlInputStream.next(XmlInputStream.java:138)
at com.sforce.ws.wsdl.WsdlParser.next(WsdlParser.java:90)
... 7 more
Caused by: com.sforce.ws.parser.XmlPullParserException: could not determine namespace bound to element prefix xsd (position: TEXT seen ...ration value="ACTIONCALL_DUPLICATE_INPUT_PARAM">\r\n<xsd:annotation>... #17360:17)
at com.sforce.ws.parser.MXParser.parseStartTag(MXParser.java:1826)
at com.sforce.ws.parser.MXParser.nextImpl(MXParser.java:1144)
at com.sforce.ws.parser.MXParser.next(MXParser.java:1111)
at com.sforce.ws.parser.XmlInputStream.next(XmlInputStream.java:136)
... 8 more
A snipped of the XML at error line:
<!--
These are the extension code to provide additional error information
-->
<simpleType name="ExtendedErrorCode">
<restriction base="xsd:string">
<enumeration value="ACTIONCALL_DUPLICATE_INPUT_PARAM">
<xsd:annotation>
<xsd:documentation>
Errors with this extended error code have the following properties: severity, actionCallName, parameterName
</xsd:documentation>
</xsd:annotation>
</enumeration>
<enumeration value="ACTIONCALL_DUPLICATE_OUTPUT_PARAM">
<xsd:annotation>
<xsd:documentation>
Errors with this extended error code have the following properties: severity, actionCallName, parameterName
</xsd:documentation>
</xsd:annotation>
</enumeration>
Parent schema:
<schema elementFormDefault="qualified" targetNamespace="urn:fault.enterprise.soap.sforce.com">
<import namespace="urn:enterprise.soap.sforce.com"/>
I don't know if it's necessary, but I'll note that there's no <xsd:schema...> at all in the XML file. xsd is used before this, but only to define element string types; eg: <element name="sessionId" type="xsd:string" nillable="true"/>
If I remove xsd prefix from everything that causes the error, I'll instead get the same error, but for soap instead of xsd. XML snippet of first instance of that:
<!-- Soap Binding -->
<binding name="SoapBinding" type="tns:Soap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="login">
<soap:operation soapAction=""/>
<input>
<soap:header use="literal" message="tns:Header" part="LoginScopeHeader"/>
<soap:body parts="parameters" use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
There's no parent schema here.
Again, there is no <soap:schema...> defined in the XML. And if I remove all of the instances of using the soap prefix, I'll land on the following issue.
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: targetNamespace not specified in wsdl:definitions
at com.sforce.ws.wsdl.Definitions.read(Definitions.java:115)
at com.sforce.ws.wsdl.WsdlFactory.createFromInputStream(WsdlFactory.java:69)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:49)
at com.sforce.ws.codegen.Generator.generate(Generator.java:94)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:115)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:149)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:71)
Again, not sure if it matters, but there's no <wsdl:definitions...> in the XML file.
I don't know if this is an issue of Salesforce generating a bad XML file (the issue occurs even in sandboxes I haven't made any database changes for, including production where I have an old but working enterprise.jar), if I don't have the right force-wsc jar file, if I'm not running it through the right version of Java (1.8, if it wasn't clear, but I've tried earlier versions of java and I just get the minor.major 52 error, which means it should be 8, as far as I know).
Any help pinpointing what the issue here is would be greatly appreciated. I'm more than open to suggestions. And if it is just Salesforce giving me a bad XML file, I can open a ticket there. I just want to make sure I'm not doing something wrong before I open a ticket.
After spending more time on this, and after coordinating with a co-worker who works on a different Salesforce project, we've discovered the following
1 Salesforce was absolutely giving a bad WSDL file.
2 The generation of the bad WSDL file only occurred because I was using a Firefox web browser. Using Chrome instead to access the WSDL generation fixed the issue, of all things.
So for any poor soul that comes across this issue in the future, I hope using Chrome fixes it for you as well.

mathml xsd schema to java classes using xjc MiOrMoOrMn <jaxb:property> error

Jaxb / xjc won't create java classes from xsd schema file (Eclipse and command line)
Using jre1.8.0_191 and JAXB both Eclipse and xjc command line (and switches) give errors when trying to convert imsqti_v2p1.xsd (learning object quizzes) to POJOs (plain old java objects). Most errors said "Property X is already defined. Use to resolve this conflict" and I was able to annotate imsqti_v2p1.xsd until (in both Eclipse and command line xjc) only one error remains:
parsing a schema...
[ERROR] Property "MiOrMoOrMn" is already defined. Use to
resolve this conflict. line 132 of
http://www.w3.org/Math/XMLSchema/mathml2/presentation/scripts.xsd
Now, imsqti_v2p1.xsd has many xmlns' - the one responsible for the error is
<xs:import namespace="http://www.w3.org/1998/Math/MathML"
schemaLocation="http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd"/>
This xsd is SHORT and has many local references, one of which causes the error
I did find this scripts.xsd - the compiler complained about line 132 and Property "MiOrMoOrMn" but scripts.xsd ends at line 130! Plus, when I load scripts.xsd into Eclipse editor it has a dozen errors - if they are caused by missing "neighbor" xsd's referenced by mathml2.xsd I'd probably have to find and download and run locally 27 local xsd's! So I'd hoped I could fix scripts.xsd and refer to it locally in a xmlns in the mathml2.xsd header, but now I'm not sure how to resolve this. Also, If you know of a better way to create these POJO's I'd be hearing about it - someone must know about this mathml xsd issue?!?
==================== imsqti_v2p1.xsd =============================
<xs:schema xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="2.1"
xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:apip="http://www.imsglobal.org/xsd/apip/apipv1p0/imsapip_qtiv1p0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sch="http://purl.oclc.org/dsdl/schematron"
targetNamespace="http://www.imsglobal.org/xsd/imsqti_v2p1" version="IMS
QTI 2.1" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.imsglobal.org/xsd/w3/2001/xml.xsd"/>
<xs:import namespace="http://www.w3.org/2001/XInclude"
schemaLocation="http://www.imsglobal.org/xsd/w3/2001/XInclude.xsd"/>
<xs:import namespace="http://www.w3.org/1998/Math/MathML"
schemaLocation="http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd"/>
<xs:import
namespace="http://www.imsglobal.org/xsd/apip/apipv1p0/imsapip_qtiv1p0"
schemaLocation="http://www.imsglobal.org/profile/apip/apipv1p0/
apipv1p0_qtiextv2p1_v1p0.xsd"/>
==================== mathml2.xsd ==================
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified">
<xs:include schemaLocation="common/math.xsd"/>
<xs:include schemaLocation="common/common-attribs.xsd"/>
<!-- Presentation -->
<xs:include schemaLocation="presentation/common-types.xsd"/>
<xs:include schemaLocation="presentation/common-attribs.xsd"/>
<xs:include schemaLocation="presentation/characters.xsd"/>
<xs:include schemaLocation="presentation/tokens.xsd"/>
<xs:include schemaLocation="presentation/scripts.xsd"/>
============= scripts.xsd ========================
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified">
================ compiler error message ==================
parsing a schema...
[ERROR] Property "MiOrMoOrMn" is already defined. Use <jaxb:property>
to resolve this conflict. line 132 of
http://www.w3.org/Math/XMLSchema/mathml2/presentation/scripts.xsd
[ERROR] The following location is relevant to the above error
line 138 of
http://www.w3.org/Math/XMLSchema/mathml2/presentation/scripts.xsd
Failed to parse a schema.
XMLSPY let's you download and try the full edition - I loaded up my .xsd and the product was able to chew through all the reference .xsd's and produce (many, many) java class files successfully ... so FYI ... In the meantime, I have been able to get JAXB to work using much smaller input .xds's. I got these (different part of project) by producing output XML from a tool, then using one of the online XML to XSD web sites to produce the .xsd which JAXB was able to process. I guess this is the only way 'round the MiOrMoOrMn problem.

Hazelcast 3.11 client connection retry config problem -

I am trying to use connection retry as explained here:
https://docs.hazelcast.org/docs/3.11/manual/html-single/index.html#configuring-client-connection-retry
Setting the config as below
<connection-strategy async-start="true" reconnect-mode="ASYNC">
<connection-retry enabled="true">
<initial-backoff-millis>2000</initial-backoff-millis>
<max-backoff-millis>60000</max-backoff-millis>
<multiplier>3</multiplier>
<fail-on-max-backoff>false</fail-on-max-backoff>
<jitter>0.5</jitter>
</connection-retry>
</connection-strategy>
Gives the following error:
Factory method 'client' threw exception; nested exception is com.hazelcast.config.InvalidConfigurationException: cvc-complex-type.2.1: Element 'connection-strategy' must have no character or element information item [children], because the type's content type is empty.
https://hazelcast.com/schema/client-config/hazelcast-client-config-3.11.xsd
The child element seems to be missing?
<xs:complexType name="connection-strategy">
<xs:attribute name="async-start" type="xs:boolean" default="false" use="optional"/>
<xs:attribute name="reconnect-mode" type="reconnect-mode" default="ON" use="optional"/>
</xs:complexType>
How can I use connection-retry feature?
Thanks
Regards
This is due to a silly classpath problem in my application. There is no error. Sorry for the inconvenience

Replace web config *elements* with msdeploy parameters

We're using msdeploy (or web deploy if you wish) to package and deploy web apps. By declaring parameters package time we can provide values at deploy time (to replace connection strings among other things).
The problem we currently face is replacing values in applicationSettings sections in our web config. We can't get msdeploy to replace the value because the content we want to replace is the text inside an xml element, not an attribute value (the warning we get is: "Cannot set a value on node type 'Element'").
The relevant config looks like this:
<applicationSettings>
<Name.Of.Assembly.Properties.Settings>
<setting name="someSetting" serializeAs="String">
<value>I wanna be replaced</value>
</setting>
</Name.Of.Assembly.Properties.Settings>
</applicationSettings>
and the declare parameter xml looks like this:
<parameter name="XX" defaultValue="default">
<parameterEntry kind="XmlFile"
scope="Web\.config$"
match="/configuration/applicationSettings/Name.Of.Assembly.Properties.Settings/setting[#name='someSetting']/value" />
</parameter>
Does msdeploy only support replacing attribute values or am I doing something wrong?
For posterity...
You just need to add "/text()" to the end of the match. That will change the value of enclosed by the tags. However, this value cannot be empty in the source web.config. So when you build the deployment package using the "Release" solution configuration, the web.Release.config must not set this value of the setting to an empty value.
<parameter name="XX" defaultValue="default">
<parameterEntry kind="XmlFile"
scope="Web\.config$"
match="/configuration/applicationSettings/Name.Of.Assembly.Properties.Settings/setting[#name='someSetting']/value/text()" />
</parameter>