In my logback.xml file I'd like to make a conditional statement that allows me to perform an action based on whether the element was specified with the debug=true attribute.
Here's an example of what I'm trying to achieve but obviously it doesn't work :-
<configuration debug="true">
<if condition='isDefined("debug")'>
<then>
[..do X actions..]
</then>
<else>
[.. do Y actions..]
</else>
</if>
</configuration>
I get why it doesn't work (ie. the 'debug' being set to 'true' is not a variable) so am hoping there's a way to get to the internal state of logback and then access the debug property or similar from there then I could make my condition based on that?
Can anybody help me out?
cheers in advance.
Related
Is it possible to configure a non-static value for the metadata field in the wildly json-formatter?
I didn't find anything about it in the wildfly documentation- it only has a simple static field example (meta-data=[#version=1])
For example, I would like to have a field "simpleClassName" - The class of the code calling the log method.
I also tried to use a similar syntax to pattern-formatter(example below) but it doesn't work
<formatter name="JSON">
<json-formatter>
<meta-data>
<property name="simpleClassName" value="%c{1}"/>
</meta-data>
</json-formatter>
</formatter>
No the meta-data is only static information. However what you're looking for seems to be the details of the caller. Note that this is an expensive operation should you should use it with caution. What you'd want to do is change the print-details to true. In CLI it would be something like:
/subsystem=logging/json-formatter=JSON:write-attribute(name=print-details, value=true)
I have a problem with Nuxeo, when I want to import my files with their attachements. It's necessary to adopt the parameters of The nuxeo CSV. For example : They define "dc:title" for title and "dc:description" for description.
here is how it works :
"name","type","dc:title","dc:description","file:content","dc:creator"
"nuxeo-csv-userdoc","File","Nuxeo CSV User documentation","This is the user guide for Nuxeo CSV","C:/../nuxeo-csv-userdoc.pdf","user"
My file is different, and I want to choose my parameters. For example, I have a date, society name, supplier, ID...which is different from what suggest Nuxeo.
Do you have any idea how to do this.
"Type","Title","Society","Year","ID","Path","supplier"
"RAPPORT","CENTRIFUGAL PUMPS","EMTECH-E LIST OF PARTS","2005","1767","file.pdf","XY"
Thanks
You must map the import with the custom type that you defined. Have you read https://doc.nuxeo.com/nxdoc/how-to-enable-csv-import-on-a-custom-document-type/ ?
you'll probably want to enable CSV import on the document types you defined, either in Studio or with some code. Here is how to do that.
(...)
<require>org.nuxeo.ecm.platform.actions</require>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
point="filters">
<filter id="importFile" append="true">
<rule grant="true">
<permission>AddChildren</permission>
<type>YourCustomTypeID</type>
</rule>
</filter>
</extension>
I have been researching this problem for a couple weeks now and at a dead end.
Running 12c form and reports, Linux OEL 6, WebLogic 12c. Also, this is a 6i to 12c migration of all objects. This fails when sending the report directly across in the URL and with web.show_document.
Have added the COMPONENT_CONFIG_PATH, added the suggested changes to rwserver.conf and the rwservlet.properties, all folders and objects are wide open at 0777. I've tried a number of different users with various privileges but all have resulted in the same error. I have tried with RUN_REPORT_OBJECT and that also results in an error of FRM-41219. Here is the rwserver.confg:
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://xmlns.oracle.com/reports/server" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<cache class="oracle.reports.cache.RWCache">
<property name="cacheSize" value="50"/>
</cache>
<engine class="oracle.reports.engine.EngineImpl" engLife="1" id="rwEng" maxEngine="1" minEngine="1" maxIdle="3" callbackTime="90000">
<property name="sourceDir" value="/app01/bcis/forms"/>
<property name="tempDir" value="/app01/oracle/tmp"/>
<property name="keepConnection" value="yes"/>
</engine>
<engine class="oracle.reports.urlengine.URLEngineImpl" engLife="50" id="rwURLEng" maxEngine="1" minEngine="0"/>
<!--
<destination class="oracle.reports.server.DesFile" destype="file"/>
<destination class="oracle.reports.server.DesCache" destype="cache"/>
<destination class="oracle.reports.server.DesPrint" destype="printer"/>
-->
<destination class="oracle.reports.plugin.destination.ftp.DesFTP" destype="ftp"/>
<destination class="oracle.reports.plugin.destination.webdav.DesWebDAV" destype="WebDav"/>
<!--job engineId="rwEng" jobType="report" securityId="Empty"/-->
<!--job engineId="rwURLEng" jobType="rwurl" securityId="Empty"/-->
<notification class="oracle.reports.server.MailNotify" id="mailNotify">
<property name="succnotefile" value="succnote.txt"/>
<property name="failnotefile" value="failnote.txt"/>
</notification>
<jobRepository>
<property name="dbuser" value="rwadmin"/>
<property name="dbpassword" value="csf:reports:repo"/>
<property name="dbconn" value="dcis2d01.mlgw.org:1522:CISDB12"/>
</jobRepository>
<connection idleTimeOut="30" maxConnect="250"/>
<queue maxQueueSize="1000"/>
<folderAccess>
<read>/app01/bcis/forms:/app01/bcis/reports:/app01/bcis/dev/exe:/app01/bcis/exe:/app01/oracle/tmp</read>
<write>/app01/bcis/forms:/app01/bcis/reports:/app01/bcis/dev/exe:/app01/bcis/exe:/app01/oracle/tmp</write>
<defaultWriteFolder>/app01/bcis/forms</defaultWriteFolder>
</folderAccess>
<identifier encrypted="yes">QgZSFEalKUbL0t/KwwqSEg0=</identifier>
<proxyInfo>
<proxyServers>
<proxyServer name="$$Self.proxyHost$$" port="$$Self.proxyPort$$" protocol="all"/>
</proxyServers>
<bypassProxy>
<domain>$$Self.proxyByPass$$</domain>
</bypassProxy>
</proxyInfo>
<pluginParam value="%MAILSERVER_NAME%" name="mailServer"/>
</server>
The naming service:
<namingService name="Cos" host="10.211.212.164" port="14021"/>
I have checked the spelling of all paths, so they are right and they do run under rwrun and I can bring them up in rwbuilder.
If there is anything else that would be helpful, please let me know.
Any suggestions at this point will be helpful and I would appreciate as many quick responses as possible.
Have you added the report as an object in the calling form? (Similar to adding a new canvas or new datablock)
The find_report_object call should be passed the name of the report object as it was added to the form. The FRM-41219 makes me think you haven't added the report object. This did not need to be done in 6i.
Have you tried to verify that the reports are generated? You could try trigger generation of a report directly from a curl command on the reports server. I use something like the below URL to verify that the reportsserver is running:
http://reportsserver:port/reports/rwservlet?userid=user/password#tnsname&destype=cache&report=reportnam.rdf&desformat=PDF&argument1=123&argument2=456
I am using SpringBatch to write a csv-file to the database. This works just fine.
I am using a FlatFileItemReader and a custom ItemWriter. I am using no processor.
The import takes quite some time and on the UI you don't see any progress. I implemented a progress bar and got some global properties where i can store some information (like lines to read or current import index).
My question is: How can i get the number of lines from the csv?
Here's my xml:
<batch:job id="importPersonsJob" job-repository="jobRepository">
<batch:step id="importPersonStep">
<batch:tasklet transaction-manager="transactionManager">
<batch:chunk reader="personItemReader"
writer="personItemWriter"
commit-interval="5"
skip-limit="10">
<batch:skippable-exception-classes>
<batch:include class="java.lang.Throwable"/>
</batch:skippable-exception-classes>
</batch:chunk>
<batch:listeners>
<batch:listener ref="skipListener"/>
<batch:listener ref="chunkListener"/>
</batch:listeners>
</batch:tasklet>
</batch:step>
<batch:listeners>
<batch:listener ref="authenticationJobListener"/>
<batch:listener ref="afterJobListener"/>
</batch:listeners>
</batch:job>
I already tried to use the ItemReadListener Interface, but this isn't possible as well.
if you need to know how many lines where read, it's available in spring batch itself,
take a look at the StepExecution
The method getReadCount() should give you the number you are looking for.
You need to add a step execution listener to your step in your xml configuration. To do that (copy/pasted from spring documentation):
<step id="step1">
<tasklet>
<chunk reader="reader" writer="writer" commit-interval="10"/>
<listeners>
<listener ref="chunkListener"/>
</listeners>
</tasklet>
</step>
where "chunkListner" is a bean of yours annotated with a method annotated with #AfterStep to tell spring batch to call it after your step.
you should take a look at the spring reference for step configuration
Hope that helps,
God knows I searched the forum for an answer, but didn't see any.
This is the simplified XML my JAXB code reads. There are 2 namespaces involved. xyz and abc. These two are defined in two different schema files. And xjc generates two different packages for them. The following file is nicely read into those classes and can even write it.
<xyz:xyz xsi:schemaLocation="urn:xyz xyz.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xyz="urn:xyz">
<session>
<App xsi:schemaLocation="urn:abc abc.xsd" xmlns="urn:abc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AppItem att1="1234"/>
</App>
</session>
</xyz:xyz>
This is how it writes it.
<ns3:xyz xmlns:ns2="urn:abc" xmlns:ns3="urn:xyz">
<session>
<ns2:App>
<ns2:AppItem att1="1234"/>
</ns2:App>
</session>
</ns3:xyz>
Now i know about NamespacePrefixMapper and I can change ns2 and ns3 to the values I want. And I want this. Basically I want to main the original form of the XML. The App element should have all its information contained in itself and not create a prefix.
<xyz:xyz xmlns:xyz="urn:xyz">
<session>
<App xsi:schemaLocation="urn:abc abc.xsd" xmlns="urn:abc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AppItem att1="1234"/>
</App>
</session>
</xyz:xyz>
Does anyone have any clue as to how to achieve this? Seems like some setting in AppType.java should tell the writer to not update root element with prefix.