jdemetra-app icon indicating copy to clipboard operation
jdemetra-app copied to clipboard

Can't read excel files in JDemetra

Open pablocarvallo opened this issue 1 year ago • 22 comments

Hi, I've just installed -once again- JDemetra+ v2.2.4. On another computer I can open an Excel spreadsheet without any problem, but on this computer I get this error message when I want to open the spreadsheet sheets: "RuntimeException: java.lang.RuntimeException: Fyle type not supported". I am using files with *.xlsx extension, but I have also tried with *.xls extensions, without success. The other problem is that when I open the file search window, Excel files do not appear, even though the "Spreadsheet file" option is checked in the "Files of type:" menu. So, I have to set "All files" for the Excel file to appear. I am grateful if you can guide me on how to solve this problem.

error_jdemetra

pablocarvallo avatar Sep 20 '23 20:09 pablocarvallo

Which version of Java/Windows are you using ? (see about box) Is the file a valid xlsx file ? Can you open it with Excel on the same computer ?

charphi avatar Sep 26 '23 13:09 charphi

Which version of Java/Windows are you using ? (see about box) Is the file a valid xlsx file ? Can you open it with Excel on the same computer ?

Hi Charphi. I'm using Windows 10 and Java 20.0.2.0. My xlsx files are valid, I use them in the same computer, I can use them in Stata, and I work with these spreadsheets in Excel. Thank you very much!

pablocarvallo avatar Sep 30 '23 20:09 pablocarvallo

OK, I re-read your first comment. It seems to me that your installation of JD+ v2.2.4 is somehow broken. Some resources (that allow to read Excel files) are missing. There are a few possible causes to that, antivirus being one.

I would suggest to reinstall JD+ and try again. If this doesn't work, try to compare the JD+ install folder on the problematic computer with a working one.

charphi avatar Oct 02 '23 11:10 charphi

OK, I re-read your first comment. It seems to me that your installation of JD+ v2.2.4 is somehow broken. Some resources (that allow to read Excel files) are missing. There are a few possible causes to that, antivirus being one.

I would suggest to reinstall JD+ and try again. If this doesn't work, try to compare the JD+ install folder on the problematic computer with a working one.

Hi Charphi, thanks again for your contribution. I've installed the same version of JDemetra+ in other computer and it works fine. I tried with the same excel files, and opens properly. As you suggested to me, I compared the folder and subfolders in both computers and are exactly the same. Very strange...and very frustrating :(

pablocarvallo avatar Oct 03 '23 20:10 pablocarvallo

