Apache POI "cannot access CTSkip" - java

I'm encountering an issue trying to use Apache POI 5.2.3. I'm attempting to set the category axis mark interval and label.
As mentioned in another question(https://stackoverflow.com/a/66670362/2212458). The following code is supposed to handle this:
chart.getCTChart().getPlotArea().getCatAxArray(0).addNewTickLblSkip().setVal(2); // label only every second mark
chart.getCTChart().getPlotArea().getCatAxArray(0).addNewTickMarkSkip().setVal(2); // show only every second mark
However, this results in a build error "error: cannot access CTSkip" and "class file for org.openxmlformats.schemas.drawingml.x2006.chart.CTSkip not found".
Other portions of the namespace are accessible such as CTTitle, CTNumFormat, CTTickMark are accessible, but for some reason CTSkip is not. How do I work around this issue?

Related

QuickfixJ required field missing, even if it's there

I'm getting a "Conditionally Required Field Missing" error message, even though I'm sure that field is there.
58=Conditionally Required Field Missing, field=55
Versions:
QuickFixJ 2.1.0
FIX 4.4
Here is the FIX message that I'm sending (with mocked values and a few fields removed for clarity)
8=FIX.4.4
9=709
35=R
34=4
49=TARGET
56=ME
11=myClOrdID
131=myQuoteReqID
146=myNoRelatedSym
55=mySymbol // field missing
167=mySecurityType // field missing
Here is the calling code:
String symbol = quoteRequest.getField(new StringField(55)).getValue();
I also tried:
String symbol = quoteRequest.getString(55);
Here is my Data Dictionary:
<field number="55" name="Symbol" type="STRING"/>
I realize that the symbol field is no longer a part of the QuoteRequest FIX specification for 4.4 (though it was in earlier versions, such as 4.0), however surely there are ways to retrieve custom fields? I have no control over the QuoteRequest message that I receive.
I can always parse the message myself using toString() but that kinda defeats the purpose of using quickfixj in the first place.
Any ideas?
Tag 55 is inside the 146 repeating group. See the docs for reading repeating groups.
The symbol field is still in FIX44. You should spend some time familiarizing yourself with the FIX44.xml data dictionary file that you're using.
(You may find that you need to customize that file based on your counterparty's messaging; in practice, nobody uses the basic FIX44 message definitions without changing them at least a little.)
// create group
QuoteRequest.NoRelatedSym group = new QuoteRequest.NoRelatedSym();
// set group, confusing method name I find
message.getGroup(1, group);
// you now have all the getters of fields in that group
Symbol symbol = group.getSymbol();

A nullpointerException occur when i send CoAP message to OM2M

I've tried to send a CoAP message to IN-CSE in OM2M but IN-CSE printed NullpointerException like the picture I've uploaded.
I solved the problem by modifying CoAPServer class in OM2M source code.
I think the problem is "to=coap://localhost/~/in-cse" so I modified requestPrimitive.setTo(request.getURI())
to request.Primivice.setTo(request.getOptions().getURIString()) in CoAPServer class.
I think this way is not good, I don't know how to solve the problem without modifying the code...
If anyone knows any other way, let me know.
Thanks
-- append
I found the solution to remove the error.
First, I checked the OM2M version released. and I tried to send CoAP message to old version(1.0.0). then It was transferred well without problem. but the latest version had an error. So I compared the two codes.( I focused on CoapServer.java in org.eclipse.om2m.binding.coap)
In Coapserver.java, service() create a requestPrimitive object and transfer to Router.java. and It puts the targetId as a "to" variable in the requestPrimitive object via setTargetId() (setTargetId() calls setTo()) in 1.0.0 version. but In the latest version, it puts the string returned getURI() as a "to" variable in the requestPrimitive object.
(and in the latest version it does not seem to use targetId unless I use it.)
targetId contained "/in-cse" and getURI() returned "coap://localhost/~/in-cse".
enter image description here
enter image description here
The lastest version removed setTargetId() in reqeustPrimitive class. so when I modified setTo(getURI()) to setTo(targetId), it was transferred well.
enter image description here
enter image description here
Is this the bug of the lastest version? or am I doing something wrong?

Table doesn't exists in Liferay 6

I have defined a data table and associated objects in Liferay 6, but when I run the code it says the table doesn't exists, and it's true. The code runs fine when I create the table by hand just copy-pasting the create table from the model implementation, but I expected the table to be created when deploying.
The user has all the privileges needed to create it.
What I'm missing?
I face the same problem. and #urvish is correct you have to change build number in
service properties file.
problem
When multiple developers working on portlet that uses servicebuilder
will give below exception “Build namespace has build number which is
newer than “. When developer commits service.properties file and that
deployed on other developer machine then it will throw below
exception
Best Practice: To avoid these kind of errors, follow these:
create service-ext.properties file at the same locaiton of service.properties
add build.number={higher-value or same value in exception)
Deploy portlet again
.
Check values of build.namespace in service.properties file and value of
select buildNumber from servicecomponent where buildNamespace = <<build.namespace from service.properties>>
Now the buildNumber return from query must be lesser than value of build.number propert in service.properties. If it is not then just set the value of build.number to 9999.
Sometimes due to mismatch, changes are not applied to database.

Error on trying to create HawkConsole Object on TIBCO Hawk JAVA API

When i'm trying to create a HawkConsole Object using Hawk JAVA API, i'm get bellow error message
Unable to create EMS transport:
COM.TIBCO.hawk.console.nest.shared.TransportInitializationException:
COM/TIBCO/hawk/util/security/PasswordObfuscation
I'm using the follow code to try to create the object
hawkConsole = new TIBHawkConsole("MyDomain",
"MyEMSConnectionString",
"MyUserTOEMS",
"MyPasswortoEMS",
1);
In according with the official documentation, to the last parameter can be used anyone number ... This will be ignored ...
The object is successfully created but when the below line is executed the error happens
getAgentMonitor().initialize;
I think the exact syntax is getAgentMonitor():initialize;
Try to do and told me if it works.
Problem is solved.
Its necessary add the security.jar and utils.jar extracted from lib Hawk folder, on the Top of BUildPath to work.

Thymeleaf add custom data attribute with message resource value

I have a requirement where I need to insert the value to custom data tag using thymeleaf. The code for doing it using
data-th-attr="${data-custom=#messages.msg('test')}"
as well as
th:attr="data-custom=${#messages.msg('test')}"
I am unable to get the value in both the cases.
ultimately the parsing should be like data-custom="test"
here test is key for the value test in a properties file
By using the
data-th-attr="data-custom=#{test}"
or By using
th:attr="data-custom=#{test}"
helped me out, here test is the key for the value in message resource the issue was with the intellij IDEA IDE, it was having a bug that was showing me an unnecessary error.
Use th:attr="data-custom=#{key.for.message}" , this should work.
then after parsing the Expression,
data-custom="value.for.message"

Categories