Month: September 2010

  • Detaching managed entity from entitymanager.

    This code will detach a entity from hibernate Entitymanger making it thus unmanaged entity.

    // Prepare workbook object to be used for cloning.
     Session session = (Session) entityManager.getDelegate();
     session.evict(workbook); // same as detached
     workbook.setId(null);
    
  • Ant BuildException Cannot run program “..\src\protoc”

    Error that I am getting when trying to run mvn test on google protobuf library.

    [INFO] Executing tasks
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "..\src\protoc": CreateProcess error=2, The system c
    annot find the file specified
    
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    

    I did place protoc.exe in the src directory. As a side note this is running on windows machine.

    Quick solution that I found was to edit the pom.xml file and modify the Ant tast into

          
                    
    
  • Ant BuildException Cannot run program “..\src\protoc”

    Error that I am getting when trying to run mvn test on google protobuf library.

    [INFO] Executing tasks
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "..\src\protoc": CreateProcess error=2, The system c
    annot find the file specified
    
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    

    I did place protoc.exe in the src directory. As a side note this is running on windows machine.

    Quick solution that I found was to edit the pom.xml file and modify the Ant tast into

          
                    
    
  • SQL Injection Presentation for ISSA

    This is a PowerPoint of presentation I gave for ISSA group in Oklahoma City, OK

    Here is listing of assets used during the presentation