Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vert.x 1.3.1 maven 저장소와 Vert.x 2.0.0 에서 실행 방법 질문 #9

Closed
legshort opened this issue Jul 21, 2013 · 7 comments
Closed
Assignees

Comments

@legshort
Copy link

Java 기반으로 Socket.io 를 테스트 해보려고 하는데요

Vert.x 1.3.1 기반으로 아래와 같이 maven 설정을 해주면 mod-socket-io 라이브러리가 존재하지 않는다고 오류를 출력하더라구요

com.nhncorp mod-socket-io 0.9.10 #

그래서 예제 프로젝트에 있는거 처럼 Vert.x 2.0.0-CR3 를 사용하고 dist 폴더에 있는 jar 파일을 vert.x lib 폴더에 복사하고 "vertx run SampleVerticle.java" 같이 실행하면 아래와 같이 오류가 출력됩니다.

java.lang.IncompatibleClassChangeError: Found interface org.vertx.java.core.impl.VertxInternal, but class was expected

기본적인 vert.x 예제를 작동되는데,,,, 확인 부탁드립니다

@ghost ghost assigned keesun Jul 21, 2013
@keesun
Copy link
Owner

keesun commented Jul 21, 2013

혹시 메이븐 repository도 설정해주셨어요?

<repository>
    <id>my.mvn.repo</id>
    <url>https://github.com/keesun/mvn-repo/raw/master</url>
</repository>

이렇게 추가해주셔야 디펜던시를 이쪽에서 가져올 수 있거든요.

그리고 그 다음 문제는 로컬에 설치하신 vertx 버전하고 dist 폴더에 넣으신 jar 파일하고 버전이 안맞아서 그런것 같은데요. 로컬에서 vertx version 실행하면 어떻게 출력되는지 알 수 있을까요?

@legshort
Copy link
Author

pom.xml 내용에 아래와 같이 저장소 추가했는데 0.9.10 버젼은 없다고 오류가 발생하고 1.0.0은 다운로드를 하더라구요 그래서 Vert.x를 2.0.0-RC3 로 다운받아서 테스트 해봤습니다.

mvn

그래서 mod-socket-io 1.0.0 과 Vet.x 2.0.0-RC3 으로 "vertx run SampleVerticle.java" 실행하면 아래와 같이 출력됩니다. Javassist 없다는 메세지는 Error 가 아니라 Warning 으로 알고 있어서 상관없을듯 한데 마지막에 클래스대신 인터페이스를 찾았다고 하는거 봐서는 API가 변경된건지 잘 모르겠네요 ^^;;;;

09:06:02.721 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
09:06:02.731 [main] DEBUG i.n.c.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 8
09:06:02.743 [main] DEBUG i.n.util.internal.PlatformDependent - Platform: Windows
09:06:02.744 [main] DEBUG i.n.util.internal.PlatformDependent - Java version: 7
09:06:02.745 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noUnsafe: false
09:06:02.747 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.ByteBuffer.cleaner: available
09:06:02.748 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
09:06:02.748 [main] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
09:06:02.749 [main] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
09:06:02.750 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: true
09:06:02.750 [main] DEBUG i.n.util.internal.PlatformDependent - sun.misc.Unsafe: available
09:06:02.750 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noJavassist: false
09:06:02.752 [main] DEBUG i.n.util.internal.PlatformDependent - Javassist: unavailable
09:06:02.752 [main] DEBUG i.n.util.internal.PlatformDependent - You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes. Please check the configuration for better performance.
09:06:02.752 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
09:06:02.784 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
09:06:02.784 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
09:06:02.920 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.noResourceLeakDetection: false
java.lang.IncompatibleClassChangeError: Found interface org.vertx.java.core.impl.VertxInternal, but class was expected

@keesun
Copy link
Owner

keesun commented Jul 22, 2013

며칠전에 vert.x 2.0 final 버전이 나왔거든요? 일단 제가 이 모듈을 2.0 final에 맞춰서 다시 한번 1.0.1로 버전을 올릴 계획이에요.

그전에 0.9.10 버전 다운로드 문제부터 확인해보겠습니다.

그리고 에러로그에서 자바시스트 때문에 클래스/인터페이스 타입 에러가 날 수도 있을것 같습니다. 왜냐면 자바시스트가 프록시 클래스 만드는데 보통 쓰이는데, 자바시스트를 이용해서 어떤 인터페이스의 구현체를 동적으로 만들어야 하는 상황에서 해당 라이브러리가 없어서 인터에이스 타입의 구현체를 동적으로 생성하지 못하면 아래처럼 인터페이스는 있지만 클래스가 없다는 에러가 날 수도 있겠다고 추측이 되서요.

일단은 자바시스트 로딩 에러부터 잡아보는게 어떨까 싶습니다.

@keesun
Copy link
Owner

keesun commented Jul 22, 2013

@legshort 이런 정말 죄송합니다. 확인해봤더니 0.9.10이 아니라 0.9.0으로 올라가 있었네요;;

의존성 버전을 0.9.0으로 변경해 주시면 vert.x 1.3.1.final과 호환하는 mod-socket-io를 사용하실 수 있습니다.

감사합니다.

@legshort
Copy link
Author

버젼 0.9.0 으로 변경하니깐 Vert.x 1.3.1 버젼으로 서버가 잘 작동하는군요 감사합니다 ^^

자바 어시스트 문제 해결하고 Vertx.2.0.0 작동도 확인해 봐야겠군요.

Vert.x 2.0.0 Final 과 호환되는 1.0.1 버젼도 기대하고 있겠습니다.

@keesun
Copy link
Owner

keesun commented Jul 23, 2013

1.0.1도 올려뒀습니다. :)
readme에 정도 갱신해뒀구요. 버전만 1.0.1로 바꾸시면 되요.

@keesun keesun closed this as completed Jul 23, 2013
@legshort
Copy link
Author

감사합니다 테스트 해봐야 겠네요 ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants