how add/modify standalone.xml in remote wildfly 8,9 openshift - openshift

I trying find file standalone.xml in remote access in openshift in wildfly 8 and wildfly 9 too, but not result.
I found page: http://blog.arungupta.me/wildfly-custom-standalone-configuartion-file-openshift/ where described where should find the location of the file, but it is not there.
my console files:
is there any ways, how use own configuration xml ?

Openshift Online allows you to override the default standalone.xml from your app by placing a file in your apps repository. The location is slightly different for v3 as it was for v2.
Overriding standalone.xml in Openshift Online v3
Place the file with your override in
/cfg/standalone.xml
Overriding standalone.xml in Openshift Online v2
Place the file with your override in
/.openshift/config/standalone.xml

Look for standalone.xml in %WILDFLY_HOME%\standalone\configuration. There you should find standalone.xlm and also standalone-full.xml and standalone-full-ha.xml (if you want to also drive your wildfly in different mode).

Related

Angular Project- Replace properties from External File in app.config.json

I have Angular 7 application. I'm building it and generating Dist package. I would like to deploy this package on Tomcat or Apache web-server.
Now, I do not want to hard-code any values in app.config.json file. I would like to externalize these properties. Let's say, i have server.xml file or any other file in tomcat and values should be there and app.config.json should read property values from there.
How can I achieve this? Is there any other way, I can externalize my properties?
Maybe this can help you https://itnext.io/how-does-app-initializer-work-so-what-do-you-need-to-know-about-dynamic-configuration-in-angular-718e7c345971.
Using this approach you can provide your configuration file directly to container (Tomcat or Apache Server) independently on environment.
If you use k8s, you can provide this config file through ConfigMap.

How can I define an arbitrary file outside my web application to configure log4j2

My web application will be deployed to Weblogic application servers on Windows and Linux/Unix in different environments. The log file location, appenders and log levels will vary between the different deployments and we would like to be able to change the logging configuration during runtime (by exchanging the config file), so I cannot embed a log4j2.xml (or whatever other config file) into my deployment. And since I'm running on Application servers I cannot control, I've got no chance to add environment variables to point to another configuration Location.
Currently, my log4j2.xml resides in the classpath of my application and is being packaged into my war file. Is there any way to tell Log4J2 to use a configuration file e. g. relative to the application root (like Log4J's configureAndWatch(fileLocation) method)?
I found lots of examples of how to configure Log4J2, but everything I found about the config file location points to the applications class path.
I finally found a solution for my problem. I added a file named
log4j2.component.properties
to my project (in src/main/resources). This file contains a property pointing to the location of my log4j2 configuration file:
log4j.configurationFile=.//path//on//my//application//server//someLog4j2ConfigFile.xml
This causes log4j2 to read that file and configure itself from it's content.

oci java sdk via proxy

The Proxy connection area in this page points to an example page which results in a 404.
https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/javasdk.htm
page resulting in 404
https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/HttpProxyExample.java
Basically, if I do not want to set a proxy on the JVM but want to use the following style of setting a proxy, is there a full example for this version? Is ProxyConfig supported in OCI java sdk and how do I use it?
ProxyConfig proxyConfig =
ProxyConfig.builder()
.host("proxy.mydomain.com")
.port("80")
.username("username")
.password("password")
.protocol(ProxyConfig.Protocol.HTTP)
.build();
The Apache Connector Provider add-on that is bundled with Oracle Cloud Infrastructure Java SDK 1.2.44 enables the option to specify an HTTP(S) proxy that is for a specific client and not a JVM setting.
For more information, please refer to the README.md hosted on GitHub
An example of configuring a proxy can also be found here.

Unable to upload widget to Wirecloud instances in private server

We have downloaded and installed a running instance of Wirecloud in our company server following the steps at:
https://conwet.fi.upm.es/wirecloud/install
We created the instance using the --quick-start command to try the instance, and ran wirecloud using the Django internal web server with the following command:
$ python manage.py runserver 0.0.0.0:8080 --insecure
We are able to enter the instance, and move around the enviroment, but we have encountered a problem when we try to upload a widget to our local workspace. After I search for the widget in my computer (previously downloaded from the Fi-lab marketplace), we get the next message:
Error adding packaged resource: Internal Server Error.
We also tried to download the zip file of the widget from github, unzip it and recompress it as a wgt file (compress as a zip but changing the extension to .wgt) and we get the same answer from our wirecloud instance; but if we try to upload the same package to the instance in fi-lab, it uploads successfully.
We don't know if it's because of the quick-start installation we made or if we have to modify something from our widget files in order to be able to upload it to our local instance.
Solved
The problem was in the config.xml file: the name of the attributes and the structure of the widgets unable to upload were different from the template of the config.xml file posted at the users guide.
After changing it to follow the structure of the template it works fine.
My widget example was the NGSI Updater. The thing is that it uploads perfectly in the instance at FiLab, even though the config.xml file had a different structure from the one of the template; but it encounters an error when uploading it to the Wirecloud local instance at my server.

Configuration path of Log4j2

I am trying to adopt Log4j2 to my project. Since my Java Application is packeted in a JAR file. I don't want "log4j2.xml" configuration packaged inside of JAR file. I am trying to learn how configuration file works from "http://logging.apache.org/log4j/2.x/manual/configuration.html"
But seems there is no clear instruction regarding altering the configuration file path of the Log4j2.
After googling about this topic I found something like "Referencing log4j config file within executable JAR" Referencing log4j config file within executable JAR, But this solution is not available any more according to "http://logging.apache.org/log4j/2.x/manual/migration.html" (if I understand it correctly).
So I am wondering if someone have any idea about this issue.
Thanks
You can set the system property to specify the configuration path.
set the
"-Dlog4j.configurationFile="D:\learning\blog\20130115\config\LogConfig.xml"
in VM arguments. replace
"D:\learning\blog\20130115\config\LogConfig.xml"
to your configuration path.
Put the log4j2.xml file in resource directory in your project so that the log4j will locate files under class path automatically.
Loading log4j2.xml file from the customized location-
You can use the System property/ VM arguments- Dlog4j.configurationFile=file:/path/to/file/log4j2.xml
This will work for any web application.
For some legacy applications, you can create a class for loading log4j2.xml/ log4j2.properties from the custom location on the machine like- D:/property/log4j2.xml
Using any of these approach,during application startup, the log4j2.xml file from the src/resources folder will be overridden by the custom location log4j.xml file.
Try using -Dlogging.config=Path_to_your_file