多年来一直在使用VisualVM,它让我觉得有这样一个错误,我一直没有找到解决方案 - 并且肯定会将调试工作流程改进十倍.
当您双击调用树中的类名时,我总是会收到如下错误:

真的很烦人.我喜欢这个只是打开我的编辑器到该文件(到正确的行号将是一个奖金)所以我可以快速编辑/查看代码上下文.
有谁知道如何配置VisualVM,以便它可以找到源?与Eclipse集成获得奖励积分.FWIW:只是将源路径添加到类路径不起作用,不幸的是,一盒牛奶比VisualVM有更好的文档.
我正在尝试在Python 2.7中编写一些单元测试,以针对我对OAI-PMH模式所做的某些扩展进行验证:http : //www.openarchives.org/OAI/2.0/OAI-PMH.xsd
我遇到的问题是具有多个嵌套名称空间的业务是由上述XSD中的此规范引起的:
<complexType name="metadataType">
<annotation>
<documentation>Metadata must be expressed in XML that complies
with another XML Schema (namespace=#other). Metadata must be
explicitly qualified in the response.</documentation>
</annotation>
<sequence>
<any namespace="##other" processContents="strict"/>
</sequence>
</complexType>
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的代码的片段:
import lxml.etree, urllib2
query = "http://localhost:8080/OAI-PMH?verb=GetRecord&by_doc_ID=false&metadataPrefix=nsdl_dc&identifier=http://www.purplemath.com/modules/ratio.htm"
schema_file = file("../schemas/OAI/2.0/OAI-PMH.xsd", "r")
schema_doc = etree.parse(schema_file)
oaischema = etree.XMLSchema(schema_doc)
request = urllib2.Request(query, headers=xml_headers)
response = urllib2.urlopen(request)
body = response.read()
response_doc = etree.fromstring(body)
try:
oaischema.assertValid(response_doc)
except etree.DocumentInvalid as e:
line = 1;
for i in body.split("\n"): …Run Code Online (Sandbox Code Playgroud) eclipse ×1
java ×1
performance ×1
profiling ×1
python ×1
validation ×1
visualvm ×1
xml ×1
xsd ×1