https://projects.ecoinformatics.org/ecoinfo/https://projects.ecoinformatics.org/ecoinfo/ecoinfo/favicon.ico?14691340362009-03-18T19:02:10ZEcoinformatics RedmineKepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131562009-03-18T19:02:10ZChristopher Brookscxh@eecs.berkeley.edu
<ul></ul><p>I updated the Build System instructions and the Eclipse instructions<br />to include running "ant clean-cache". This seems much better than<br />trying to describe how to remove ~/.kepler.</p>
<p>Also, at one point I did see a message on stdout about removing ~/.kepler,<br />so some error checking is happening. To close this bug, the follow<br />acceptance criteria should be met:<br />1) Run Kepler 1.0, verify that the actors are present.<br />2) Install Kepler from the developement tree, verify that the actors are present.<br />3) Do step 1 again.<br />If there is an error with step 2, then a dialog should be displayed that<br />suggests running "ant clean-cache", or, ideally, clicking on a button that<br />would clean the cache and restart Kepler.</p>
<p>David Welker wrote:</p>
<blockquote>
<p>Just to chime in. I am not sure if deleting your .kepler directory is<br />the solution to your problem or not. But, if it is, the best way to do<br />it is by typing:</p>
<p>ant clean-cache</p>
<p>That command works across platforms and will delete your .kepler directory.</p>
<p>And no, deleting the .kepler directory will not cause Kepler to<br />"misbehave." (Although, sometimes the .kepler directory does mask some<br />problems that exist, and it may sometimes that deleting .kepler caused a<br />problem. But deleting .kepler doesn't cause such problems, it merely<br />unmasks them.)</p>
</blockquote>
<p>[Qiao Hui-jie] wrote:</p>
<blockquote><blockquote>
<p>Thanks for that.</p>
<p>Are you referring to the file present not in the Kepler folder, but<br />separately under Users?<br />I can see it present, but I have Kepler 1.0.0 installed. Will deletion<br />of that affect the working of Kepler 1.0.0 in any way?</p>
<p>I am asking since all previous workflows have been done in Kepler<br />1.0.0 and I don't want Kepler 1.0.0 to begin misbehaving in any way.</p>
<p>Thanks!</p>
</blockquote></blockquote> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131572009-03-18T19:21:05ZMatt Jonesjones@nceas.ucsb.edu
<ul></ul><p>Although in development mode it is fine to remove .kepler either manually or with clean-cache, there would be problems for users to regularly remove this. When a user selects 'Save to Library...' for an actor from the canvas, Kepler creates a new KAR file and puts it into the cache which is then loaded into the Library pane. This allows users to create new actors from composites or specialized atomics very easily. If the .kepler directory is removed, these would be lost, and if the cache contains the only copy of the kar (ie., if they didn't 'Upload to repository' as well), then their actor is lost. So, in general, we should be creating a system in which new versions of kepler have no need to delete the .kepler directory when upgrading. Using the development tree should be handled similarly. The hard part, of course, is going backwards (e.g., from trunk to 1.0.0), in that 1.0.0 may not be able to execute new actors from a newer version. It would be nice if the next version of kepler could recognize based on actor metadata which actors it can handle, and ignore those that it can't. This would allow switching among different versions of Kepler, and older versions would just ignore actors in the cache that they can't handle. Overall, we need a better strategy for handling .kepler.</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131582009-04-01T18:33:38ZDerik Barseghianbarseghian@nceas.ucsb.edu
<ul></ul><p>A similar problem occurs when switching between suites.<br />If in suite A you've developed an actor, and you instantiate and then Export it to kar including the class, and then Import Archive, it will show up in the library. If you then change-to suite B and launch kepler, the actor will show up in the library but will give an error if you try to use it. Also if you try to import it, you'll get an error (about being unable to clone). If you run ant clean-cache before launching suite B, you can import the actor.</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131592009-04-02T20:28:17ZDavid Welkerwelker4kepler@gmail.com
<ul></ul><p>I have a proposed solution to this problem. I think that the cache should be module aware. If you are running kepler-trunk, a different cache (or part of the cache) should be used than if you are running kepler-1.0 or daks-base.</p>
<p>When you do a change-to, to kepler-1.0 from kepler-trunk for example, there would be no memory of what was in the cache for kepler-trunk, but then you would not have any strange incompatibilities. When you changed back to kepler-trunk, your data previously stored in kepler-trunk would be available again.</p>
<p>Alternatively, I suppose we could develop a cache where there are some basic items that would appear regardless of change-to, but then perhaps there are specific items that are known to cause problems which behave in the manner described above (i.e. if you do a change-to kepler-1.0, that cache item is not available until you change-to back to kepler-trunk).</p>
<p>Any thoughts?</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131602009-04-22T22:26:38ZChad Berkleyberkley@nceas.ucsb.edu
<ul></ul><p>Aaron agreed to take this on with help from david and chad. We need to be able to upgrade the .kepler directory between versions and keep version specific schema, databases, etc in their own folders for backwards compatability.</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131612009-06-02T02:11:22ZAaron Aaronaschultz@nceas.ucsb.edu
<ul></ul><p>Chad, David, and I had a discussion today about how to handle the .kepler directory for the 2.0 release. The conclusion was the following:</p>
<p>- use the authority and namespace to generate a subdirectory in the .kepler directory for each instance of Kepler (refer to as .kepler/instance directory)<br />- cache directory, actorLibrary, etc. will go into the .kepler/instance directory<br />- ModulesTree class will be used to create one directory for each module in the .kepler/instance/modules/ directory (refer to as a module's .kepler directory)<br />- A module can then use it's .kepler directory for any disk activity, Also resources from a module can be copied to it's .kepler directory for read/write capability<br />- the Kepler cache should only be a mirror of KAR files and resources on disk to prevent any future issues with version management<br />- Kepler 1.0 caches will be converted to the new system by building KAR files from the old cache and allowing the new cache to be built from those KAR files on disk<br />- The current InstanceAuthNamespace will be kept in the .kepler directory<br />- build function for cleaning cache should be updated to clean only the current .kepler/instance directory</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131622009-06-18T02:10:04ZAaron Aaronaschultz@nceas.ucsb.edu
<ul></ul><p>Progress on this bug. The InstanceAuthNamespace is kept at the project root. A configuration directory is now created in the project root that contains a directory named according to the authority and namespace of the running kepler. Then there is a modules directory that contains a folder for each module. This effectively defines an area on disk where a particular installed module can write too without worrying that another installation is also using that space. The .kepler directory is now defined as a place on disk where modules can save and read runtime information that is meant to be shared between different installations of Kepler. Left to do is to detect and export an old cache to KAR files so they can be loaded into the 2.0 installation.</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131632009-08-25T18:27:56ZChristopher Brookscxh@eecs.berkeley.edu
<ul></ul><p>This bug was discussed in kepler-users:</p>
<p>Ben Leinfelder writes:</p>
<blockquote>
<p>Rick,<br />The path is specified in DBConnectionFactory but should probably be moved into the config.xml file so that it is more readily changed.<br />I'm fearful that simply changing the HSQL database path will not be a viable option as there are many other cache-specific files in the ~/.kepler directory that may interfere with this mix of old and new databases/cache files.<br />Certainly give it a try (strongly recommend backing up your existing .kepler beforehand) to see if you have satisfactory results.<br />You might be happier running the different Kepler versions as a different user on the same computer - that will allow you to keep the ~/.kepler directories distinct since they will be under different user directories.<br />-ben</p>
<p>On Aug 25, 2009, at 10:33 AM, Rick Moore wrote:</p>
<blockquote>
<p>Thanks for the prompt response Ben.</p>
<p>This seems to indicate that the path to the HSQL database is hardcoded somewhere in the Kepler src base. If that is the case, would someone please help me find where that is ? I haven't had any luck with cygwin/grep or Windows file search.</p>
<p>I need to be able to run both the prod and dev instances on a daily basis. The prod version to run/maintain existing workflows and the dev version to build/debug new actors. We will eventually go to the newest source base for both, but that may take a couple of months.</p>
<p>Rick</p>
<p>ben leinfelder wrote:</p>
<blockquote>
<p>Rick,<br />Unfortunately we do not currently have an "upgrade" approach for going from Kepler 1.0 to the development trunk (though it is something we are attempting to support in the future).<br />To preserve your existing HSQL database (say, if you plan on using Kepler 1.0 again after you successfully run Kepler from the trunk) I'd recommend copying your ~/.kepler directory to a safe location and then re-running Kepler from the trunk. There have been substantial changes to the cache database (the HSQL version was upgraded and various tables have had their schema altered). Your new ~/.kepler (automatically created when you launch Kepler from the trunk) will allow you to use the trunk version. If/when you want to go back to Kepler 1.0, you'll need to swap in your old ~/.kepler and launch 1.0.<br />Thanks,<br />-ben</p>
<p>On Aug 25, 2009, at 9:38 AM, Rick Moore wrote:</p>
<blockquote>
<p>I just tried to run Kepler 1.0.0 and it failed. This extract from the stack trace suggests that the problem is a corrupt HSQL database.</p>
<p>java.sql.SQLException: Wrong database file version<br />at org.hsqldb.jdbc.jdbcUtil.sqlException(Unknown Source)<br />at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)<br />at org.hsqldb.jdbcDriver.getConnection(Unknown Source)<br />at org.hsqldb.jdbcDriver.connect(Unknown Source)</p>
<p>I think this happened because I recently downloaded and built Kepler from the dev tree and it stomped on my production database.</p>
<p>Is there any way to tell one of these instances to look for the HSQL database in a different location than my home directory ?</p>
<p>Thanks,</p>
<p>Rick Moore<br />Content Management Specialist<br />Information Science<br />Cornell University<br />email: rem63 at cornell dot edu</p>
</blockquote></blockquote></blockquote></blockquote> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131642009-08-25T18:50:04ZChristopher Brookscxh@eecs.berkeley.edu
<ul></ul><p>Rick Moore writes:</p>
<p>Turns out that DBConnectionFactory gets it's path from DotKeplerManager. Here are the files/lines I had to change to make this work:</p>
<ul>
<li>build-area/src/org/kepler/build/CleanCache.java: 39> File<br /> keplerCache = new File(userDir, ".kepler");</li>
<li>core/src/org/ecoinformatics/util/Config.java: 76> private<br /> static final String settingsdir = ".kepler";</li>
<li>core/src/org/kepler/util/DotKeplerManager.java 26> +<br /> File.separator + ".kepler" + File.separator;</li>
<li>core/src/org/kepler/util/DotKeplerManager.java: 122> + ".kepler" <br /> + File.separator + "cache"</li>
</ul>
<p>As it now stands, my production version uses ${user.home}\.kepler and my dev version uses ${user.home}\.kepler-dev</p>
<p>Rick</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131652009-08-26T20:18:24ZMatt Jonesjones@nceas.ucsb.edu
<ul></ul><p>Progress has been made, but there's still work to be done. There are two main directories in which things can be stored in Kepler -- the product 'install' directory (usually in an OS system folder) and the .kepler directory (for user-specific artifacts and files). To close this bug, the following should all be true:</p>
<p>1. The 'install' directory can be removed and replaced by the same version of kepler, or by a new version, and everything still works fine<br /> -- this implies that any files that should not be lost across upgrades must NOT be in the install directory (e.g., InstanceAuthNamespace)</p>
<p>2. User-created KAR files and other artifacts in the .kepler directory should migrate across version upgrades without duplication -- there is no need to have multiple copies of the same KAR file</p>
<p>3. There should never be a need to 'clean' any files from the .kepler directory -- neither during the development cycle nor for a binary product install</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131662009-09-18T18:08:11ZChristopher Brookscxh@eecs.berkeley.edu
<ul></ul><p>One possible solution would be to have the current devel version of kepler<br />use .kepler/2.0/ instead of .kepler/</p>
<p>I do like the idea of being able to pass in the .kepler directory as a command<br />line argument. Java can take properties as a command line argument, so if<br />the .kepler directory was a property such as kepler.keplerDirectory, then<br />we could invoke java with something like <br />-Dkepler.keplerDirectory=/users/me/.kepler-myversion</p>
<p>Chad writes:</p>
<blockquote>
<p>Hi Michal,</p>
<p>This is something we are currently working on for the 2.0 release. There is a bug here:<br /><a class="external" href="http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3898">http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3898</a></p>
<p>Unfortunately, the 1.0 directory will not have this functionality in the future.</p>
<p>Aaron Schultz (<a class="email" href="mailto:aschultz@nceas.ucsb.edu">aschultz@nceas.ucsb.edu</a>) is working on this and I think he could answer any questions you have better than I could.</p>
<p>Thanks,<br />chad</p>
<p>Michal Owsiak wrote:</p>
<blockquote>
<p>Hello all,</p>
<p>Is it possible to pass home directory as a parameter to Kepler?</p>
<p>We are developing application for both: Kepler 1.0 and Kepler 1.x.</p>
<p>At the moment we are forced to either remove .kepler home each time we<br />switch distribution or we have to create symbolic links. Not to mention<br />the possibility of running Kepler 1.0 and 1.x simultaneously.</p>
<p>If there is some sort of argument/switch/parameter that allows to set<br />different .kepler location it would be great.</p>
<p>Thanks in advance for the info</p>
<p>Cheers</p>
<p>Michal</p>
</blockquote></blockquote> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131672009-09-18T18:29:10ZMichal Owsiakmichalo@man.poznan.pl
<ul></ul><p>(In reply to comment <a class="issue tracker-1 status-5 priority-2 priority-default closed" title="Bug: ibm xml parser jar file missing or corrupted (Closed)" href="https://projects.ecoinformatics.org/ecoinfo/issues/11">#11</a>)</p>
<p>This idea (of passing parameter through the Java properties) is exactly what I'd like to have in Kepler.</p>
<p>This way, I would be able to start separate instances of Kepler at the same time. Additionally, regular user (non developer) would not notice a difference if default value of -Dkepler.keplerDirectory would be set to "$HOME/.kepler"</p>
<blockquote>
<p>One possible solution would be to have the current devel version of kepler<br />use .kepler/2.0/ instead of .kepler/</p>
<p>I do like the idea of being able to pass in the .kepler directory as a command<br />line argument. Java can take properties as a command line argument, so if<br />the .kepler directory was a property such as kepler.keplerDirectory, then<br />we could invoke java with something like <br />-Dkepler.keplerDirectory=/users/me/.kepler-myversion</p>
<p>Chad writes:</p>
<blockquote>
<p>Hi Michal,</p>
<p>This is something we are currently working on for the 2.0 release. There is a bug here:<br /><a class="external" href="http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3898">http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3898</a></p>
<p>Unfortunately, the 1.0 directory will not have this functionality in the future.</p>
<p>Aaron Schultz (<a class="email" href="mailto:aschultz@nceas.ucsb.edu">aschultz@nceas.ucsb.edu</a>) is working on this and I think he could answer any questions you have better than I could.</p>
<p>Thanks,<br />chad</p>
<p>Michal Owsiak wrote:</p>
<blockquote>
<p>Hello all,</p>
<p>Is it possible to pass home directory as a parameter to Kepler?</p>
<p>We are developing application for both: Kepler 1.0 and Kepler 1.x.</p>
<p>At the moment we are forced to either remove .kepler home each time we<br />switch distribution or we have to create symbolic links. Not to mention<br />the possibility of running Kepler 1.0 and 1.x simultaneously.</p>
<p>If there is some sort of argument/switch/parameter that allows to set<br />different .kepler location it would be great.</p>
<p>Thanks in advance for the info</p>
<p>Cheers</p>
<p>Michal</p>
</blockquote></blockquote>
</blockquote> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131682010-02-04T20:59:19ZChad Berkleyberkley@nceas.ucsb.edu
<ul></ul><p>Matt identified these three milestones to be able to close this bug. I believe they are all now met. See my comments below each.</p>
<blockquote>
<p>1. The 'install' directory can be removed and replaced by the same version of<br />kepler, or by a new version, and everything still works fine<br />-- this implies that any files that should not be lost across upgrades must<br />NOT be in the install directory (e.g., InstanceAuthNamespace)</p>
</blockquote>
<p>This is now true. All changeable files are now in the ~/KeplerData or the ~/.kepler directories</p>
<blockquote>
<p>2. User-created KAR files and other artifacts in the .kepler directory should<br />migrate across version upgrades without duplication -- there is no need to have<br />multiple copies of the same KAR file</p>
</blockquote>
<p>The kar files themselves are actually not stored in the .kepler directory for either 1.0 or 2.0. The cached, serialized version are. I see no way to migrate the 1.0 serialized forms without a major headache. I have changed the DotKeplerManager to create a new cache directory for 2.0 if it detects that 1.0 is already installed. I believe this to be the best workaround for this problem. it allows 2.0 to operate correctly as well as for 1.0 to continue to operate, albeit independently of one another.</p>
<blockquote>
<p>3. There should never be a need to 'clean' any files from the .kepler directory<br />-- neither during the development cycle nor for a binary product install</p>
</blockquote>
<p>I think we have finally gotten around this with some minor exceptions. You can now switch between suites without cleaning and the 2.0 installer will not require a clean .kepler directory.</p>
<p>I'm closing this bug. If there is a reason for it to still be open, please reopen with comments.</p> Kepler - Bug #3898: update .kepler instead of removing it between versionshttps://projects.ecoinformatics.org/ecoinfo/issues/3898?journal_id=131692013-03-27T21:24:54ZRedmine Admin
<ul></ul><p>Original Bugzilla ID was 3898</p>