|
Greetings,
Maybe I'm the only one to ever hit this problem,
but I'm having significant difficulty with xmlBeans and the Windows file
system. Windows limits the length of a full path to 255 characters.
However, it must possible programmatically create folders and files whose
full paths are too long, because xmlBeans is doing it. Since doing this is
going to inevitably create problems downstream, I believe it is a bug that
xmlBeans is doing this on Windows. I agree that Windows having a 255
character limit is really dumb, but that's how it is.
My initial suggestion is that xmlBeans on Windows,
as it is creating the folder hierarchy, should detect if the full path of a file
or folder is longer than 255 characters and if it is -- issue a pinpointing
diagnostic and terminate with an error. This would have saved me about an
hour. It would be friendlier if xmlBeans, upon encountering this error,
would continue examining the remaining folders and files to be created and
report all of them that are too long.
I'm brand new to xmlBeans. I am guessing that
maybe the best way to deal with this is to create the .jar file (default name:
xmltypes.jar) instead of generating all the sources into my project. Is
that what is recommended? I'm starting down this path, but having some
problems conveying the correct classpath from Ant into the xmlbeans Ant
task. I'm still working on this.
-Sam
My Eclipse project has the path
C:\Cayuse\615\dev\eclipse\cayuse.clients.elsub, which has 46 characters.
Naturally I wanted the Ant task to build everything
in subfolders in this project. Here's my current Ant commands for
xmlBeans:
<taskdef
name="xmlbean"
classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="./lib/xbean.jar;./lib/jsr173_api.jar" />
<target
name="xmlbean.compile.schema">
<xmlbean schema="schema" srconly="true" srcgendir="./src" classgendir="./classes" />
</target>
xmlbean.compile.schema:
[xmlbean] Time to build schema type system: 2.813
seconds
BUILD FAILED: C:\Cayuse\615\dev\eclipse\cayuse.clients.elsub\build.xml:25:
org.apache.xmlbeans.SchemaTypeLoaderException:
C:\Cayuse\615\dev\eclipse\cayuse.clients.elsub\classes\schemaorg_apache_xmlbeans\javaname\gov\nih\era\projectmgmt\sbir\cgap\nihspecificNamespace\ResearchApplicationExtensionDocument\ResearchApplicationExtension\NewApplicationQualifiers\SBIRQuestions\Phase2Details.xsb
(The system cannot find the path specified)
(schemaorg_apache_xmlbeans.system.sA50776AFD0F50C12DA7A7CA6F2FA7F35.schemaorg_apache_xmlbeans/javaname/gov/nih/era/projectmgmt/sbir/cgap/nihspecificNamespace/ResearchApplicationExtensionDocument/ResearchApplicationExtension/NewApplicationQualifiers/SBIRQuestions/Phase2Details)
- code 9
Total time: 6 seconds
What is "code 9"? I looked at the path specified
and I was able to navigate to the file and I saw it, so this really faked me
out.
Here's the path mentioned in the above error that
is the problem, broken into 80 character lines with the exact character count of
the last partial line shown (i.e., starting at 241):
C:\Cayuse\615dev\eclipse\cayuse.clients.elsub\classes\schemaorg_apache_xmlbeans\
javaname\gov\nih\era\projectmgmt\sbir\cgap\nihspecificNamespace\ResearchApplicat ionExtensionDocument\ResearchApplicationExtension\NewApplicationQualifiers\SBIRQ uestions\Phase2Details.xsb 2 2 2 4 5 6 12345678901234567890123456 |
- How do I debug? Samuel B. Quiring
- RE: How do I debug? Lawrence Jones
- Re: How do I debug? Samuel B. Quiring
- xmlbeans - generating paths that are too long o... Samuel B. Quiring
- -Xlint? Samuel B. Quiring

