web stats
Compiler warnings after Java 7_40 update. - Page 3 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #21  
Old 11-20-2014, 09:03 AM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 948
StickyBandit is on a distinguished road
Thumbs down Mirth Warnings

I still get the following Mirth Warnings:
Any responses may be helpful...

[2014-11-20 10:33:23,387] ERROR (Server:146): Compiler warnings:

[2014-11-20 10:33:23,309] ERROR (Server:146): Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser : Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

[2014-11-20 10:33:23,387] ERROR (Server:146): WARNING: 'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
Reply With Quote
  #22  
Old 12-17-2014, 07:25 AM
john.newman john.newman is offline
OBX.3 Kenobi
 
Join Date: Oct 2009
Posts: 124
john.newman is on a distinguished road
Default

Is it possible to suppress this in the log4j config? I don't know which class in the mirth code that the messages are coming from: ERROR 2014-12-17 10:07:40,860 [qtp709531179-2263] Server: Compiler warnings:
....

I don't see a "Server" class in here. If someone can specify which class it is coming from we can just add a rule in log4j.properties to set that one to INFO only. Which might be an issue as we'll be suppressing other ERROR events that we might care about.

We are on jdk7 u67 so the prior comment that u51 solves the issue is likely incorrect.

I'd rather not install 6 alongside for mirth as 6 is EOL. We can't exactly move to 3.x and 8 and 3.x is not a drop in upgrade. It's not worth moving heaven and earth to fix this silly error message, but we should be able to do something.

Is there a better way to fix it? Can we not set those properties that it's saying are not recognized? There should be a simple way around this one.... The oracle bug tracker site isn't working either, what a joke.
Reply With Quote
  #23  
Old 12-17-2014, 08:10 AM
john.newman john.newman is offline
OBX.3 Kenobi
 
Join Date: Oct 2009
Posts: 124
john.newman is on a distinguished road
Default

Looking through the code it appears these messages are coming from

com.mirth.connect.server.logging.LogOutputStream

Which somewhat confusingly says: private Logger logger = Logger.getLogger("Server");

Server could be a more descriptive string.

protected void processLine(final String line) {
logger.error(line);
}

And we see this referenced in:

com.mirth.connect.server.Mirth

private void initializeLogging() {
// Route all System.err messages to log4j error
System.setErr(new PrintStream(new LogOutputStream()));

So we are teeing system.err with our log4j file. Neat trick. So these messages are in fact coming from somewhere else and dumping to system.err. Which would mean that the real bug here is not with any of the mirth code, but rather xerces, or possibly mirth's use of xerces.

Our application is using xerces 2.8 (older) I believe and we do not see this error. I'll try to investigate it from that angle.

Any other thoughts anyone? There should be a semi-clean workaround or even fix for this one somehow... It'd be nice if the oracle bug site would come back....
Reply With Quote
  #24  
Old 02-05-2015, 08:29 PM
jerchap jerchap is offline
OBX.3 Kenobi
 
Join Date: Nov 2007
Location: British Columbia, Canada
Posts: 129
jerchap is an unknown quantity at this point
Default

I'm seeing this with Java v7 update 75 on Mirth 3.1.1.7461

I've heard Java version 8 has it's own bugs. Should I upgrade to 8, or is there another solution?
Reply With Quote
  #25  
Old 03-20-2015, 11:16 AM
akathol akathol is offline
Mirth Newb
 
Join Date: Sep 2014
Location: OR, USA
Posts: 10
akathol is on a distinguished road
Default

Hello all,
I'd like to revisit this issue since the conversation has been quiet here for a month+.

Can anyone confirm that an upgrade to Java 8 will fix this issue? We're on 7u60 without any resolution to the server warnings. The warnings are choking our server logs and have caused a heap size issue after letting warnings file to the mirth server log for too long.

Are there alternatives to this XmlUtil.prettyPrint that might do the same thing?

Our setup: Java 7u60, Mirth Connect 3.2. Warning logs get created during a file writer destination with output template:
Code:
${XmlUtil.prettyPrint(${message.encodedData})}
Reply With Quote
  #26  
Old 03-23-2015, 11:44 AM
akathol akathol is offline
Mirth Newb
 
Join Date: Sep 2014
Location: OR, USA
Posts: 10
akathol is on a distinguished road
Default

We updated our test Mirth Appliance to Java 8u31 this morning and I'm still finding the same errors when the pretty print util is run either from transform or in a file destination template (as posted above).
Reply With Quote
  #27  
Old 03-30-2015, 11:52 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

As a workaround, you can suppress the warning from your logs by doing this:
  • Set "Clear global map on redeploy" to No in the server settings.
  • Use this in the global deploy script:
    Code:
    if ($('log4jFilterSet') != true) {
    	for (var en = org.apache.log4j.Logger.getRootLogger().getAllAppenders(); en.hasMoreElements();) {
    		en.nextElement().addFilter(new JavaAdapter(org.apache.log4j.spi.Filter, {
    			decide: function(event) {
    				if (event.getLevel().equals(org.apache.log4j.Level.ERROR) && event.getLoggerName().equals("Server")) {
    					var msg = event.getRenderedMessage();
    
    					if (org.apache.commons.lang3.StringUtils.isNotBlank(msg)) {
    						if (org.apache.commons.lang3.StringUtils.equals(msg, "Compiler warnings:") || org.apache.commons.lang3.StringUtils.contains(msg, "Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.") || org.apache.commons.lang3.StringUtils.contains(msg, "Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.") || org.apache.commons.lang3.StringUtils.contains(msg, "Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.")) {
    							return org.apache.log4j.spi.Filter.DENY;
    						}
    					}
    				}
    				
    				return org.apache.log4j.spi.Filter.NEUTRAL;
    			}
    		}));
    	}
    	
    	$g('log4jFilterSet', true);
    }
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #28  
Old 03-30-2015, 01:12 PM
StickyBandit's Avatar
StickyBandit StickyBandit is offline
Mirth Guru
 
Join Date: Aug 2013
Location: Home Alone
Posts: 948
StickyBandit is on a distinguished road
Default

What if we still need to ..
Clear global map on redeploy

with this code does it get cleared?
Reply With Quote
  #29  
Old 03-30-2015, 02:40 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Quote:
Originally Posted by StickyBandit View Post
What if we still need to ..
Clear global map on redeploy

with this code does it get cleared?
Then you'll just have to take measures of your own to ensure the filters only get added to each appender once. Otherwise there is potential for a memory leak.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #30  
Old 03-31-2015, 05:50 AM
akathol akathol is offline
Mirth Newb
 
Join Date: Sep 2014
Location: OR, USA
Posts: 10
akathol is on a distinguished road
Default

Quote:
What if we still need to ..
Clear global map on redeploy

with this code does it get cleared?
I guess you could flip it and manually clear global variables you're worried about persisting in the global deploy script?

Quote:
As a workaround, you can suppress the warning from your logs by doing this:
Set "Clear global map on redeploy" to No in the server settings.
Use this in the global deploy script:......
Thanks Nick! That looks like it will work for us. It is filtering the warning errors and AFAICT not filtering other server errors unnecessarily.
Reply With Quote
Reply

Tags
compiler, java, warning

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:58 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation