Spring Roo – Typicalsecurity Addon problem

January 15, 2012

I followed the steps to install this addon for Spring Roo.  But I kept getting this message.  ”Command ‘typicalsecurity setup’ was found but is not currently available

I found that some generous developer provided a fix to this.  Install the new .jar file as per instructions here

http://code.google.com/p/spring-roo-addon-typical-security/issues/detail?id=17

After this, the addon ran successfully and created all the necessary Entities and scaffold artefacts.    One error I faced is  - “There is already ‘forgotPasswordController’ bean method”  I found that by explicitly adding @RequestMapping (value=”/forgotpassword/index”) to the controller classes, these issues were resolved and the application could be run.

Once issue remaining after changing the mapping to “/forgotpassword/index” I found that the links don’t work from the browser.  I must have missed something and will update this post once I find out the cause.

 


Why doesn’t my Spring Roo application not retain my data even after changing the persistence type?

January 14, 2012

In Roo, to change the persistence type, you issue the command.  But this doesn’t take effect and data is not retained for the next run.

jpa setup –provider HIBERNATE –database HYPERSONIC_PERSISTENT

 

Reason:

JPA uses the file - /src/main/resources/META-INF/persistence.xml to specify how existing data should be treated upon every restart of the server.

Solution:

Change the value of <property name=”hibernate.hbm2ddl.auto”>  to “update”

<!– value=”create” to build a new database on each run; value=”update” to modify an existing database; value=”create-drop” means the same as “create” but also drops tables when Hibernate closes; value=”validate” makes no changes to the database –>

<property name=”hibernate.hbm2ddl.auto” value=”update”/>


Add a task from QuickSilver to TaskPaper

July 23, 2011

A variation of the script from: http://blog.hogbaysoftware.com/post/62679297/quicksilver-to-taskpaper

This version has two enhancements
1) prefixes the entered text with a “-” so that it appears as a task
2) saves the file after adding the task.

To install it: (Full instructions in the link above)
Open Script Editor and paste in the script
Save the script as ~/Library/Application Support/QuickSilver/Actions/TaskPaper.scpt
Restart QuickSilver

using terms from application "Quicksilver"
on process text tasks_text
tell application "TaskPaper"
tell front document
if not (exists project named "Inbox") then
make new project with properties {name:"Inbox"} at front of projects
end if
tell project named "Inbox"
repeat with each in paragraphs of tasks_text
-- Add as a task by prepending with -
set myLine to "- " & each
make new entry with properties {text line:myLine}
end repeat
end tell
end tell
-- Autosave the file
front document save
end tell
end process text
end using terms from


Outlook 2007 – Prompt for Save to Folder before sending Email

November 30, 2010

1) Create a Macro using the VBA editor – Hit Alt+F11
2) Copy the following Code and Paste it into the ThisOutlookSession module. (You have to expand the items shown in VBA editor)
3) Save and test your code

Note: This code will work ONLY in the current session UNLESS you digitally sign it. (due to Outlook’s Macro security)
If you want to digitally sign the Macro, generate your own certificate and sign the macro.


Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim objNS As NameSpace
Dim objFolder As MAPIFolder
Set objNS = Application.GetNamespace("MAPI")
Set objFolder = objNS.PickFolder
If TypeName(objFolder) "Nothing" And _
IsInDefaultStore(objFolder) Then
Set Item.SaveSentMessageFolder = objFolder
End If
Set objFolder = Nothing
Set objNS = Nothing
End Sub

Public Function IsInDefaultStore(objOL As Object) As Boolean
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objInbox As Outlook.MAPIFolder
On Error Resume Next
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Select Case objOL.Class
Case olFolder
If objOL.StoreID = objInbox.StoreID Then
IsInDefaultStore = True
End If
Case olAppointment, olContact, olDistributionList, _
olJournal, olMail, olNote, olPost, olTask
If objOL.Parent.StoreID = objInbox.StoreID Then
IsInDefaultStore = True
End If
Case Else
MsgBox "This function isn't designed to work " & _
"with " & TypeName(objOL) & _
" items and will return False.", _
, "IsInDefaultStore"
End Select
Set objApp = Nothing
Set objNS = Nothing
Set objInbox = Nothing
End Function


Dojo – Convert Strings to Dates and Sorting them in DataGrid

October 13, 2010

This sample code demonstrates how to use Dojo to convert strings to date objects. When used in this manner, you can sort the values as “dates” in Dojo DataGrid (otherwise grid handles them as strings)
Note: This code is based on a sample I found on another web-site. I enhanced it for use with dates returned from DQL and added comments to make the code clearer to understand.

WordPress may mess up the formatting: Click the link to get the HTML code as a MS Word file
DateSortingInDojo.docx

