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 243431 - JAXB wizard incorrectly reports Please Enter Valid Schema File
Summary: JAXB wizard incorrectly reports Please Enter Valid Schema File
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: JAXB (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-01 07:31 UTC by alibaba88
Modified: 2015-05-15 07:40 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alibaba88 2014-04-01 07:31:52 UTC
When trying to use a valid XSD file in JAXB Binding wizard, NetBeans reports Enter Valid Schema File (however only a flash message a 1/2 second long), if the projects src, WEB and WEB-INF folders are placed outside the Netbeans project home.
We're trying to keep the sourcecode outside the NetBeans projects homefolder for use of other IDE's as well.

When pointing to a valid xsd in the file browser in "Select file from local file system", the resulting filepath becomes relative which JAXB doesn't seem to handle, ie the following fails:
../../eCMSApp/eCMS-war/src/conf/xmlSchemas/v1/Products-schema.xsd

It works ok in a plain web project when sources are placed within the project home folder. It results in the following filepath and JAXB succeds:
src/conf/v2/products-schema.xsd

It seems to be similair to Bug 175802 however that bug was reported on 6.x on Macintosh 2009-10-30, concerned symbolic links, and has never been fixed.

Also similair to Bug 183577 reported 2010-04-06 on version 6.8, 6.7.1.
Comment 1 alibaba88 2014-04-01 08:04:37 UTC
It seems that the projects home must have a \src\conf directory inside for the JAXB wizard to succeed creating a src\conf\xml-resources folder there, eventhough we have all our sources located in a parallell directory outside the projects home.

When I created a empty \src\conf inside the projects home the wizard managed to generate code eventhough the xsd files were outside, ie the relative filepath worked: 
../../eCMSApp/eCMS-war/src/conf/xmlSchemas/v1/Products-schema.xsd
Comment 2 Svata Dedic 2015-05-15 07:40:22 UTC
Your observation is correct: the current JAXB implementaton is implemented so that it must copy all schema files underneath the project directory - usually xml-resources/jaxb, or conf/xml-resources/jaxb, depending on the type of the project.

The scenario of keeping project files separate from the sources is valid, but conflicts with the jaxb support design - I'll turn this to high prio enhancement.