개발문제해결

    에러 - Optional int parameter is present but cannot be translated into a null value

    에러 - Optional int parameter is present but cannot be translated into a null value

    int를 null로 선언할 수 없으니 long등 다른 자료형을 사용하라는 이야기이다. 기본자료형 int는 null로 선언할 수 없다. 저 HTTP 500 에러는 어떤 과정상에서 int 기본변수에 null값이 들어가서 생기는 에러이다. 자신의 로직 중 int에 null이 들어갈 수 있는 장소를 찾아내서 수정해줘야한다. 내 경우는 어디가 문제인지 2시간동안 찾았는데.. ajax로 input으로 넘거야 하는 값을 form으로 넘겨서 url이 바뀌어서 기존 파라미터 변경으로 인해 생기는 에러였다...

    ORA-00936 누락된 표현식의 원인

    ORA-00936 누락된 표현식의 원인

    어제부터 자꾸 이런 에러가 떳다. 이 에러의 이유는 보통 ' ' , . ; * 이런 기호들을 잘못 사용해서 발생한다. 이 포스트에 들어왔다면 자기 쿼리문의 기호를 다시 체크해보도록 하자 나는 기호는 다 맞추었는데, 안되는 경우였다. String SQL_SELECTPAGE = "select b.writer, b.title, b.topicdate, b.lecturekey, b.tcontent" + "from (select rownum rn, a.* from (select * from topics WHERE LECTUREKEY = #{lid}" + "order by topicdate desc) a) b" + "where rn between #{c.start} and #{c.end}";내 쿼리문은 이러하다. 처..

    JSTL c tag 링크 에러

    JSTL c tag 링크 에러

    According to TLD or attribute directive in tag file, attribute [test] does not accept any expressions 스택오버플로우에서 가져온 오류 이유입니다. You must use JSP, JSTL - is just set of custom tags and can not be used separately. As well as Expression Language. If you are not using any MVC frameworks, then you need to do some of their work by yourself. Please take a look (if you haven't yet) at following design pat..

    백준 9012번 - 괄호

    import java.util.Scanner; public class algo { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int value=0; int num = sc.nextInt(); sc.nextLine(); for (int i = 0; i < num; i++) { String line = sc.nextLine(); char[] temp = line.toCharArray(); for(int y=0; y

    자바 스택 구현

    원래 백준 10828을 풀다가 스택의 갯수의 동적할당이 아니라 명령어의 수를 동적할당으로 하라고 했는데 잘 못읽어서 만들었다. 런타임 에러 나오는 거 보고 다시 읽어봐서 발견.. 그냥 지우긴 아까워서 기록한다. 백준 10828 기반에 스택 갯수 동적할당 코드 import java.util.Scanner; public class algo { public static void main(String[] args) { int count = 0; int push = 0; Scanner sc = new Scanner(System.in); int size = sc.nextInt(); int array[] = new int[size]; while(true) { String value = sc.nextLine(); if..

    JQuery 에러 “TypeError: $.getJSON is not a function”

    JQuery 에러 “TypeError: $.getJSON is not a function”

    JQuery.Deferred exception: $.getJSON is not a function TypeError: $.getJSON is not a function “TypeError: $.getJSON is not a function” jquery slim 버전에는 JSON을 처리하는 함수가 존재하지 않는다. 때문에 slim 버전을 일반버전으로 바꾸어 주면 완료된다. 하지만 내 코드는 일반버전을 참조하고 있다. 왜 이런오류가 일어날까? 코드를 살펴보면 header 처리를 위한 액션태그를 사용하고 있는데 이 헤더 JSP에서 slim.min.js 를 참조하고 있다. 액션태그는 읽는 순간부터 참조파일까지 다 바꿔버리는듯하다. 이부분을 바꿔주면 에러가 해결된다.

    백준 11721번 - 열 개씩 끊어 출력하기

    import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String text = sc.next(); for (int i = 0; i

    백준 11720번 - 숫자의 합

    import java.util.Scanner; public class algo { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int i = sc.nextInt(); String y = sc.next(); int total=0; for(int q=0;q

    백준 11718번 11719번 - 그대로 출력하기 1, 2

    public class algo { public static void main (String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNextLine()) { String line = sc.nextLine(); System.out.println(line); } } } 11718맞았습니다!!12336 KB128 MS sc.next() -> 다음 토큰을 읽습니다. sc.nextLine -> 다음 행을 읽습니다. sc.hasNext -> 토큰이 있는지 확인하고 boolean을 리턴합니다. 공백의 경우 무시합니다. sc.hasNextLine -> 행이 있는지 확인 후 boolean을 리턴합니다. 줄바뀜이 있으면 true를 리턴합니다. 예를 들어 ..

    HTTP Status 500 - JSP 액션태그 에러

    HTTP Status 500 - JSP 액션태그 에러

    org.apache.jasper.JasperException: /WEB-INF/views/board/../subPage/header.jsp (line: [8], column: [1]) Page directive: illegal to have multiple occurrences of 'contentType' with different values (old: [text/html; charset=UTF-8], new: [text/html;charset=UTF-8]) JSP 헤더나 풋터 같은 액션태그를 사용할 때 컨텐트 타입의 형식이 맞지 않으면 발생하는 에러입니다. 설정이같아도 형식이 다르면 에러가 날 수 있습니다. 액션태그 대상과 컨텐트 타입을 맞춰줍시다.