3.4.6 Restoring projects - bug?

Panda Kay, geändert vor 12 Jahren.

3.4.6 Restoring projects - bug?

Youngling Beiträge: 24 Beitrittsdatum: 02.11.11 Neueste Beiträge
I am using a trial version of the Enterprise Edition (EE), version 3.4.6, to check out what benefits it would be to upgrade to EE 3.4.6 from the Community Version (CE) 3.4.6.

I could not find whether this has previously been reported, so I give it a shot.

I have unsuccessfully tried to restore a project from a backup file. Backing up seems to go without trouble, but when restoring the project, the error message "Unable to upload the file due to validation error: null" is shown.

I have tried this both for a new project created in EE 3.4.6 and for a test project which was created in CE, version 3.4.5. Both times I backed the projects up and tried to restore them in EE 3.4.6.

I have also tested this in version 3.2.3 of the Community Edition, and it worked as expected here.

Does this happen for others as well? Any suggestions?
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Jedi Council Member Beiträge: 755 Beitrittsdatum: 12.02.09 Neueste Beiträge
Can you please send your backup file to support@verit.de so we can reproduce this issue?

If like you can obfuscate this with the XSLT script found here, but I would prefer the original file.

Thanks for your feedback,

Torsten
Panda Kay, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Youngling Beiträge: 24 Beitrittsdatum: 02.11.11 Neueste Beiträge
Backup file is now sent as requested.
Thank you.
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Jedi Council Member Beiträge: 755 Beitrittsdatum: 12.02.09 Neueste Beiträge
Thanks a lot for the sample!

We failed to reproduce this error on two different 3.4.6 installations so this must be a corner case. It would be great if you can give us some detail here:

Can you please describe what steps you did take (regarding projects)?
Did you delete the backed up project?
Did you purge it?
I assume you are using the builtin Derby as your database?

Thanks in advance,

Torsten
Panda Kay, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Youngling Beiträge: 24 Beitrittsdatum: 02.11.11 Neueste Beiträge
Torsten Stolpmann:
Can you please describe what steps you did take (regarding projects)?


I am unsure as to what information you need here.
The file I sent contained a project which I created in EE 3.4.6. After creating it, I then:
(1) renamed the project
(2) created a test case
(3) created a test suite
(4) assigned the test case to the test suite
(5) navigated to configure, clicked Backup project
(6) selected the project
(7) saved the backup file
(8) clicked Restore project
(9) selected the backup file
(10) Clicked Upload button
(11) Error message is displayed in log.

I also created a new "empty" project where the same happens.
Previously I updated to v3.4.6 by installing it "over" the existing v3.4.5 without uninstalling it first.
However, just now I uninstalled Klaros and re-installed it, but it made no difference.

Torsten Stolpmann:
Did you delete the backed up project?

No.

Torsten Stolpmann:
Did you purge it?

No.

I tried to delete and purge the backed up project and then restore it now, but this did not make a difference.
Earlier today I used the same procedure as described above to back up and restore a project in CE v3.2.3, which worked perfectly.

Torsten Stolpmann:
I assume you are using the builtin Derby as your database?

Yes. I have not made any changes to the original set-up.

I hope this answers your questions. Thank you.
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Jedi Council Member Beiträge: 755 Beitrittsdatum: 12.02.09 Neueste Beiträge
Thanks, this helps a lot. So I get that you are not shown a list of projects (with one entry in your case) like the one shown below?

If this is true, something must be wrong with your file upload mechanism.

Is it possible for your to upload attachments to a test case?
What is your Maximum Upload File Size setting on Configuration / System Parameters / General?

The file upload happens to a physical location in your temp directory, it would be interesting to know if what is stored in the C:\Users\<<Your User Name>>\AppData\Local\Temp\.klaros-temp directory is the complete backup file.

Thanks for your support,

Torsten
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Jedi Council Member Beiträge: 755 Beitrittsdatum: 12.02.09 Neueste Beiträge
Never mind I am pretty sure this is pin-pointed now:

If your java.io.tmpdir setting is not ending in a file seperator (/ or \) and the directory containing this temp folder is not writable this bug is triggered (amongst other problems uploading attachments).

Thanks a lot for your high quality input which really helped getting this fixed!

As a workaround you may add a -Djava-io-tmpdir=<YourTmpDirEndingWithASeperator> to the java options defined in catalina.(sh|cmd). I see that we get a fixed version out RSN.

Regards,

Torsten
Panda Kay, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Youngling Beiträge: 24 Beitrittsdatum: 02.11.11 Neueste Beiträge
Torsten Stolpmann:
I get that you are not shown a list of projects (with one entry in your case) like the one shown below?

If this is true, something must be wrong with your file upload mechanism.

Yes, this is true, the list of projects contained by the backup file is not shown. When I restore a project in CE 3.2.3, the project list is shown as in the image.

Torsten Stolpmann:
Is it possible for your to upload attachments to a test case?

Yes. It is. No problems uploading attachments (as long as the file is not empty).

Torsten Stolpmann:
What is your Maximum Upload File Size setting on Configuration / System Parameters / General?

10485760

Torsten Stolpmann:
The file upload happens to a physical location in your temp directory, it would be interesting to know if what is stored in the C:\Users\<<Your User Name>>\AppData\Local\Temp\.klaros-temp directory is the complete backup file.

The .klaros-temp folder you describe does not exist on my machine.

