How to use CCRC to get old file versions? - java

I'm trying to use CCRC API in order to get, for instance, all versions for a specific file and get some old file version.
I've tried to use CHILD_LIST, CHILD_MAP, tried to use CcFile.getVersion().getPredecessor() and then use CcFile.doReadProperties(...) but it seems that the location is remote and then is not possible to get the file using for example getClientPath().
I already saw that is possible to retrieve all versions for a specific file using CCRC plugin and select a specific version clicking in the version three.
Does anybody have some example how to retrieve this version without setting the config spec ?
tks
Kleber

The CCRC CLI is not very complete in 7.X, and even the first 8.0.0.x.
rcleartool is completed with the latest 8.x releases, and included a rcleartool get which allows you to access any version you want.
See more details at "How to use CCRC to get prievous file version?".

Related

Gitkit Java - Update photo URL

My goal is setting the URL for the profile picture of an existing user.
I'm using the Google Identity Toolkit Java library on App Engine.
Below is my code:
GitkitUser u = gitkitClient.getUserByLocalId(localId);
u.setPhotoUrl(profilePictureURL);
gitkitClient.updateUser(u);
where gitkitClient' is my GitKit client, already initialized with the right parameters, andlocalId' is the id of the user I'd like to update.
This code causes the following exception:
org.json.JSONException: JSONObject["localId"] not found.
Documentation is hard to find for this library. I'd be glad if someone could suggest me what I'm missing there.
Thanks for reporting the bug. It will be fixed in one or two days.
[UPDATE] It's fixed. I manually tested and verified. Please also use the newest version of java library. You can get it from here or from maven update.

Domino nvapplet.jar Security Exception

