NullPointerException when running Crystal reports with SP24 for Eclipse - java

We are trying to upgrade to SP24 of Crystal Report for Eclipse but have found that several of our reports are failing with a NullPointerException when generating the report. I've included the stack trace below - does anyone have any idea what may be wrong or have any workarounds, please?
Changing Main Report Table Connection Info
Changing Sub Report Table Connection Info
Setting Parameters of Main Reports
Starting Verify database
Completed Verify database
Setting Parameters of Sub Reports
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:238)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:148)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:129)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:112)
at us.nm.state.hsd.aspen.business.batch.rp.crystal.RpJRCExportReport.runReportExport(RpJRCExportReport.java:742)
at us.nm.state.hsd.aspen.business.batch.rp.crystal.RpScheduleReportRun.process(RpScheduleReportRun.java:177)
at us.nm.state.hsd.aspen.business.batch.rp.crystal.RpScheduleReportRun.drive(RpScheduleReportRun.java:263)
at us.nm.state.hsd.aspen.business.batch.rp.crystal.RpScheduleReportRun.main(RpScheduleReportRun.java:286)
Caused by: java.lang.NullPointerException
at com.crystaldecisions.reports.formatter.formatter.objectformatter.d.a(SourceFile:154)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:332)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:250)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.a(SourceFile:922)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.e(SourceFile:784)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.f.e(SourceFile:383)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.for(SourceFile:242)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)
...

Just in case someone else is running into the same problem here.
Problem is: Newer JDK versions are not shipped with a lib/fonts folder which the Crystal Report engine expects.
A somewhat unsatisfying, but working solution is:
Create a fonts folder -> %JAVA_HOME%/lib/fonts
Copy fonts from 'Windows\Fonts' into %JAVA_HOME%/lib/fonts.
Problem should be solved then.

I have got the same issue, copying the jre/lib/fonts folder from Java8 to Java 11
-jdk/lib/fonts solved the issue.

Related

NetBeans IDE 12.5 no Project Open

I'm running NetBeans IDE 12.5 with Java 1.8.0_311 on Mac OS 11.16 Big Sur.
No Folders are displayed in the Projects Window, no difference with new created or old projects.
I already adjusted the netbeans.conf to the right JDK home directory:
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home"
Also I get an Unexpected Exception - java.lang.NullPointerException in the notifications when trying to open a project.
Full trace:
java.lang.NullPointerException
at org.netbeans.modules.j2ee.metadata.model.api.support.annotation.AnnotationModelHelper.runJavaSourceTaskWhenScanFinished(AnnotationModelHelper.java:190)
at org.netbeans.modules.j2ee.dd.impl.webservices.annotation.WebservicesMetadataModelImpl.runReadActionWhenReady(WebservicesMetadataModelImpl.java:80)
at org.netbeans.modules.j2ee.metadata.model.api.MetadataModel.runReadActionWhenReady(MetadataModel.java:160)
at org.netbeans.modules.websvc.core.jaxws.projects.JavaEEWSOpenHook.projectOpened(JavaEEWSOpenHook.java:80)
at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:60)
at org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectOpened(UILookupMergerSupport.java:223)
at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:60)
[catch] at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1323)
at org.netbeans.modules.project.ui.OpenProjectList.access$1600(OpenProjectList.java:116)
at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.loadOnBackground(OpenProjectList.java:513)
at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.run(OpenProjectList.java:384)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
I found a similar question on stack overflow where adjusting the config file was mentioned as a possible solution.
Output from IDE Log:
WARNING [org.netbeans.modules.options.keymap.LayersBridge]: Invalid shortcut: org.openide.loaders.XMLDataObject#20e83598[MultiFileObject#19d29edf[Actions/Help/master-help.xml]]
WARNING [org.netbeans.modules.options.keymap.LayersBridge]: Invalid shortcut: org.openide.loaders.BrokenDataShadow#72ee9bcd[MultiFileObject#58de53e0[Keymaps/NetBeans/D-BACK_QUOTE.shadow]]
WARNING [null]: Last record repeated again.
Any other ideas?
Thanks!

JIRA's “SafePluginPointAccess” reporting my plugin is producing a NullPointerException—how do I get at the stack trace?