@IMPORT url("http://ajax.googleapis.com/ajax/libs/dojo/1.3/dojo/resources/dojo.css");
@IMPORT url("http://ajax.googleapis.com/ajax/libs/dojo/1.3/dijit/themes/tundra/tundra.css");
@IMPORT url("http://ajax.googleapis.com/ajax/libs/dojo/1.3/dojox/grid/resources/Grid.css");
@IMPORT url("http://ajax.googleapis.com/ajax/libs/dojo/1.3/dojox/grid/resources/tundraGrid.css");

djConfig = {
isDebug: false,
parseOnLoad: true,
baseUrl: "./",
xdWaitSeconds: 10
};

dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojox.grid.DataGrid");
dojo.require("dojo.date.locale");

function dateFormatterForDisplay(value, rowIndex) {
//Set the output date format
var aDate = dojo.date.locale.format(value, {datePattern:"dd MMM yyyy HH:mm:ss", selector:"date"});
console.log("formatMyDate():" + aDate);
return aDate;
}

var typeMap = {
"Date": {
type: Date,
deserialize: function(value){
//Parse the String into a date object. Your incoming data-string can be formatted differently from your output.
var aNewDate = dojo.date.locale.parse(value, {datePattern: "dd/MM/yyyy", timePattern: "HH:mm:ss"});
console.log("typeMap called:" + value + "|| converted: " + aNewDate);
return aNewDate;
}
}
};

Part Number Date


Dojo – DataGrid – Combining Field values in Formatter

August 6, 2010

I faced an interesting problem today. I was using a dojo Datagrid and wanted to display a different value in “Author” column if the author value was empty. All the samples I came across on the net were simple formatter examples which dealt with a single column.
Finally I found that the formatter function call has an “undocumented” 2nd argument “rowIndex”. Once I had a handle to this rowIndex, I could retrieve all the fields in the grid row using var rowdata = this.grid.getItem(rowIndex).

