jueves, 24 de octubre de 2013

CONFIGURAR BASE DE DATOS ORACLE ANTES DE INSTALAR ALFRESCO 4.X

Esta configuración la realize antes de intalar Alfresco en una base de datos Oracle, espero les sirva si alguien tiene sugerencias para mejorar bienvenidas Saludos --Crear un tablespace para los datos
CREATE TABLESPACE "TS_ALFRESCO" LOGGING

DATAFILE 'C:\app\Oracle\product\11.1.0\db_1\oradata\alfresco\ALFRESCODAT.dbf' SIZE 200M

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

--Crear un tablespace para los indices
CREATE TABLESPACE "TS_ALFRESCO_IDX" LOGGING

DATAFILE 'C:\app\Oracle\product\11.1.0\db_1\oradata\alfresco\ALFRESCOIDX.dbf' SIZE 200M

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
--Crear el usuario que va a trabajar sobre estos tablespace
CREATE USER "ALFRESCOUSER" PROFILE "DEFAULT" IDENTIFIED BY "ALFRESCOPWD"

DEFAULT TABLESPACE "TS_ALFRESCO" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
--Asignacion de permisos para el usuario ALFRESCOUSER
GRANT "CONNECT" TO "ALFRESCOUSER"

GRANT "RESOURCE" TO "ALFRESCOUSER"
--permisos complementarios
GRANT ALTER ANY INDEX TO "ALFRESCOUSER";

GRANT ALTER ANY SEQUENCE TO "ALFRESCOUSER";

GRANT ALTER ANY TABLE TO "ALFRESCOUSER";

GRANT ALTER ANY TRIGGER TO "ALFRESCOUSER";

GRANT CREATE ANY INDEX TO "ALFRESCOUSER";

GRANT CREATE ANY SEQUENCE TO "ALFRESCOUSER";

GRANT CREATE ANY SYNONYM TO "ALFRESCOUSER";

GRANT CREATE ANY TABLE TO "ALFRESCOUSER";

GRANT CREATE ANY TRIGGER TO "ALFRESCOUSER";

GRANT CREATE ANY VIEW TO "ALFRESCOUSER";

GRANT CREATE PROCEDURE TO "ALFRESCOUSER";

GRANT CREATE PUBLIC SYNONYM TO "ALFRESCOUSER";

GRANT CREATE TRIGGER TO "ALFRESCOUSER";

GRANT CREATE VIEW TO "ALFRESCOUSER";

GRANT DELETE ANY TABLE TO "ALFRESCOUSER";

GRANT DROP ANY INDEX TO "ALFRESCOUSER";

GRANT DROP ANY SEQUENCE TO "ALFRESCOUSER";

GRANT DROP ANY TABLE TO "ALFRESCOUSER";

GRANT DROP ANY TRIGGER TO "ALFRESCOUSER";

GRANT DROP ANY VIEW TO "ALFRESCOUSER";

GRANT INSERT ANY TABLE TO "ALFRESCOUSER";

GRANT QUERY REWRITE TO "ALFRESCOUSER";

GRANT SELECT ANY TABLE TO "ALFRESCOUSER";

GRANT UNLIMITED TABLESPACE TO "ALFRESCOUSER";

-- crear un esquema de la base de datos
 CREATE SCHEMA AUTHORIZATION ALFRESCOUSER;
Si es el caso que instalamos algo mal y necesitamos borrar las tablas que creamos ejecutamos el siguiente script o los drop directamente --borrar las tablas de un esquema
SELECT 'DROP TABLE '||table_name||' CASCADE CONSTRAINTS;'

FROM ALL_TABLES

WHERE owner='ALFRESCOUSER';

SELECT 'DROP TABLE '||table_name||' CASCADE CONSTRAINTS;' FROM user_tables

SELECT 'DROP VIEW '||VIEW_NAME||';' FROM user_views

SELECT 'DROP SEQUENCE '|| SEQUENCE_NAME||';' FROM user_sequences

DROP TABLE ALF_NAMESPACE CASCADE CONSTRAINTS;

