Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » UML/XMI resource loader connects to www.eclipse.org(During maven build, build gets stuck for minutes behind firewall)
UML/XMI resource loader connects to www.eclipse.org [message #1847988] Tue, 16 November 2021 10:55 Go to next message
Mudi Obada is currently offline Mudi ObadaFriend
Messages: 2
Registered: November 2021
Junior Member
During maven build with EMF on a host behind firewall, build gets stuck for minutes.

Observation is that this is due to attempt to connect directly to internet.

Can this connection attempt be disabled?

Note that after connection timeout, the build continues without problems.

java    9772 user   31u  IPv4              74651       0t0      TCP ip-10-112-143-149.internal:57862->www.eclipse.org:http (SYN_SENT)



[INFO] "main" #1 prio=5 os_prio=0 tid=0x00007f9094050800 nid=0x24ee runnable [0x00007f909a9cd000]
[INFO]    java.lang.Thread.State: RUNNABLE
[INFO] 	at java.net.PlainSocketImpl.socketConnect(Native Method)
[INFO] 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
[INFO] 	- locked <0x00000000e2bbcea0> (a java.net.SocksSocketImpl)
[INFO] 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
[INFO] 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
[INFO] 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[INFO] 	at java.net.Socket.connect(Socket.java:607)
[INFO] 	at java.net.Socket.connect(Socket.java:556)
[INFO] 	at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
[INFO] 	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
[INFO] 	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
[INFO] 	- locked <0x00000000e2bbce18> (a sun.net.www.http.HttpClient)
[INFO] 	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
[INFO] 	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
[INFO] 	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
[INFO] 	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226)
[INFO] 	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
[INFO] 	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
[INFO] 	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990)
[INFO] 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
[INFO] 	- locked <0x00000000e2bbc308> (a sun.net.www.protocol.http.HttpURLConnection)
[INFO] 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
[INFO] 	- locked <0x00000000e2bbc308> (a sun.net.www.protocol.http.HttpURLConnection)
[INFO] 	at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl.createInputStream(URIHandlerImpl.java:207)
[INFO] 	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2589)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2476)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1353)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1522)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1044)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:82)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1026)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:720)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:190)
[INFO] 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
[INFO] 	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
[INFO] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
[INFO] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
[INFO] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
[INFO] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
[INFO] 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
[INFO] 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
[INFO] 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[INFO] 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
[INFO] 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
[INFO] 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
[INFO] 	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
[INFO] 	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
[INFO] 	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
[INFO] 	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
[INFO] 	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
[INFO] 	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
[INFO] 	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:220)
[INFO] 	at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:209)
[INFO] 	at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:269)
[INFO] 	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1477)
[INFO] 	at org.eclipse.uml2.uml.internal.impl.StructuralFeatureImpl.getType(StructuralFeatureImpl.java:221)
[INFO] 	at org.eclipse.uml2.uml.internal.operations.ElementOperations.getExtension(ElementOperations.java:1189)
[INFO] 	at org.eclipse.uml2.uml.internal.operations.ElementOperations.applyStereotype(ElementOperations.java:1498)
[INFO] 	at org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereotype(ElementImpl.java:504)

Re: UML/XMI resource loader connects to www.eclipse.org [message #1847993 is a reply to message #1847988] Tue, 16 November 2021 15:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33143
Registered: July 2009
Senior Member
This option can be used to turn that off:

org.eclipse.emf.ecore.xmi.XMLResource.OPTION_USE_PACKAGE_NS_URI_AS_LOCATION

You could put in into org.eclipse.emf.ecore.resource.ResourceSet.getLoadOptions() so that all resource loads avoid that.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: UML/XMI resource loader connects to www.eclipse.org [message #1847994 is a reply to message #1847993] Tue, 16 November 2021 16:53 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Eclipse OCL used to have a bad problem whereby an attempt to access the nonexistent http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore was made at the start of every OCL compilation. The failure fell back to built-in functionality, but burned a modest amount of time for all users, and gave a painful delay for no Internet.

Switching off the access is good, but the need for the access at all is a bug.

I therefore developed org.eclipse.ocl.examples.xtext.tests.NoHttpURIHandlerImpl to give a JUnit test fail if any attempt is made to access the Internet. This forces me to fix rather than hide bugs. For the particular case of the synthetic http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore, it required the functionality to be less synthetic and to provide a regular EMF registration so that the access hits a Java model, not the Internet.

Regards

Ed Willink
Re: UML/XMI resource loader connects to www.eclipse.org [message #1848027 is a reply to message #1847993] Wed, 17 November 2021 15:10 Go to previous message
Mudi Obada is currently offline Mudi ObadaFriend
Messages: 2
Registered: November 2021
Junior Member
Ed Merks wrote on Tue, 16 November 2021 15:35
This option can be used to turn that off:

org.eclipse.emf.ecore.xmi.XMLResource.OPTION_USE_PACKAGE_NS_URI_AS_LOCATION


Setting this option to true seems to solve the problem.

Thank you!


Regards,
Mudi Obada
Previous Topic:Reference elements from other Ecore models
Next Topic:Large containment reference performance
Goto Forum:
  


Current Time: Thu May 02 00:11:56 GMT 2024

Powered by FUDForum. Page generated in 0.03736 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top