This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 113664 - Cannot validate ejb-jar.xml
Summary: Cannot validate ejb-jar.xml
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords: REGRESSION
Depends on: 112329
Blocks:
  Show dependency tree
 
Reported: 2007-08-23 21:15 UTC by _ pcw
Modified: 2009-11-10 06:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
example ejb-jar.xml (1.59 KB, text/plain)
2007-08-23 21:16 UTC, _ pcw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2007-08-23 21:15:19 UTC
Create a J2EE 1.4 ejb-jar (any server).  Open ejb-jar.xml, switch to XML view, right click and select <Validate XML>.

I get this output:

XML validation started.

Checking file:/space/tmp/ServiceEjb21A/src/conf/ejb-jar.xml...
Referenced entity at "nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/j2ee_1_4.xsd".
schema_reference.4: Failed to read schema document 'j2ee_1_4.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>. [109]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:descriptionGroup' to a(n) 'group' component. [525]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:dewey-versionType' to a(n) 'type definition' component. [583]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:dewey-versionType' to a(n) 'simpleType definition' component. [583]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [374]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [395]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:fully-qualified-classType' to a(n) 'type definition' component. [496]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:xsdNMTOKENType' to a(n) 'type definition' component. [629]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:descriptionGroup' to a(n) 'group' component. [1,193]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:jndiEnvironmentRefsGroup' to a(n) 'group' component. [1,290]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:descriptionGroup' to a(n) 'group' component. [1,379]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:jndiEnvironmentRefsGroup' to a(n) 'group' component. [1,409]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [1,443]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [1,467]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [1,769]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [1,793]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [1,979]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:descriptionGroup' to a(n) 'group' component. [2,084]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:jndiEnvironmentRefsGroup' to a(n) 'group' component. [2,121]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [2,151]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
src-resolve: Cannot resolve the name 'j2ee:string' to a(n) 'type definition' component. [2,180]
nbres:/org/netbeans/modules/j2ee/ddloaders/ejb/resources/ejb-jar_2_1.xsd
Too many errors, stopping further checking.
XML validation finished.
Comment 1 _ pcw 2007-08-23 21:16:34 UTC
Created attachment 47213 [details]
example ejb-jar.xml
Comment 2 _ pcw 2007-08-23 21:23:57 UTC
This also impacts application.xml and application-client.xml.

web.xml works, apparently because web/resources is where j2ee_1_4.xsd is located (but this file is shared among all the
standard descriptors.

It also affects the same set of descriptors (ejb-jar.xml, application.xml, application-client.xml) for Java EE 5, except
the referenced missing file is javaee_5.xsd.

It also impacts webservices.xml (check against the different versions - 1.1, 1.2, etc. as well)

This is a regression from when these schemas were provided by the glassfish plugin.

IMPORTANT:  When fixing this, please make sure that the entity resolvers can locate all necessary schemas against all
file types to which they apply.  I have probably not enumerated all cases here.
Comment 3 Erno Mononen 2007-08-24 08:38:12 UTC
Yes, it must be related to moving the schemas to a different catalog. I don't understand though why this is happening 
now, I did test that validation worked with all affected schemas (in particular ejb-jar.xml). I will investigate.
Comment 4 Erno Mononen 2007-08-24 09:31:58 UTC
Adding a dependency to issue 112329. I plan to put all schemas in j2ee/ddloaders to the same directory, which would 
resolve this, but there is an exception thrown when invoking code completion that blocks me from doing it now.
Comment 5 Erno Mononen 2007-09-03 14:01:28 UTC
Fixed together with issue 112329 (the commit log is in that issue), please verify.