Bug 392634 - Loading aop.xml file phones home to Eclipse.org
Summary: Loading aop.xml file phones home to Eclipse.org
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: 1.7.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-23 03:39 EDT by Bob Kerns CLA
Modified: 2012-10-24 14:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Kerns CLA 2012-10-23 03:39:31 EDT
(This is using the aspectjweaver.jar from the latest ajdt.)

I'm getting an exception looking for this permission: ("java.net.SocketPermission" "www.eclipse.org:80" "connect,resolve")

I would really be much happier if my secure application did not do this! Supply an EntityResolver and supply the DTD via an internal resource.

AccessControlContext.checkPermission(Permission) line: not available	
AccessController.checkPermission(Permission) line: not available	
SecurityManager.checkPermission(Permission) line: not available	
SecurityManager.checkConnect(String, int) line: not available	
HttpClient.openServer() line: not available	
HttpClient.<init>(URL, Proxy, int) line: not available	
HttpClient.New(URL, Proxy, int, boolean) line: not available	
HttpClient.New(URL, Proxy, int) line: not available	
HttpURLConnection.getNewHttpClient(URL, Proxy, int) line: not available	
HttpURLConnection.plainConnect() line: not available	
HttpURLConnection.connect() line: not available	
HttpURLConnection.getInputStream() line: not available	
XMLEntityManager.setupCurrentEntity(String, XMLInputSource, boolean, boolean) line: not available	
XMLEntityManager.startEntity(String, XMLInputSource, boolean, boolean) line: not available	
XMLEntityManager.startDTDEntity(XMLInputSource) line: not available	
XMLDTDScannerImpl.setInputSource(XMLInputSource) line: not available	
XMLDocumentScannerImpl$DTDDriver.dispatch(boolean) line: not available	
XMLDocumentScannerImpl$DTDDriver.next() line: not available	
XMLDocumentScannerImpl$PrologDriver.next() line: not available	
XMLNSDocumentScannerImpl(XMLDocumentScannerImpl).next() line: not available	
XMLNSDocumentScannerImpl.next() line: not available	
XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available	
XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available	
XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available	
SAXParser(XMLParser).parse(XMLInputSource) line: not available	
SAXParser(AbstractSAXParser).parse(InputSource) line: not available	
DocumentParser.saxParsing(URL) line: 158	
DocumentParser.parse(URL) line: 123	
ClassLoaderWeavingAdaptor.parseDefinitions(ClassLoader) line: 271	
DefaultWeavingContext.getDefinitions(ClassLoader, WeavingAdaptor) line: 130	
ClassLoaderWeavingAdaptor.initialize(ClassLoader, IWeavingContext) line: 155
Comment 1 Bob Kerns CLA 2012-10-23 03:44:58 EDT
Unsurprisingly, the workaround is to remove the DTD, and put up with the warning and less assistance that Eclipse gives me as a result.

This seems to be a regression from 1.7.1? I've had that DTD there for a while, and got it the first time after I updated the aspectweaver.jar file, attempting to get around bytecode verify errors (successfully, it seems).
Comment 2 Bob Kerns CLA 2012-10-23 04:03:28 EDT
(Actually, I take that back about success on the verifier. I forgot I added -XX:-UseSplitVerifier to my launcher. So I do need to try to put together a bug report.)
Comment 3 Andrew Clement CLA 2012-10-23 20:48:32 EDT
I wonder if it is that the aspectjweaver from AJDT is not the same as the aspectjweaver from a distribution, it is repackaged to better conform with usage in the OSGi environment.  I have never used the one from AJDT to do LTW. I wonder if it would work better for you if you used a real AspectJ aspectjweaver.jar.  But then we are stuck that the download page for AspectJ isn't currently showing recent dev builds any more (the build machine is down)...

Although, having said that, I think there were some changes around ltw caching, I suppose they *might* have disturbed the dtd.

However, a verifyerror (stack frame related I presume?) in 1.7.1 is unlikely to be fixed in 1.7.2 dev builds, I haven't fixed one of those since 1.7.1 went out.
Comment 4 Bob Kerns CLA 2012-10-23 21:04:40 EDT
I tried to ascertain from the Git repository how the two jars might differ, but I'm not even sure they were built from the same git repository. As much as I like git, it can be a drawback it doesn't force everything to end up in the same place. Do you know the right place to be looking? the "CVS" link on the web page points to a git repository, supposedly, but returns a 403 error.

I'll try to take look for the DTD thing if I get a chance.

The verify error was indeed another case of a missing StackMap. I had a reproducible case earlier in the AJDT environment, but that was resolved by upgrading to the latest, which is why I thought it might help to switch the one I'm using for LTW.

I haven't used AspectJ outside of a Spring environment, so it may take me a bit to tease out a test case and verify it.

I did verify that the Asm classes are there.
Comment 5 Andrew Clement CLA 2012-10-24 14:27:51 EDT
aspectjweaver.jar is built from the AspectJ git repository (http://git.eclipse.org/c/aspectj/org.aspectj.git/). Then there is an extra build step in AJDT that takes the aspectj jars apart and re-assembles them in a form suitable for AJDT distribution. There is no recompilation, but I can imagine things like DTDs getting lost.

I just built a new dev build and uploaded it, you can see it here:

http://eclipse.org/aspectj/downloads.php

That will include an aspectjweaver.jar suitable for proper LTW.  I don't quite know if it will affect this DTD issue though.