iReport 4.1.3: Unable to add jars and folders to classpath in Win7 - jasper-reports

I'm running the iReport 4.1.3 using Java 5 in Windows 7. It used to run perfectly with XP. Now as i'm trying to add jars or folders it is throwing ArrayIndexOutOfBoundsException in the logs. Are there any compatibility issues with Win7.
Can I modify the classpath file in the software without using GUI. Any pointers will be helpful. Thanks.
Here is the log:
java.lang.ArrayIndexOutOfBoundsException: 3184
at sun.awt.shell.Win32ShellFolder2.getFileChooserIcon(Win32ShellFolder2.java:748)
at sun.awt.shell.Win32ShellFolderManager2.get(Win32ShellFolderManager2.java:248)
at sun.awt.shell.ShellFolder.get(ShellFolder.java:221)
at com.sun.java.swing.plaf.windows.WindowsLookAndFeel$LazyWindowsIcon.createValue(WindowsLookAndFeel.java:1873)
at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:185)
at javax.swing.UIDefaults.get(UIDefaults.java:130)
at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:44)
at javax.swing.UIDefaults.getIcon(UIDefaults.java:411)
at javax.swing.UIManager.getIcon(UIManager.java:613)
at javax.swing.plaf.basic.BasicFileChooserUI.installIcons(BasicFileChooserUI.java:237)
at javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:219)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:135)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:126)
at javax.swing.JComponent.setUI(JComponent.java:653)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1755)
at javax.swing.JFileChooser.setup(JFileChooser.java:366)
at javax.swing.JFileChooser.<init>(JFileChooser.java:341)
at javax.swing.JFileChooser.<init>(JFileChooser.java:300)
at com.jaspersoft.ireport.designer.options.IReportPanel.jButtonAddClasspathItemActionPerformed(IReportPanel.java:2216)
at com.jaspersoft.ireport.designer.options.IReportPanel.access$2000(IReportPanel.java:84)
at com.jaspersoft.ireport.designer.options.IReportPanel$27.actionPerformed(IReportPanel.java:938)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:5501)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5266)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3968)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Looks like there is a issue with the jdk5. Updating to jdk7 worked. Here is the link
http://community.jaspersoft.com/questions/531699/unable-add-folder-options-classpath

Related

Eclipse CDT 4.11.0 crashes with SWT library not found error

I am trying to get Eclipse 4.11.0 running on my RHEL 6.10 system but it crashes when I try to run it. It points me to a log file that states:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I tried running it again and it crashed again with a different log file entry:
...UnsatisfiedLinkError Could not load SWT library
It was looking for:
~/.swt/lib/linux/x86_64/libswt-pi4-gtk-4924r25.so
but the only file in that directory was libswt-pi3-gtk-4924r25.so
I also found libswt-pi3-gtk-4924r25.so in eclipse/configuration/org.eclipse.osgi/458/0/.cp.
I removed my ~/.swt directory and ran it again. Once again I got:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I noticed that it made the ~/.swt/… directory structure and put the libswt-pi3-gtk-4924r25.so file in it so I tried to run it again and it (not surprisingly) gave me the following:
...UnsatisfiedLinkError Could not load SWT library
Does this have something to do with the version of gtk that I'm running on my system? Why does eclipse include the libswt-pi3-gtk.4924r25.so library in their installation, then look for the libswt-pi4-gtk-4924r25.so library?
Installing libgthread resolved the issue for me (SLES15, GTK3).

Scenicview 8.7 cannot find JavaFX Application

Loading Scenicview.jar version 8.7 on Windows 10 (Version 10.0.16299.726) in Java 8 via cmd line:
"C:\Program Files\Java\jre1.8.0_181\bin\java.exe" -Dprism.verbose=true -Djavafx.verbose=true -jar "Scenicview.jar"
I get the following error in the cmd output:
Loaded C:\Program Files\Java\jre1.8.0_181\lib\ext\..\..\bin\jfxwebkit.dll from relative path
Startup done
Creating server
Server done
Exception in thread "org.scenicview.model.update.RemoteVMsUpdateStrategy" java.lang.UnsatisfiedLinkError: sun.tools.attach.WindowsAttachProvider.tempPath()Ljava/lang/String;
at sun.tools.attach.WindowsAttachProvider.tempPath(Native Method)
at sun.tools.attach.WindowsAttachProvider.isTempPathSecure(WindowsAttachProvider.java:91)
at sun.tools.attach.WindowsAttachProvider.listVirtualMachines(WindowsAttachProvider.java:75)
at com.sun.tools.attach.VirtualMachine.list(VirtualMachine.java:147)
at org.fxconnector.remote.RemoteConnectorImpl.getRunningJavaFXApplications(RemoteConnectorImpl.java:360)
at org.fxconnector.remote.RemoteConnectorImpl.connect(RemoteConnectorImpl.java:251)
at org.scenicview.model.update.RemoteVMsUpdateStrategy.getActiveApps(RemoteVMsUpdateStrategy.java:57)
at org.scenicview.model.update.RemoteVMsUpdateStrategy.work(RemoteVMsUpdateStrategy.java:77)
at org.fxconnector.helper.WorkerThread.run(WorkerThread.java:43)
Loading Prism common native library ...
Loaded C:\Program Files\Java\jre1.8.0_181\lib\ext\..\..\bin\prism_common.dll from relative path
succeeded.
The Scenicview application runs up but does not find a JavaFX application that is also running in Java8. The searching... icon just keeps spining.
Has anyone expericenced this?
I was using the JRE java.exe. If I use the JDK version it works without issue.
Duplicate of ScenicView Javafx java.lang.UnsatisfiedLinkError

