Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 #566542] Tue, 25 March 2003 18:52
kaunteya bhattacharya is currently offline kaunteya bhattacharyaFriend
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)
Previous Topic:Problems with plugin versions
Next Topic:NullPointerEx at EMFPlugin when using xsd library in a TomCat JSP page
Goto Forum:
  


Current Time: Fri Apr 26 23:51:34 GMT 2024

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

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

Back to the top