However, C:\Users\<<my user name>>\Klaros-Testmanagement\temp\.klaros-temp contains a folder named with a GUID which contains the files I have tested for uploading attachments in addition to the backup files that I have tried to restore.

Torsten Stolpmann:
If your java.io.tmpdir setting is not ending in a file seperator (/ or \) and the directory containing this temp folder is not writable this bug is triggered (amongst other problems uploading attachments).
...
As a workaround you may add a -Djava-io-tmpdir=<YourTmpDirEndingWithASeperator> to the java options defined in catalina.(sh|cmd). I see that we get a fixed version out RSN.

I have checked out the catalina.sh file and the -Djava-io-tmpdir used was the default C:\Users\<<my user name>>\Klaros-Testmanagement\temp. I tried to add a file seperator, but this did not fix the problem. It seems also that the files in this folder are read-only?

I have to add that the machine I am testing on is a virtual machine, but I do not think this should make a difference.
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Jedi Council Member Beiträge: 755 Beitrittsdatum: 12.02.09 Neueste Beiträge
Yes. It is. No problems uploading attachments (as long as the file is not empty).


I get your point. Adding empty attachments is currently ignored. I wonder if this is worth supporting.

The .klaros-temp folder you describe does not exist on my machine.

However, C:\Users\<<my user name>>\Klaros-Testmanagement\temp\.klaros-temp contains a folder named with a GUID which contains the files I have tested for uploading attachments in addition to the backup files that I have tried to restore.


I stand corrected, as I was accidently referring to my developer setup. The temp folder you are referring to is the one I mentioned. The GUID (actually your HTTP session id) is used to prevent conflicts with other users uploading files with the same name.

I have checked out the catalina.sh file and the -Djava-io-tmpdir used was the default C:\Users\<<my user name>>\Klaros-Testmanagement\temp. I tried to add a file seperator, but this did not fix the problem. It seems also that the files in this folder are read-only?


The read-only bit is the one that is really puzzling me. AFAIK Windows tries to hide dot-files/folders from the user per default (you may influence this from the explorer folder default settings though).

Coming back to the start:

Is there a stack trace on your console window when the mentioned error occurs (If you are running klaros as a service this may be in logs/catalina.out)?
What version of windows are you running?

I attached a zip with two patched class files which may or may not help you with your problem. To try them out please:

- shutdown Klaros
- copy them to webapps\klaros-web\WEB-INF\classes\de\verit\klaros\web\beans\application\FileUploadHelper.class and
webapps\klaros-web\WEB-INF\classes\de\verit\klaros\web\beans\pages\configure\RecoveryBean.class respectivly
- start Klaros

Thanks for your support,

Torsten
Panda Kay, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Youngling Beiträge: 24 Beitrittsdatum: 02.11.11 Neueste Beiträge
Torsten Stolpmann:

Adding empty attachments is currently ignored. I wonder if this is worth supporting.

Agreed. No use in supporting this.

Torsten Stolpmann:

Is there a stack trace on your console window when the mentioned error occurs (If you are running klaros as a service this may be in logs/catalina.out)?
What version of windows are you running?


Yes, sorry I didn't see this before. First line:
2011-11-04 09:41:48: ERROR, de.verit.klaros.web.beans.pages.configure.RecoveryBean, http-18080-2 Unable to unmarshal file
java.lang.NullPointerException: null
at java.util.Arrays$ArrayList.<init>(Arrays.java:2842) ~[na:1.7.0]
at java.util.Arrays.asList(Arrays.java:2828) ~[na:1.7.0]
at com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings.addRecognizedFeatures(ParserConfigurationSettings.java:115) ~[na:1.7.0]

Full stack trace is sent on mail.

Windows version : Windows 7 Enterprise, SP1

Torsten Stolpmann:


I attached a zip with two patched class files which may or may not help you with your problem. To try them out please:

- shutdown Klaros
- copy them to webapps\klaros-web\WEB-INF\classes\de\verit\klaros\web\beans\application\FileUploadHelper.class and
webapps\klaros-web\WEB-INF\classes\de\verit\klaros\web\beans\pages\configure\RecoveryBean.class respectivly
- start Klaros

I tried this, but it did not help. Hopefully the stack trace will give some answers.
Thanks for your help so far. emoticon
Panda Kay, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Youngling Beiträge: 24 Beitrittsdatum: 02.11.11 Neueste Beiträge
Torsten, thank you for your reply and for all your help regarding the problem.

I checked and the JAVA_HOME path variable was set correctly (for version 1.7.0).
However, as you suggested, changing the installed Java version from 1.7.0 to 1.6.0_29 fixed the problem.

Now I can check out the EE trial version to see what benefits it can provide. Thank you! Have a great weekend! emoticon
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Jedi Council Member Beiträge: 755 Beitrittsdatum: 12.02.09 Neueste Beiträge
This issue has been tracked as KLAROS-1430 (Unable to recover project backups under Java 7) and is now fixed towards the next maintanance release. In the mean time users are advised to avoid using Java 7.

Thanks again for pointing us in the right direction here!

Cheers,

Torsten
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: 3.4.6 Restoring projects - bug?

Jedi Council Member Beiträge: 755 Beitrittsdatum: 12.02.09 Neueste Beiträge
A fix for Java 7 is now available starting with the just released version 3.4.7.

Regards,

Torsten