java.lang.NullPointerException

Spring JIRA | Michael Hunger | 8 years ago
  1. 0

    After upgrading 3.0.2 -> 3.1-beta3, a space export to PDF or HTML fails with a NPE. Note that XML exports work fine PDF export: {noformat}2009-11-20 11:02:49,486 INFO [PDF Space Export task] [confluence.velocity.htmlsa fe.PossibleIncorrectHtmlEncodingEventHandler] annotatedValueInsert $content in t emplates/extra/pdfexport/pagehtml.vm 2009-11-20 11:02:49,486 ERROR [PDF Space Export task] [core.task.longrunning.Abs tractLongRunningTask] doInTransactionWithoutResult Error during PDF export -- url: /confluence/spaces/flyingpdf/doflyingpdf.action | userName: admin | ref erer: http://winchang:8080/confluence/spaces/flyingpdf/flyingpdf.action?key=TEST | action: doflyingpdf java.lang.NullPointerException at com.atlassian.confluence.extra.flyingpdf.html.LinkFixer.<init>(LinkFi xer.java:41) at com.atlassian.confluence.extra.flyingpdf.html.RenderedXhtmlBuilder.bu ildHtml(RenderedXhtmlBuilder.java:140) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterServi ce.createPdfForSpace(FlyingSaucerPdfExporterService.java:53) at com.atlassian.confluence.extra.flyingpdf.PdfExportLongRunningTask$1.d oInTransactionWithoutResult(PdfExportLongRunningTask.java:68) at org.springframework.transaction.support.TransactionCallbackWithoutRes ult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(T ransactionTemplate.java:127) at com.atlassian.confluence.extra.flyingpdf.PdfExportLongRunningTask.run Internal(PdfExportLongRunningTask.java:53) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunni ngTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:619) {noformat} HTML export: {noformat} 2009-11-20 15:17:04,106 ERROR [Export Space task] [confluence.importexport.impl. HtmlExporter] doExportEntity Error occurred during export. -- referer: http://winchang:8080/confluence/spaces/exportspacehtml.action?key=T EST | url: /confluence/spaces/doexportspace.action | userName: admin | action: d oexportspace java.lang.NullPointerException at java.lang.String.startsWith(String.java:1422) at java.lang.String.startsWith(String.java:1451) at com.atlassian.confluence.importexport.impl.HtmlImageProcessingRule.is ConfluenceResource(HtmlImageProcessingRule.java:70) at com.atlassian.confluence.importexport.impl.HtmlImageProcessingRule.pr ocess(HtmlImageProcessingRule.java:41) at com.opensymphony.module.sitemesh.html.HTMLProcessor$2.tag(HTMLProcess or.java:99) at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parsedTag(Pars er.java:303) at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parseFullTag(P arser.java:215) at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parseTag(Parse r.java:156) at com.opensymphony.module.sitemesh.html.tokenizer.Parser.start(Parser.j ava:112) at com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer.start(Ta gTokenizer.java:33) at com.opensymphony.module.sitemesh.html.HTMLProcessor.process(HTMLProce ssor.java:90) at com.atlassian.confluence.importexport.impl.HtmlImageParser.parse(Html ImageParser.java:27) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterIm pl.exportImages(AbstractRendererExporterImpl.java:152) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntit y(HtmlExporter.java:189) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterIm pl.exportSpace(AbstractRendererExporterImpl.java:104) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(H tmlExporter.java:93) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterIm pl.doExport(AbstractRendererExporterImpl.java:87) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(Html Exporter.java:32) at com.atlassian.confluence.importexport.DefaultImportExportManager.expo rtAs(DefaultImportExportManager.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:204) at $Proxy76.exportAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningT ask$1.doInTransactionWithoutResult(ExportSpaceLongRunningTask.java:94) at org.springframework.transaction.support.TransactionCallbackWithoutRes ult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(T ransactionTemplate.java:127) at com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningT ask.runInternal(ExportSpaceLongRunningTask.java:63) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunni ngTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:619) 2009-11-20 15:17:04,106 ERROR [Export Space task] [confluence.importexport.impl. HtmlExporter] doExportEntity Entity being exported was: com.atlassian.confluence .spaces.Space@ad11d219 -- referer: http://winchang:8080/confluence/spaces/exportspacehtml.action?key=T EST | url: /confluence/spaces/doexportspace.action | userName: admin | action: d oexportspace 2009-11-20 15:17:04,122 ERROR [Export Space task] [core.task.longrunning.Abstrac tLongRunningTask] doInTransactionWithoutResult Error during export -- referer: http://winchang:8080/confluence/spaces/exportspacehtml.action?key=T EST | url: /confluence/spaces/doexportspace.action | userName: admin | action: d oexportspace com.atlassian.confluence.importexport.ImportExportException: java.lang.NullPoint erException at com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntit y(HtmlExporter.java:210) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterIm pl.exportSpace(AbstractRendererExporterImpl.java:104) at com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(H tmlExporter.java:93) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterIm pl.doExport(AbstractRendererExporterImpl.java:87) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(Html Exporter.java:32) at com.atlassian.confluence.importexport.DefaultImportExportManager.expo rtAs(DefaultImportExportManager.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:204) at $Proxy76.exportAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningT ask$1.doInTransactionWithoutResult(ExportSpaceLongRunningTask.java:94) at org.springframework.transaction.support.TransactionCallbackWithoutRes ult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(T ransactionTemplate.java:127) at com.atlassian.confluence.importexport.actions.ExportSpaceLongRunningT ask.runInternal(ExportSpaceLongRunningTask.java:63) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunni ngTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException at java.lang.String.startsWith(String.java:1422) at java.lang.String.startsWith(String.java:1451) at com.atlassian.confluence.importexport.impl.HtmlImageProcessingRule.is ConfluenceResource(HtmlImageProcessingRule.java:70) at com.atlassian.confluence.importexport.impl.HtmlImageProcessingRule.pr ocess(HtmlImageProcessingRule.java:41) at com.opensymphony.module.sitemesh.html.HTMLProcessor$2.tag(HTMLProcess or.java:99) at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parsedTag(Pars er.java:303) at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parseFullTag(P arser.java:215) at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parseTag(Parse r.java:156) at com.opensymphony.module.sitemesh.html.tokenizer.Parser.start(Parser.j ava:112) at com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer.start(Ta gTokenizer.java:33) at com.opensymphony.module.sitemesh.html.HTMLProcessor.process(HTMLProce ssor.java:90) at com.atlassian.confluence.importexport.impl.HtmlImageParser.parse(Html ImageParser.java:27) at com.atlassian.confluence.importexport.impl.AbstractRendererExporterIm pl.exportImages(AbstractRendererExporterImpl.java:152) at com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntit y(HtmlExporter.java:189) ... 22 more 2009-11-20 15:17:15,012 ERROR [DefaultQuartzScheduler_Worker-7] [atlassian.confl uence.links.ReferralTaskQueue] flush Unable to add referrer http://winchang:8080 /confluence/dashboard.action - null java.lang.NullPointerException at java.lang.String.startsWith(String.java:1422) at java.lang.String.startsWith(String.java:1451) at com.atlassian.confluence.links.DefaultReferralManager.isReferringRequ est(DefaultReferralManager.java:169) at com.atlassian.confluence.links.DefaultReferralManager.referToContent( DefaultReferralManager.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(S pringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:204) at $Proxy64.referToContent(Unknown Source) at com.atlassian.confluence.links.ReferralTask.execute(ReferralTask.java :22) at com.atlassian.confluence.links.ReferralTaskQueue.flush(ReferralTaskQu eue.java:69) at com.atlassian.quartz.jobs.TaskQueueFlushJob.doExecute(TaskQueueFlushJ ob.java:32) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.jav a:87) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJob Bean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j ava:520) {noformat}

    Atlassian JIRA | 7 years ago | Mark Hrynczak [Atlassian]
    com.atlassian.confluence.importexport.ImportExportException: java.lang.NullPoint erException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    There are many NPEs of the following form in the Confluence logs on confluence.atlassian.com {noformat} Could not execute action -- url: /styles/main-action.css | userName: jed java.lang.NullPointerException at java.lang.String.startsWith(String.java:1422) at java.lang.String.startsWith(String.java:1451) at com.atlassian.confluence.core.actions.StylesheetAction.isModuleSeparateToTheme(StylesheetAction.java:164) at com.atlassian.confluence.core.actions.StylesheetAction.execute(StylesheetAction.java:126) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:48) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:47) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:114) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.spaces.actions.SpaceAwareInterceptor.intercept(SpaceAwareInterceptor.java:67) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.actions.LastModifiedInterceptor.intercept(LastModifiedInterceptor.java:39) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.ConfluenceAutowireInterceptor.intercept(ConfluenceAutowireInterceptor.java:25) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:98) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115) at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:229) {noformat} It would appear that {{getPluginKey()}} on the theme can for some reason return null.

    Atlassian JIRA | 9 years ago | Christopher Owen [Atlassian]
    java.lang.NullPointerException
  4. 0

    db:: 4.40::BEA-101020 error ac

    hivmr.com | 2 months ago
    java.lang.NullPointerException

  1. robert.nemet 3 times, last 6 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.lang.String.startsWith()
  2. Java RT
    String.startsWith
    1. java.lang.String.startsWith(String.java:1422)
    2. java.lang.String.startsWith(String.java:1451)
    2 frames
  3. org.springframework.roo
    JLineCompletorAdapter.complete
    1. org.springframework.roo.shell.SimpleParser.isMatch(SimpleParser.java:299)
    2. org.springframework.roo.shell.SimpleParser.locateTargets(SimpleParser.java:248)
    3. org.springframework.roo.shell.SimpleParser.complete(SimpleParser.java:352)
    4. org.springframework.roo.shell.jline.JLineCompletorAdapter.complete(JLineCompletorAdapter.java:27)
    4 frames
  4. SBT
    ConsoleReader.readLine
    1. jline.ConsoleReader.complete(ConsoleReader.java:832)
    2. jline.ConsoleReader.readLine(ConsoleReader.java:518)
    3. jline.ConsoleReader.readLine(ConsoleReader.java:448)
    4. jline.ConsoleReader.readLine(ConsoleReader.java:300)
    4 frames
  5. org.springframework.roo
    Bootstrap.main
    1. org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:96)
    2. org.springframework.roo.bootstrap.Bootstrap.run(Bootstrap.java:99)
    3. org.springframework.roo.bootstrap.Bootstrap.main(Bootstrap.java:48)
    3 frames