Project不会使用最新版本的Netbeans和Java SE Development Kit在新PC上启动

时间:2014-10-17 15:33:43

标签: java apache tomcat netbeans glassfish

Apache Tomcat日志

17-Oct-2014 14:06:48.319 SEVERE [http-nio-8084-exec-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class listeners.Initializer
 java.lang.NoClassDefFoundError: org/apache/http/params/HttpParams
    at mon.MainMon.openConnection(MainMon.java:72)
    at mon.MainMon.<init>(MainMon.java:38)
    at mon.MainMon.setJndiName(MainMon.java:221)
    at listeners.Initializer.contextInitialized(Initializer.java:38)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4760)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:455)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1496)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1437)
    at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:884)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:335)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.http.params.HttpParams
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)
    ... 53 more

17-Oct-2014 14:06:48.319 SEVERE [http-nio-8084-exec-1] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class ShutdownInitializer
 java.lang.NullPointerException
    at ShutdownInitializer.contextDestroyed(ShutdownInitializer.java:61)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4801)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5401)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:455)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1496)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1437)
    at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:884)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:335)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

Apache Tomcat

Using CATALINA_BASE:   "C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base"
Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.9"
Using CATALINA_TMPDIR: "C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_20"
Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.9\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.9\bin\tomcat-juli.jar"
17-Oct-2014 17:50:32.348 INFO [main] org.apache.catalina.core.AprLifecycleListener.init The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_20\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;.
17-Oct-2014 17:50:32.788 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8084"]
17-Oct-2014 17:50:32.866 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
17-Oct-2014 17:50:32.874 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
17-Oct-2014 17:50:32.874 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
17-Oct-2014 17:50:32.881 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1074 ms
17-Oct-2014 17:50:32.944 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
17-Oct-2014 17:50:32.944 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.9
17-Oct-2014 17:50:32.967 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\conf\Catalina\localhost\manager.xml
17-Oct-2014 17:50:33.826 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
17-Oct-2014 17:50:34.045 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\conf\Catalina\localhost\manager.xml has finished in 1,071 ms
17-Oct-2014 17:50:34.045 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\conf\Catalina\localhost\MDCWebDispatcher.xml
17-Oct-2014 17:50:34.045 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
17-Oct-2014 17:50:35.672 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Error listenerStart
17-Oct-2014 17:50:35.680 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/MDCWebDispatcher] startup failed due to previous errors
17-Oct-2014 17:50:35.688 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\conf\Catalina\localhost\MDCWebDispatcher.xml has finished in 1,643 ms
17-Oct-2014 17:50:35.688 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\conf\Catalina\localhost\ROOT.xml
17-Oct-2014 17:50:35.797 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
17-Oct-2014 17:50:35.797 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\conf\Catalina\localhost\ROOT.xml has finished in 109 ms
17-Oct-2014 17:50:35.797 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8084"]
17-Oct-2014 17:50:35.813 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
17-Oct-2014 17:50:35.813 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2839 ms
17-Oct-2014 17:50:37.637 INFO [http-nio-8084-exec-2] org.apache.catalina.util.LifecycleBase.stop The stop() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/MDCWebDispatcher]] after stop() had already been called. The second call will be ignored.
17-Oct-2014 17:50:38.198 INFO [http-nio-8084-exec-2] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/MDCWebDispatcher]
17-Oct-2014 17:50:38.307 INFO [http-nio-8084-exec-3] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\conf\Catalina\localhost\MDCWebDispatcher.xml
17-Oct-2014 17:50:38.346 WARNING [http-nio-8084-exec-3] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
17-Oct-2014 17:50:39.775 SEVERE [http-nio-8084-exec-3] org.apache.catalina.core.StandardContext.startInternal Error listenerStart
17-Oct-2014 17:50:39.783 SEVERE [http-nio-8084-exec-3] org.apache.catalina.core.StandardContext.startInternal Context [/MDCWebDispatcher] startup failed due to previous errors
17-Oct-2014 17:50:39.791 INFO [http-nio-8084-exec-3] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\serega\AppData\Roaming\NetBeans\8.0.1\apache-tomcat-8.0.9.0_base\conf\Catalina\localhost\MDCWebDispatcher.xml has finished in 1,484 ms
我的计划
ant -f "D:\\serg\\Projects2 - Copy\\MDCWebDispatcher" -Dnb.internal.action.name=run -Ddirectory.deployment.supported=true -DforceRedeploy=false "-Dbrowser.context=D:\\serg\\Projects2 - Copy\\MDCWebDispatcher" run
init:
deps-module-jar:
CommonForgeClassesLib.init:
Deleting: D:\serg\Projects2 - Copy\CommonForgeClassesLib\build\built-jar.properties
CommonForgeClassesLib.deps-jar:
Updating property file: D:\serg\Projects2 - Copy\CommonForgeClassesLib\build\built-jar.properties
CommonForgeClassesLib.wsimport-init:
CommonForgeClassesLib.wsimport-client-CpService:
files are up to date
CommonForgeClassesLib.wsimport-client-generate:
CommonForgeClassesLib.compile:
Copy libraries to D:\serg\Projects2 - Copy\CommonForgeClassesLib\dist\lib.
To run this application from the command line without Ant, try:
java -jar "D:\serg\Projects2 - Copy\CommonForgeClassesLib\dist\CommonForgeClassesLib.jar"
CommonForgeClassesLib.jar:
machMonitoring.init:
Deleting: D:\serg\Projects2 - Copy\machMonitoring\build\built-jar.properties
machMonitoring.deps-jar:
Updating property file: D:\serg\Projects2 - Copy\machMonitoring\build\built-jar.properties
CommonForgeClassesLib.init:
CommonForgeClassesLib.deps-jar:
Updating property file: D:\serg\Projects2 - Copy\machMonitoring\build\built-jar.properties
CommonForgeClassesLib.wsimport-init:
CommonForgeClassesLib.wsimport-client-CpService:
files are up to date
CommonForgeClassesLib.wsimport-client-generate:
CommonForgeClassesLib.compile:
Copy libraries to D:\serg\Projects2 - Copy\CommonForgeClassesLib\dist\lib.
To run this application from the command line without Ant, try:
java -jar "D:\serg\Projects2 - Copy\CommonForgeClassesLib\dist\CommonForgeClassesLib.jar"
CommonForgeClassesLib.jar:
machMonitoring.compile:
Copying 1 file to D:\serg\Projects2 - Copy\machMonitoring\build
Not copying library D:\serg\Projects2 - Copy\machMonitoring\<<<<<<< project.properties , it can't be read.
Copy libraries to D:\serg\Projects2 - Copy\machMonitoring\dist\lib.
To run this application from the command line without Ant, try:
java -jar "D:\serg\Projects2 - Copy\machMonitoring\dist\machMonitoring.jar"
machMonitoring.jar:
deps-ear-jar:
deps-jar:
Copying 1 file to D:\serg\Projects2 - Copy\MDCWebDispatcher\build\web
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
Undeploying ...
undeploy?path=/MDCWebDispatcher
OK - Undeployed application at context path /MDCWebDispatcher
In-place deployment at D:\serg\Projects2 - Copy\MDCWebDispatcher\build\web
Deployment is in progress...
deploy?config=file%3A%2FC%3A%2FUsers%2Fserega%2FAppData%2FLocal%2FTemp%2F2%2Fcontext5124608604393553249.xml&path=/MDCWebDispatcher
FAIL - Deployed application at context path /MDCWebDispatcher but context failed to start
D:\serg\Projects2 - Copy\MDCWebDispatcher\nbproject\build-impl.xml:1112: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 15 seconds)

我不明白我做错了什么!

2 个答案:

答案 0 :(得分:1)

我注意到你的代码说它无法找到HTTPParams类。 java.lang.ClassNotFoundException: org.apache.http.params.HttpParams
这告诉我不包括适当的罐子。

包含HttpParams的jar文件名为HttpCore,可以找到here

这可能不是您需要的版本,可能不是您在项目中所需的全部内容。 您需要仔细检查您所包含的罐子,并确保它们是您需要的正确版本。

我注意到你正在使用Netbeans。如果您在Netbeans部署到Tomcat时遇到问题,我建议您查看这个link,了解如何在Netbeans中包含jar文件以确保它们被正确包含。<​​/ p>

如果这解决了问题,请告诉我们,并确保将您认为的答案标记为“最佳答案”。

答案 1 :(得分:0)

我在项目中添加了httpclient-4.3.5.jar和httpcore-4.3.2.jar,删除了不需要的库并解决了问题!