maven-jaxb2-plugin - ignore ssl error - web-services

I am using maven-jaxb2-plugin and I get the following error
Caused by: java.security.cert.CertPathValidatorException: timestamp check failed
I understand the certificate expired and I do not manage the webservice. So how do I ignore the SSL error.
I try to generate-source as
generate-sources -Dmaven.wagon.provider.http=httpclient -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
But I still get the same error. How do I configure Maven to ignore SSL error and generate sources.

I stronly advise against compiling online resources.
Create a local copy of what you're compiling and use catalogs to rewrite URLs.
<configuration>
<catalogs>
<catalog>
<dependencyResource>
<groupId>com.acme.foo</groupId>
<artifactId>bar</artifactId>
<!--
Version can be omitted if artifact is already
configured in dependencies or dependency management.
-->
<version><!-- Version --></version>
<resource>catalog.cat</resource>
</dependencyResource>
</catalog>
</catalogs>
</configuration>
Catalog file is as simple as:
REWRITE_SYSTEM "http://www.w3.org" "w3c"

Related

Why cannot superset connect to Athena using PyAthena and rest scheme and throws HTTP 422 "unexpected error"?

Installing Superset with docker-compose. App is up and running. When adding a new database using PyAthena connector, error Unexpected error occurred, please check your logs for details happens with no details in the logs.
First, if you are using docker-compose, check whether you have added driver to the build environment.
echo "PyAthena>1.2.0" >> ./docker/requirements-local.txt
If you don't you will get Driver not found error.
Second, check your URI scheme. It must be of the following form:
awsathena+rest://AKIAXXXX:XXXXXX#athena.{region}.amazonaws.com/{database_name}?s3_staging_dir=s3://{bucket_name_for_results}
If you are missing the query string part you may get mysterious error without a detail reason.
Also note that PyAthena does not check you AK/SK against the staging bucket.

Is there a way to catch container-generated STDOUT within embedded Jetty Logback?

Situation is:
-> a homemade container app, using logback, configured with ConsoleAppender. Different loggers to specify log levels depending on package:
<logger name="com.mycompany.package1">
<level value="DEBUG"/>
</logger>
<logger name="com.mycompany.package2">
<level value="INFO"/>
</logger>
-> an embedded Jetty app, using logback, configured with RollingFileAppender.
I need both log outputs to be sent to the same rolling file, so I'm trying to catch the container STDOUT within the embedded Jetty app. Is there a way to do that? is it the wrong way to go about it?
NOTE: I have access to both logback.xml for editing.
If you have a logback configuration going to ConsoleAppender then don't attempt to catch output and log it again (you just created a loop).
Instead, just configure Jetty to use slf4j for its own events and NOT use the RolloverFileOutputStream or the console-capture module (from jetty-home).
The easiest way is to not do anything, the mere existence of slf4j-api-<ver>.jar in the server classpath is sufficient to make Jetty use slf4j to log its own events on.
In short, your server classpath needs:
slf4j-api-<ver>.jar
Your logback jars (probably logback-classic-<ver>.jar and logback-core-<ver>.jar)
A ${jetty.base}/resources/ directory on your classpath with 2 files:
a jetty-logging.properties with a single line org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog
your logback configuration files. (eg: logback.xml)
Make sure you are not using Jetty's RollingFileOutputStream to capture System.out and/or System.err to a file.

Change windows installer error message if service installation fails

I'm currently struggling with WIX (disclaimer: I'm a very beginner in terms of WIX).
I need to install a service. The specific part of the .wxs file looks like this:
<ServiceInstall
Id="ServiceInstaller"
Vital="yes"
Type="ownProcess"
Name="ABC_MyService"
DisplayName="TestService"
Description="Monitoring and management Jobs"
Start="auto"
Arguments="--service"
Account="LocalSystem"
ErrorControl="normal"
Interactive="no"
/>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="ABC_MyService" Wait="yes" />
Unfortunately the start of the service can fail in some cases (a port is already in use etc.). In that case you will get the super generic and confusing WIX error msg:
Service xy failed to start. Verify that you have sufficient privileges
to start system services.
Is there any way to propagate error messages / exceptions which can occur when starting the service and override the generic error msg?

Access is denied while register provider (wevtutil)

I´m trying to register a manifest based provider using wevtutil and get the following error:
**** Warning: Publisher ExampleProvider resources are not accessible.
So I run wevtutil gp ExampleProvider and get the following message:
Failed to open metadata for publisher ExampleProvider. Access is denied
The user account I´m working with have Administrator privilage and is part of the groups Event Log Readers, Performance Log Users, and Performance Monitor Users.
The manifest file is the same as in this example.
Does anyone know whats wrong?
A side note is that my project folder has read-only flag under properties and when I try to change it does not complain. However, when I open up the properties again it remains read-only.. Can anyone explain that behaviour?
EDIT
I have located the problem area and it is the channel.
In the example manifest created in the tutorial they create a channel like:
<channels>
<channel name="MyChannel" chid="MyChannel" symbol="MyChannel" type="Debug" enabled="true" message="$(string.ExampleProvider.channel.MyChannel.message)">
</channel>
<importChannel name="Application" chid="appchnl">
</importChannel>
</channels>
And when I remove this channel and use default in the event I get no warnings, do I not have access to write events to that channel or something (Application)?

Powerbuilder 12.5.2 Classic .NET Web Service error with Amazon SQS WSDL

I get the error below when I try to access the Amazon SQS WSDL:
http://queue.amazonaws.com/doc/2012-11-05/QueueService.wsdl
Cannot access the WSDL or the WSDL file is invalid.
I believe I have .NET 4 SDK installed and I have tried downloading the WSDL file to a local drive and pointing the proxy wizard to it. Still the same error.
Can someone try to use it and let me know your outcomes?
Try running the .Net WSDL utility directly on the WSDL. That utility reports back error information. It's also what PowerBuilder is calling under the covers, but is not sharing the error information back to you.
When I do that, I get this result:
Error: Unable to import binding 'SimpleQueueServicePostBinding' from namespace '
http://queue.amazonaws.com/doc/2012-11-05/'.
- The operation 'GetQueueUrl' on portType 'SimpleQueueServicePortType' from na
mespace 'http://queue.amazonaws.com/doc/2012-11-05/' had the following syntax error:
The operation has no matching binding. Check if the operation, input and
output names in the Binding section match with the corresponding names in the PortType section.
It looks like it might be a problem with the format of the WSDL. Not the first time that's happened, I've had to edit one of their other WSDL files by hand to correct an error in it.
If you choose to do that, you can download the file to your local machine, make the edits, and then run the PB proxy tool against the local file.