I am using Java Studio creator for some dev on my current project, but would like to leverage hibernate for a few things (besides I am already using it in other places). Studio Creator packages Sun App Server 8 as it's internal server for testing. When I use hibernate from within one of it's methods I get a SecurityException related to the xml parser it is using (see stack trace below). Notice the reference to crimson...I don't know if that is application, but it is not something I have configured intentionally. When I deploy the same application to tomcat, it works fine. However, I would like to find a way to make this work from within the sun server to speed the process. Can someone help me figure this out? I have been banging my head against it for a couple of days now.
Thank you for the help,
LES
javax.servlet.ServletException: Provider org.apache.crimson.jaxp.DocumentBuilderFactoryImpl could not be instantiated: java.lang.SecurityException: unable to instantiate Subject-based policy
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:218)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessController.doPrivileged(Native Method)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
*root cause*
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.crimson.jaxp.DocumentBuilderFactoryImpl could not be instantiated: java.lang.SecurityException: unable to instantiate Subject-based policy
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:99)
org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:99)
org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:72)
org.apache.jasper.compiler.JspConfig.init(JspConfig.java:181)
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:233)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:164)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:419)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:402)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:262)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessController.doPrivileged(Native Method)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
Hibernate version:
2.1.7
Mapping documents:
any....won't load
Code between sessionFactory.openSession() and session.close():
havn't gotten to that point yet
Full stack trace of any exception that occurs:
see above
Name and version of the database you are using:
oracle 9.2.04
The generated SQL (show_sql=true):
none yet
Debug level Hibernate log excerpt:
|