配置开发环境(JDK1.5+Tomcat5.5.4+Eclipse3.1)时碰到的3个问
2008-01-05 09:32:55 来源:WEB开发网核心提示:我在配置开发环境(JDK1.5+Tomcat5.5.4+Eclipse3.1)时碰到的3个问 1、问题:用打开带java小程序的页面,在Java小程序的地方显示一灰色区块,配置开发环境(JDK1.5+Tomcat5.5.4+Eclipse3.1)时碰到的3个问, 当鼠标移动到该区块时,状态栏提
我在配置开发环境(JDK1.5+Tomcat5.5.4+Eclipse3.1)时碰到的3个问
1、问题:用打开带java小程序的页面,在Java小程序的地方显示一灰色区块,
当鼠标移动到该区块时,状态栏提示:
load:class XXXXX not found
解答:参考http://www.cryer.co.uk/brian/java/help_classnotfound.htm
2、问题:在Eclipse中执行,报Could not find the main class.PRogram will exit.
console窗口:
java.lang.ExceptionInInitializerError
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:53)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstrUCtor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 4 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
... 5 more
Exception in thread "main"
解答:
Possible solution:
I edited the file "tomcat50x.server" under
C:\eclipse\plugins\com.objectlearn.jdt.j2ee_3.0.1\servers
and changed
-Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"
to
-Djava.endorsed.dirs="${serverRootDirectory}/common/endorsed"
in the following ´tags´:
<startVmParameters>-DJAVA_HOME="${jrePath}" -Dcatalina.base="${serverRootDirectory}" -Dcatalina.home="${serverRootDirectory}" -Djava.io.tmpdir="${serverRootDirectory}/temp" -Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"</startVmParameters>
and
<stopVmParameters>-DJAVA_HOME="${jrePath}" -Dcatalina.base="${serverRootDirectory}" -Dcatalina.home="${serverRootDirectory}" -Djava.io.tmpdir="${serverRootDirectory}/temp" -Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"</stopVmParameters>
- ››开发Android 日历教程
- ››开发学院总结 Win 8实用技巧大全
- ››开发学院原创教程:把win8的IE10放桌面上方法(非...
- ››配置MySQL出错The service could not be started....
- ››配置apache虚拟主机
- ››开发者眼中的Windows Phone和Android
- ››开发学院教你用SQL 语句最快速清空MySQL 数据表的...
- ››配置远程客户机使用命名管道协议访问SQL服务器
- ››配置SQL Server2005以允许远程访问
- ››配置ISA Server以创建站点到站点VPN 连接之一
- ››配置ISA Server以创建站点到站点VPN 连接之二
- ››配置ISA Server以创建站点到站点VPN 连接之三 启用...
更多精彩
赞助商链接