문제해결 - flapper/codezen GitHub Wiki

증상

심각: Servlet.service() for servlet [Spring] in context with path [] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleStatement$1] with root cause java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleStatement$1 at oracle.jdbc.driver.OracleStatement.getLargeUpdateCount(OracleStatement.java:3189) at oracle.jdbc.driver.OracleStatement.getUpdateCount(OracleStatement.java:3176)

또는 java.lang.NoClassDefFoundError: oracle/jdbc/driver/T4CTTIiov

해결

tomcat clean ? 최종적으로 src\main\resources\dnp\config\context-websocket.xml 가 잘못되어 삭제함

증상

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [dco30.common.RefreshableSqlSessionFactoryBean] for bean with name 'dcoSqlSessionFactory' defined in file [C:...\org.eclipse.wst.server.core\tmp1\wtpwebapps\DCO30\WEB-INF\classes\dco30\config\context-mapper.xml]; nested exception is java.lang.ClassNotFoundException: dco30.common.RefreshableSqlSessionFactoryBean

해결

pom.xml 원래대로 https 로 변경-> Maven Update (Force) -> mvn clean install

증상

빌드 Problem :

  • Unable to load annotation processor factory 'M2_REPO/ognl/ognl/3.1.12/ognl-3.1.12.jar' for project DCO30 DCO30 Annotation processor factory path APT Build Problem
  • Missing artifact rtim-common-crypt:rtim-common-crypt:jar:3.5 pom.xml /DCO30 line 335 Maven Dependency Problem
  • Project DCO30 is missing required annotation processor library: 'M2_REPO/ognl/ognl/3.1.12/ognl-3.1.12.jar' DCO30 Annotation processor factory path APT Build Problem

톰캣 기동시 :

  • Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.type.TypeReference 아래에 Caused by: org.apache.catalina.LifecycleException: A child container failed during start 또는
  • Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.type.TypeReference ... java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 또는
  • Could not clean server of obsolete files: 프롤로그에서는 콘텐츠가 허용되지 않습니다.

해결

problems 의 문제를 먼저 ### 해결해야함.

해결이 안되는 이유는 허무하게도 > 이클립스에서 Build Automatically 체크 안하고 Clean 만 하고 잇었음

clean 후 Maven Update 해야함

증상

eclipse publishing failed may be locked by another process js 파일 수정한 뒤 바로 배포 에러남

해결

원인 : vscode 내 tomcat plugin 에서 lock 잡고 있엇던듯... 서버 삭제하고 바로위 ### 해결 방법과 동일하게 ### 해결

증상

no local history available for selected resource

해결

You can configure how long the history is kept in the Preferences in 'General > Workspace > Local History' https://stackoverflow.com/questions/41445711/my-compare-to-local-history-no-longer-works

증상

Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for dco30_StockItemSelectV.selectMain 톰캣 기동시

해결

mapper id 명 불일치 http://starlmh.tistory.com/entry/Mybatis-%EC%97%90%EB%9F%AC 이중 5번에 해당되었음 왜냐면, xml 복사후 쿼리만 바꾸고 namespace 안바꾸었기 때문

증상

Caused by: org.xml.sax.SAXParseException: 요소 콘텐츠는 올바른 형식의 문자 데이터 또는 마크업으로 구성되어야 합니다.

해결

xml 쿼리내 부등호 존재 cdata 처리해야함.

증상

The method (Map) in the type is not applicable for the arguments (RequestObject)

해결