I'm trying to build a custom field type for JIRA, but whenever I add my field to an issue, JIRA says the following:
The field was added successfully, but you do not have edit permissions.
However, in the stdout of atlas-run, I get the following line:
[INFO] [talledLocalContainer] 2017-04-24 09:31:20,813 http-nio-2990-exec-11 WARN adam 571x584x2 fgpziy 0:0:0:0:0:0:0:1 /secure/AjaxIssueEditAction!default.jspa [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.
In target/jira/home/log/atlassian-jira.log I can see exactly the same thing; both have that one-line error message and nothing else.
Is there anywhere I can go to find a stacktrace for the NullPointerException that's being reported here, so I can tell which bit of my code it's coming from?
I've tried running atlas-run --jvmargs -XX:-OmitStackTraceInFastThrow, but I still get the same output.
If you're on a JIRA version before 7.2, it could be related to this issue which is a bug in JIRA itself.
To answer your question, you can use the atlas-debug command, which lets you attach a Java remote debugging tool to JIRA.

UnsatisfiedLinkError and NoClassDefFoundError : Running Java Mapscript on Ubuntu 11.10

We have coded and run a dynamic web application using MAPSERVER(Version 6.0.1) on windows platform using Java Technology. Now, there is need of deploying it on Ubuntu 11.10. We have installed Apache Tomcat 6.0, Mapserver 6.0.1, Apache 2.0, and FWTools-2.0.1(As this package contain all required tools for mapserver if I am not wrong, so I didn't feel any other tools to be installed). We have deployed the war file(and put application without) in Apache Tomcat 's Webapps folder. I even got the index page which dont have code related with mapscript api. But while fetching the other servlet with mapscript we are getting following error...
java.lang.UnsatisfiedLinkError: no mapscript in java.library.path
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
java.lang.Runtime.loadLibrary0(Runtime.java:840)
java.lang.System.loadLibrary(System.java:1047)
edu.umn.gis.mapscript.mapscriptJNI.<clinit>(mapscriptJNI.java:23)
edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:283)
Again while refreshing the browser page where the above error was displayed, I got a change,
java.lang.NoClassDefFoundError: Could not initialize class
edu.umn.gis.mapscript.mapscriptJNI
edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:283)
I searched on net about the above problem. But finally blank. Please, provide idea about the above problem.
I'm not going to explain why you're getting the UnsatisfiedLinkError, but instead I'll explain why you are getting the NoClassDefFoundError when you reload the page.
A NoClassDefFoundError with a message Could not initialize class ... is thrown by the JVM when it attempts to initialize a class that it has already tried and failed to initialize.
The first of your two stacktraces contains the line
edu.umn.gis.mapscript.mapscriptJNI.<clinit>(mapscriptJNI.java:23)
The method name <clinit> denotes the static initializer, of the class mapscriptJNI. So, at the point that the UnsatisfiedLinkError was thrown, the JVM was trying to initialize this class. Looking at the error message, it seems that this static initializer tried to load the native code library mapscript but failed.
This UnsatisfiedLinkError causes the mapscriptJNI class to fail to initialize successfully. The JVM keeps a record of all classes that fail to initialize, and if you attempt to initialize one of those classes again, you'll get a NoClassDefFoundError with a message saying that it could not initialize that class.
When you refresh the page, you end up causing the JVM to attempt to initialize the class mapscriptJNI a second time. Of course, this class failed to initialize the previous time. Your second stacktrace contains exactly the error I've described.
In short, the UnsatisfiedLinkError is the real error here. Fix that and the other one will go away.
I would check the following 2 items:
Is the mapscript.jar file on Tomcat or at least your webapp's classpath? (NoClassDefFoundError is your big clue here)
Is the libmapscript.so on either your LD_LIBRARY_PATH or -Djava.library.path? (UnsatisfiedLinkError since the shared object cannot be found)
Try having a look at this post, near the Running Java Mapscript (on Linux) section.
Hope that helps!

Java EE "JDI Event Dispatch" error

