1

我在scala 邮件列表(也在此处)中找到了详细描述的类似问题。在创建 scala 解释环境时,它似乎与类路径管理的这种变化有关。

在我的情况下,两者scala-libraryscala-compiler包含在war被部署到WebLogic 10.3(camel 版本:2.8.0,jvm:oracle 1.6)中。

异常如下所示:

com.sun.jersey.api.container.ContainerException: org.fusesource.scalate.TemplateException: object scala not found.
    at org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeToUsingServletTemplateEngine(ScalateTemplateProcessor.scala:190)
    at org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeTo(ScalateTemplateProcessor.scala:136)
    at org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeTo(ScalateTemplateProcessor.scala:44)
    at com.sun.jersey.spi.template.ResolvedViewable.writeTo(ResolvedViewable.java:103)
    at com.sun.jersey.server.impl.template.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:83)
    Truncated. see log file for complete stacktrace
Caused By: org.fusesource.scalate.TemplateException: object scala not found.
    at org.fusesource.scalate.TemplateEngine.compileAndLoad(TemplateEngine.scala:784)
    at org.fusesource.scalate.TemplateEngine.compileAndLoadEntry(TemplateEngine.scala:643)
    at org.fusesource.scalate.TemplateEngine.liftedTree1$1(TemplateEngine.scala:374)
    at org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:368)
    at org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:426)
    Truncated. see log file for complete stacktrace
Caused By: scala.tools.nsc.MissingRequirementError: object scala not found.
    at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:653)
    at scala.tools.nsc.symtab.Definitions$definitions$.getModule(Definitions.scala:603)
    at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definitions.scala:145)
    at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Definitions.scala:146)
    at scala.tools.nsc.symtab.Definitions$definitions$.AnyClass(Definitions.scala:176)

问题:是否有可能让骆驼网络控制台在这种环境下工作?

4

1 回答 1

1

不,它是 WebLogic 的问题。Scalaete 需要添加对 WebLogic 的特殊支持,因为 WebLogic 的类加载与通常的做法有些不同。

于 2011-10-04T14:08:55.563 回答