Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Metro configuration is inaccessible in Java SE 8

I have a Java desktop app that uses JAX-WS to call some web services using the default Metro JAX-WS implementation in Java SE -- it's an SWT app that's launched via Java Web Start (.jnlp). The web services haven't had any problems until recently, when several instances started having errors when the web service calls are initialized:

WARNING: MASM0010: Unable to unmarshall metro config file from location [ jar:file:/C:/Program%20Files%20(x86)/Java/jre1.8.0_31/lib/resources.jar!/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml ]
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")

Which ultimately leads to:

SEVERE: MASM0003: Default [ jaxws-tubes-default.xml ] configuration file was not loaded.

All of the clients experiencing this issue are on Windows using the JRE 1.8.31-45, both x86 and x86_64. I've been scouring this site and google, but haven't been able to find any information about this issue.

Thanks for any insight to this problem!

like image 526
idlegravity Avatar asked Nov 10 '22 14:11

idlegravity


1 Answers

after upgrading from jre 1.7_80 to 1.8.0_51 we received the "MASM0003" error when we tried to start our webservices. setting the ContextClassLoader before publish solved the problem:

Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); endpoint = Endpoint.publish(wsdlUrl, engine);

like image 155
oli_b Avatar answered Nov 14 '22 22:11

oli_b