I am writing a plugin for DITA-OT PDF2. In this plugin I need to define extension functions for Saxon XSLT. I followed the tutorials from the dita-ot website:
https://www.dita-ot.org/3.3/topics/implement-saxon-extension-functions.html
and
https://www.dita-ot.org/3.3/topics/plugin-javalib.html
Note: I am using DITA OT 3.3.1
I have this feature in my plugin, pointing to the jar that contains my extension functions:
<feature extension="dita.conductor.lib.import" file="./xslt-extension.jar"/>
I get this error:
transform.topic2fo.main:
[pipeline] Static error in {ftd:lastApplicability()} in expression in xsl:variable/#select on line 30 column 79 of applicability.xsl:
[pipeline] XPST0017: Cannot find a 0-argument function named {https://orlandotechpubs.com/}lastApplicability()
[pipeline] Static error near {...eApplicability($applicabili...} in expression in xsl:value-of/#select on line 99 column 69 of applicability.xsl:
[pipeline] XPST0017: Cannot find a 1-argument function named {https://orlandotechpubs.com/}writeApplicability()
BUILD FAILED
C:\Users\d_bo\Desktop\test-dita-ot-pdf\test\sample_pdf.xml:9: The following error occurred while executing this line:
C:\Users\d_bo\Desktop\test-dita-ot-pdf\dita-ot-3.3.1\plugins\org.dita.base\build.xml:31: The following error occurred while executing this line:
C:\Users\d_bo\Desktop\test-dita-ot-pdf\dita-ot-3.3.1\plugins\org.dita.pdf2\build.xml:151: The following error occurred while executing this line:
C:\Users\d_bo\Desktop\test-dita-ot-pdf\dita-ot-3.3.1\plugins\org.dita.pdf2\build.xml:291: java.lang.RuntimeException: Failed to compile stylesheet 'C:\Users\d_bo\Desktop\test-dita-ot-pdf\dita-ot-3.3.1\plugins\org.dita.pdf2.axf\xsl\fo\topic2fo_shell_axf.xsl': net.sf.saxon.s9api.SaxonApiException: Errors were reported during stylesheet compilation
at org.dita.dost.module.XsltModule.execute(XsltModule.java:108)
at org.dita.dost.ant.ExtensibleAntInvoker.execute(ExtensibleAntInvoker.java:182)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:834)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Caused by: javax.xml.transform.TransformerConfigurationException: net.sf.saxon.s9api.SaxonApiException: Errors were reported during stylesheet compilation
at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(SaxonTransformerFactory.java:158)
at org.dita.dost.module.XsltModule.execute(XsltModule.java:106)
... 56 more
Caused by: net.sf.saxon.s9api.SaxonApiException: Errors were reported during stylesheet compilation
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:742)
at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(SaxonTransformerFactory.java:155)
... 57 more
Caused by: net.sf.saxon.trans.XPathException: Errors were reported during stylesheet compilation
at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:260)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:106)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:739)
... 58 more
I double checked everything and my extension functions are correctly defined. So I did some tests and apparently my jar is never added to the classpath. I created a simple ant target and launched again:
<target name="testJava">
<java classname="com.infotel.ftd.MyTest">
</java>
</target>
Here is what I get:
[java] Could not find com.infotel.ftd.MyTest. Make sure you have it in your classpath
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:141)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:861)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:231)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:498)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
[java] at org.apache.tools.ant.Task.perform(Task.java:350)
[java] at org.apache.tools.ant.Target.execute(Target.java:449)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:470)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
[java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
[java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:498)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
[java] at org.apache.tools.ant.Task.perform(Task.java:350)
[java] at org.apache.tools.ant.Target.execute(Target.java:449)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:470)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
[java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:498)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
[java] at org.apache.tools.ant.Task.perform(Task.java:350)
[java] at org.apache.tools.ant.Target.execute(Target.java:449)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:470)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
[java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:834)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:223)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
[java] Java Result: -1
How can I debug dita OT to see what is wrong with my configuration?
I finally nailed what was wrong with my DITA OT configuration.
I was using an ant build script to run DITA OT and when doing this, the plugin JARs are not automatically added to the classpath.
I switched to using the DITA OT command line. Now my JARs are seen by the ant scripts and my extension functions are accessible from the XSLT.
In addition, if someone else has a classpath problem like this, you can also check the file [DITA-OT]/config/env.bat (env.sh for lunix users). After installing a plugin that provides its own JAR libraries, the JAR files shall be present in this file:
set "CLASSPATH=%CLASSPATH%;%DITA_HOME%\plugins\org.dita.pdf2\lib\fo.jar"
set "CLASSPATH=%CLASSPATH%;%DITA_HOME%\plugins\com.infotel.orlando.pdf\.\xslt-extension.jar"
set "CLASSPATH=%CLASSPATH%;%DITA_HOME%\plugins\org.dita.eclipsehelp\lib\eclipsehelp.jar"
...
Related
I recently run my gatling simulation scenario using maven following this tutorial,
It runs okay week ago, until recently I try to re run the scenario again then I got error
[main][ERROR][Gatling.scala:83] i.g.a.Gatling$ - Run crashed java.util.NoSuchElementException: null.
I run the scenatio with this command
mvn gatling:test -Dgatling.simulationClass=myscenario
I thought this caused by some corrupt repository? Because I see it points to gatling dependency.
I tried to reinstall the dependency with:
mvn dependency:purge-local-repository - doesn't solve the issue
mvn clean install -U - doesn't solve the issue
rm -rf ~/.m2/repository - doesn't solve the issue
Here are the logs:
[INFO] Scanning for projects...
[INFO]
[INFO] ----------< collection:collection >-----------
[INFO] Building collection 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gatling-maven-plugin:3.1.0:test (default-cli) # collection ---
16:34:00.585 [main][ERROR][Gatling.scala:83] i.g.a.Gatling$ - Run crashed
java.util.NoSuchElementException: null
at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:635)
at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
at simulations.PoolCollection.<init>(PoolCollection.scala:21)
... 16 common frames omitted
Wrapped by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.gatling.app.Runner.run0(Runner.scala:65)
at io.gatling.app.Runner.run(Runner.scala:52)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.gatling.app.Runner.run0(Runner.scala:65)
at io.gatling.app.Runner.run(Runner.scala:52)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
... 6 more
Caused by: java.util.NoSuchElementException
at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:635)
at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
at simulations.PoolCollection.<init>(PoolCollection.scala:21)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.377 s
[INFO] Finished at: 2021-01-28T16:34:00+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:3.1.0:test (default-cli) on project collection: Gatling failed.: Process exited with an error: 255 (Exit value: 255) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
The stacktrace is pretty clear: that's a coding issue on your side and Gatling is not at fault here.
Caused by: java.util.NoSuchElementException
at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:635)
at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
at simulations.PoolCollection.<init>(PoolCollection.scala:21)
Look at whatever you're doing in your PoolCollection class at line 21. You're trying to get an entry that doesn't exist from a HashMap.
I am getting the below error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/spark/streaming/flume/FlumeUtils$
at SampleStream$.main(NetworkWordCount.scala:10)
at SampleStream.main(NetworkWordCount.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:665)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:170)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:193)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:112)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused by: java.lang.ClassNotFoundException:
org.apache.spark.streaming.flume.FlumeUtils$
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
i refer below link
https://spark.apache.org/docs/1.4.1/streaming-flume-integration.html
You need to package spark-streaming-flume and its dependencies (except spark-core and spark-streaming which are provided by spark-submit) into the application JAR.
https://spark.apache.org/docs/1.6.1/streaming-flume-integration.html has a better description about deploying. You can use this doc as there is no API changes between 1.4 and 1.6.
You need to have all libraries loaded in classpath.
Add this to build.sbt file: libraryDependencies += "org.apache.spark" % "spark-streaming-flume_2.10" % "1.6.1"
I am deploying in Weblogic but I got this error:
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/application/descriptor/MungerLogger
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:823)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:413)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:779)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:792)
[java] at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:142)
[java] at weblogic.servlet.jsp.jspc20.initDescriptors(jspc20.java:537)
[java] at weblogic.servlet.jsp.jspc20.runBody(jspc20.java:273)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:158)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[java] at weblogic.jspc.main(jspc.java:22)
[java] Caused by: java.lang.ClassNotFoundException: weblogic.application.descriptor.MungerLogger
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[java] ... 10 more
deploying with the free Oracle WebLogic Server 12c (12.1.3)
I have no idea from where I can get this class from
First you need to download the jar which contains MungerLogger. In pom.xml add dependency:
com.common
jarName
x.x
Then you need to tell Weblogic to load the jar which contains the MungerLogger. Add this script into weblogic.xml or weblogic-application.xml:
the package contain MungerLogger such as com.common.
the package contain MungerLogger such as com.common.
Use this on top of weblogic.xml:
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
I am trying to compile gwt module. This error is generated , env has gwt-log-3.1.8 and gwtsdk-2.4.0. Any idea why this is happening. It used work earlier in different project.
Error :
[java] Loading inherited module 'com.allen_sauer.gwt.log.gwt-log-OFF'
[java] Loading inherited module 'com.allen_sauer.gwt.log.gwt-log-impl'
[java] [ERROR] Line 87: Unexpected exception while processing element 'property-provider'
[java] java.lang.NoClassDefFoundError: com/google/gwt/dev/js/JsKeywords
[java] at com.google.gwt.dev.js.ast.JsScope.maybeMangleKeyword(JsScope.java:56)
[java] at com.google.gwt.dev.js.ast.JsScope.declareName(JsScope.java:75)
[java] at com.google.gwt.dev.js.JsParser.mapVar(JsParser.java:1229)
[java] at com.google.gwt.dev.js.JsParser.map(JsParser.java:324)
[java] at com.google.gwt.dev.js.JsParser.mapStatement(JsParser.java:1026)
[java] at com.google.gwt.dev.js.JsParser.mapStatements(JsParser.java:1046)
[java] at com.google.gwt.dev.js.JsParser.mapBlock(JsParser.java:442)
[java] at com.google.gwt.dev.js.JsParser.mapFunction(JsParser.java:718)
[java] at com.google.gwt.dev.js.JsParser.map(JsParser.java:296)
JsKeywords class is part of gwt-dev.jar. Make sure that this jar is in classpath.
I am compiling my project in GWT with any target . I get the following error on Linux and Solaris . I can compile the Samples which came with GWT but get this error .
I am using GWT 2.0.3 and JDK 1.6.17
[java] Compiling module com.calix.ex1.webgui.ex1embeddedclient.Ex1EmbeddedGui
[java] [ERROR] Unexpected
[java] java.lang.NullPointerException
[java] at com.google.gwt.dev.javac.JdtCompiler$FindTypesInCud.visit(JdtCompiler.java:179)
[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1253)
[java] at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.traverse(QualifiedAllocationExpression.java:478)
[java] at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.traverse(ReturnStatement.java:262)
[java] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:239)
[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1350)
[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1223)
[java] at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:687)
[java] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:158)
[java] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
[java] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:467)
[java] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:142)
[java] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:281)
[java] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:182)
[java] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:280)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:502)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:201)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:159)
Maybe an answer here : GWT Issue 4552
If you neglect to add an import for an
anonymous class like so:
FocusPanel dropdown = new FocusPanel();
dropdown.addClickHandler(new BloggiDiBlook() {});
where class BloggiDiBlook is neither
in the enclosing class's package, nor
imported in the enclosing class's
.java file. There ought to be an
appropriate "Class not found" or
similar compiler error. Instead, the
JDT Compiler throws the following
NullPointerException