2012년 3월 26일 월요일
2012년 3월 25일 일요일
2012년 3월 23일 금요일
Unable to locate Spring NamespaceHandler
원문: 감사합니다.
http://techieth8s.blogspot.com/2011/04/unable-to-locate-spring.html
오늘, 난 spring-security 관련 에러 때문에 고생하였습니다.
단지 WEB-INF/lib에 관련 library를 추가하고
http://www.springframework.org/schema/security/spring-security-3.1.xsd
를 사용하면 그만입니다.
Error:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx] Offending resource: class path resource [applicationContext.xml]
Solution: Add spring-tx.jar to WEB-INF/lib
Error:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security] Offending resource: class path resource [applicationContext.xml]
Solution: Add spring-core, spring-acl, spring-config, spring-web, spring-taglibs jars to WEB-INF/lib
http://techieth8s.blogspot.com/2011/04/unable-to-locate-spring.html
오늘, 난 spring-security 관련 에러 때문에 고생하였습니다.
단지 WEB-INF/lib에 관련 library를 추가하고
http://www.springframework.org/schema/security/spring-security-3.1.xsd
를 사용하면 그만입니다.
Error:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx] Offending resource: class path resource [applicationContext.xml]
Solution: Add spring-tx.jar to WEB-INF/lib
Error:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security] Offending resource: class path resource [applicationContext.xml]
Solution: Add spring-core, spring-acl, spring-config, spring-web, spring-taglibs jars to WEB-INF/lib
2012년 3월 14일 수요일
Mysql DataSource Configuration in Jboss7.1.1
원문: https://community.jboss.org/wiki/DataSourceConfigurationInAS7
jboss7.1.1 설치 디렉터리를 ${jboss-dir}로 표기함.
mysql-jdbc: mysql-connector-java-5.1.18.jar
모듈 설치
1. ${jboss-dir}/modules 디렉터리에 com/mysql/main 하위 폴더를 생성한다.
2. ${jboss-dir}/modules/com/mysql/main 에 mysql-connector-java-5.1.18.jar 파일을 복사한다.
3. ${jboss-dir}/modules/com/mysql/main 에 module.xml 파일을 생성하여 아래와 같이 수정한다.
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.18.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/datasources/MysqlDS" pool-name="MysqlDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/mydb</connection-url>
<driver>com.mysql</driver>
<security>
<user-name>dbuser</user-name>
<password>dbpasswd</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="com.mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
jboss7.1.1 설치 디렉터리를 ${jboss-dir}로 표기함.
mysql-jdbc: mysql-connector-java-5.1.18.jar
모듈 설치
1. ${jboss-dir}/modules 디렉터리에 com/mysql/main 하위 폴더를 생성한다.
2. ${jboss-dir}/modules/com/mysql/main 에 mysql-connector-java-5.1.18.jar 파일을 복사한다.
3. ${jboss-dir}/modules/com/mysql/main 에 module.xml 파일을 생성하여 아래와 같이 수정한다.
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.18.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
DataSource 설정
${jboss-dir}/standalone/configuation/standalone.xml 파일의 datasource 항목에 아래와 같이 추가한다.
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/datasources/MysqlDS" pool-name="MysqlDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/mydb</connection-url>
<driver>com.mysql</driver>
<security>
<user-name>dbuser</user-name>
<password>dbpasswd</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="com.mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
피드 구독하기:
글 (Atom)