var layout = [{
field: “a_content_type”,
name: ‘ ‘,
width: “20px”,
formatter: getIcon
},
{
field: “author”,
name: ‘Author‘,
width: “25%”,
styles: ‘text-decoration:underline;’,
formatter: getAuthor
},……

//You can name the arguments anyway you want.
//You can call this function getAuthor(writer, rowNum), Javascript will pass the values to your arguments when formatter is called.
function getAuthor(author, rowIndex){
if( dojo.string.trim(author) == “”) { //author field was empty so use value from another field
console.debug(“Author was empty = ” + rowIndex);
var rowdata = this.grid.getItem(rowIndex);
return rowdata.owner_name;
} else {
return author;
}
}


Thoughts on Book – Documentum 6.5 Content Management Foundations by Pawan Kumar

July 3, 2010

I had bought a hard-copy of  the previous edition 2 years ago and read it from from cover-to-cover.  Right now it is full of highlighted text, hand-written notes and sticky notes.   I still keep going back to it when I need to explain the concepts to someone new to Documentum.  Now I have been invited to review  the new edition of Pawan’s book on Documentum 6.5.  It is a privilege for me.

Documentum 6.5 Content Management Foundations book brings all the concepts of Documentum in into a cohesive whole.

I think the book will be very useful to those who are starting on Documentum.   Typically, for beginners, Documentum product documentation is too detailed and dry to clearly understand the concepts.   This is where the book excels.   It covers all the concepts of Documentum with the right amount of emphasis on key concepts like Doctypes, Security, etc.

I hope to write a more detailed review in future.  For now, you can check out the Documentum 6.5 Content Management Foundations book.    You can also download a sample Chapter No 3 Objects and Types from the publisher’s website.

Download HotFile:
http://hotfile.com/dl/46615802/cfbc969/Subliminal.Wealth.Videos.part1.rar.html
http://hotfile.com/dl/46615895/feb26bc/Subliminal.Wealth.Videos.part2.rar.html
http://hotfile.com/dl/46615897/6f52443/Subliminal.Wealth.Videos.part3.rar.html
http://hotfile.com/dl/46615899/5ec8f01/Subliminal.Wealth.Videos.part4.rar.html
http://hotfile.com/dl/46615935/60b21ed/Subliminal.Wealth.Videos.part5.rar.html
http://hotfile.com/dl/46615987/fa7c5fd/Subliminal.Wealth.Videos.part6.rar.html

Download FS:
http://www.fileserve.com/file/yhfMHEQ/Subliminal.Wealth.Videos.part1.rar
http://www.fileserve.com/file/d7DrUJ7/Subliminal.Wealth.Videos.part2.rar
http://www.fileserve.com/file/2Pg25pb/Subliminal.Wealth.Videos.part3.rar
http://www.fileserve.com/file/wA5Zd8x/Subliminal.Wealth.Videos.part4.rar
http://www.fileserve.com/file/6NVeDaS/Subliminal.Wealth.Videos.part5.rar
http://www.fileserve.com/file/tWhjJvS/Subliminal.Wealth.Videos.part6.rar

Download SHR:
http://sharingmatrix.com/file/7032957/Subliminal.Wealth.Videos.part1.rar
http://sharingmatrix.com/file/7032945/Subliminal.Wealth.Videos.part2.rar
http://sharingmatrix.com/file/7032943/Subliminal.Wealth.Videos.part3.rar
http://sharingmatrix.com/file/7032967/Subliminal.Wealth.Videos.part4.rar
http://sharingmatrix.com/file/7032949/Subliminal.Wealth.Videos.part5.rar
http://sharingmatrix.com/file/7032959/Subliminal.Wealth.Videos.part6.rar

Download From Rapidshare
http://rapidshare.com/files/395566216/Subliminal.Wealth.Videos.part1.rar
http://rapidshare.com/files/395566208/Subliminal.Wealth.Videos.part2.rar
http://rapidshare.com/files/395566193/Subliminal.Wealth.Videos.part3.rar
http://rapidshare.com/files/395566235/Subliminal.Wealth.Videos.part4.rar
http://rapidshare.com/files/395566226/Subliminal.Wealth.Videos.part5.rar
http://rapidshare.com/files/395566241/Subliminal.Wealth.Videos.part6.rar


DFS SOAP Request/Response – XML content over the wire

April 1, 2009

To watch the SOAP Request and Response being sent by DFS Clients, add the following code before the SOAP call.  I usually add it in the first few few lines of the main() method.
System.setProperty
(“com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump”,
“true”);

This eliminates the need for using tools like TCPMon or Wireshark to observe what is being sent by DFS SDK.


Javascript Popup – Documentum DAM and WebTop

February 12, 2009

The credit for the solution goes to two people who work with me – Yih Wern and Su Sheng.

Problem: When the user goes to either Webtop or DAM URL, IE launches a separate popup window with the following messages:

appintgevents.js: AppIntgProcessEvent did not handle aiEvent(event=ShowDialog_,_id=invoker_,_title=Content Transfer Service_,_height=130_,_width=440_,_sizepreference=false)
appintgevents.js: AppIntgProcessEvent did not handle aiEvent(event=ShowBusyCursor)
appintgevents.js: AppIntgProcessEvent did not handle aiEvent(event=ShowBusyCursor)
appintgevents.js: AppIntgProcessEvent did not handle aiEvent(event=ShowBusyCursor)
appintgevents.js: AppIntgProcessEvent did not handle aiEvent(event=ShowBusyCursor)
appintgevents.js: AppIntgProcessEvent did not handle aiEvent(event=ShowBusyCursor)
appintgevents.js: AppIntgProcessEvent did not handle aiEvent(event=ShowBusyCursor)

This problem is irritating as the messages keep appearing repeatedly and the popup window is refreshed. In some extreme cases, the popup prevents people from logging in or viewing documents.

Solutions:
There seem to be two solutions.
1) If the user has Google toolbar installed, it could cause this issue.  You can test this by uninstalling the Google toolbar.  Or you can recommend the user to use older Google Toolbar.
2) The second solution is related to IE7  which tries to access a page – runonce.aspx.  This seems to fail for some browsers and leaves the registry in an inconsistent state.  To fix this you can do the following :  (Suggested by Yih Wern)
Run Registry.exe
search for: HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\ZERO\win32  (WordPress is not displaying slash-zero.  Replace ‘ZERO’ with a numeric ’0′)
Change the (Default) value from C:\WINDOWS\system32\shdocvw.dll to C:\WINDOWS\system32\ieframe.dll
Restart your IE browser.

The full thread is here – http://www.google.com/support/forum/p/Toolbar/thread?tid=1b384f23ae01da52&hl=en&fid=1b384f23ae01da52000462aedade69c6


Audit Trails and Impact on Documentum Performance

January 28, 2009

From my experience, we have to be careful about turning on audit trails in Documentum.  Turning on tracking for unnecessary events could lead to excessive audit trail creation in the database and will slow down the system.

For example, audit can be turned on for Sysobjects on several events. Two of these events are a bit confusing.

1) dm_getfile and 2) dm_fetch

While these two events sound similar at the first glance, their function is different.
1) dm_getfile occurs when a document is viewed or exported.  This is true “reading” of a document. You will want to turn this on to track which user downloaded/read this document.
2) dm_fetch occurs when webtop gets the documents attributes from the content-server.  This can occur when you perform a search or just browse to a folder.   This means that if you browse to a folder with 50 documents, it could potentially create 5o new audit trail records in the database!!  This is unnecessary, unless you have a strict security policy.

Watch out for this.  In our system, we turned on auditing for dm_fetch and ended up creating 8 million useless records and consuming all the database tablespaces.  After we realised what was happening, we turned off the auditing for dm_fetch and purged the unnecessary records, our system performance improved dramatically.

There are some excellent posts on EMC forums regarding this.  Do check them out.


Follow

Get every new post delivered to your Inbox.