This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems to generate a servlet with kawa


Hello,

I work on Windows NT 4 with JDK 1.3. I downloaded the kawa jar file. Then I
tried to generate a servlet with Kawa, but I got the following error
message:

java -jar kawa-1.6.97.jar --xquery --servlet -C table.xql
(compiling table.xql)
Internal error while compiling table.xql
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:120)
        at gnu.bytecode.ObjectType.getReflectClass(ObjectType.java:54)
        at gnu.bytecode.ClassType.getDeclaredMethod(ClassType.java:500)
        at gnu.bytecode.ClassType.addMethod(ClassType.java:351)
        at gnu.expr.Compilation.generateConstructor(Compilation.java:851)
        at gnu.expr.LambdaExp.compileEnd(LambdaExp.java:470)
        at gnu.expr.Compilation.addClass(Compilation.java:1332)
        at gnu.expr.Compilation.<init>(Compilation.java:763)
        at gnu.expr.ModuleExp.compileToFiles(ModuleExp.java:277)
        at kawa.lang.CompileFile.compile_to_files(CompileFile.java:104)
        at kawa.repl.main(repl.java:241)

I tried different settings of PATH and CLASSPATH and I'm sure that
servlet.jar is defined in the classpath. I also tried the new version 1.6.98
with the same result.

I can generate a class file with the option --main [java -jar
kawa-1.6.98.jar --xquery --main -C table.xql], but that is not what I want.

The content of table.xql is:
----------
<table>{
  for $y in 1 to 10 return (
    <tr>{
      for $x in 1 to 10 return
        let $bg:=(if($x mod 2 + $y mod 2 <= 0) then "lightgreen"
                  else if ($y mod 2 <= 0) then "yellow"
                  else if ($x mod 2 <= 0) then "lightblue"
                  else "white"),
            $prod:=$x*$y
          return <td align="right" bgcolor="{$bg}">{
            if ($x > 1 and $y > 1) then $prod else <b>{$prod}</b>}</td>
    }</tr>,
    "
")
}</table>,"
"
----------
Please help.
Karin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]