読者です 読者をやめる 読者になる 読者になる

slim3のHotReloadingでエラーが発生した

  • リビジョン
    • r.364

エラー内容

HTTP ERROR: 500

A class that is not HOT reloaded can not access a HOT reloaded class, loader constraint violation: loader (instance of org/slim3/controller/HotReloadingClassLoader) previously initiated loading for a different type with name "study/model/MailQueue"

RequestURI=/user/insert
Caused by:

org.slim3.exception.HotReloadingRuntimeException: A class that is not HOT reloaded can not access a HOT reloaded class, loader constraint violation: loader (instance of org/slim3/controller/HotReloadingClassLoader) previously initiated loading for a different type with name "study/model/MailQueue"
	at org.slim3.controller.HotReloadingFilter.doHotReloading(HotReloadingFilter.java:227)
	at org.slim3.controller.HotReloadingFilter.doFilter(HotReloadingFilter.java:186)
	at org.slim3.controller.HotReloadingFilter.doFilter(HotReloadingFilter.java:159)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:124)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:313)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:313)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/slim3/controller/HotReloadingClassLoader) previously initiated loading for a different type with name "study/model/MailQueue"
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
	at org.slim3.controller.HotReloadingClassLoader.defineClass(HotReloadingClassLoader.java:163)
	at org.slim3.controller.HotReloadingClassLoader.defineClass(HotReloadingClassLoader.java:150)
	at org.slim3.controller.HotReloadingClassLoader.defineClass(HotReloadingClassLoader.java:131)
	at org.slim3.controller.HotReloadingClassLoader.loadClass(HotReloadingClassLoader.java:109)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at org.slim3.jdo.S3ClassLoaderResolver.classForName(S3ClassLoaderResolver.java:65)
	at org.slim3.jdo.S3ClassLoaderResolver.classForName(S3ClassLoaderResolver.java:74)
	at org.datanucleus.metadata.AbstractClassMetaData.loadClass(AbstractClassMetaData.java:499)
	at org.datanucleus.metadata.ClassMetaData.populate(ClassMetaData.java:167)
	at org.datanucleus.metadata.MetaDataManager$1.run(MetaDataManager.java:2317)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.datanucleus.metadata.MetaDataManager.populateAbstractClassMetaData(MetaDataManager.java:2311)
	at org.datanucleus.metadata.MetaDataManager.populateFileMetaData(MetaDataManager.java:2148)
	at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass(MetaDataManager.java:2289)
	at org.datanucleus.jdo.metadata.JDOMetaDataManager.getMetaDataForClassInternal(JDOMetaDataManager.java:369)
	at org.slim3.jdo.S3MetaDataManager.getMetaDataForClassInternal(S3MetaDataManager.java:57)
	at org.datanucleus.jdo.metadata.JDOMetaDataManager$MetaDataRegisterClassListener.registerClass(JDOMetaDataManager.java:184)
	at javax.jdo.spi.JDOImplHelper.registerClass(JDOImplHelper.java:376)
	at study.model.MailQueue.(MailQueue.java)
	at study.slim3.mail.MailBuilder.createMailQueue(MailBuilder.java:83)
	at study.slim3.mail.MailBuilder.createMailQueue(MailBuilder.java:94)
	at study.controller.user.InsertController.doRun(InsertController.java:50)
	at study.slim3.controller.ActionController.run(ActionController.java:40)
	at org.slim3.controller.Controller.runBare(Controller.java:94)
	at org.slim3.controller.FrontController.processController(FrontController.java:477)
	at org.slim3.controller.FrontController.doFilterInternal(FrontController.java:299)
	at org.slim3.controller.FrontController.doFilter(FrontController.java:258)
	at org.slim3.controller.FrontController.doFilter(FrontController.java:225)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at org.slim3.jdo.JDOFilter.doFilter(JDOFilter.java:63)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at org.slim3.controller.HotReloadingFilter.doHotReloading(HotReloadingFilter.java:223)
	... 24 more

とりあえずhotReloadingを切ったらエラーは抑制されました。

引用もとの問題は関連あり(oneToMany)のようですが私のは単純なmodelです。設定ミスなのだろうか。
web.xmlとjdoconfig.xmlはslim3itを元に設定しています。jarもslim3itから取得。