Thursday, June 27, 2013

publish with maven in tomcat7

There're a bug in plugin
   org.apache.tomcat.maven
   tomcat7-maven-plugin
   2.1
dont read the tag configuration you must put each var in section properties
      
  http://localhost:port/manager/text
  TomcatServer
  ${project.artifactId}
  true
  /${project.build.finalName}
 
and execute goal mvn tomcat:redeploy this work¡

Wednesday, June 5, 2013

integration-test with web server

I want created a integration-test with web server tomcat to launch integration test execute
mvn integration-test -Ptomcat 
to generate war file
mvn package
In a hand i have web server tomcat: to launch integration-test i have a this file pom.xml to start and stop tomcat web service

   tomcat
   
 
      org.codehaus.mojo
      tomcat-maven-plugin
      1.1
      
       true
       true
       /${project.build.finalName}
       ${project.build.directory}/${project.build.finalName}.war
       9876
      
      
       
        start-tomcat
        pre-integration-test
        
         run-war
        
       
       
        stop-tomcat
        post-integration-test
        
         shutdown
        
       
      
     
and the other hand i have the integration test

   
    maven-surefire-plugin
    
     true
    
   
   
    maven-failsafe-plugin
    2.7.2
    
     
      **/*Test.java
     
    
    
     
      integration-test
      integration-test
      
       integration-test
      
     
     
      verify
      verify
      
       verify
      
     
    
   
  
But I have a problem to add resources files. you need add this line in your pom.xml file

     
      src/test/resources
      
       app.properties
      
     
    
and add this line in pom.xml file to erase previous resources files generate with execute integration test

      org.apache.maven.plugins
      maven-clean-plugin
      2.5
      
       
        clean
        generate-resources
        
         clean
        
       
      

Thursday, May 30, 2013

DSE cassandra: dangerous command apt-get upgrade

there 're an error when upgrade version 1.1.11. to version 1.2.4 in cassandra
si por algun casual se te ocurre actualizar el sistema de cassandra de la version 1.1.11 a la version 1.2.4, te encontraras con el siguiente error
INFO [main] 2012-04-17 12:12:02,065 AbstractCassandraDaemon.java (line 105) Logging initialized
INFO [main] 2012-04-17 12:12:02,123 DatabaseDescriptor.java (line 116) Loading settings from file:/home/vensocia/datastax/resources/cassandra/conf/cassandra.yaml
ERROR [main] 2012-04-17 12:12:02,216 DatabaseDescriptor.java (line 448) Fatal configuration error error
while parsing a block mapping
in "", line 10, column 1:
cluster_name: 'Test Cluster'
^
expected , but found BlockMappingStart
dont modify the file cassandra.yaml
No te vuelvas loco modificando el fichero cassandra.yaml. Tienes dos opciones sigue las instrucciones de http://www.datastax.com/docs/datastax_enterprise2.0/upgrading_dse o revierte los cambios. execute command to show cassandra version
ejecuta el comando para ver que versión de cassandra tienes
dpkg -s cassandra
and make a rollback
y vuelve a dejarlo todo como estaba con la instruccion
sudo apt-get install dsc1.1 

Wednesday, March 20, 2013

Solandra install

download git and gittortoise download solandra form https://github.com/tjake/Solandra.git with cloneRepository download and install maven3 http://maven.apache.org/download.cgi and configure settings repository and proxy prerequisites jdk, mvn configure java_home 1.6 jdk, (note that java7 don`t work) and mvn_home download and put in directory Solandra\reuters-demo app curl http://curl.haxx.se/latest.cgi?curl=win64-nossl modify bach file Solandra\reuters-demo

Cassandra-cli command

Select database or keyspace [default@unknown] USE demo; List all user of database demo with limit 100 , if change limit bigint the cassandra-cli colapse. [default@demo] LIST users; http://www.datastax.com/docs/0.8/dml/using_cli list all keyspace [default@unknown] show keyspace;

Thursday, January 17, 2013

Make inference with pellet in Virtuoso


  set = new VirtGraph(GraphIri, "jdbc:virtuoso://" + uriServer + ":"
    + portJDBC + "", db_user, db_pass);
  vd = new VirtDataSource("jdbc:virtuoso://" + uriServer + ":" + portJDBC
    + "", db_user, db_pass);
  System.out.println("Start inference!");
  Reasoner reasoner = PelletReasonerFactory.theInstance().create();
  reasoner = reasoner.bindSchema(set);
  infModel = ModelFactory.createInfModel(reasoner, modelVirtuoso);
  System.out.println("Stop inference!");
  Model m2 = vd.getNamedModel(GraphIri);
  Model inferido = infModel.difference(m2);
  m2.add(inferido);

Tuesday, January 8, 2013

good examples of Dependence Injections

The first link is a simple tutorial Start
The second is a interesting aplication of AOP Interceptions and the last are Scope Scopes