axiom builder is null error - jaxb

I am not sure whether it is relevant but We are using in our system axis2 and JAXB for xml parsing and soap for communication(On tomcat).
Everything works well, however, I receive in my logs the following debug message repeatedly after each incoming message and I am not sure whether we are missing something.
2013-01-30 23:41:44,727 [http-8081-1] DEBUG org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl - Could not close builder or parser due to:
2013-01-30 23:41:44,727 [http-8081-1] DEBUG org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl - builder is null
Does it make sense to anyone ? Was I supposed somehow to initialize the builder to configure it ?
Thanks

This is not an error, but a debug message. In can be safely ignored.

Related

IBM ODM cannot generate a valid WADL

I've been plagued for months with an error in ODM.
It doesn't prevent my services from working, it only prevents ODM from automatically generating the JSON input payload when I test a service through the Rule Execution Server (the Retrieve HTDS Description File).
I attached a screenshot of the error.
What is puzzling is that:
if I move my variable from Input to Output, then the JSON gets generated in the Server Response section
if I manually enter my own JSON, the service executes correctly and I get back a decision
Does anyone have any idea what could possibly be wrong here?
Very likely your variable is not being deserialized properly. This would explain both the error you are getting and why you get it only as an input variable.
We get a similar error using a java.tim.ZonedDateTime with ODM 8.9.1, which does not support the java.time package. We just ignore the error -- and are hoping we can avoid it when we move to ODM 8.10.2.
hard to help as some of the context is missing. However the symptoms you describe tells there is a serialization issue one of the class of the HTDS interface.
It could be :
a getter/setter missing
a dependency missing in the XOM (classloader)
or a #jsonIgnore missing on a non getter/setter method whose name starts by get or set.
Best
Emmanuel

Nice Error Messages for "no viable alternative at input '<EOF>'" in ANTLR4

I want to show more beautiful error message to my users.
For example if someone types integer i= the error message no viable alternative at input '<EOF>' appears. That's totally fine and predictable due to my grammar rules but I'm figuring out ways to improve those messages. If the = is missing in the example above the message changes to mismatched input '<EOF>' expecting '='. Again predictable but I can do more stuff on things like this in my code than on a general input error.
Should I catch them in the code and try to evaluate which cases is meant? Or is there a better way to handle this?
Typically you'd create your own error listener and add it to the parser where you can deal with the error yourself. For that remove any existing error listeners (one for the console is automatically registered by default), by calling parser.removeErrorListeners();. Define an own error listener class derived from BaseErrorListener and add an instance of that to your parser via parser.addErrorListener(yourListener);. You can see an example of such a custom error listener in the ANTLR runtime (search for XPathLexerErrorListener). Override the syntaxError method and use the provided info to generate your own error message. There is already a message passed in to this method (in addition to other stuff like line + char position, exception etc.), which you cannot customize as it comes directly from generated code. So best is probably to leave that alone and start from scratch (the passed in exception is your best option you have).

How to disable JAXB INFO message "cannot be unwrapped:

I'm using CXF WSDL2Java (using JAXB to generate Java classes). I now have everything generating my classes fine, but I get INFO messages of the form;
Jun 15, 2016 4:39:16 PM org.apache.cxf.wsdl11.WSDLServiceBuilder checkForWrapped
INFO: Operation <--my operation--> cannot be unwrapped, its wsdl:part/#element reference must match xs:complexType/xs:sequence.
I understand why it can't be unwrapped and don't have the option to "fix" the WSDL, it's already in use as is.
I'd like to pass something in so that I don't see these INFO messages during my build, as it just creates noise for something that's really OK.
How can I run WSDL2Java to avoid this message?

Debugging XAML UnhandledException

Occasionally the UnhandledException handler in my app is raised due to an unhandled XAML exception.
The UnhandledExceptionEventArgs contains the message
E_RUNTIME_SETVALUE
and an inner-exception of type ArgumentException
Value does not fall within the expected range.
There is nothing in the call stack other than InitialiseComponent() which I can step into/ over without any exception being thrown.
Any ideas on how to debug further or any experience with E_RUNTIME_SETVALUE issues?
I do remember I had to once add basically no-op value converters to some XAML so I could see what was going on and trace the error. That might help in this case as well.
Also try to turn on mixed-mode debugging to see if more data comes from the native stack.
I had this in UWP and it was because I was using OnIdiom
<OnIdiom x:Key="MyFontSize" x:TypeArguments="x:Double" Tablet="28" Phone="16">
</OnIdiom>
I didn't have desktop included in one of the values and I was running my app on my desktop.

Play! framework and log4j, changing level for specifc package to FATAL

I'm in the process of writing an application that uses the WS object to make HTTP requests. However when making them (deliberately to a service that does not run) , I get a message from the inner Play! code:
15:06:29,613 ERROR ~ java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused to http://127.0.0.1:9091/
I traced this back to WSAsync.get() (https://github.com/playframework/play/blob/master/framework/src/play/libs/ws/WSAsync.java#L199):
public HttpResponse get() {
this.type = "GET";
sign();
try {
return new HttpAsyncResponse(prepare(prepareGet()).execute().get());
} catch (Exception e) {
Logger.error(e.toString());
throw new RuntimeException(e);
}
}
As this message is non-informational in my use case, I'd not like to show this error, so I decided to add a directive to my log4j.properties and restart the concerning application (Play! does not automatically reload it):
log4j.rootLogger=ERROR, Rolling
log4j.logger.play=INFO
log4j.logger.play.libs.ws=FATAL
log4j.appender.Rolling=org.apache.log4j.RollingFileAppender
log4j.appender.Rolling.File=logs/play-as.log
log4j.appender.Rolling.MaxFileSize=100KB
log4j.appender.Rolling.MaxBackupIndex=100
log4j.appender.Rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.Rolling.layout.ConversionPattern=%d{ABSOLUTE} %-5p ~ %m%n
However I still receive the messages in my logs. I don't really understand because it should run in the same classpath. Any guesses on this?
Play always log under one category "play". They use always Logger..., so your approach can't work. There was some discussion about this issue, but the developer of play prefer only one category for simplicity.
Add
log4j.debug = TRUE
That enables debugging for log4j: You'll see which options are parsed. If you don't see anything, then the properties aren't loaded. Maybe there is a typo or the file is in the wrong place.
Note: You can specify the class name as well to avoid to suppress too much (i.e. log4j.logger.play.libs.ws.WSAsync=FATAL)
Also note: You should really use the XML version to configure; using properties is so error prone...

Resources