DROP TABLE ALF_APPLIED_PATCH CASCADE CONSTRAINTS;

DROP TABLE ALF_BOOTSTRAP_LOCK CASCADE CONSTRAINTS;

DROP TABLE ACT_ID_INFO CASCADE CONSTRAINTS;

DROP TABLE ACT_ID_USER CASCADE CONSTRAINTS;

DROP TABLE ACT_ID_MEMBERSHIP CASCADE CONSTRAINTS;

DROP TABLE ACT_ID_GROUP CASCADE CONSTRAINTS;

DROP TABLE ACT_HI_ATTACHMENT CASCADE CONSTRAINTS;

DROP TABLE ACT_HI_COMMENT CASCADE CONSTRAINTS;

DROP TABLE ACT_HI_DETAIL CASCADE CONSTRAINTS;

DROP TABLE ACT_HI_TASKINST CASCADE CONSTRAINTS;

DROP TABLE ACT_HI_ACTINST CASCADE CONSTRAINTS;

DROP TABLE ACT_HI_PROCINST CASCADE CONSTRAINTS;

DROP TABLE ACT_RU_EVENT_SUBSCR CASCADE CONSTRAINTS;

DROP TABLE ACT_RU_VARIABLE CASCADE CONSTRAINTS;

DROP TABLE ACT_RU_IDENTITYLINK CASCADE CONSTRAINTS;

DROP TABLE ACT_RU_TASK CASCADE CONSTRAINTS;

DROP TABLE ACT_RE_PROCDEF CASCADE CONSTRAINTS;

DROP TABLE ACT_RU_JOB CASCADE CONSTRAINTS;

DROP TABLE ACT_RU_EXECUTION CASCADE CONSTRAINTS;

DROP TABLE ACT_RE_DEPLOYMENT CASCADE CONSTRAINTS;

DROP TABLE ACT_GE_BYTEARRAY CASCADE CONSTRAINTS;

DROP TABLE ACT_GE_PROPERTY CASCADE CONSTRAINTS;

martes, 22 de octubre de 2013

Instalar Gnome Desktop en Oracle Linux 6.4 con Windows Azure

El problema ocurre desde que Windows Azure Agente Linux no es compatible con NetworkManager incluido en los paquetes de GNOME.
/ Se intalo ejecutando los siguientes pasos

* Eliminar Windows Azure Linux Agente
# yum remove WALinuxAgent
* Instalación de X Window and GNOME
# yum groupinstall "X Window System" "Desktop" "Fonts" "General Purpose Desktop" 
* Eliminar NetworkManager e instalar Windows Azure Linux Agent
# yum remove NetworkManager
# yum install WALinuxAgent
 http://social.msdn.microsoft.com/Forums/en-US/WAVirtualMachinesforLinux/thread/e836aa6a-65cb-47dd-81d5-363ffc013c75

domingo, 20 de octubre de 2013

Después de actualizar a ubuntu 13.10

Luego del lanzamiento de Ubuntu 13.10, siempre ejecutamos la típica actualización en mi caso actualice de Ubuntu 13.04 a 13.10 y nos encontramos con algunas cosillas que nunca faltan aquí una lista de los temas que me sucedieron.
1. Desconfiguración de Unity.
Toco reinstalar completamente unity
$ sudo dpkg --configure -a
2. No funciona el wireless
$ sudo apt-get install linux-headers-generic

$ sudo apt-get install --reinstall bcmwl-kernel-source
3. Instalar vmware workstation
Probar esta solucion
$sudo apt-get install open-vm-tools open-vm-tools-dev open-vm-dkms open-vm-toolbox open-vm-tools-dev
 

$sudo apt-get install gcc
 

$sudo vmware-modconfig --console --install-all --appname="VMware Player" --icon="vmware-player"
Si no Funciona remover y volver a instalar con los paquetes instalados no vuelve a dar el problema.
$vmware-installer --uninstall-product vmware-workstation


$vmware-installer -l


 
4. Instalar flash player
$ sudo apt-get update

$ sudo apt-get install flashplugin-installer
continua....

sábado, 5 de octubre de 2013

