Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » NPE when running XSD Sample XSDGenerateHTML
NPE when running XSD Sample XSDGenerateHTML [message #654455] Tue, 15 February 2011 21:02 Go to next message
Yves Grenier is currently offline Yves GrenierFriend
Messages: 4
Registered: July 2009
Junior Member
I am using the most recent bits from eclipse.org.

I have been stuck on this for a few days and now will ask for help.

I get this:

java.lang.NullPointerException
at
org.eclipse.xsd.example.XSDGenerateHTML.loadAndPrint(XSDGene rateHTML.java:780)
at org.eclipse.xsd.example.XSDGenerateHTML.run(XSDGenerateHTML. java:698)
at org.eclipse.xsd.example.XSDGenerateHTML.start(XSDGenerateHTM L.java:660)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)


The line it refers to is:
XSDElementDeclaration specialElementDeclaration =
(XSDElementDeclaration)((XSDModelGroup)((XSDModelGroup)((XSD Particle)(xsdComplexTypeDefinition.getContentType())).getTer m()).getParticles().get(1).getTerm()).getParticles().get(j). getTerm();

Any help would be appreciated.

Yves Grenier
Re: NPE when running XSD Sample XSDGenerateHTML [message #654563 is a reply to message #654455] Wed, 16 February 2011 09:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090107060208000008040003
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Yves,

Something must have changed... We really should resolve those things in
the schema for schemas (line 766).

XSDElementDeclaration simpleContent =
xsdSchema.*getSchemaForSchema().*resolveElementDeclaration("simpleContent ");
XSDElementDeclaration complexContent =
xsdSchema.*getSchemaForSchema().*resolveElementDeclaration("complexContent ");

Please open a bugzilla to fix the example.


Yves Grenier wrote:
> I am using the most recent bits from eclipse.org.
>
> I have been stuck on this for a few days and now will ask for help.
>
> I get this:
>
> java.lang.NullPointerException
> at
> org.eclipse.xsd.example.XSDGenerateHTML.loadAndPrint(XSDGene rateHTML.java:780)
> at org.eclipse.xsd.example.XSDGenerateHTML.run(XSDGenerateHTML. java:698)
> at org.eclipse.xsd.example.XSDGenerateHTML.start(XSDGenerateHTM L.java:660)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>
>
> The line it refers to is:
> XSDElementDeclaration specialElementDeclaration =
> (XSDElementDeclaration)((XSDModelGroup)((XSDModelGroup)((XSD Particle)(xsdComplexTypeDefinition.getContentType())).getTer m()).getParticles().get(1).getTerm()).getParticles().get(j). getTerm();
>
> Any help would be appreciated.
>
> Yves Grenier
>
>
>

--------------090107060208000008040003
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yves,<br>
<br>
Something must have changed...&nbsp; We really should resolve those things
in the schema for schemas (line 766).<br>
<br>
&nbsp;&nbsp;&nbsp; XSDElementDeclaration simpleContent = xsdSchema.<b>getSchemaForSchema().</b>resolveElementDeclaration( "simpleContent");<br>
&nbsp;&nbsp;&nbsp; XSDElementDeclaration complexContent = xsdSchema.<b>getSchemaForSchema().</b>resolveElementDeclaration( "complexContent");<br>
<br>
Please open a bugzilla to fix the example.<br>
<br>
<br>
Yves Grenier wrote:
<blockquote cite="mid:ijep9u$bhn$1@news.eclipse.org" type="cite">
<pre wrap="">I am using the most recent bits from eclipse.org.

I have been stuck on this for a few days and now will ask for help.

I get this:

java.lang.NullPointerException
at
org.eclipse.xsd.example.XSDGenerateHTML.loadAndPrint(XSDGene rateHTML.java:780)
at org.eclipse.xsd.example.XSDGenerateHTML.run(XSDGenerateHTML. java:698)
at org.eclipse.xsd.example.XSDGenerateHTML.start(XSDGenerateHTM L.java:660)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)


The line it refers to is:
XSDElementDeclaration specialElementDeclaration =
(XSDElementDeclaration)((XSDModelGroup)((XSDModelGroup)((XSD Particle)(xsdComplexTypeDefinition.getContentType())).getTer m()).getParticles().get(1).getTerm()).getParticles().get(j). getTerm();

Any help would be appreciated.

Yves Grenier


</pre>
</blockquote>
</body>
</html>