libgdx can't start desktop project on ubuntu

so, I just created libgdx project for desktop and imported it (gradle) to eclipse. When I launch it this error pops up:
Exception in thread "LWJGL Application" java.lang.ExceptionInInitializerError
at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:446)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:118)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.lwjgl.opengl.LinuxDisplay.getAvailableDisplayModes(LinuxDisplay.java:954)
at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:738)
at org.lwjgl.opengl.Display.<clinit>(Display.java:138)
... 2 more
AL lib: (EE) alc_cleanup: 1 device not closed
I can't figure out what's happening. Project's created for android and launched in android studio working properly.
You need to install the xorg-xrandr package, see
http://badlogicgames.com/forum/viewtopic.php?f=11&t=18801
This is a known issue, try to install xorg-xrandr.
Also, I fixed this issue by installing bumblebee.
This error disappeared for me after I switched from the default lwjgl backend (that is for some reason still used in the tool to generate a LibGDX project) to lwjgl3 backend. This is how you do it for a project freshly generated with gdx-setup.jar (doc):
In build.gradle change
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
to
compile "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
In DesktopLauncher class, change
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
new LwjglApplication(new Game(), config);
to
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
new Lwjgl3Application(new Game(), config);
and modify imports to
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
so basically just add 3 after lwjgl in those two places.

iReport 4.5.1 throwing ArrayIndexOutOfBoundException

Getting following error message while loading iReport 4.5.1 new install:
java.lang.ArrayIndexOutOfBoundsException: 3184
at sun.awt.shell.Win32ShellFolder2.getFileChooserIcon(Win32ShellFolder2.java:748)
at sun.awt.shell.Win32ShellFolderManager2.get(Win32ShellFolderManager2.java:248)
at sun.awt.shell.ShellFolder.get(ShellFolder.java:221)
at com.sun.java.swing.plaf.windows.WindowsLookAndFeel$LazyWindowsIcon.createValue(WindowsLookAndFeel.java:1873)
at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:185)
at javax.swing.UIDefaults.get(UIDefaults.java:130)
at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:44)
at javax.swing.UIDefaults.getIcon(UIDefaults.java:411)
at javax.swing.UIManager.getIcon(UIManager.java:613)
at javax.swing.plaf.basic.BasicFileChooserUI.installIcons(BasicFileChooserUI.java:237)
at javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:219)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:135)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:126)
at javax.swing.JComponent.setUI(JComponent.java:653)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1755)
at javax.swing.JFileChooser.setup(JFileChooser.java:366)
at javax.swing.JFileChooser.<init>(JFileChooser.java:341)
at javax.swing.JFileChooser.<init>(JFileChooser.java:300)
at com.jaspersoft.ireport.designer.options.IReportPanel.jButtonAddClasspathItemActionPerformed(IReportPanel.java:2216)
at com.jaspersoft.ireport.designer.options.IReportPanel.access$2000(IReportPanel.java:84)
at com.jaspersoft.ireport.designer.options.IReportPanel$27.actionPerformed(IReportPanel.java:938)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:5501)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5266)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3968)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
This is known issue for iReport running on Vista or Windows 7.
You can try to upgrade your JVM to 1.7 (in some cases the 1.6) version.
For more details you can read this posts on JasperForge.org:
Unable to "Add Folder" to the Options -> Classpath
Error java 3184 when trying to open a document
UPDATE:
You can set the JDK for iReport via ireport.conf file in iReport-x.y.z\etc folder. With help of jdkhome property we can set the JDK path.
The sample:
jdkhome="/path/to/jdk"
I've just found that this problem might be caused by something else than JDK version. I'm running iReport 4.5.1 on windows 7 and tried JDK 1.6 and 1.7 getting the same error. Than I found that problem is related to some fields retrived by SQL statement (Stored Procedure in mssql 2008 R2). Problem was ntext field casted to java.lang.String. I changed field class to java.sql.Clouds and found that report is generated (but this column is unreadable). When I was messing with different types I found that the problem was column width. As my procedure retrives many parameters I have many "thin" columns in design generated by wizard. When I resize (enlarge) ntext result column on the layout and click "preview" everything is fine, when column is to thin to fill data (one letter width, because wraps are correct) I'm getting this error:
Error filling print... 0
java.lang.ArrayIndexOutOfBoundsException: 0 
I've tested it few times, so without any doubt this was the problem in my case not JDK.

