JBuilderX and Tomcat5 (100分)

  • 主题发起人 主题发起人 nugget
  • 开始时间 开始时间
N

nugget

Unregistered / Unconfirmed
GUEST, unregistred user!
我在JBuilderX中配置好Tomcat5以后,Run的时候出现以下错误:
E:/j2sdk1.4.2/bin/javaw -classpath "E:/Tomcat 5.0/bin/bootstrap.jar;E:/Tomcat 5.0/common/lib/servlet-api.jar;E:/j2sdk1.4.2/lib/tools.jar" -Dcatalina.home="E:/Tomcat 5.0" org.apache.catalina.startup.Bootstrap -config "D:/My Projects/proj1/Tomcat/conf/server8083.xml" start
2004-6-2 11:32:24 org.apache.commons.digester.Digester startElement
严重: begin
event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.connector.http.HttpConnector
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721)
at org.apache.commons.digester.ObjectCreateRule.begin
(ObjectCreateRule.java:252)
at org.apache.commons.digester.Rule.begin
(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at org.apache.catalina.util.CatalinaDigester.startElement(CatalinaDigester.java:65)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
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:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:421)
Catalina.start using D:/My Projects/proj1/Tomcat/conf/server8083.xml: java.lang.ClassNotFoundException: org.apache.catalina.connector.http.HttpConnector
java.lang.ClassNotFoundException: org.apache.catalina.connector.http.HttpConnector
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at org.apache.catalina.util.CatalinaDigester.startElement(CatalinaDigester.java:65)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
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:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:421)
2004-6-2 11:32:25 org.apache.commons.digester.Digester startElement
严重: begin
event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.connector.http.HttpConnector
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721)
at org.apache.commons.digester.ObjectCreateRule.begin
(ObjectCreateRule.java:252)
at org.apache.commons.digester.Rule.begin
(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at org.apache.catalina.util.CatalinaDigester.startElement(CatalinaDigester.java:65)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.start(Catalina.java:548)
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:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Catalina.start using D:/My Projects/proj1/Tomcat/conf/server8083.xml: java.lang.ClassNotFoundException: org.apache.catalina.connector.http.HttpConnector
java.lang.ClassNotFoundException: org.apache.catalina.connector.http.HttpConnector
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at org.apache.catalina.util.CatalinaDigester.startElement(CatalinaDigester.java:65)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.start(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2004-6-2 11:32:25 org.apache.catalina.startup.Catalina start
信息: Server startup in 0 ms
java.lang.reflect.InvocationTargetException
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:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)

at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Caused by: java.lang.NullPointerException
at org.apache.catalina.startup.Catalina.await(Catalina.java:619)
at org.apache.catalina.startup.Catalina.start(Catalina.java:579)
... 6 more
请问,这些问题怎么解决?
 
你是如何集成的?
 
集成过程参见:
http://www.delphibbs.com/keylife/iblog_show.asp?xid=2097
 
我的理解是Tomcat5中HttpConnector等已经被取代了,所以loadClass出错!可在jbx中怎么来改正呢?
 

to nugget:
Tomcat5里很多class进行了调整。
我那样的整合也不能够正常使用。
建议使用JBuilderX Tomcat5 OpenTools.
环境要求:
JBX 176-205;Tomcat5.0.X.
安装:
把jar文件放到 lib/ext目录,然后在配置服务器中指定Tomcat5安装目录。
问题:
在JBX WebModule属性中没有显示支持Servlet2.4/JSP2.0,这是因为JBX把这个信息硬编码到程序中,无法通过插件扩展,这点应该不影响实际使用。
下载地址:
http://www.cjsdn.com/user/download/86558/JBX-Tomcat5-OpenTools-build20040406.jar
 
http://community.borland.com/article/0,1410,32375,00.html
by Borland Developer Support Staff
Overview
Step-by-step procedure for integrating Tomcat 5 with JBuilder X
Details
Note:
This is not a supported or tested configuration. This is just a workaround to get the server running in JBuilder X. JSP debugging will not work with this solution.
Steps:
1. Tools | Configure Servers, select the Tomcat 4.1 server and click the Copy button. Change the name to Tomcat 5.0. Next, set the home directory to the root of the Tomcat 5.0 installation, and remove the entry in the Class list and add <TOMCAT_5.0_HOME>/bin/bootstrap.jar.

2. File | New Project. Set server to Tomcat 5.0 and create a web module. This will trigger generation of the Tomcat 5.0 Servlet library.

3. Tools | Configure Libraries. Edit the Tomcat 5.0 Servlet library and add the following jars :
<TOMCAT_5.0_HOME>/common/lib/jsp-api.jar
<TOMCAT_5.0_HOME>/common/lib/servlet-api.jar
<TOMCAT_5.0_HOME>/bin/commons-logging-api.jar
<TOMCAT_5.0_HOME>/common/lib/commons-el.jar
Make a backup of this library (in your user home directory) as it gets regenerated when you create a new web module/JSP/servlet. Please make sure that you replace the library when you use any of the web gallery wizards.

4. Set server for the project to Tomcat 5.0.

5. If a "Tomcat" folder is not present under the project's root directory, create one (e.g. ../jbproject/untitled1/Tomcat). Next, create a directory named "conf" under this directory (e.g. ../jbproject/untitled1/Tomcat/conf). and create an XML file named server8080.xml. Sample server8080.xml is below. Please modify the appBase,do
cBase, and workDir, etc. according to your web module properties:

<?xml version="1.0" encoding="UTF-8"?>
<!--This comment marks this file as generated, so it may be deleted and regenerated at any time. To preserve manual changes to this file, delete this comment.-->
<Server debug="0" port="8081" shutdown="SHUTDOWN">
<Service name="Catalina">
<Connector acceptCount="10" connectionTimeout="60000" debug="0" maxThreads="75" minSpareThreads="5" port="8080"/>
<Engine debug="0" defaultHost="localhost" name="Catalina">
<Host appBase="C:Documents and Settings<user name>jbprojectuntitled1Tomcatwebapps" debug="0" name="localhost" unpackWARs="true">
<Context debug="0"do
cBase="C:Documents and Settings<user name>jbprojectuntitled1WebModule1" path="/WebModule1" reloadable="true" workDir="C:Documents and Settings<user name>jbprojectuntitled1TomcatworkWebModule1"/>
</Host>
</Engine>
</Service>
</Server>

6. Start the server in JBuilder. This should use the modified server8080.xml

You should be able to compile JSPs using this workaround but not debug. You should be able to debug any java code. You will see a number of exceptions for the admin, manager, balancer services whichdo
not get started when you normally run the server in JBuilder. Please ignore these exceptions. The server should function normally without these services.

/////////////////////////
我试了这个方法,还是不行.
 
to lnboy
按你的建议使用JBuilderX Tomcat5 OpenTools,但是出现如下错误:
"Register.jsp": java.lang.NoClassDefFoundError: org/apache/jasper/JspC
Exception in thread "main"
请问,如何解决呢?
 
后退
顶部