Problemas con la licencia de Producción de Bonita

Esta información fue de utilidad cuando trabajaba con la version 5.X de bonita SP.
Hello,
I'm using the bundled Tomcat from Bonita download page : BOS-5.6.1-Tomcat-6.0.33.zip I succesfully call the REST API from another webapp, but now I want to supervise my changes from the User XP. I configured the server and its config files as explained in this article http://www.bonitasoft.org/blog/tutorial … -http-api/.
Then I deployed the bonita USER XP webapp but when I'm trying to log in, I run into this error :
18 janv. 2012 16:11:21 org.ow2.bonita.services.impl.DefaultCommandService execute GRAVE: exception while executing command org.ow2.bonita.facade.rest.RESTServerAPIInterceptorCommand@49dd63c9: Unexpected Exception arrived in Bonita: License Error 27 18 janv. 2012 16:11:21 org.bonitasoft.console.server.login.ConsoleLoginServletExt consoleLoginOnDomain GRAVE: Auto authentication failed on domain: null java.lang.RuntimeException at org.bonitasoft.console.server.login.ConsoleLoginServlet.consoleLogin(ConsoleLoginServlet.java:216) ...
As it says it is a license problem, I put my license file into the folder "BOS-5.6.1-Tomcat-6.0.33\bonita\server\licenses\", but now I get this slightly different error :
18 janv. 2012 16:40:02 org.ow2.bonita.services.impl.DefaultCommandService execute GRAVE: exception while executing command org.ow2.bonita.facade.rest.RESTServerAPIInterceptorCommand@4ea14b94: Unexpected Exception arrived in Bonita: License Error 42,27 18 janv. 2012 16:40:02 org.bonitasoft.console.server.login.ConsoleLoginServletExt consoleLoginOnDomain GRAVE: Auto authentication failed on domain: null java.lang.RuntimeException at org.bonitasoft.console.server.login.ConsoleLoginServlet.consoleLogin(ConsoleLoginServlet.java:216) ...
My license is a standard SP license.
Do you have any insights about this issue ? I couldn't find anything in the forum or in the internet...
Thank you in advance.
Fred.
Hi,
Thank you for your reply.
I reinstalled the wole thing on a fresh new install on Tomcat 7, and I still had the same error license. I figured out that in fact the problem came from the number of CPUs my machine has (4). It seems that my license have been generated for a 2 CPUs machine, so by forcing my Tomcat to use only 2 cores, everything works fine now.
For information, here is the command I use (Found in the BOS-5.5.1-installation-guide-tomcat-rev1.pdf):
cmd /C start /AFFINITY 3 catalina.bat start

How to configure JAAS to use CASClient authentification

