Hi Mike

 

I can repro your problem and I think it’s a bug so I’ve raised a JIRA - http://issues.apache.org/jira/browse/XMLBEANS-236.

 

It’s something to do with the attribute called “scope” at line 175. I changed use=”prohibited” to use=”required” at line 175 and it compiled fine.

 

I’m also suspicious of the fact you don’t have a targetNamespace (and so all your attributes are getting defined in the default namespace) – that may have something to do with it. You define xmlns:local=”” but then you don’t use local anywhere – did you mean to use this as a targetNamespace?

 

Anyway if you’re OK with the change to line 175 that I mentioned then that will help. Putting in a targetNamespace and updating all the type and other references may also help (not sure on this – I haven’t tried it). Neither of these things should be necessary – which is why I raised the bug. But other than that unfortunately I can’t provide you with a quick fix right now. Sorry. I know that’s probably not the news you wanted.

 

Cheers,

 

Lawrence

 


From: Mike Skells [mailto:[EMAIL PROTECTED]
Sent: Friday, December 09, 2005 9:45 AM
To: [email protected]
Subject: RE: NPE running scomp

 

Hi Laurance,

I am actually runing scmp in an application.but I can reproduce the error with the following command

 

in this case the schemas directory only includes one schema, and the source and classes directory are empty

 

 

scomp -d e:\projects\xmlbeansgenerated\classes -src e:\projects\xmlbeansgenerated\src -javasource 1.5 -mx 500m e:\projects\xmlbeansgenerated\schemas

 

 

for completeness

java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode)

 

 

Mike

 


From: Lawrence Jones [mailto:[EMAIL PROTECTED]
Sent: 09 December 2005 17:12
To: [email protected]
Subject: RE: NPE running scomp

Hi Mike

 

Could you post the schema and the exact command line you’re invoking when you see this? I think that would allow easier investigation.

 

Cheers,

 

Lawrence

 


From: Mike Skells [mailto:[EMAIL PROTECTED]
Sent: Friday, December 09, 2005 8:42 AM
To: [email protected]
Subject: RE: NPE running scomp

 

BTW the schema validates OK with XMLSPY and SQC 

 


From: Mike Skells [mailto:[EMAIL PROTECTED]
Sent: 09 December 2005 10:30
To: [email protected]
Subject: NPE running scomp

Hi,

ANyone got any ideas what is causing this NPE. I am using 2.1.0

 

Exception in thread "main" java.lang.NullPointerException
        at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getIndexForLocalAttribute(SchemaTypeImpl.java:690)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.writeTypeData(SchemaTypeSystemImpl.java:2698)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveType(SchemaTypeSystemImpl.java:1439)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1316)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1317)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1317)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1317)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.save(SchemaTypeSystemImpl.java:1291)
        at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:1098)
        at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:368)

 

Mike

Reply via email to