Skip to main content



      Home
Home » Archived » XML Schema Definition (XSD) » NullPointerEx at EMFPlugin when using xsd library in a TomCat JSP page
NullPointerEx at EMFPlugin when using xsd library in a TomCat JSP page [message #15261] Tue, 25 March 2003 13:52 Go to next message
Eclipse UserFriend
Hello,
I am having problems running some XSD schema generation code in a JSP
environment. In a test (standalone/Java application)environment, the
schema is created without problems. But when I call the class from a jsp
page the schema is not created beyond the minimum namespace declarations.
When this following snippet of code is encountered, it throws the
exception..

XSDElementDeclaration constraint =
xsdFactory.createXSDElementDeclaration();
constraint.setName("Constraint");
constraint.setTypeDefinition(schema.getSchemaForSchema).reso lveSimpleTypeDefinition( "string"));

The culprit is: schema.getSchemaForSchema()..
I have read that you would need to put xsd.resources.jar in the classpath.
But I do have that jar in the WEB-INF/classes directory under my
application. I have also attached the Stack Trace(logged in TomCat) below.

Would be great if someone could point out what might be wrong

kaunteya


STACK TRACE:
java.lang.NullPointerException
at org.eclipse.emf.common.EMFPlugin.getBaseURL(EMFPlugin.java:1 01)
at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.j
ava:630)
at
org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.j
ava:2383)
at
com.sensima.swift.SchemaGenerator.createSchemaForMT1XX(Schem aGenerato
r.java:83)
at
com.sensima.swift.SwiftSchemaManager.getSchemaFromRawTextDat a(SwiftSc
hemaManager.java:74)
at org.apache.jsp.SwiftMain_jsp._jspService(SwiftMain_jsp.java: 129)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.ja va:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper
java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:2
95)
Re: NullPointerEx at EMFPlugin when using xsd library in a TomCat JSP page [message #15294 is a reply to message #15261] Tue, 25 March 2003 15:26 Go to previous message
Eclipse UserFriend
no worries. found the problem. Apparently it works if you dump it into the
lib directory of TomCat. thanks
kb

kaunteya wrote:

> Hello,
> I am having problems running some XSD schema generation code in a JSP
> environment. In a test (standalone/Java application)environment, the
> schema is created without problems. But when I call the class from a jsp
> page the schema is not created beyond the minimum namespace declarations.
> When this following snippet of code is encountered, it throws the
> exception..

> XSDElementDeclaration constraint =
> xsdFactory.createXSDElementDeclaration();
> constraint.setName("Constraint");
>
constraint.setTypeDefinition(schema.getSchemaForSchema).reso lveSimpleTypeDefinition( "string"));

> The culprit is: schema.getSchemaForSchema()..
> I have read that you would need to put xsd.resources.jar in the classpath.
> But I do have that jar in the WEB-INF/classes directory under my
> application. I have also attached the Stack Trace(logged in TomCat) below.

> Would be great if someone could point out what might be wrong

> kaunteya


> STACK TRACE:
> java.lang.NullPointerException
> at org.eclipse.emf.common.EMFPlugin.getBaseURL(EMFPlugin.java:1 01)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.j
> ava:630)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.j
> ava:2383)
> at
> com.sensima.swift.SchemaGenerator.createSchemaForMT1XX(Schem aGenerato
> r.java:83)
> at
> com.sensima.swift.SwiftSchemaManager.getSchemaFromRawTextDat a(SwiftSc
> hemaManager.java:74)
> at org.apache.jsp.SwiftMain_jsp._jspService(SwiftMain_jsp.java: 129)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.ja va:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper
> java:204)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:2
> 95)
Re: NullPointerEx at EMFPlugin when using xsd library in a TomCat JSP page [message #566578 is a reply to message #15261] Tue, 25 March 2003 15:26 Go to previous message
Eclipse UserFriend
no worries. found the problem. Apparently it works if you dump it into the
lib directory of TomCat. thanks
kb

kaunteya wrote:

> Hello,
> I am having problems running some XSD schema generation code in a JSP
> environment. In a test (standalone/Java application)environment, the
> schema is created without problems. But when I call the class from a jsp
> page the schema is not created beyond the minimum namespace declarations.
> When this following snippet of code is encountered, it throws the
> exception..

> XSDElementDeclaration constraint =
> xsdFactory.createXSDElementDeclaration();
> constraint.setName("Constraint");
>
constraint.setTypeDefinition(schema.getSchemaForSchema).reso lveSimpleTypeDefinition( "string"));

> The culprit is: schema.getSchemaForSchema()..
> I have read that you would need to put xsd.resources.jar in the classpath.
> But I do have that jar in the WEB-INF/classes directory under my
> application. I have also attached the Stack Trace(logged in TomCat) below.

> Would be great if someone could point out what might be wrong

> kaunteya


> STACK TRACE:
> java.lang.NullPointerException
> at org.eclipse.emf.common.EMFPlugin.getBaseURL(EMFPlugin.java:1 01)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.j
> ava:630)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema(XSDSch emaImpl.j
> ava:2383)
> at
> com.sensima.swift.SchemaGenerator.createSchemaForMT1XX(Schem aGenerato
> r.java:83)
> at
> com.sensima.swift.SwiftSchemaManager.getSchemaFromRawTextDat a(SwiftSc
> hemaManager.java:74)
> at org.apache.jsp.SwiftMain_jsp._jspService(SwiftMain_jsp.java: 129)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.ja va:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper
> java:204)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:2
> 95)
Previous Topic:NullPointerEx at EMFPlugin when using xsd library in a TomCat JSP page
Next Topic:Retrieving the line number from XSDDiagnostic
Goto Forum:
  


Current Time: Fri May 16 06:39:28 EDT 2025

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

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

Back to the top