import dnp.framework.common.RequestModel; 하고 아래처럼 수정해야함. 틀린거 public @ResponseBody ResponseObject selectIncomeOutcome(GlobalContext ctx, @RequestBody RequestObject reqModel, ResponseObject respModel) throws Exception{ 맞은거 public @ResponseBody ResponseObject selectIncomeOutcome(GlobalContext ctx, @RequestBody RequestModel reqModel, ResponseObject respModel) throws Exception{

증상

Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'dco30_ConsumeSiteVService' must be of type [dco30.dco30_04.dco30_0408.Dco30_ConsumeSiteRepo

해결

controller 에 @Resource 명 잘못 됨 @Resource(name="dco30_ConsumeSiteVService") private Dco30_ConsumeSiteReportVService dco30_ConsumeSiteReportVService; ==> @Resource(name="dco30_ConsumeSiteReportVService") private Dco30_ConsumeSiteReportVService dco30_ConsumeSiteReportVService;

증상 (위와 유사)

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dco30_ConsumeSiteReportVService' is defined

해결

service 에 @Service 명 잘못 됨 (뒷부분에 Servie 빠짐) @Service("dco30_ConsumeSiteReportV") public class Dco30_ConsumeSiteReportVService extends DcoAbstractServiceImpl{ ==> @Service("dco30_ConsumeSiteReportVService") public class Dco30_ConsumeSiteReportVService extends DcoAbstractServiceImpl{

증상

[DB] org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='CL_SOBI', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: 부적합한 열 유형

해결

mapper xml 에서 isEmpty() 체크 안하고 사용 더 근본적인 원인은 화면에서 ajax 호출할때 정의되지 않음 이번에는 radiogroup 에 simpleValue: true 속성 정의하지 않아서 radiofield 의 inputValue 가 인식이 안된 것이 문제

증상

심각: StandardWrapper.Throwable org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 249 in XML document from ServletContext resource [/WEB-INF/dnp-servlet.xm] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 249; columnNumber: 21; cvc-complex-type.2.4.b: 'mvc:interceptor' 요소의 콘텐츠가 불완전합니다.

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: 'mvc:interceptor' 요소의 콘텐츠가 불완전합니다. '{"http://www.springframework.org/schema/mvc":exclude-mapping, "http://www.springframework.org/schema/beans":bean, "http://www.springframework.org/schema/beans":ref}' 중 하나가 필요합니다.

cvc-complex-type.2.4.b: The content of element 'mvc:interceptor' is not complete. One of '{"http://www.springframework.org/schema/mvc":exclude-mapping, "http://www.springframework.org/schema/beans":bean, "http://www.springframework.org/schema/ beans":ref}' is expected.

해결

dnp-servlet.xml 의 위 249 라인에 아래 코드 추가 <beans:bean id="dnpSessionInterceptor" class="dnp.framework.session.DnpSessionInterceptor"></beans:bean>

증상

ERROR [org.springframework.web.servlet.DispatcherServlet] Context initialization failed org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only

해결

증상

Description Resource Path Location Type Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target pom.xml /DCO30 line 1 Maven Configuration Problem\

Description Resource Path Location Type CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target pom.xml /DCO30 line 673 Maven Project Build Lifecycle Mapping Problem

Description Resource Path Location Type Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target pom.xml /DCO30 line 1 Maven Configuration Problem

- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-
 plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update 
 interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: 
 PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile)

[Java] CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target [0]

증상

톰캣 시작 안됨 Removing obsolete files from server... Could not clean server of obsolete files: null

해결

tomcat > 우클릭 > properties > switch location http://blog.naver.com/PostView.nhn?blogId=nateen7248&logNo=220815838165&parentCategoryNo=&categoryNo=58&viewDate=&isShowPopularPosts=true&from=search

증상

톰캣 기동시 Caused by: java.lang.Error: Unresolved compilation problems

해결

project clean 또는 rebuild

증상

Error querying database. Cause: java.lang.NumberFormatException: For input string: “y”

Cause: java.lang.NumberFormatException: For input string: “y”

해결

BAD <if test=’stringValue == "Y"‘> GOOD 쌍따옴표와 홑따옴표 위치 변경 http://t-ara72.blogspot.com/2013/10/mybatis-numberformatexception.html

증상

Caused by: java.lang.ClassNotFoundException: dco30.... org.springframework.web.context.WebApplicationContext

해결

https://stackoverflow.com/a/25632154

  1. Right click on server > Add and Remove
  2. Select your project > Remove > Finish
  3. Restart your server
  4. Right click on server > Add and Remove
  5. Select your project > Add > Finish
  6. Restart your server again.

증상

org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only

해결

try catch 로 감싸줘야한다 내부적으로 throw new Exception() 발생시키는듯..

증상

인덱스에서 누락된 IN 또는 OUT 매개변수:: 1 (sql plus) 또는 ORA-00911: 문자가 부적합합니다 (DBeaver)

해결

로그에서 값대입되지 않은 ? 부분 복사해서 DB툴에 넣었기 때문 로그에서 값대입된 부분 찾아서 다시 복사하시오.

증상

runtime 에러 [SYS] java.lang.IllegalArgumentException: Protected method: selectInvoJab [SYS] java.lang.IllegalArgumentException: Protected method: selectItems

해결

Server Restart! Debugging 모드에서 spring loaded 적용 안되었을 수도 있음! (controller 만 안되는 것 같음)

증상

파일 저장시 Resource is out of sync

해결

Navigator 에서 refresh 한다

증상

sync 할때 svn: E200030: There are unfinished transactions detected in

해결

project 우클릭 > team > clean up or 이클립스 닫고 tortoise 로 clean up 그래도 안되면 sqlite 사용하여 ### 해결 https://web-obj.tistory.com/186

증상

Caused by: java.lang.IllegalStateException: Connection factory returned null from createConnection 일부 기능은 잘되고 일부만 안됨

해결

톰캣 Restart

증상

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'dco30_SiteClosedE.selectBeforeJungsanCancel'. It's likely that neither a Result Type nor a Result Map was specified

해결

오류 : 정상 :

증상

ORA-06550: 줄 1, 열7:PLS-00306: 'DDIDPR_DELETE_CANCEL_AUTOSLIP' 호출 시 인수의 갯수나 유형이 잘못되었습니다 ORA-06550: 줄 1, 열7:PL/SQL: Statement ignored

해결

xml mapper 의 인자 갯수와 stored procedure 의 인수 갯수가 다름

증상

ORA-01830: 날짜 형식의 지정에 불필요한 데이터가 포함되어 있습니다

해결

날짜형식의 문자열 데이터를 날짜포맷으로 변환하는 과정에서 포맷이 맞지 않으면 발생한다. 예1) ’10/01/2013′ => 2013년 10월 1일의 날짜를 날짜 포맷으로 변환한다. SELECT TO_DATE(’10/01/2013′) FROM DUAL; ==> SELECT TO_DATE(’2013/10/01′) FROM DUAL; ==> SELECT TO_DATE(’10012013′,’MM/DD/YYYY’) FROM DUAL;

증상

TypeError: Converting circular structure to JSON

해결

특수 Ajax 호출시 param 을 객체가 아닌 value 로 직접 지정시 에러남 bad param: scbSearchbar good param: {scbSearchbar: scbSearchbar} 다만, param: param 과 같이 순수 객체인 경우는 에러 안남 DNP 에서 조작한 컴포넌트만 직접 지정시 에러 일반 json.stringify() 할때 object 순환참조 있으면 에러남 https://ohgyun.com/399

https://stackoverflow.com/questions/11616630/json-stringify-avoid-typeerror-converting-circular-structure-to-json

증상

Mapped Statements collection does not contain value for dco30_SiteClosedE.costTuja

해결

해당 Mapper 파일에 Service.java 에서 호출하는 해당 id (costTuja) 가 없음

증상

org.apache.ibatis.reflection.ReflectionException: Could not set property 'O_MSG_ERROR' of 'class java.lang.Class' with value 'null' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'O_MSG_ERROR' in 'class java.lang.Class'

해결 ?

https://yamea-guide.tistory.com/162 mapper 안의 #{O_MSG_ERROR} 오타 가능성

증상

톰캣 기동시 Caused by: java.lang.ClassNotFoundException: org.springframework.core.io.Resource

해결

Problems View 의 문제가 근본적 문제임.

증상

No setter found for property 'configLocation' in class 'dco30.common.RefreshableSqlSessionFactoryBean'

해결

Maven Update

증상

ERROR [jdbc.sqlonly] 2. ResultSet.getInt(NM_CTRT) java.sql.SQLException: 내부 표기로 변환할 수 없습니다

해결

mapper 의 resultType 과 java 파일의 return type 이 다름

<select id="selectUnitPriceContract" resultType="int">

를 으로 바꿔서 ### 해결

⚠️ **GitHub.com Fallback** ⚠️