我有一个遗留应用程序(petstore1.3.2),已经设法在JBOSS 3.2.3(J2SDKEE1.3.1和JDK1.3.1)上部署并运行它。
我也尝试使用J2SDKEE1.3.1和JDK6在JBOSS 4.2.3上运行它,以便在无法部署在JBOSS 3.2.3上的服务器上运行另一个工具。问题是JBOSS 4.2.3的最低要求是JDK 1.6或JDK6。
一旦我部署petstore1.3.2,我会得到一些我认为是JDK6引起的错误(即使代码是使用JDK 1.3编译的)
javax.servlet.ServletException: Populate exception occured :null
com.sun.j2ee.blueprints.petstore.tools.populate.PopulateServlet.doPost(PopulateServlet.java:122)
com.sun.j2ee.blueprints.petstore.tools.populate.PopulateServlet.doGet(PopulateServlet.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.j2ee.blueprints.signon.web.SignOnFilter.doFilter(SignOnFilter.java:154)
com.sun.j2ee.blueprints.encodingfilter.web.EncodingFilter.doFilter(EncodingFilter.java:77)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.ClassCastException: com.sun.proxy.$Proxy118 cannot be cast to com.sun.j2ee.blueprints.signon.user.ejb.UserLocalHome
com.sun.j2ee.blueprints.petstore.tools.populate.XMLDBHandler.endElement(XMLDBHandler.java:150)
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
org.apache.xerces.impl.dtd.XMLNSDTDValidator.endNamespaceScope(Unknown Source)
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
com.sun.j2ee.blueprints.petstore.tools.populate.PopulateServlet.populate(PopulateServlet.java:162)
com.sun.j2ee.blueprints.petstore.tools.populate.PopulateServlet.doPost(PopulateServlet.java:118)
com.sun.j2ee.blueprints.petstore.tools.populate.PopulateServlet.doGet(PopulateServlet.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.j2ee.blueprints.signon.web.SignOnFilter.doFilter(SignOnFilter.java:154)
com.sun.j2ee.blueprints.encodingfilter.web.EncodingFilter.doFilter(EncodingFilter.java:77)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)