Hi

 

I'm trying to run the Jibx CodeGen utility to create bindings and value
objects but all I get is 

 

Loaded and validated 1 specified schema(s) and 1 referenced schema(s)

Exception in thread "main" java.lang.NullPointerException

        at
org.jibx.runtime.impl.UTF8Escaper.writeAttribute(UTF8Escaper.java:68)

        at
org.jibx.runtime.impl.GenericXMLWriter.writeAttributeText(GenericXMLWriter.j
ava:209)

        at
org.jibx.runtime.impl.XMLWriterBase.startTagNamespaces(XMLWriterBase.java:24
1)

        at
org.jibx.runtime.impl.MarshallingContext.startTagNamespaces(MarshallingConte
xt.java:950)

        at
org.jibx.schema.codegen.SchemaDocumentationGenerator$DocumentationVisitor.vi
sit(SchemaDocumentationGenerator.java:

427)

        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:98)

        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:108)

        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:374)

        at
org.jibx.schema.codegen.SchemaDocumentationGenerator$DocumentationVisitor.vi
sit(SchemaDocumentationGenerator.java:

495)

        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:194)

        at
org.jibx.schema.codegen.SchemaDocumentationGenerator.generate(SchemaDocument
ationGenerator.java:283)

        at
org.jibx.schema.codegen.ClassHolder.initClass(ClassHolder.java:663)

        at
org.jibx.schema.codegen.StructureClassHolder.generate(StructureClassHolder.j
ava:1980)

        at
org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:203)

        at
org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:218)

        at org.jibx.schema.codegen.CodeGen.generate(CodeGen.java:1402)

        at org.jibx.schema.codegen.CodeGen.main(CodeGen.java:1652)

 

This error seems to have been fixed in release 1.2.1 as shown on the jira
site but it continues to occur at my end even with this new release.
Attached is the schema for reference.

 

The main schema is service.xsd. The tool works fine if I run it on
header.xsd which is referenced from service.

 

Please let me know where I am going wrong.

 

Thanks

Anurag

<?xml version="1.0" encoding="utf-8"?>
<!-- Mit XMLSpy v2008 rel. 2 sp2 (http://www.altova.com) von Kevin Cao (computer & competence GmbH) bearbeitet -->
<!--Created with Liquid XML Studio 6.1.17.0 - FREE Community Edition (http://www.liquid-technologies.com)-->
<xs:schema xmlns:msgh="http://www.hamburgsud.com/Schemas/Common/MessageHeader"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://www.hamburgsud.com/Schemas/Common/MessageHeader"; elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.2">
	<xs:element name="MESSAGE_HEADER" type="msgh:type_MessageHeader"/>
	<xs:complexType name="type_MessageHeader">
		<xs:sequence>
			<xs:element name="MessageID" type="xs:string">
				<xs:annotation>
					<xs:documentation>UniqueID</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="BusinessID" type="xs:string" minOccurs="0"/>
			<xs:element name="CorrelationID" type="xs:string">
				<xs:annotation>
					<xs:documentation>Same as MessageID</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="MessageName">
				<xs:annotation>
					<xs:documentation>e.g. VESSELSCHEDULECREATE, REPORTS, etc.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:string">
							<xs:attribute name="Version" type="xs:string"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="TimeStamp" type="xs:dateTime">
				<xs:annotation>
					<xs:documentation>Current UTC timestamp in the format "yyyy-mm-ddThh:mm:ssZ"</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="TTL" type="xs:unsignedShort" minOccurs="0"/>
			<xs:element name="Source">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="OriginalSender" type="xs:string">
							<xs:annotation>
								<xs:documentation>e.g. GLOBE userid</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="ESBApplicationName" type="xs:string">
							<xs:annotation>
								<xs:documentation>e.g. GLOBE, COMPASS, OutputService, etc.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="Region" type="xs:string">
							<xs:annotation>
								<xs:documentation>e.g. GLB, REU, RAN, RAS, etc.</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Chunks" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="CurrentChunkNo" type="xs:unsignedShort"/>
						<xs:element name="EOFChunks" type="xs:boolean"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="BodyVersion" type="xs:string" minOccurs="0"/>
			<xs:element name="Checksum" type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:msgh="http://www.hamburgsud.com/Schemas/Common/MessageHeader"; elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://www.hamburgsud.com/Schemas/Common/MessageHeader"; schemaLocation="GLOBE_Common_MessageHeader.xsd"/>
	<xs:element name="Reports">
		<xs:annotation>
			<xs:documentation>Comment describing your root element</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="MESSAGE_HEADER" type="msgh:type_MessageHeader"/>
				<xs:element name="Report_Data" type="Report_Data"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="Report_Data">
		<xs:choice>
			<xs:element name="Request_Parameters">
				<xs:complexType>
					<xs:choice>
						<xs:element name="Excel_Parameter" type="Parameters">
							<xs:annotation>
								<xs:documentation>Parameter for requesting excel report

Fix string: http://host:port/reports/GLOBE/LC01/ ???

e.g. http://192.168.166.15:7777/reports/GLOBE/LC01/flexSearch.jsp?LC02"ampersand"p_instance
_id=4</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="Pdf_Parameter" type="Parameters">
							<xs:annotation>
								<xs:documentation>Parameter for requesting pdf report

Fix string: http://host:port/reports/rwservlet?  ???

e.g. tbd</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>
			<xs:element name="Report_Result">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Instance_Id" minOccurs="0">
						<xs:element name="Status"  minOccurs="0">
						</xs:element>
						<xs:element name="Error_Message" type="xs:string" minOccurs="0">
							<xs:annotation>
								<xs:documentation>As return from Oracle Reports</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="Contact">
		<xs:sequence>
			<xs:element name="Name" type="xs:string"/>
			<xs:element name="Address" type="xs:string"/>
			<xs:element name="City" type="xs:string"/>
			<xs:element name="Phone" type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="Key_Values">
		<xs:sequence>
			<xs:element name="Key" type="xs:string">
				<xs:annotation>
					<xs:documentation>e.g. p_instance_id, destype, desformat, report</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Value" type="xs:string">
				<xs:annotation>
					<xs:documentation>e.g. 2, cache, pdf, fontest9i.rdf</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="Parameters">
		<xs:sequence>
			<xs:element name="Host" type="xs:string">
				<xs:annotation>
					<xs:documentation>e.g. hamsl006.ham.hamburgsud.com</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Port" type="xs:string">
				<xs:annotation>
					<xs:documentation>e.g. 7778</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Environment_1" type="xs:string">
				<xs:annotation>
					<xs:documentation>e.g. LC01</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Environment_2" type="xs:string">
				<xs:annotation>
					<xs:documentation>e.g. LC02</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Template_Name" type="xs:string">
				<xs:annotation>
					<xs:documentation>e.g. flexSearch.jsp</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Key_Values" type="Key_Values" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>key value pairs will be separated by an ampersand sign</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
</xs:schema>
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to