[BASH] ERROR line 1: #!/bin/bash: No existe el fichero o el directorio

Este error aparece cuando se editar el archivo agregando el extra fin de carro es decir "\r\n" o el byte (BOM) en la primera linea del archivo, para descubrir que pasa debemos ejecutar el siguiente comando:
$ head -1 yourscript | od -c

and see how it ends: This is wrong

0000000   ï   »   ¿   #   !   /   b   i   n   /   b   a   s   h  \n
0000017

This is correct:
0000000   #   !   /   b   i   n   /   b   a   s   h  \n

Use dos2unix to fix your script if this is the issue. Esto ocurre por editar los archivos con un editor de texto gráfico como el Kate con la opción activa de Herramientas-> "Añadir marca de orden de byte(BOM)"

[SOA] Oracle JDeveloper install soporte para OSB

Instalando soporte para SOA al Jdeveloper:

Primero descargar la version 11g de :


chmod 775 jdevstudio11116install.bin 
luxo@luxo-Vostro-3460:~/Descargas$ ./jdevstudio11116install.bin 
Extracting 0%....................................................................................................100%

Jdeveloper Downloads

Ir a HELP-> Check for Updates-> next->  next-> Instalar las siguientes versiones extensiones:

  • Oracle SOA Composite Editor
  • Oracle BPM Studio
  • Spring & Oracle Weblogic SCA 


Reiniciar IDE,luego:

Steps in JDeveloper 1. Create DB Connection in JDeveloper. 2. Create a Generic Project. 3. Create Project as SOA project and use Empty Composite.

Steps to create DB Adaptor

Go to Composite Palette and choose AD Adaptor. Drag and drop the DB Adaptor in the External Reference section (right side of Composite view). It will open a wizard for selecting the connection and Other DB related process. Give name to service that you want to create Choose the DB Connection you have created already. Move one with selecting your desired choice of Stored Procedure or Table (insert/Select) functionality that you want your web service to perform. If you choose Table insert/Select then you can also choose the relation between tables as optional step. Try to keep all steps default if you do not want any special features. Once you finish all steps in wizard, then it will generate whole lot of files under your Project. Look for 4 main files .jca, xsd/.xsd, *.mapping.xml, *.wsdl If you see all these files generated well in your project then you are all set and we can move ahead. If not then look for the issue.

Steps in WLS Console Create Data Source

1.Go to Left panel and choose Data Source. 2. Select New -- Generic Data Source 3. Give Name as you wish but for JNDI Name you have to use the connection name from the *.JCA file that you already have. Open the jca file and search for the ‘UIConnectionName’. This value will be used as JNDI name in data source creation. 4. Choose Driver as oracle.jdbc.xa.client.OracleXADataSource 5. Use the host and Port and other details that you had selected during DB Connection (in JDeveloper). This is obvious step. 6. Choose target AdminServer. 7. If you finish everything correctly. You are all set here and you can choose to test the connection and should be Test Success.

Configure the DB Adaptor

Go to Deployment on left hand panel. In Deployed services. Search for DbAdaptor. Click on the name DbAdaptor. Select Configuration tab. And under it choose Outbound Connection Pool. Here you will see (javax.resource.cci.ConnectionFactory) Click on new.

Choose javax.resource.cci.ConnectionFactory Next page will ask for JNDI Name. For this, you have to go to your *.jca file and choose the value which is already there for Connection-factory as Location (like connection-factory location=?). Use the value of Location as JNDI Name. Transaction will be No Transaction. Choose this for now. This is need basis selection. Leave other selection as is and then Finish.

Note : Once you finish. Go to Properties Tab again and look for a property name : xADataSourceName. Its value should be the same as UIConnectionName that you have in *.jca file. It should be populated. If not then you can set now as well. You have to double click on the value section and then write the name and press enter. Then Save it. With above all steps we have set the DbAdaptor to point to same DB where we have our table/store procedure.

[XML]Apache Commons XMLConfiguration fetch Object list?

Como se puede cargar un archivo de texto plano a XML, la libreria org.apache.commons.configuration, pero que pasa con los XML que tienen varios niveles dentro del Tag raíz?
EJ:
  
      
 VOZ
 servicio de voz
 OBO,4:OBI,2:OICK,0:OBSSM,0:OSB1,0
 OBO,1:OBI,2:OICK,0:OBSSM,1:OSB1,1
 1
      
      
 Llamadas a Moviles
 Servicio de llamadas a móviles
 OBO,0
 OBO,2
 1
      
      
 700
 Servicio de llamada a 700
 OBOPRE,0
 OBOPRE,1
 1
      
      
   LDI
   Larga distancia Internacional
   OBOPRI,0
   OBOPRI,1
   1
      
      
   300
   Servicio llamadas a 300
   OSB3,0
   OSB3,1
   1
      
  

Para recórrelas solo vasta:

List listaServicios = arch.config.getList("servicios.servicio.codigo");

int nunRowPcsFile = listaServicios.size();
        log.info("Cantidad de servicios Leidos del archivo de configuracion:"+nunRowPcsFile);
        int i = 0;

        registrosTbl = new RequestConsulta[nunRowPcsFile];

        if (nunRowPcsFile != 0) {

            for (String rs : listaServicios) {

                RequestConsulta datosObj = new RequestConsulta();
                String codigo=arch.config.getString("servicios.servicio(" + i + ").codigo");
                datosObj.setCodigo(codigo);
                String on=arch.config.getString("servicios.servicio(" + i + ").servicio_on");
                datosObj.setActivacion(on);
                String off=arch.config.getString("servicios.servicio(" + i + ").servicio_off");
                datosObj.setDesactivacion(off);               
                registrosTbl[i] = datosObj;
                i++;

            }

        }

PD: código funciona para java >= 1.6

INFO:INFO API

Instalar Decompiler Java Ubuntu 14.10


Al ejecutar el decompiler de java JD-GUI da este error:
./jd-gui: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

Solucion instalar las liberias X11 del GTK:
sudo apt-get install libgtk2.0-0:i386 libxxf86vm1:i386 libsm6:i386 lib32stdc++6

Problemas de activación WIFI6 en LG_OLED55CXPSA

  Mi experiencia con este TV  ah sido impecable hasta ahora, llevaba un uso normal y no tenia que usar la conexión por wifi ya que tengo una...