"Error while loading manipulator"

I'm continually getting the following error under Eclipse Galileo while trying to install the WTP Web Page Editor plugin:
java.lang.IllegalStateException: Error while loading manipulator.
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:54)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:108)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.installBundle(InstallBundleAction.java:76)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.execute(InstallBundleAction.java:29)
at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:35)
at org.eclipse.equinox.internal.provisional.p2.engine.Phase.mainPerform(Phase.java:129)
at org.eclipse.equinox.internal.provisional.p2.engine.Phase.perform(Phase.java:72)
at org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet.perform(PhaseSet.java:44)
at org.eclipse.equinox.internal.provisional.p2.engine.Engine.perform(Engine.java:54)
at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.performProvisioningPlan(ProvisioningUtil.java:389)
at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation.doExecute(ProfileModificationOperation.java:61)
at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation.execute(ProvisioningOperation.java:37)
at org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner$1.run(ProvisioningOperationRunner.java:94)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
One blog said Eclipse Galileo doesn't play well with Java 1.6 (what??), so I've tried running Eclipse with Java 1.5 but that hasn't helped. Has anyone else had this problem and been able to get around it?
Edit BTW, below the error in the error log it also says
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Install, operand=null --> [R]javax.mail 1.4.0.v200905040518, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
You can try to follow the various suggestions mentioned in the bug 277242
Also check your eclipse.ini:
More generally, the error you're seeing can happen when we cannot read "-startup" since we use this to position the install.area.
As suggested by Jelle van Geuns in the comments (and confirmed by Halfstop):
I found that one MacOS there are two folders (MacOS and Eclipse) with two separate sets of configuration files.
Each had an 'org.eclipse.equinox.launcher' startup jar in the plugins sub-folder, but with slightly different versions.
The Eclipse executable resides in the MacOS folder.
But the eclipse.ini there was set up to look for the startup jar under Eclipse/plugins, but with the wrong version.
Solution that worked for me was to copy both versions of the startup.jar to both the plugins sub-folders.
Halfstop confirms:
I copied all of the what was in Eclipse to the MacOS directory and this solved it.
I just ran into this problem today. The answer provided by VonC et al helped to locate the problem but didn't quite fix it.
In my case, the location specified in -startup within the MacOS/eclipse.ini was incorrectly looking in the ../Eclipse/plugins folder rather than the ../MacOS/plugins folder.
I corrected the path and the error went away.
try to chown -R your_user_name:your_user_name /path/to/eclipe
Try edit
Eclipse/configuration/config.ini.
Make sure osgi.instance.area.default= value is right workspace. This works for me.
I'm not sure if the above answers adequately resolve this issue. I've found that, with a number of our eclipse derivative RCP products, that on some linux machines plugins will fail with log entries like this one:
!ENTRY org.eclipse.equinox.p2.engine 4 4 2017-02-23 12:00:49.492
!MESSAGE An error occurred while installing the items
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2017-02-23 12:00:49.492
!MESSAGE session context was:(profile=TIBCOBusinessStudio-4.0, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]com.tibco.eclipse.p2.installer 1.1.3.20161130, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2017-02-23 12:00:49.492
!MESSAGE Error while loading manipulator.
!STACK 0
java.lang.IllegalStateException: Error while loading manipulator.
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:59)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:108)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.installBundle(InstallBundleAction.java:75)
at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.execute(InstallBundleAction.java:32)
at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:38)
at org.eclipse.equinox.internal.p2.engine.Phase.mainPerform(Phase.java:183)
at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:95)
at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:47)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:75)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44)
at org.eclipse.equinox.p2.operations.ProvisioningSession.performProvisioningPlan(ProvisioningSession.java:159)
at org.eclipse.equinox.p2.operations.ProfileModificationJob.runModal(ProfileModificationJob.java:79)
at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:177)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The reason this happens (I suspect) is that the actual file name of the config file is compared with the absolute name by the lazyloader. In my case the home dir is a symlink, so the two names don't match. The resolution was to edit the eclipse.ini (or whatever yours is called) and ensure that all the paths referencing the eclipse home dir are fully qualified and do not rely on symlinks.