--------------090107060208000008040003--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: NPE when running XSD Sample XSDGenerateHTML [message #654621 is a reply to message #654563] Wed, 16 February 2011 13:39 Go to previous message
Yves Grenier is currently offline Yves GrenierFriend
Messages: 4
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0010_01CBCDB5.10D54CA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Raised this one:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D337309

Thanks Ed
"Ed Merks" <Ed.Merks@gmail.com> wrote in message =
news:ijg5ht$e3t$1@news.eclipse.org...
Yves,

Something must have changed... We really should resolve those things =
in the schema for schemas (line 766).

XSDElementDeclaration simpleContent =3D =
xsdSchema.getSchemaForSchema().resolveElementDeclaration("simpleContent ")=
;
XSDElementDeclaration complexContent =3D =
xsdSchema.getSchemaForSchema().resolveElementDeclaration("complexContent "=
);

Please open a bugzilla to fix the example.


Yves Grenier wrote:=20
I am using the most recent bits from eclipse.org.

I have been stuck on this for a few days and now will ask for help.

I get this:

java.lang.NullPointerException
at=20
org.eclipse.xsd.example.XSDGenerateHTML.loadAndPrint(XSDGene rateHTML.java=
:780)
at =
org.eclipse.xsd.example.XSDGenerateHTML.run(XSDGenerateHTML. java:698)
at =
org.eclipse.xsd.example.XSDGenerateHTML.start(XSDGenerateHTM L.java:660)
at=20
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.ja=
va:196)
at=20
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplicati=
on(EclipseAppLauncher.java:110)
at=20
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Eclips=
eAppLauncher.java:79)
at=20
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:3=
69)
at=20
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:1=
79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)


The line it refers to is:
XSDElementDeclaration specialElementDeclaration =3D=20
(XSDElementDeclaration)((XSDModelGroup)((XSDModelGroup)((XSD Particle)(xsd=
ComplexTypeDefinition.getContentType())).getTerm()).getParti cles().get(1)=
..getTerm()).getParticles().get(j).getTerm();

Any help would be appreciated.

Yves Grenier



------=_NextPart_000_0010_01CBCDB5.10D54CA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.6000.17093" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Raised this one:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D337309">https://b=
ugs.eclipse.org/bugs/show_bug.cgi?id=3D337309</A></FONT></DIV >
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks Ed</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A=20
href=3D"mailto:Ed.Merks@gmail.com">Ed.Merks@gmail.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:ijg5ht$e3t$1@news.eclipse.org">news:ijg5ht$e3t$1@news.eclips=
e.org</A>...</DIV>Yves,<BR><BR>Something=20
must have changed...&nbsp; We really should resolve those things in =
the schema=20
for schemas (line 766).<BR><BR>&nbsp;&nbsp;&nbsp; =
XSDElementDeclaration=20
simpleContent =3D=20
=
xsdSchema.<B>getSchemaForSchema().</B>resolveElementDeclaration( "simpleCo=
ntent");<BR>&nbsp;&nbsp;&nbsp;=20
XSDElementDeclaration complexContent =3D=20
=
xsdSchema.<B>getSchemaForSchema().</B>resolveElementDeclaration( "complexC=
ontent");<BR><BR>Please=20
open a bugzilla to fix the example.<BR><BR><BR>Yves Grenier wrote:=20
<BLOCKQUOTE cite=3Dmid:ijep9u$bhn$1@news.eclipse.org =
type=3D"cite"><PRE wrap=3D"">I am using the most recent bits from =
eclipse.org.

I have been stuck on this for a few days and now will ask for help.

I get this:

java.lang.NullPointerException
at=20
org.eclipse.xsd.example.XSDGenerateHTML.loadAndPrint(XSDGene rateHTML.java=
:780)
at =
org.eclipse.xsd.example.XSDGenerateHTML.run(XSDGenerateHTML. java:698)
at =
org.eclipse.xsd.example.XSDGenerateHTML.start(XSDGenerateHTM L.java:660)
at=20
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.ja=
va:196)
at=20
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplicati=
on(EclipseAppLauncher.java:110)
at=20
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Eclips=
eAppLauncher.java:79)
at=20
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:3=
69)
at=20
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:1=
79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)


The line it refers to is:
XSDElementDeclaration specialElementDeclaration =3D=20
(XSDElementDeclaration)((XSDModelGroup)((XSDModelGroup)((XSD Particle)(xsd=
ComplexTypeDefinition.getContentType())).getTerm()).getParti cles().get(1)=
..getTerm()).getParticles().get(j).getTerm();

Any help would be appreciated.

Yves Grenier


</PRE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0010_01CBCDB5.10D54CA0--
Previous Topic:XSD comparer
Next Topic:Auto Completion Classes for XSD
Goto Forum:
  


Current Time: Tue Mar 19 04:40:03 GMT 2024

Powered by FUDForum. Page generated in 0.02089 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top