NullPointerEx at EMFPlugin when using xsd library in a TomCat JSP page [message #566542] |
Tue, 25 March 2003 18:52 |
kaunteya bhattacharya Messages: 24 Registered: July 2009 |
Junior Member |
|
|
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)
|
|
|
Powered by
FUDForum. Page generated in 0.60163 seconds