PebbleをJava6で使う。
PebbleをJava6で起動しようとすると、こんなエラーが出る。
17:27:34,510 INFO [STDOUT] 2008-09-02 17:27:34,508 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.parsers.DocumentBuilder.setErrorHandler(Lorg/xml/sax/ErrorHandler;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/springframework/beans/factory/xml/XmlBeanDefinitionReader, and the class loader (instance of) for resolved class, javax/xml/parsers/DocumentBuilder, have different Class objects for the type org/xml/sax/ErrorHandler used in the signature
org.xml.saxlErrorHandlerが、Java6で標準に入っているのに、アプリケーションのクラスパスにも入ってますよ、ってことみたいだ。Pebbleのwarの中のWEB-INF/libの中を調べてみたら、tidy.jarというファイルの中に発見。org/w3c/dom/*と、org/xml/sax/*を削除。というか、org/w3c/tidy/Parser.classとか、何なんだよ、このパッケージ名は。
気を取り直して、再起動。全く同じエラーが出る。おかしいな。と思ったら、xmlrpc-1.2-b1.jarにも入ってる! こちらも削除して、ようやく立ち上がるようになった。








