hadoop问题
问题一:
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
com.sun.faces.config.ConfigurationException: It appears the JSP version of the container is older than 2.1 and unable to locate the EL RI expression factory, com.sun.el.ExpressionFactoryImpl. If not using JSP or the EL RI, make sure the context initialization parameter, com.sun.faces.expressionFactory, is properly set.
Jun 28, 2014 9:54:55 AM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6. Jun 28, 2014 9:54:55 AM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. Jun 28, 2014 9:54:56 AM org.apache.catalina.core.AprLifecycleListener initializeSSL INFO: OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012) Jun 28, 2014 9:54:56 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-apr-8080"] Jun 28, 2014 9:54:56 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-apr-8009"] Jun 28, 2014 9:54:56 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1384 ms Jun 28, 2014 9:54:56 AM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Jun 28, 2014 9:54:56 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.35 Jun 28, 2014 9:54:56 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory E:\tomcat\myeclipse\tomcat7\webapps\docs Jun 28, 2014 9:54:57 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory E:\tomcat\myeclipse\tomcat7\webapps\examples Jun 28, 2014 9:54:57 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Jun 28, 2014 9:54:57 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Jun 28, 2014 9:54:57 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@8032df') Jun 28, 2014 9:54:57 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory E:\tomcat\myeclipse\tomcat7\webapps\host-manager Jun 28, 2014 9:54:57 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory E:\tomcat\myeclipse\tomcat7\webapps\manager Jun 28, 2014 9:54:57 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory E:\tomcat\myeclipse\tomcat7\webapps\mrweb Jun 28, 2014 9:54:57 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(E:\tomcat\myeclipse\tomcat7\webapps\mrweb\WEB-INF\lib\servlet-api-2.5-20081211.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Jun 28, 2014 9:55:03 AM com.sun.faces.config.ConfigureListener contextInitialized INFO: Initializing Mojarra 2.0.3 (FCS b03) for context '/mrweb' Jun 28, 2014 9:55:04 AM com.sun.faces.spi.InjectionProviderFactory createInstance INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed. Jun 28, 2014 9:55:05 AM com.sun.faces.config.ConfigureListener installExpressionFactory SEVERE: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl' Jun 28, 2014 9:55:05 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener com.sun.faces.config.ConfigurationException: It appears the JSP version of the container is older than 2.1 and unable to locate the EL RI expression factory, com.sun.el.ExpressionFactoryImpl. If not using JSP or the EL RI, make sure the context initialization parameter, com.sun.faces.expressionFactory, is properly set. at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:639) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:238) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Jun 28, 2014 9:55:05 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Jun 28, 2014 9:55:05 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/mrweb] startup failed due to previous errors Jun 28, 2014 9:55:05 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/mrweb] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@356eb0]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. Jun 28, 2014 9:55:05 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory E:\tomcat\myeclipse\tomcat7\webapps\ROOT Jun 28, 2014 9:55:05 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-apr-8080"] Jun 28, 2014 9:55:05 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-apr-8009"] Jun 28, 2014 9:55:05 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 8702 ms
看日志输出说tomcat的jsp版本比2.1老。
参考:http://blog.csdn.net/chszs/article/details/9852661。实际上比2.1新。
让tomcat与hadoop一致即可.
解决方法:
把tomcat的lib目录下的jsp-api.jar
替换为hadoop的lib目录下的jsp2.1下面的jar包。
问题二:
14/06/28 17:19:05 INFO zookeeper.ClientCnxn: Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
14/06/28 17:19:06 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:host.name=xfengdesktop 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_13 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc. 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:java.home=D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:java.class.path=E:\tomcat\myeclipse\tomcat7forothers/bin/bootstrap.jar;E:\tomcat\myeclipse\tomcat7forothers/bin/tomcat-juli.jar;D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013/lib/tools.jar 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:java.library.path=D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;E:\tomcat\myeclipse\tomcat7forothers\bin 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=E:\tomcat\myeclipse\tomcat7forothers\temp 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA> 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:os.name=Windows Vista 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:os.arch=x86 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:os.version=6.1 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:user.name=Administrator 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:user.home=C:\Users\Administrator 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Client environment:user.dir=E:\tomcat\myeclipse\tomcat7forothers\bin 14/06/28 17:47:20 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection 14/06/28 17:47:20 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 4784@xfengdesktop 14/06/28 17:47:20 INFO zookeeper.ClientCnxn: Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (无法定位登录配置) 14/06/28 17:47:21 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException: Connection refused: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
在myeclipse中执行javaApplication类型的hbase程序正常,在tomcat中执行web程序时报这样的错误。
参考:http://blog.pureisle.net/archives/1859.html
网络问题。看日志主机配置的有问题。连接的hbase服务器地址有问题。
可以肯定是配置有问题。在往tomcat上部署项目的时候,配置文件所在的目录没有部署上去。
把hbase-site.xml放入tomca的lib目录即可。
注意:项目中的第三方jar包都要放到tomcat的lib目录下