-
1. Re: how to get rid of these warnings?
adrian.brock Sep 14, 2005 2:02 PM (in response to bill.burke)I think that is really a question for JBossXB?
I could hack around it since I know it uses the JBossEntityResolver
http://docs.jboss.org/jbossas/javadoc/4.0.2/org/jboss/util/xml/JBossEntityResolver.html#registerEntity(java.lang.String,%20java.lang.String)
But that isn't going to solve the problem when we introduce "ANY" processing.
Actually, you just reminded me of something I missed/forgot :-(
http://jira.jboss.com/jira/browse/JBAS-2257 -
2. Re: how to get rid of these warnings?
starksm64 Sep 14, 2005 2:14 PM (in response to bill.burke)I have a thread on entity/schema resolution in JBossXB that has not gotten too far. The only registry that exists today is the JBossEntityResolver, but its configuration is lacking. The catch all resolution notion that it current has is something like this logic:
String uri = ...; ClassLoader loader = ...; URL schemaOrDtdURL = null; if( uri.endsWith(".dtd") ) schemaOrDtdURL = loader.findResource("dtd/"+uri); else if( uri.endsWith(".xsd") ) schemaOrDtdURL = loader.findResource("schema/"+uri);
so if the dtds/xsds reside somewhere on the classpath under the correct directory they should be found. The JBossEntityResolver also has a registry of well known public names and dtd/schema names that allow for explicit matching. -
3. Re: how to get rid of these warnings?
adrian.brock Sep 14, 2005 2:22 PM (in response to bill.burke)So this is just a problem of location within the jar file:
adrian@adrian-srv01:~/jboss-4.0/workspace/thirdparty/jboss/microcontainer/lib> jar -tf jboss-microcontainer.jar | grep xsd bean-deployer_1_0.xsd
At least until something better comes along. -
4. Re: how to get rid of these warnings?
starksm64 Sep 14, 2005 2:32 PM (in response to bill.burke)Yes, I think so. We need to have consistent packaging/naming conventions in line with whatever the JBossEntityResolver logic is. Ultimately this needs to be an xmlcatalog like thing with flexible namespace to dtd/xsd resolution via classpath or codebase.
-
5. Re: how to get rid of these warnings?
adrian.brock Sep 14, 2005 9:10 PM (in response to bill.burke)Argh!
Now that it is finding the schema properly, it shows the schema is invalid.
There are some minOccurs that should be zero.
I can't fix it at the moment:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=69265
There is still this coming from somewhere, still to investigate...
"2437 WARN [org.xml.sax.EntityResolver] Entity is not registered, publicId=null systemId=file:/home/adrian/jboss-head/workspace/kernel/src/r
esources/xml-test/org/jboss/test/kernel/config/test/bean-deployer_1_0.xsd" -
6. Re: how to get rid of these warnings?
starksm64 Sep 14, 2005 10:38 PM (in response to bill.burke)How do I test this?
-
8. Re: how to get rid of these warnings?
bill.burke Sep 15, 2005 6:12 PM (in response to bill.burke)"adrian@jboss.org" wrote:
Argh!
Now that it is finding the schema properly, it shows the schema is invalid.
There are some minOccurs that should be zero.
I can't fix it at the moment:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=69265
There is still this coming from somewhere, still to investigate...
"2437 WARN [org.xml.sax.EntityResolver] Entity is not registered, publicId=null systemId=file:/home/adrian/jboss-head/workspace/kernel/src/r
esources/xml-test/org/jboss/test/kernel/config/test/bean-deployer_1_0.xsd"
As a hack, I added the following to JBossEntityResolver.
registerEntity("urn:jboss:bean-deployer bean-deployer_1_0.xsd", "bean-deployer_1_0.xsd");
Unfortunately, I get the following specified in this forum post.
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3895024#3895024
Intellij posts the same error for me. -
9. Re: how to get rid of these warnings?
adrian.brock Sep 15, 2005 6:17 PM (in response to bill.burke)The links are a bit circular :-)
Can you confirm the current problem?
Are you using the xsd I committed last night in jboss-head? -
10. Re: how to get rid of these warnings?
bill.burke Sep 15, 2005 7:52 PM (in response to bill.burke)Ok, problem is solved with latest from CVS. Thanks for fixing the schema.
-
11. Re: how to get rid of these warnings?
adrian.brock Sep 15, 2005 10:37 PM (in response to bill.burke)"adrian@jboss.org" wrote:
There is still this coming from somewhere, still to investigate...
"2437 WARN [org.xml.sax.EntityResolver] Entity is not registered, publicId=null systemId=file:/home/adrian/jboss-head/workspace/kernel/src/r
esources/xml-test/org/jboss/test/kernel/config/test/bean-deployer_1_0.xsd"
This was just stupid. It logs the warning even though it is going to use
bean-deployer_1_0.xsd anyway.
It is just telling you it wasn't explicitly registered with the resolver.
I moved this logging to TRACE level and added some more TRACE logging
to help debug entity resolution problems in future. -
12. Re: how to get rid of these warnings?
bill.burke Sep 16, 2005 11:02 AM (in response to bill.burke)FYI, I changed JBossEntityResolve to register the bean xsd
-
13. Re: how to get rid of these warnings?
starksm64 Sep 22, 2005 1:14 PM (in response to bill.burke)There still are spurious warnings even with the removal of the warnings at the DefaultSchemaResolver level because the JBossEntityResolver does not try to load systemIDs that are valid URLs. One example is:
<jaas:policy xsi:schemaLocation="urn:jboss:security-config resource:security-config_4_1.xsd" xmlns:jaas="urn:jboss:security-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
2005-09-22 08:08:58,859 WARN [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] schema_reference.4: Failed to read schema document 'resource:security-config_4_1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. @ *unknown*[8,5]
I create a http://jira.jboss.com/jira/browse/JBAS-2282 issue for this. It seems that the logic for the JBossEntityResolver.resolveEntity(String publicId, String systemId) method should be:... // Try to resolve the publicID against the registered IDs InputSource inputSource = resolvePublicID(publicId); if( inputSource == null ) { // Try to resolve the systemID as a absolute URL inputSource = resolveSystemID(systemId); } if( inputSource == null ) { // Try to resolve the systemID as as a classpath reference under dtd or schema inputSource = resolveClasspathName(systemId); }
-
14. Re: how to get rid of these warnings?
adrian.brock Oct 4, 2005 5:47 PM (in response to bill.burke)We have acquired a new warning:
1585 WARN [XsdBinder] NOT HANDLED WILDCARD IN GLOBAL MODEL GROUP