OK; that is strange. Could you try to remove the user directory of JD+ ? (See https://github.com/jdemetra/jdemetra-app/wiki/Quick-install-guide#user-directory) Note that this will remove your JD+ preferences. You can also just move the folder instead of removing it.

charphi avatar Oct 04 '23 11:10 charphi

I also have the same issue. I've reinstalled the JDK package and NBDemetra 2.2.4 a couple of times without any change. Java is indeed installed, I've also tried to manually launch NBDemetra with the --javahome jdk-location, etc.

I've used earlier versions of NBDemetra as well, but this new version does not recognize *.xls or *.xlsx files that I've used successfully earlier. I'm not sure whether this is a problem with 2.2.4 per se, I've also found that NBDemetra is highly sensitive to certain Windows settings.

niklaag avatar Dec 04 '23 10:12 niklaag

I also have the same issue. I've reinstalled the JDK package and NBDemetra 2.2.4 a couple of times without any change. Java is indeed installed, I've also tried to manually launch NBDemetra with the --javahome jdk-location, etc.

I've used earlier versions of NBDemetra as well, but this new version does not recognize *.xls or *.xlsx files that I've used successfully earlier. I'm not sure whether this is a problem with 2.2.4 per se, I've also found that NBDemetra is highly sensitive to certain Windows settings.

I could not solve this problem. Finally, I uninstalled that version and installed version 3.2. I think it is a bit different, but at least it reads .xlsx files correctly. Link: https://github.com/jdemetra/jdplus-main/releases/tag/v3.2.0

pablocarvallo avatar Dec 04 '23 12:12 pablocarvallo

Thanks for the clarification! I also got JD 3.2.0 to read spreadsheet files.

I also tried going back to NB 2.2.3 which I've used successfully previously, but didn't get it to work now.

niklaag avatar Dec 04 '23 12:12 niklaag

This behavior is strange. It seems that some part of JDemetra+ is not loaded at runtime. There are several possibilities:

  • an overzealous antivirus or corportate policy
  • a conflict with some JDemetra+ plugin

As previoulsy commented, could you try to remove the user directory of JD+ ? (save it somewhere before) Then restart JD+, check if works or not. If not, go to the JD+ logs and look for errors.

charphi avatar Dec 04 '23 13:12 charphi

Okay, I removed the /var/cache/ and made a new attempt.

See the picture for illustration, LHS is NB 2.2.4 and RHS is JD 3.2.0. JD not only identifies the *.xlsx file, but also loads it with default settings successfully.

image

niklaag avatar Dec 04 '23 13:12 niklaag

Edit: Upon further inspection there seems to be a problem with JD as well. I can't initiate new SA multiprocesses without getting the message "undefined specification".

I'm guessing it's got something to do with an overzealous antivirus protection, need to look into this further. The big upside here is that I'm working on my own computer, meaning that there's no fishy corporate policy in place this time.

Here's the messages.log file. messages.log

niklaag avatar Dec 04 '23 13:12 niklaag

The messages.log for the JD run was in another file, here's the error message I'm trying to rectify atm (I'll let you know if I find a solution):

INFO [jdplus.toolkit.desktop.plugin.util.Installer]: ChartPanel buffer enabled SEVERE [org.netbeans.core.modules] java.lang.NullPointerException: spec is marked non-null but is null at jdplus.sa.desktop.plugin.ui.DemetraSaUI.setDefaultSaSpec(DemetraSaUI.java:129) at jdplus.sa.desktop.plugin.ui.DemetraSaUI.setConfig(DemetraSaUI.java:195) at java.base/java.util.Optional.ifPresent(Optional.java:178) at jdplus.sa.desktop.plugin.util.Installer$DemetraSaOptionsStep.restore(Installer.java:64) at jdplus.toolkit.desktop.plugin.util.InstallerStep$AllInstallerStep.restore(InstallerStep.java:165) at jdplus.sa.desktop.plugin.util.Installer.restored(Installer.java:48) at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:447) [catch] at org.netbeans.core.startup.NbInstaller.loadImpl(NbInstaller.java:370) at org.netbeans.core.startup.NbInstaller.access$000(NbInstaller.java:77) at org.netbeans.core.startup.NbInstaller$1.run(NbInstaller.java:322) at org.openide.filesystems.FileUtil$2.run(FileUtil.java:420) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:404) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:424) at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:319) at org.netbeans.ModuleManager.doEnable(ModuleManager.java:1507) at org.netbeans.ModuleManager.enable(ModuleManager.java:1350) at org.netbeans.ModuleManager.enable(ModuleManager.java:1275) at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:316) at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:252) at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:298) at org.netbeans.core.startup.Main.getModuleSystem(Main.java:173) at org.netbeans.core.startup.Main.getModuleSystem(Main.java:142) at org.netbeans.core.startup.Main.start(Main.java:303) at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98) at java.base/java.lang.Thread.run(Thread.java:1583)

niklaag avatar Dec 05 '23 08:12 niklaag

The messages.log for the JD run was in another file, here's the error message I'm trying to rectify atm (I'll let you know if I find a solution):

This is a bug in JD+ v3.2.0 that will be fixed in the next release.

Edit: Upon further inspection there seems to be a problem with JD as well. I can't initiate new SA multiprocesses without getting the message "undefined specification".

There is no default specification set during installation. You need to define your own default specification in JD+ settings: see Tool>Options>SA>General>Seasonal Adjustment>Default method

2023-12-05 10_46_41-Options

charphi avatar Dec 05 '23 09:12 charphi

Excellent! All is in working condition now, thanks a million.

niklaag avatar Dec 05 '23 13:12 niklaag

@pablocarvallo how are you installing JDemetra+ v2.2.4? Are you using jdemetra-2.2.4-setup-windows.exe or jdemetra-2.2.4-bin.zip?

charphi avatar Dec 05 '23 13:12 charphi