春季开放 JPA
我正在尝试集成 Spring 和 OpenJpa。 对于每个场景,抛出的异常是 SAXParseException:Prolog 中不允许有内容。 我知道该问题可能与 xml 文件有关,但所有相关的 xml 均已正确读取和验证。 spring 文件已正确解析并创建了 beans,但实体管理器创建失败,根异常是序言错误中不允许此内容。 我不确定要在这里发布哪些相关部分。 如果需要,我可以发布文件的完整内容。 我进一步发现,在向 persistence.xml 添加类标记条目后,会出现此问题。 有人可以帮我解决这个问题吗? 我正在发布完整的堆栈跟踪:
**11:39:45,931 INFO [STDOUT] jpa template is org.springframework.orm.jpa.JpaTemplate@649a07
11:39:45,981 ERROR [STDERR] 3215 idea INFO [http-127.0.0.1-8080-1] openjpa.Runtime - Starting OpenJPA 1.2.1
11:39:47,293 ERROR [STDERR] 4527 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Using metadata factory "org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory@99abd7".
11:39:48,294 ERROR [STDERR] 5528 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning URL "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" for persistent types.
11:39:48,304 ERROR [STDERR] 5538 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scan of "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" found persistent types [Ljava.lang.String;@a92583.
11:39:48,304 ERROR [STDERR] 5538 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Mapping resource location "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" to persistent types "[]".
11:39:48,304 ERROR [STDERR] 5538 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning resource "mappings.xml" for persistent types.
11:39:48,314 ERROR [STDERR] 5548 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scan of "mappings.xml" found persistent types [Ljava.lang.String;@16e3879.
11:39:48,314 ERROR [STDERR] 5548 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Mapping resource location "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/mappings.xml" to persistent types "[com.idea.app.dataservice.dto.ActivityData, com.idea.app.dataservice.dto.EventData, com.idea.app.dataservice.dto.GroupData, com.idea.app.dataservice.dto.ProductData, com.idea.app.dataservice.dto.ReportData]".
11:39:48,314 ERROR [STDERR] 5548 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
11:39:48,324 ERROR [STDERR] 5558 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - parsePersistentTypeNames() found [com.idea.app.dataservice.dto.GroupData, com.idea.app.dataservice.dto.ActivityData, com.idea.app.dataservice.dto.EventData, com.idea.app.dataservice.dto.ReportData, com.idea.app.dataservice.dto.ProductData].
11:39:48,324 ERROR [STDERR] 5558 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Found 5 classes with metadata in 30 milliseconds.
11:39:48,365 ERROR [STDERR] 5599 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Using metadata factory "org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory@1ee33fd".
11:39:48,365 ERROR [STDERR] 5599 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Loading metadata for "class com.idea.app.dataservice.dto.GroupData" under mode "[META][QUERY]".
11:39:48,365 ERROR [STDERR] 5599 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning URL "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" for persistent types.
11:39:48,375 ERROR [STDERR] 5609 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scan of "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" found persistent types [Ljava.lang.String;@f9daf2.
11:39:48,375 ERROR [STDERR] 5609 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Mapping resource location "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" to persistent types "[]".
11:39:48,375 ERROR [STDERR] 5609 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning resource "mappings.xml" for persistent types.
11:39:48,385 ERROR [STDERR] 5619 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scan of "mappings.xml" found persistent types [Ljava.lang.String;@3e68dc.
11:39:48,385 ERROR [STDERR] 5619 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Mapping resource location "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/mappings.xml" to persistent types "[com.idea.app.dataservice.dto.ActivityData, com.idea.app.dataservice.dto.EventData, com.idea.app.dataservice.dto.GroupData, com.idea.app.dataservice.dto.ProductData, com.idea.app.dataservice.dto.ReportData]".
11:39:48,385 ERROR [STDERR] 5619 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
11:39:48,395 ERROR [STDERR] 5629 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - parsePersistentTypeNames() found [com.idea.app.dataservice.dto.GroupData, com.idea.app.dataservice.dto.ActivityData, com.idea.app.dataservice.dto.EventData, com.idea.app.dataservice.dto.ReportData, com.idea.app.dataservice.dto.ProductData].
11:39:48,395 ERROR [STDERR] 5629 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Found 5 classes with metadata in 30 milliseconds.
11:39:48,685 ERROR [STDERR] 5919 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Parsing resource "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/".
11:39:48,785 ERROR [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /queueDetails.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@155c746]
11:39:48,785 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception
org.xml.sax.SAXException: vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/ [Location: Line: 1, C: 1]: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.openjpa.lib.meta.XMLMetaDataParser.getException(XMLMetaDataParser.java:656)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.fatalError(XMLMetaDataParser.java:421)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:376)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:318)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:295)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:268)
at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:247)
at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:198)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:474)
at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:294)
at org.apache.openjpa.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:285)
at org.apache.openjpa.jdbc.meta.MappingTool.getMapping(MappingTool.java:676)
at org.apache.openjpa.jdbc.meta.MappingTool.buildSchema(MappingTool.java:748)
at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:646)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:153)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:119)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:189)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:434)
at $Proxy125.createEntityManager(Unknown Source)
at org.springframework.orm.jpa.EntityManagerFactoryUtils.doGetTransactionalEntityManager(EntityManagerFactoryUtils.java:195)
at org.springframework.orm.jpa.EntityManagerFactoryUtils.getTransactionalEntityManager(EntityManagerFactoryUtils.java:142)
at org.springframework.orm.jpa.EntityManagerFactoryAccessor.getTransactionalEntityManager(EntityManagerFactoryAccessor.java:129)
at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:174)
at org.springframework.orm.jpa.JpaTemplate.executeFind(JpaTemplate.java:151)
at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:311)
at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:307)
at com.idea.app.dataservice.DataQueueServiceImpl.getQueueRecords(DataQueueServiceImpl.java:79)
at com.idea.app.dataservice.DataQueueServiceImpl.getQueueDetails(DataQueueServiceImpl.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy127.getQueueDetails(Unknown Source)
at com.idea.app.business.BusinessQueueServiceImpl.getQueueDetails(BusinessQueueServiceImpl.java:34)
at com.idea.app.bean.QueueBeanHelper.getSavedRecords(QueueBeanHelper.java:76)
at com.idea.app.bean.QueueDetailsBean.fetchData(QueueDetailsBean.java:150)
at com.idea.app.bean.QueueDetailsBean.<init>(QueueDetailsBean.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:106)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
at org.apache.el.parser.AstValue.getValue(AstValue.java:107)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
这是我的映射 xml:
<id name="prdRecordId">
<column name="PRD_RECORD_ID" nullable="false" />
<generated-value strategy="IDENTITY" />
</id>
<basic name="productId">
<column name="PRODUCT_ID"/>
</basic>
<basic name="productGroupid">
<column name="PRODUCT_GROUPID" />
</basic>
<basic name="empGroupclassificationCode">
<column name="EMP_GROUPCLASSIFICATION_CODE" />
</basic>
<basic name="empGroupclassificationId">
<column name="EMP_GROUPCLASSIFICATION_ID" />
</basic>
<basic name="productName">
<column name="PRODUCT_NAME" />
</basic>
<basic name="productType">
<column name="PRODUCT_TYPE" />
</basic>
<basic name="prodEffdate">
<column name="PROD_EFFDATE" />
</basic>
<basic name="prodTermdate">
<column name="PROD_TERMDATE" />
</basic>
<basic name="prodDescription">
<column name="PROD_DESCRIPTION" />
</basic>
<basic name="prodShortDescription">
<column name="PROD_SHORT_DESCRIPTION" />
</basic>
<basic name="priorInd">
<column name="PRIOR_IND" />
</basic>
<basic name="prodBusinessUnitCode">
<column name="PROD_BUSINESS_UNIT_CODE" />
</basic>
<basic name="calculationMethodCode">
<column name="CALCULATION_METHOD_CODE" />
</basic>
<basic name="pairedGroupNumber">
<column name="PAIRED_GROUP_NUMBER" />
</basic>
<basic name="coverageCode">
<column name="COVERAGE_CODE" />
</basic>
<basic name="fundingType">
<column name="FUNDING_TYPE" />
</basic>
<basic name="prodSubtypeValue">
<column name="PROD_SUBTYPE_VALUE" />
</basic>
<basic name="packageCode">
<column name="PACKAGE_CODE" />
</basic>
<basic name="billRef">
<column name="BILL_REF" />
</basic>
<basic name="billSortOrderCode">
<column name="BILL_SORT_ORDER_CODE" />
</basic>
<basic name="employeeClassId">
<column name="EMPLOYEE_CLASS_ID" />
</basic>
<basic name="productCategory">
<column name="PRODUCT_CATEGORY" />
</basic>
<basic name="benefitPlanId">
<column name="BENEFIT_PLAN_ID" />
</basic>
<basic name="contibutory">
<column name="CONTRIBUTORY" />
</basic>
<basic name="benefitClassId">
<column name="BENEFIT_CLASS_ID" />
</basic>
<basic name="benefitClassText">
<column name="BENEFIT_CLASS_TEXT" />
</basic>
<many-to-one name="groupId"
target-entity="com.idea.app.dataservice.dto.GroupData" fetch="LAZY">
<join-column name="GROUP_ID" nullable="false" />
<cascade>
<cascade-all />
</cascade>
</many-to-one>
</attributes>
</entity>
<entity class="com.idea.app.dataservice.dto.ReportData" name="ReportData">
<table name="REPORT_LOG" />
<attributes>
<id name="reportId">
<column name="REPORT_ID" nullable="false" />
<generated-value strategy="IDENTITY" />
</id>
<basic name="brndTxt">
<column name="BRND_TXT"/>
</basic>
<basic name="bsnsUntCd">
<column name="BSNS_UNT_CD" />
</basic>
<basic name="srcSysCd">
<column name="SRC_SYS_CD" />
</basic>
<basic name="scrbrId">
<column name="SCRBR_ID" />
</basic>
<basic name="mbrNmeTxt">
<column name="MBR_NME_TXT" />
</basic>
<basic name="trnsTyp">
<column name="TRNS_TYP" />
</basic>
<basic name="trnsSts">
<column name="TRNS_STS" />
</basic>
<basic name="processTier">
<column name="PROCESS_TIER" />
</basic>
<basic name="erroMsg">
<column name="ERRO_MSG" />
</bas
I am trying to integrate Spring and OpenJpa. For every scenario the exception thrown is
SAXParseException: No Content allowed in Prolog.
I am aware that the issue is probably related to the xml files but all the related xmls are read and validated correctly. The spring files are parsed correctly and beans are created but the entitymanager creation fails and the root exception is this content not allowed in prolog error. I am not sure which are the relevant sections to post here. If required I can post the full contents of the files. I have further isolated that this problem comes up after I am adding a class tag entry to persistence.xml. Can anyone please help me on this? I am posting the fuul stacktrace:
**11:39:45,931 INFO [STDOUT] jpa template is org.springframework.orm.jpa.JpaTemplate@649a07
11:39:45,981 ERROR [STDERR] 3215 idea INFO [http-127.0.0.1-8080-1] openjpa.Runtime - Starting OpenJPA 1.2.1
11:39:47,293 ERROR [STDERR] 4527 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Using metadata factory "org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory@99abd7".
11:39:48,294 ERROR [STDERR] 5528 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning URL "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" for persistent types.
11:39:48,304 ERROR [STDERR] 5538 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scan of "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" found persistent types [Ljava.lang.String;@a92583.
11:39:48,304 ERROR [STDERR] 5538 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Mapping resource location "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" to persistent types "[]".
11:39:48,304 ERROR [STDERR] 5538 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning resource "mappings.xml" for persistent types.
11:39:48,314 ERROR [STDERR] 5548 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scan of "mappings.xml" found persistent types [Ljava.lang.String;@16e3879.
11:39:48,314 ERROR [STDERR] 5548 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Mapping resource location "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/mappings.xml" to persistent types "[com.idea.app.dataservice.dto.ActivityData, com.idea.app.dataservice.dto.EventData, com.idea.app.dataservice.dto.GroupData, com.idea.app.dataservice.dto.ProductData, com.idea.app.dataservice.dto.ReportData]".
11:39:48,314 ERROR [STDERR] 5548 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
11:39:48,324 ERROR [STDERR] 5558 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - parsePersistentTypeNames() found [com.idea.app.dataservice.dto.GroupData, com.idea.app.dataservice.dto.ActivityData, com.idea.app.dataservice.dto.EventData, com.idea.app.dataservice.dto.ReportData, com.idea.app.dataservice.dto.ProductData].
11:39:48,324 ERROR [STDERR] 5558 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Found 5 classes with metadata in 30 milliseconds.
11:39:48,365 ERROR [STDERR] 5599 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Using metadata factory "org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory@1ee33fd".
11:39:48,365 ERROR [STDERR] 5599 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Loading metadata for "class com.idea.app.dataservice.dto.GroupData" under mode "[META][QUERY]".
11:39:48,365 ERROR [STDERR] 5599 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning URL "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" for persistent types.
11:39:48,375 ERROR [STDERR] 5609 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scan of "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" found persistent types [Ljava.lang.String;@f9daf2.
11:39:48,375 ERROR [STDERR] 5609 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Mapping resource location "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/" to persistent types "[]".
11:39:48,375 ERROR [STDERR] 5609 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning resource "mappings.xml" for persistent types.
11:39:48,385 ERROR [STDERR] 5619 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scan of "mappings.xml" found persistent types [Ljava.lang.String;@3e68dc.
11:39:48,385 ERROR [STDERR] 5619 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Mapping resource location "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/mappings.xml" to persistent types "[com.idea.app.dataservice.dto.ActivityData, com.idea.app.dataservice.dto.EventData, com.idea.app.dataservice.dto.GroupData, com.idea.app.dataservice.dto.ProductData, com.idea.app.dataservice.dto.ReportData]".
11:39:48,385 ERROR [STDERR] 5619 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
11:39:48,395 ERROR [STDERR] 5629 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - parsePersistentTypeNames() found [com.idea.app.dataservice.dto.GroupData, com.idea.app.dataservice.dto.ActivityData, com.idea.app.dataservice.dto.EventData, com.idea.app.dataservice.dto.ReportData, com.idea.app.dataservice.dto.ProductData].
11:39:48,395 ERROR [STDERR] 5629 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Found 5 classes with metadata in 30 milliseconds.
11:39:48,685 ERROR [STDERR] 5919 idea TRACE [http-127.0.0.1-8080-1] openjpa.MetaData - Parsing resource "vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/".
11:39:48,785 ERROR [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /queueDetails.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@155c746]
11:39:48,785 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception
org.xml.sax.SAXException: vfsfile:/D:/Documents%20and%20Settings/sandeep.kumar.aggarw/Desktop/Desktop/Software/jboss-5.0.1.GA/server/default/deploy/IdeaWebappDev.war/WEB-INF/classes/ [Location: Line: 1, C: 1]: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.openjpa.lib.meta.XMLMetaDataParser.getException(XMLMetaDataParser.java:656)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.fatalError(XMLMetaDataParser.java:421)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:376)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:318)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:295)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:268)
at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:247)
at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:198)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:474)
at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:294)
at org.apache.openjpa.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:285)
at org.apache.openjpa.jdbc.meta.MappingTool.getMapping(MappingTool.java:676)
at org.apache.openjpa.jdbc.meta.MappingTool.buildSchema(MappingTool.java:748)
at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:646)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:153)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:119)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:189)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:434)
at $Proxy125.createEntityManager(Unknown Source)
at org.springframework.orm.jpa.EntityManagerFactoryUtils.doGetTransactionalEntityManager(EntityManagerFactoryUtils.java:195)
at org.springframework.orm.jpa.EntityManagerFactoryUtils.getTransactionalEntityManager(EntityManagerFactoryUtils.java:142)
at org.springframework.orm.jpa.EntityManagerFactoryAccessor.getTransactionalEntityManager(EntityManagerFactoryAccessor.java:129)
at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:174)
at org.springframework.orm.jpa.JpaTemplate.executeFind(JpaTemplate.java:151)
at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:311)
at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:307)
at com.idea.app.dataservice.DataQueueServiceImpl.getQueueRecords(DataQueueServiceImpl.java:79)
at com.idea.app.dataservice.DataQueueServiceImpl.getQueueDetails(DataQueueServiceImpl.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy127.getQueueDetails(Unknown Source)
at com.idea.app.business.BusinessQueueServiceImpl.getQueueDetails(BusinessQueueServiceImpl.java:34)
at com.idea.app.bean.QueueBeanHelper.getSavedRecords(QueueBeanHelper.java:76)
at com.idea.app.bean.QueueDetailsBean.fetchData(QueueDetailsBean.java:150)
at com.idea.app.bean.QueueDetailsBean.<init>(QueueDetailsBean.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:106)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
at org.apache.el.parser.AstValue.getValue(AstValue.java:107)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
This is my mapping xml:
<id name="prdRecordId">
<column name="PRD_RECORD_ID" nullable="false" />
<generated-value strategy="IDENTITY" />
</id>
<basic name="productId">
<column name="PRODUCT_ID"/>
</basic>
<basic name="productGroupid">
<column name="PRODUCT_GROUPID" />
</basic>
<basic name="empGroupclassificationCode">
<column name="EMP_GROUPCLASSIFICATION_CODE" />
</basic>
<basic name="empGroupclassificationId">
<column name="EMP_GROUPCLASSIFICATION_ID" />
</basic>
<basic name="productName">
<column name="PRODUCT_NAME" />
</basic>
<basic name="productType">
<column name="PRODUCT_TYPE" />
</basic>
<basic name="prodEffdate">
<column name="PROD_EFFDATE" />
</basic>
<basic name="prodTermdate">
<column name="PROD_TERMDATE" />
</basic>
<basic name="prodDescription">
<column name="PROD_DESCRIPTION" />
</basic>
<basic name="prodShortDescription">
<column name="PROD_SHORT_DESCRIPTION" />
</basic>
<basic name="priorInd">
<column name="PRIOR_IND" />
</basic>
<basic name="prodBusinessUnitCode">
<column name="PROD_BUSINESS_UNIT_CODE" />
</basic>
<basic name="calculationMethodCode">
<column name="CALCULATION_METHOD_CODE" />
</basic>
<basic name="pairedGroupNumber">
<column name="PAIRED_GROUP_NUMBER" />
</basic>
<basic name="coverageCode">
<column name="COVERAGE_CODE" />
</basic>
<basic name="fundingType">
<column name="FUNDING_TYPE" />
</basic>
<basic name="prodSubtypeValue">
<column name="PROD_SUBTYPE_VALUE" />
</basic>
<basic name="packageCode">
<column name="PACKAGE_CODE" />
</basic>
<basic name="billRef">
<column name="BILL_REF" />
</basic>
<basic name="billSortOrderCode">
<column name="BILL_SORT_ORDER_CODE" />
</basic>
<basic name="employeeClassId">
<column name="EMPLOYEE_CLASS_ID" />
</basic>
<basic name="productCategory">
<column name="PRODUCT_CATEGORY" />
</basic>
<basic name="benefitPlanId">
<column name="BENEFIT_PLAN_ID" />
</basic>
<basic name="contibutory">
<column name="CONTRIBUTORY" />
</basic>
<basic name="benefitClassId">
<column name="BENEFIT_CLASS_ID" />
</basic>
<basic name="benefitClassText">
<column name="BENEFIT_CLASS_TEXT" />
</basic>
<many-to-one name="groupId"
target-entity="com.idea.app.dataservice.dto.GroupData" fetch="LAZY">
<join-column name="GROUP_ID" nullable="false" />
<cascade>
<cascade-all />
</cascade>
</many-to-one>
</attributes>
</entity>
<entity class="com.idea.app.dataservice.dto.ReportData" name="ReportData">
<table name="REPORT_LOG" />
<attributes>
<id name="reportId">
<column name="REPORT_ID" nullable="false" />
<generated-value strategy="IDENTITY" />
</id>
<basic name="brndTxt">
<column name="BRND_TXT"/>
</basic>
<basic name="bsnsUntCd">
<column name="BSNS_UNT_CD" />
</basic>
<basic name="srcSysCd">
<column name="SRC_SYS_CD" />
</basic>
<basic name="scrbrId">
<column name="SCRBR_ID" />
</basic>
<basic name="mbrNmeTxt">
<column name="MBR_NME_TXT" />
</basic>
<basic name="trnsTyp">
<column name="TRNS_TYP" />
</basic>
<basic name="trnsSts">
<column name="TRNS_STS" />
</basic>
<basic name="processTier">
<column name="PROCESS_TIER" />
</basic>
<basic name="erroMsg">
<column name="ERRO_MSG" />
</bas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
好的,堆栈跟踪没有指定实际的文件名,但它看起来像 OpenJPA 映射文件之一。
当
声明之前的 xml 文件中有任何内容时,通常会引发“Prolog 中不允许内容”异常 - 您需要查看文件并确保情况并非如此。
已知导致此问题的另一个可能问题是 xml 编码被指定为“utf-16”(某些 XML 工具喜欢这样做)。 将其改回“utf-8”往往可以解决问题。
Ok, so stack trace doesn't specify the actual file name but it looks like one of OpenJPA mapping files.
"No Content allowed in Prolog" exception is usually thrown when there's anything in xml file prior to
<?xml
declaration - you'll need to look through your files and make sure that's not the case.Another possible issue that has been known to cause this is when xml encoding is specified as "utf-16" (certain XML tools like to do that). Changing it back to "utf-8" tends to resolve the problem.
我最近在 JBoss AS 5 中看到了这一点。问题是某些组件试图通过 VFS(虚拟文件系统)访问 XML 文件,但给定的路径是一个目录。 因此,应该抛出 FileNotFound 异常,而不是 SAXParser 异常。
检查您的配置,某些原因导致为 SAXParser 提供了错误的路径。
I've seen this recently with JBoss AS 5. The problem was that some component was trying to access a XML file through the VFS (virtual file system), but the path given was a directory. So instead of SAXParser exception, FileNotFound should be thrown.
Check your config, something causes that the wrong path is given to the SAXParser.
查看源代码和堆栈跟踪(查看源代码可以揭示很多信息),似乎您的 xml 映射文件之一就是问题所在。
如果您将 openjpa.MetaData 打开到 TRACE 级别,您将看到它出现在哪个文件中。
我认为您可以通过将 openjpa.Log=openjpa.MetaData=TRACE 指定为属性来做到这一点...尽管我不确定,因为我是通过 spring 而不是普通的 jpa 指定的。
它会告诉您发生错误时正在处理哪个文件,尽管我怀疑您不会发现任何可以看到的错误,并且“序言”中会有奇怪的字符(您看不到)。
Taking a look at the source and your stack trace (looking at source code can reveal a lot) it seems to be that one of your xml mapping files is where the problem lies.
If you turn on openjpa.MetaData to TRACE level you will see in which file it occurs.
I think you do this by specifying openjpa.Log=openjpa.MetaData=TRACE as a property... though I'm not sure since I specify this via spring and not plain jpa.
It will tell you what file it is processing when the error occurs though I suspect you won't find anything wrong that you can see and there will be strange characters (that you can't see) in the "prolog".