When I try to debug any project in Java EE INDIGO (64 bit) in win 7 and place a breakpoint somewhere the program acts as expected but when I hit f6 or f5 to go further eclipse throws an error which reads (I have Spring installed):
An internal error occurred during: "JDI Event Dispatch".
com.springsource.sts.groovy.debug.core.GroovyDebugProvider.isAlwaysInteretingLaunch()Z
(No typo, "Z" does appear)
Now I can't debug any program because it always gives this error. Can anyone help?
From the eclipse error log:
!MESSAGE com.springsource.sts.groovy.debug.core.GroovyDebugProvider.isAlwaysInteretingLaunch()Z
!STACK 0
java.lang.AbstractMethodError: com.springsource.sts.groovy.debug.core.GroovyDebugProvider.isAlwaysInteretingLaunch()Z
at org.eclipse.contribution.jdt.debug.DebugHooksAspect.isInterestingLaunch(DebugHooksAspect.aj:253)
at org.eclipse.contribution.jdt.debug.DebugHooksAspect.ajc$inlineAccessMethod$org_eclipse_contribution_jdt_debug_DebugHooksAspect$org_eclipse_contribution_jdt_debug_DebugHooksAspect$isInterestingLaunch(DebugHooksAspect.aj:1)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.getStepFilters_aroundBody1$advice(JDIDebugTarget.java:195)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.getStepFilters(JDIDebugTarget.java:1)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.attachFiltersToStepRequest(JDIThread.java:2154)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.createStepRequest(JDIThread.java:2065)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.createStepRequest(JDIThread.java:2040)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.step(JDIThread.java:1989)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.stepOver(JDIThread.java:1412)
at org.eclipse.jdt.internal.debug.core.model.JDIStackFrame.stepOver(JDIStackFrame.java:418)
at org.eclipse.debug.internal.core.commands.StepOverCommand.step(StepOverCommand.java:27)
at org.eclipse.debug.internal.core.commands.StepCommand.doExecute(StepCommand.java:34)
at org.eclipse.debug.core.commands.AbstractDebugCommand$1.run(AbstractDebugCommand.java:213)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
This seems to be a similar bug to this bug in codehaus jira (see comments section). I was able to switch back to an older eclipse installation (from two weeks ago) to get rid of the current problem and will upgrade to Eclipse 3.7 as soon as time permits.
As crazy as this sounds, I too was getting this error when debugging an Android App and trying to step into a specific method, and resolved it by renaming the method I was trying to step into.
I had tried:
completely reinstalling the app
cleaning in Eclipse
reboot of device (phone), OS, and restart of Eclipse
increasing debug timeouts in Preferences | Java | Debug
My method was called "getMessageInfoFromDb"... and was in a class that didn't extend anything, but implemented Serializable ;-)
Try disabling simple step filtering, especially filtering of simple getters.
delete the Temp folder from yourlocalpath\domainfolder\server\AdminServer
domains\base_domain\servers\AdminServer
Have you done any DB import twice or more time on the same DB that you use for the application in which you are running in debug mode. Because I am also getting similar error with the caption JDI while starting Application Server with deployed .ear in Eclipse based IDE as a popup.
When db is imported twice user created tables gets imported if it's been tried in the same kind of databases. But Oracle App & System Specific tables throws error in process of importing. And some crash in that....
I hope this is what scenario yours as well....
In my scenario I had imported Oracle db from UNIX environment to Oracle XE in Windows environment.

tortoise svn fails to import to repository due to Inconsistent line ending style

I was very excited to see that there is a check-style like plugin called CheckStyle-IDEA plugin for IntelliJ that i can enforce code style on the source.
I installed it using the IDE plugin repository, restarted it.
Unfortunately After pressing the check this file or check project I got the an exception (see log below).
I am using windows 7 pro,
IDEA 10.0.3 build #103.255 Build on April 2011
JDK 1.6.0_21
did anyone encountered this problem?
is there any other tool to do this job through the intelliJ IDE?
Thanks
2011-05-05 11:41:56,723 [1300492] INFO - ea.checkstyle.CheckStylePlugin - Scanning current file(s).
2011-05-05 11:41:56,727 [1300496] ERROR - style.checker.CheckFilesThread - An error occurred while scanning a file.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:409)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:72)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.charAt(String.java:686)
at java.util.regex.Matcher.appendReplacement(Matcher.java:703)
at java.util.regex.Matcher.replaceAll(Matcher.java:813)
at java.lang.String.replaceAll(String.java:2189)
at org.infernus.idea.checkstyle.util.ScannableFile.parentDirFor(ScannableFile.java:72)
at org.infernus.idea.checkstyle.util.ScannableFile.createTemporaryFileFor(ScannableFile.java:58)
at org.infernus.idea.checkstyle.util.ScannableFile.(ScannableFile.java:40)
at org.infernus.idea.checkstyle.checker.CreateScannableFileAction.run(CreateScannableFileAction.java:60)at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:757) at org.infernus.idea.checkstyle.checker.FileScanner.createTemporaryFile(FileScanner.java:228)
at org.infernus.idea.checkstyle.checker.FileScanner.checkPsiFile(FileScanner.java:167)
at org.infernus.idea.checkstyle.checker.FileScanner.run(FileScanner.java:80)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:770) at org.infernus.idea.checkstyle.checker.CheckFilesThread.runFileScanner(CheckFilesThread.java:39) at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.processFilesForModuleInfoAndScan(AbstractCheckerThread.java:132)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:57)
Checkstyle-idea plugin is sadly rather buggy :(
You can post or view issues at http://code.google.com/p/checkstyle-idea/ and get much faster support than here.

Categories