Jndi value cant support dots - jboss

I am trying to declare a new JNDI with the tool jboss-cli.sh.
This is my basic instruction:
/subsystem=naming/binding=java:/comp/env/config/rutaLogback:add(value="/var/opt/logback.xml",binding-type=simple)
The problem is that my value has a dot (value="/var/opt/logback.xml") and when I execute it , the value shown is only "xml" instead of the complete value that I wrote in the instruction.
I tried to escape the dot by many different ways.
:add(value="/var/opt/logback\.xml",binding-type=simple)
:add(value="/var/opt/logback\\.xml",binding-type=simple)
:add(value="/var/opt/logback\\\.xml",binding-type=simple)
:add(value="/var/opt/logback.xml",binding-type=simple)
Etc...
But it doesn`t work..
I expect to obtain the value /var/opt/logback.xml in the JNDI when i look that in the server console.

Finally I found the solution:
I watch the value in the standalone.xml and there the value is OK!! The problem seems to be only with the viewer of the admin console of the JBOSS and it doesn`t matter!

Related

Sparx Enterprise Architect DocumentGenerator does not honour TaggedValues on Stereotype or values from SetProjectConstants and ReplaceField

maybe someone can help me on this. I am trying to generate a document via the DocumentGenerator interface. All in all this works well, except that the DocumentGenerator does not replace the Report Constants with actual values (which are defined on the report package stereotype.
This is the general flow of the document creation code (which generally works):
var gen = Repository.CreateDocumentGenerator();
gen.SetProjectConstant("ReportName", "My Project");
gen.NewDocument(string.Empty);
gen.ReplaceField("ReportName", "My Project");
gen.InsertCoverPageDocument(tags[REPORT_COVERPAGE]);
gen.InsertBreak(DocumentBreak.breakPage);
gen.InsertTOCDocument(tags[REPORT_TOC]);
gen.InsertBreak(DocumentBreak.breakPage);
gen.DocumentPackage((int)nativeId, 0, template);
gen.SaveDocument(fileName, DocumentType.dtDOCX);
I tried ReplaceField and SetProjectConstant both and one at a time before and after calls to NewDocument/InsertCoverPageDocument:
Strangely there is one constant that is being replaced: ReportSummary.
When I run the document generator via "F8" all constants are being replaced correctly.
Other project constants are being replaced correctly.
I can reproduce the behaviour on EA v14.1.1429 and v12.0.1215.
Does someone have a hint for further troubleshooting? Thanks in advance!
========== UPDATE ==========
When I use ReplaceField at the end (before the actual call to SaveDocument the following Report Constants get replaced: {ReportTitle} and {ReportName}
I discovered some workaround: when I manually remove the predefined {Report~} constants from the template and re-add them as Project Constants, their values get replaced correctly.
I will examine this further and give an update as
I did some further investigation on this and came to the following conclusion and workaround (as I have received no comments or answers on this):
I deleted all references to ReportConstants in my EA templates and replaced them by ProjectConstants with the same name.
In my code where I want to generate the documentation I (re)set all ProjectConstants with the actual values via SetProjectConstant and additionally added a call to ReplaceField to replace the constants with the actual values.
The previous mentioned calls are inserted directly before the call to SaveDocument document.
tags.ForEach(t =>
{
if (string.IsNullOrWhiteSpace(t.Key)) return;
generator.SetProjectConstant(t.Key, t.Value);
generator.ReplaceField(t.Key, t.Value);
});
generator.SaveDocument(fileName, DocumentType.dtDOCX);
If someone comes up with a better resonse or explanation for the behaviour I am happy to accept this as answer.
I have also found that when you call ReplaceField on these project constants in a CoverPage template, the formatting defined in the template is overwritten. It seems that some of the SetProjectConstant calls actually set the values as you would expect, and the rest do not.. hence the need to call both sets of APIs.

how to verify text present in placeholder in selenium IDE

I want to verify the text present in placeholder. I have located the element and i am using Assert text command. I've entered the same string in value. On executing it is showing actual value did not match
Use assertAttribute or verifyAttribute command.
Example:
verifyAttribute | css=#search#placeholder | Sample String
Notes:
In the Target column of Selenium IDE, you need to provide the proper path of the element followed by an # sign
and then the name of the attribute. (placeholder in your case)
Using
verifyAttibute will still continue running the test case once an
error is detected while using assertAttribute doesn't.
You need to understand that assertText function can only check static text on your webpage.
You must be getting an error message.
This is perfectly normal.
What can help in this situation is using the assertAttribute or verifyAttribute functions.
Both these functions perform the same task; the former stops the test after receiving an error message in the text box while verifyValue just records the error in the log and runs the next commands.
While giving the target, either specify the XPath or refer by using the name=name#placeholder format.
You can find the name value by inspecting the box with a firefox addon called Firepath which runs with another firefox tool called Firebug. Install them if you don't already have.
Hope this helps!
Xpath contains() is the best way.
driver.find_element_by_xpath('//input[contains(#placeholder,"email")]')
Format : '//tag[contains(#attribute,"value")]'

how to pass a single value parameter through jndi in glassfish server?

Hi i would like to set context level parameter through JNDI but i am getting problem with Glasfish server when i am manually set the parameter like the below in web.xml
< env-entry>< env-entry-name>name< /env-entry-name>< env-entry-value>value< /env-entry-value>< env-entry-type>type< /env-entry-type>< /env-entry>
while i am setting the above patameters on web.xml it gives error like
cvc-complex-type.2.4.a: Invalid content was found starting with element 'env-entry-type'. One of
'{http://xmlns.jcp.org/xml/ns/javaee:mapped-name,
i am acquiring the initialContext object by this object i got the environment context on java:/comp/env/ now can any one help me how to set single value parameter using JNDI glass fish server in eclipse?
You need to change the order of the elements. The correct order is:
<env-entry>
<env-entry-name>name</env-entry-name>
<env-entry-type>type</env-entry-type>
<env-entry-value>value</env-entry-value>
</env-entry>

How create node with unicode property in Neo4jClient?

I am using Neo4jClient in C#.
I added several nodes with properties which contains string in nicode format. The thing is that when i query nodes back in C# i get ???? instead of unicode values the same happen when i review data via Neo4j server DataBrowser page.
I added node directly in Neo4j server with unicode property, everything looks ok.
How can i tune Neo4jClient to create node/relationships with unicode properties?
thank you in advance
p.s. in neo4j-wrapper.conf file i found wrapper.java.additional.3=-Dfile.encoding=UTF-8
This is a known issue:
https://bitbucket.org/Readify/neo4jclient/issue/25/unicode-characters-are-not-roundtripped
Please monitor that issue to know when it is fixed.

jboss valve encoding problem while url rewriting

I have an app., coded with ejb3, jsf and maven, which runs on jboss 4.2.2GA
The problem I have been facing for 2 days is I cannot convert non-english characters that are added to url on runtime. For instance, there is a search textbox and a button. When a user enters a word including non-english characters, and pushes the button, it is added to the url with bad characters like %56 or &347 etc..
Is there any way to achieve what I am trying to do here? BTW, is there also any way to get over this problem on the jboss side configuration rather than application side (filters or context.xml etc..)?
Any help would be appreciated
Thanks a lot,
Baris
--
EDIT: I have solved this issue by using URLEncoder. When I passed the variable to the action method, I use URLEncoder in order to encode it to the right charset.
Example:
Take parameter from the URL:
String someString = ServletActionContext.getRequest().getParameter("someStringFromURL");
Encode the string;
String encoded = URLEncoder.encode(someString, "ISO-8859-9");
Find the appropriate connector element in your tomcat server.xml (deploy/jboss-web.deployer/server.xml for recent versions) and add the attribute URIEncoding with a value of UTF-8.
I have solved this issue by using URLEncoder. When I passed the variable to the action method, I use URLEncoder in order to encode it to the right charset.
Example: Take parameter from the URL:
String someString = ServletActionContext.getRequest().getParameter("someStringFromURL");
Encode the string;
String encoded = URLEncoder.encode(someString, "ISO-8859-9");