I have a long standing domino application that uses embedded views to display data. This application has been moved from a server 2003, 32 bit, domino 8.5 environment to a new server 2008 R2 64 bit domino 8.5.3 FP6 environment.
I have everything up and working as before with the exception of embedded views. They are giving a SecurityException "Missing required Permissions manifest attribute in main jar: http://*.com/domjava/nvapplet.jar".
I have confirmed that the actionbar.jar, editor.jar, nvapplet.jar, and outline.jar are the current version on the server. I have even replaced them with the version from the IBM download (http://www-01.ibm.com/support/docview.wss?uid=swg21662233).
I can get this to work by displaying the view as HTML instead of Java Applet, but I don't understand what the issue is with the java version?
There were major security changes to Java in relation to applets. You can download the latest applets here.
http://www-01.ibm.com/support/docview.wss?uid=swg21662233
You may need to clear your browser cache if it still persists after that.
[update] The question now mentions that you installed Fixpack 6, installed the Jars then uninstalled Fixpack 6.
When you uninstall a fix pack, it reverts the files it touches back to what they were before the fix pack was installed. Although I have no details on it, it is quite likely that the updated security applets were also added to fix pack 6 (as it's the last fix pack for R8.5.3).
So during the uninstall the applets look the same as FP6 and it reverts them.
To solve this, after the revert you would need to drop in the updated applets again.
If the issue still persists at this point, you need to open the Java Console on your browser and update your question with the logs it generates (as it pertains to the error).
Turns out this situation may have been a little unique, but I will post it here for future reference in case anyone else runs into this. The server was a fresh build of windows and domino all the way up to 8.5.3 FP6. The FP6 installer date stamps the jars in question with the install date of the system. So in my case I had people come to the site, download the jar with a file date newer than 1/17/2014, which is the date of the files IBM put in the fix mentioned above. Those files are a simple flat copy so they always maintain the 1/17/2014 date. Anyway, any user that came and picked up the newer date files 3/1/2014 for example would keep those files or rev date in their local java machine cache and ignore the 1/17/2014 file I had replaced them with, thus they continued to show the problem. Only by manually clearing their cache from the java were they able to pick up the 1/17/2014 file and no longer have the issue.
Actually from what I was told via IBM FP 6, does not include the fixed .jars. That was my main problem assuming it did.

How to retrieve the recent files used by all app in windows

I want to find out the recent file used by all applications in windows env using java.
I have tried with
using Registry: I am trying to get the recent file information from HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU. But I am getting some "HEX" value but i am not able to retrive the string equivalent. I have also tried http://code.google.com/p/java-registry/
I have also tried with "recent" file folder. But i am not able get the actual type/path of the file.
Sounds like a job for Sysinternal's Process Monitor (by now, that's official - and free - Microsoft software). First, add a filter of type process name of value "java.exe" like this, then add the "ReadFile" and "WriteFile" operations as additional filters, like this:

upload.parseRequest(request) returns empty list in commons.fileUpload

I am using org.apache.commons.fileUpload.FileItem and other related classes for uploading files from local machine to server (Although for the current testing both the machines are same).
I am having .jsp file as UI and servlet to handle the upload. Now when the request reaches
statement
List items = upload.parseRequest(request);
it returns empty list. I googled this thing at many places. Most of them specifying the symptons that parserequest() returns empty. But Could not find out the exact solution to avoid this. At one place I could see that Tomcat may have filters that may have parsed The request and thats why at above call to parseRequest returns empty list. But there is no specification how to avoid this.
Is it because of the web server I am using (which is JBOss) ? or has it anything to do with the java version and commons.jar version conflicts ?
I am using
jre 1.6
jboss-4.0.4.CR2
commons-fileupload-1.2.2.jar
Eclipse (To create dynamic web project)
Your help would be very much useful.
I encountered this same problem with a similar setup in Tomcat. The solution was as simple as placing a name attribute on my input file element.
Before I had <input type="file" /> in my HTML form.
Once I added a name tag i.e. <input type="file" name="aFile" /> my DiskFileUpload object stopped returning an empty list when I called parseRequest(request) from the servlet/JSP.
I'm using jboss 5.1 and have no troubles using commons-fileupload libs.
Make sure you have the right version of jboss 4.0.4 (jre 1.6) as it may only support jre 1.5. You may want to consider upgrading to the next version if 1.6 is a requirement or change your jre to 1.5.
You should post more of you java and JSP code so we can see how you are posting the request.
Good Luck

JavaDB dual installation

on WIN XP SP3 and Netbeans 6.7.1 IDE,
I have installed Java SDK 6.17 which includes JavaDB. I set the JavaDB directory to ...\Java\JavaDB at the Java installation script with %DERBY_HOME% set accordingly and %PATH% including %DERBY_HOME%\bin
Later on I installed GlassFish-V3 Prelude which - surprise surprise - comes with its own JavaDB and silently installs that into a JavaDB directory under the GlassFish path.
Q's
I don't want to have duplicates. Can
I remove one of these installations
without spoiling Netbeans.
How can I verify which of the two
JavaDB's Netbeans is actually using
Can I eventually configure GlassFish
in a way to use the JavaDB I
installed as part of the SDK
Thanks for any hints (as on superuser.com I didn't get any replies :-( )
I don't want to have duplicates. Can I remove one of these installations without spoiling Netbeans.
If really you want to remove one of them, I'd suggest to remove the one that comes with your JDK and to leave the one bundled with GlassFish v3 (GlassFish expects it to be there when using some commands which can be extremely handy, e.g. during development). But honestly, I wouldn't spend too much time for the 4.5 MB extra space used.
How can I verify which of the two JavaDB's Netbeans is actually using
To verify, go to the Services tab, expand the Databases node and right-click on Java DB and select Properties.... You should get the following window:
alt text http://netbeans.org/images_www/articles/65/ide/java-db/javadb-props.png
As documented in Working with the Java DB (Derby) Database, "If you have the GlassFish Server registered in your NetBeans IDE installation, Java DB will already be registered for you."
Can I eventually configure GlassFish in a way to use the JavaDB I installed as part of the SDK
I don't know, but... why would you do that, why is it such a concern, don't you think you're wasting your time? Now, as I said, if this is really an issue, remove the version bundled with your JDK instead.
PS: GlassFish v3 is out, GlassFish v3 prelude is outdated, you should upgrade.
MikeD!
After many years, I am using NetBeans again. As I realized many features are included but others get "lost". I am planning to install several versions.
In NetBeans 6.7.1, to know what version of Java DB NetBeans is using, right click the Java DB node and ckeck the properties.
The path next to the label Java DB Installation tells you what installation is currently in use.
The path next to the label Database Location is used as the value for the property derby.system.home. This property tells Java DB where to create/find the individual databases folders. Besides, this folder holds two files called derby.properties and derby.log.
*derby.properties* establishes persistently system-wide properties.
Do not worry about duplicates. As you can see NetBeans uses 1 at a time. Nevertheless, as a recommendation, choose an installation and stick to it. During my tests I changed the path to the Java DB Installation several times and played with the user authentication properties inside derby.properties and eventually NetBeans could not create new databases in the regular way. So, I had to re-install NetBeans (I use the OS independent zip).
Regarding GlassFish, I have not experimented yet. But, it is reasonable to think that there is some limited set of options about using a different version of Java DB. For example, NetBeans 6.7.1 Java DB support fails if you set the netbeans_jdkhome property so that it points to a JDK version equal or higher than 1.7.0. That tells us something, right?
I will try to tell you anything useful I find out during my tests.
George

Categories