'您好我在Mac OSX上使用Eclipse luna和Tomcat v7。我的apache tomEE运行正常,直到我从apache-tomee-webprofile-1.7.4文件夹执行startup.sh(之前我只从eclipse运行服务器)。然后它停止工作并显示以下错误“localhost的服务器Apache TomEE无法启动。”我还尝试使用shutdown.sh关闭服务器,但这是它产生的:
./shutdown.sh
Using CATALINA_BASE: /Users/federicogiulianelli/Documents/Tomcat/apache-tomee-plus-1.7.4
Using CATALINA_HOME: /Users/federicogiulianelli/Documents/Tomcat/apache-tomee-plus-1.7.4
Using CATALINA_TMPDIR: /Users/federicogiulianelli/Documents/Tomcat/apache-tomee-plus-1.7.4/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Using CLASSPATH: /Users/federicogiulianelli/Documents/Tomcat/apache-tomee-plus-1.7.4/bin/bootstrap.jar:/Users/federicogiulianelli/Documents/Tomcat/apache-tomee-plus-1.7.4/bin/tomcat-juli.jar
objc[2185]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
giu 01, 2016 11:47:24 AM org.apache.catalina.startup.Catalina stopServer
GRAVE: Could not contact localhost:8005. Tomcat may not be running.
giu 01, 2016 11:47:24 AM org.apache.catalina.startup.Catalina stopServer
GRAVE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:498)
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:498)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:343)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430)
我尝试删除工作区文件夹中的.snap文件和temp0文件夹。我也试过再次配置tomEE。我提到的问题是,本地主机上的服务器Tomcat v7.0服务器无法启动并尝试了所有解决方案。但这一切都是徒劳的。在端口号8080上没有运行其他进程,但我不知道在另一个端口上 我用。实际上从eclipse的控制台写了一些错误,如:
[...]
giu 01, 2016 12:25:52 PM org.apache.tomee.catalina.TomcatWebAppBuilder startInternal
GRAVE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/siw-jee-es1]
org.apache.openejb.OpenEJBException: Unable to load servlet listener class: com.sun.faces.config.ConfigureListener: com.sun.faces.config.ConfigureListener
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:2156)
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1843)
at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:360)
at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1227)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1100)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5472)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
at org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:176)
at org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:80)
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:2153)
... 17 more
giu 01, 2016 12:25:52 PM org.apache.catalina.core.ContainerBase removeChild
GRAVE: ContainerBase.removeChild: destroy:
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_destroy]) for component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/siw-jee-es1]] in state [STARTING_PREP]
at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:401)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:291)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1038)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1537)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1518)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1267)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1100)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5472)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[...]
GRAVE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]][...]
giu 01, 2016 12:25:55 PM org.apache.catalina.startup.Catalina start
GRAVE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
我认为问题出在org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
错误上,但我不知道,有人能帮帮我吗?非常感谢。
答案 0 :(得分:0)
Caused by: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
缺少 ConfigureListener
课程。在webapp /WEB-INF/lib
或Tomcat /lib