Esta información la recupere de un foro me ayudo cuando se me presento el mismo problema.
The order of my filters was exactly what was wrong. I now have this working!
For future reference for anyone else who needs to do this - here's the basic code you should need to get it working. I had success with this on Ubuntu 10.04.1 (64-bit), Tomcat 6, Oracle JDK 1.6.0_20, Bonita 5.3, Cas server 3.4.3 and Cas client 3.1.12
web.xml


    CAS Authentication Filter
    org.jasig.cas.client.authentication.AuthenticationFilter
    
        casServerLoginUrl
        http://cashost:8080/cas/login
    
    
        service
        http://bonitahost:8080/bonita/
    
    
        serverName
        http://bonitahost:8080
    


    CAS Validation Filter
    org.jasig.cas.client.validation.Cas10TicketValidationFilter
    
        casServerUrlPrefix
        http://cashost:8080/cas
    
    
        serverName
        http://bonitahost:8080
    


    CAS HttpServletRequest Wrapper Filter
    org.jasig.cas.client.util.HttpServletRequestWrapperFilter


    CAS Web Authentication Filter
    
    org.jasig.cas.client.tomcat.authentication.WebAuthenticationFilter
    
        service
        http://bonitahost:8080/bonita/
    
    
        serverName
        http://bonitahost:8080
    


    CAS Authentication Filter
    /*


    CAS Validation Filter
    /*


    CAS HttpServletRequest Wrapper Filter
    /*


    CAS Web Authentication Filter
    /*

jaas-standard.cfg
BonitaAuth {
    org.jasig.cas.client.jaas.CasLoginModule required
    ticketValidatorClass="org.jasig.cas.client.validation.Cas10TicketValidator"
    casServerUrlPrefix="http://cashost:8080/cas"
    service="http://bonitahost:8080/bonita"
};
WebAuthenticationFilter.java (Requires cas-client-core-3.1.12.jar, commons-logging-1.1.jar, security-server-5.3.jar, servlet-api-6.0.29.jar)
public class WebAuthenticationFilter extends AbstractCasFilter {
  
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) throws IOException, ServletException {

        HttpServletRequest request = (HttpServletRequest)servletRequset;
        HttpSession session = request.getSession();

        CredentialsEncryptionAPIImpl credEncAPI = CredentialsEncryptionAPIImpl.getInstance();
        String username = request.getRemoteUser();

        String encryptedCredentials = credEncAPI.encryptCredential(username);

        session.setAttribtue(LoginServlet.USER_CREDENTIALS_SESSION_PARAM_KEY, encryptedCredentials);

        chain.doFilter(servletRequset, servletResponse);
    }
}

Validaciones con expresiones Regulares

A string with at least one character but not only white spaces
(.{1,})(\S+)(\s*)
Only the characters of the alphabet:
^[a-zA-Z]+
Everything instead of digits:
^[\D]+
Everything except the given string "mystring":
^((?!mystring).)*$
http://www.cis.upenn.edu/~matuszek/General/RegexTester/regex-tester.html

Deploy Bonita User Experience

1. Requiere tener habilitado el cache de firefox o chrome.
Expected Results
->Copy Bonita Execution Engine libraries
   Copy all *.jar files from \bonita_execution_engine\bonita_client\libs

   and \bonita_execution_engine\engine\libs

   to \server\default\lib.
->Deploy User Experience web application
   Copy \bonita_user_experience\ BOS-5.5-

   DEPLOYwithout_execution_engine_without_client\bonita.war

   to \server\default\deploy.
   remove xml-apis-*.jar from WEB-INF/lib in the war
Copy \bonita_execution_engine\interfaces\EJB\EJB3\bonita.ear

   to \server\default\deploy
Deploy xCMIS web application

  Copy \xcmis\xcmis.war to \server\default\deploy.
Copy Bonita configuration files to web container

   Go to \conf and copy the bonita folder and external folder to

   .
Define variables edit the file \bin\run.conf.bat add code after :JAVA_OPTS_SET
   set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true -Dorg.ow2.bonita.api-type=EJB3 -DBONITA_HOME=\bonita

-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.security.auth.login.config=\external\security\jaas-standard.cfg

-Djava.naming.provider.url=jnp://localhost:1099 [^]

-Dexo.data.dir=\external\xcmis\ext-exo-data -Dorg.exoplatform.container.standalone.config=\external\xcmis\ext-exo-conf\exo-configuration-hsql.xml"

set "MEMORY_OPTS=-Xshare:auto -Xms512m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"

set "JAVA_OPTS=%JAVA_OPTS% %BONITA_OPTS% %MEMORY_OPTS%"
Configure JAAS authentication and communication Add to \server\default\conf\login-config.xml inside :
   

   

   

   

   
  Add to \server\default\conf\login-config.xml inside:

   

   

   

   

   
Configure JAAS for xCMIS If your xCMIS server is also located here, you must also add the following to login-config.xml:
 








Add license file
  copy the valid license file to \bonita\server\licenses

Error al deployar aplicacion JEE en jbos-eap-5.1 con BOS 5.7.1

caused by: java.lang.SecurityException: class "org.hibernate.cfg.AnnotationConfiguration"'s signer information does not match signer information of other classes in the same package


------------------------------------------------------------------------------------------------------------------------------------

Error ocasionado por duplicado de librerías  hibernate,con las de hibernate de bonita

 hibernate-core-3.5.6-Final.jar

hibernate-jpa-2.0-api-1.0.0.Final.jar