본문 바로가기

프로그래밍/JAVA

에러노트

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

 - commons-logging-1.1.1.jar를 WEB-INF/lib 폴더에 넣어줌.

 

******Error: datasource specifications*******:Cannot create JDBC driver of class '' for connect URL 'null'
tomcat > conf > server.xml , context.xml의 global naming resource 설정
server.xml
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" />
context.xml
<WatchedResource>WEB-INF/web.xml</WatchedResource>
- <!-- Uncomment this to disable session persistence across Tomcat restarts
-->
- <!-- <Manager pathname="" />

-->
<ResourceLink global="jdbc/srdev" name="jdbc/srdev" type="javax.sql.DataSource" />

document root > web-inf > web.xml
- <resource-ref>
<description>ERP DEV</description>
<res-ref-name>jdbc/srdev</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

** Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory]
2011. 7. 4 2:46:10 org.apache.catalina.core.NamingContextListener addResource

tomcat > lib
commons-pool-1.5.4.jar
commons-dbcp-1.2.2.jar 넣어줌


** java.lang.IllegalArgumentException: Document base d:\web\app\manager does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
documant base 밑에 manager라는 폴더를 생성하여 줌

** 2011. 7. 4 5:16:15 org.apache.catalina.loader.WebappClassLoader validateJarFile
: validateJarFile(d:\web\app\ROOT\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

tomcat5 이상부터는 servlet.jar 넣지말고 servlet-api.jar를 넣어야 함
tomcat > lib에 이미 있음 document root > web-inf > 밑에 있는 servlet.jar 를 삭제함

**: The web application [] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
ojdbc.jar를 tomcat > lib > 넣어줌