xinminlabs / openfire-apns-plugin

openfire-apns-plugin is used to integrate Apple Push Notification Service to Openfire.
57 stars 33 forks source link

org.apache.jasper.JasperException: java.lang.NullPointerException: charsetName Failure processing jsps #4

Open mayankmon opened 9 years ago

mayankmon commented 9 years ago

In the last step the error is as follow:-

[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building APNS Service [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting /home/eduos/openfire/openfire-apns-plugin/target [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/eduos/openfire/openfire-apns-plugin/src/main/resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Changes detected - recompiling the module! [INFO] Compiling 4 source files to /home/eduos/openfire/openfire-apns-plugin/target/classes [INFO] [openfire:jspc {execution: default-jspc}] 2015-01-03 16:46:05.952::INFO: Logging to STDERR via org.mortbay.log.StdErrLog java.lang.NullPointerException: charsetName at java.io.OutputStreamWriter.(OutputStreamWriter.java:99) at org.apache.jasper.compiler.JDTJavaCompiler.getJavaWriter(JDTJavaCompiler.java:120) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362) at org.apache.jasper.JspC.processFile(JspC.java:1137) at org.apache.jasper.JspC.execute(JspC.java:1306) at com.reucon.maven.plugin.openfire.jspc.JspcMojo.compile(JspcMojo.java:279) at com.reucon.maven.plugin.openfire.jspc.JspcMojo.execute(JspcMojo.java:196) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] : org.apache.jasper.JasperException: java.lang.NullPointerException: charsetName Failure processing jsps [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Sat Jan 03 16:46:06 IST 2015 [INFO] Final Memory: 25M/217M [INFO] ------------------------------------------------------------------------

I have tried openfire3.9.3 and 3.8.2. I have also tried changing the maven-plugin pom.xml to maven 2.1.0. Please help!!

paulo-ogilvie commented 9 years ago

As posted on the other thread, I got this working after many days of work.

The solution is to use maven 2.2.1, and re-install maven-openfire-plugin , openfire.jar , then finally openfire-apns-plugin . This has been a challenge for me also. I don't know if it helped, but I added the stanza

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
</properties>

right before the close tag in maven-openfire-plugin-master/pom.xml when i got it to compile.

ghost commented 9 years ago

I just ran into the exact same problem with maven 2.2.1 and openfire (both 3.8.2 and 3.10.0). Using the UTF-8 property did not help. Any suggestions?

ghost commented 9 years ago

Upgraded to maven 3.0.5 and it worked :)

RobinPeens commented 8 years ago

remove maven2 and install maven.. then rebuild the maven plugin and the apns plugin...

BhaveshPatadiya commented 8 years ago

Anybody facing the same issue? I just couldn't able to get ride of this issue.

pburlov commented 7 years ago

Put javaEncoding element in your pom.xml

<plugin>
    <groupId>com.reucon.maven.plugins</groupId>
    <artifactId>maven-openfire-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
      <javaEncoding>UTF-8</javaEncoding>
    </configuration>
    <version>1.0.2-SNAPSHOT</version>
  </plugin>