Problema con testing de aplicacion en Openxava Netbeans

Fernando
2013-05-20
2013-05-23
  • Fernando

    Fernando - 2013-05-20

    Estimados:
    Al intentar correr el test unitario de la aplicación de facturación del libro me sale el siguente error. Aclaro que tengo el hibernate.cfg.xml en la carpeta de persistencia.
    Detected Java version: 1.7 in: C:\Program Files\Java\jdk1.7.0_21\jre
    Detected OS: Windows 7
    Trying to override old definition of task java
    Trying to override old definition of task input
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/apisupport/ant/nblib/org-netbeans-modules-apisupport-ant.jar!/org/netbeans/modules/apisupport/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/apisupport/ant/nblib/org-netbeans-modules-apisupport-ant.jar!/org/netbeans/modules/apisupport/ant/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/apisupport/ant/nblib/org-netbeans-modules-apisupport-ant.jar!/org/netbeans/modules/apisupport/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/apisupport/ant/nblib/org-netbeans-modules-apisupport-ant.jar!/org/netbeans/modules/apisupport/ant/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-debugger-jpda-ant.jar!/org/netbeans/modules/debugger/jpda/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-debugger-jpda-ant.jar!/org/netbeans/modules/debugger/jpda/ant/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-debugger-jpda-ant.jar!/org/netbeans/modules/debugger/jpda/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-debugger-jpda-ant.jar!/org/netbeans/modules/debugger/jpda/ant/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/enterprise/ant/nblib/org-netbeans-modules-j2ee-ant.jar!/org/netbeans/modules/j2ee/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/enterprise/ant/nblib/org-netbeans-modules-j2ee-ant.jar!/org/netbeans/modules/j2ee/ant/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/enterprise/ant/nblib/org-netbeans-modules-j2ee-ant.jar!/org/netbeans/modules/j2ee/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/enterprise/ant/nblib/org-netbeans-modules-j2ee-ant.jar!/org/netbeans/modules/j2ee/ant/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/profiler/ant/nblib/org-netbeans-modules-profiler-nbimpl.jar!/org/netbeans/modules/profiler/nbimpl/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/profiler/ant/nblib/org-netbeans-modules-profiler-nbimpl.jar!/org/netbeans/modules/profiler/nbimpl/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/profiler/ant/nblib/org-netbeans-modules-profiler-nbimpl.jar!/org/netbeans/modules/profiler/nbimpl/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/profiler/ant/nblib/org-netbeans-modules-profiler-nbimpl.jar!/org/netbeans/modules/profiler/nbimpl/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-java-source-ant.jar!/org/netbeans/modules/java/source/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-java-source-ant.jar!/org/netbeans/modules/java/source/ant/antlib.xml from a zip file
    Trying to override old definition of task javac
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-java-source-ant.jar!/org/netbeans/modules/java/source/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-java-source-ant.jar!/org/netbeans/modules/java/source/ant/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-javawebstart.jar!/org/netbeans/modules/javawebstart/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-javawebstart.jar!/org/netbeans/modules/javawebstart/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-javawebstart.jar!/org/netbeans/modules/javawebstart/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/java/ant/nblib/org-netbeans-modules-javawebstart.jar!/org/netbeans/modules/javawebstart/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/ide/ant/nblib/org-netbeans-modules-web-browser-api.jar!/org/netbeans/modules/web/browser/api/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/ide/ant/nblib/org-netbeans-modules-web-browser-api.jar!/org/netbeans/modules/web/browser/api/antlib.xml from a zip file
    parsing buildfile jar:file:/C:/Program%20Files/NetBeans%207.3/ide/ant/nblib/org-netbeans-modules-web-browser-api.jar!/org/netbeans/modules/web/browser/api/antlib.xml with URI = jar:file:/C:/Program%20Files/NetBeans%207.3/ide/ant/nblib/org-netbeans-modules-web-browser-api.jar!/org/netbeans/modules/web/browser/api/antlib.xml from a zip file
    parsing buildfile C:\Users\Fernando\AppData\Local\NetBeans\Cache\7.3\executor-snippets\junit.xml with URI = file:/C:/Users/Fernando/AppData/Local/NetBeans/Cache/7.3/executor-snippets/junit.xml
    Project base dir set to: C:\Users\Fernando\AppData\Local\NetBeans\Cache\7.3\executor-snippets
    Build sequence for target(s) `test' is [-init, -prepare-junit-execution, -prepare-testng-execution, -prepare-execution, -test-class, -check-run-test-single-method-supported, -test-method, test]
    Complete build sequence is [-init, -prepare-junit-execution, -prepare-testng-execution, -prepare-execution, -test-class, -check-run-test-single-method-supported, -test-method, test, ]
    -init:
    Unable to load class org.testng.annotations.Test
    -prepare-junit-execution:
    Override ignored for property "tmp.dir"
    creating macro junit-template
    creating macro testng-template
    -prepare-testng-execution:
    Skipped because property 'false' not set.
    -prepare-execution:
    -test-class:
    Overriding previous definition of property "classpath-translated"
    Override ignored for property "run.jvmargs"
    Override ignored for property "work.dir"
    Implicitly adding C:\Program Files\NetBeans 7.3\java\ant\lib\ant-launcher.jar;C:\Program Files\NetBeans 7.3\java\ant\lib\ant.jar;C:\Program Files\NetBeans 7.3\java\ant\lib\ant-junit.jar;C:\Program Files\NetBeans 7.3\java\ant\lib\ant-junit4.jar to CLASSPATH
    Executing 'C:\Program Files\Java\jdk1.7.0_21\bin\java.exe' with arguments:
    '-ea'
    '-classpath'
    'C:\Program Files\NetBeans 7.3\enterprise\modules\ext\jsf-2_1\javax.faces.jar;C:\Program Files\NetBeans 7.3\enterprise\modules\ext\standard.jar;C:\Program Files\NetBeans 7.3\enterprise\modules\ext\jstl.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\antlr-2.7.6.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\asm.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\asm-attrs.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\cglib-2.1.3.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\commons-collections-2.1.1.jar;C:\Program Files\NetBeans 7.3\ide\modules\org-apache-commons-logging.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\dom4j-1.6.1.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\ehcache-1.2.3.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\jdbc2_0-stdext.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\jta.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\hibernate3.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\hibernate-tools.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\hibernate-annotations.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\hibernate-commons-annotations.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\hibernate-entitymanager.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\javassist.jar;C:\Program Files\NetBeans 7.3\java\modules\ext\hibernate\ejb3-persistence.jar;C:\Program Files\glassfish-3.1.2.2\javadb\lib\derbyclient.jar;C:\Program Files\glassfish-3.1.2.2\javadb\lib\derby.jar;C:\openxava-4.7\openxava.jar;C:\openxava-4.7\workspace\Facturacion\build\web\WEB-INF\classes;C:\Program Files\NetBeans 7.3\platform\modules\ext\junit-4.10.jar;C:\openxava-4.7\htmlunit.jar;C:\openxava-4.7\workspace\Facturacion\build\test\classes;C:\openxava-4.7\tomcat\lib\annotations-api.jar;C:\openxava-4.7\tomcat\lib\catalina-ant.jar;C:\openxava-4.7\tomcat\lib\catalina-ha.jar;C:\openxava-4.7\tomcat\lib\catalina-tribes.jar;C:\openxava-4.7\tomcat\lib\catalina.jar;C:\openxava-4.7\tomcat\lib\ejb.jar;C:\openxava-4.7\tomcat\lib\el-api.jar;C:\openxava-4.7\tomcat\lib\hsqldb.jar;C:\openxava-4.7\tomcat\lib\jasper-el.jar;C:\openxava-4.7\tomcat\lib\jasper.jar;C:\openxava-4.7\tomcat\lib\jsp-api.jar;C:\openxava-4.7\tomcat\lib\jta.jar;C:\openxava-4.7\tomcat\lib\postgresql-9.0-802.jdbc4.jar;C:\openxava-4.7\tomcat\lib\servlet-api.jar;C:\openxava-4.7\tomcat\lib\tomcat-coyote.jar;C:\openxava-4.7\tomcat\lib\tomcat-dbcp.jar;C:\openxava-4.7\tomcat\lib\tomcat-i18n-es.jar;C:\openxava-4.7\tomcat\lib\tomcat-i18n-fr.jar;C:\openxava-4.7\tomcat\lib\tomcat-i18n-ja.jar;C:\openxava-4.7\tomcat\bin\tomcat-juli.jar;C:\Program Files\NetBeans 7.3\java\ant\lib\ant-launcher.jar;C:\Program Files\NetBeans 7.3\java\ant\lib\ant.jar;C:\Program Files\NetBeans 7.3\java\ant\lib\ant-junit.jar;C:\Program Files\NetBeans 7.3\java\ant\lib\ant-junit4.jar'
    'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
    'org.openxava.facturacion.test.ClienteTest'
    'filtertrace=true'
    'haltOnError=false'
    'haltOnFailure=false'
    'showoutput=true'
    'outputtoformatters=true'
    'logfailedtests=true'
    'logtestlistenerevents=true'
    'formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter'
    'formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,C:\Users\Fernando\AppData\Local\Temp\TEST-org.openxava.facturacion.test.ClienteTest.xml'
    'crashfile=C:\openxava-4.7\workspace\Facturacion\build\junitvmwatcher8660138066300127424.properties'
    'propsfile=C:\openxava-4.7\workspace\Facturacion\build\junit1972889607901580104.properties'
    The ' characters around the executable and arguments are
    not part of the command.
    may 20, 2013 12:08:47 PM org.hibernate.cfg.annotations.Version
    INFO: Hibernate Annotations 3.3.1.GA
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Environment
    INFO: Hibernate 3.2.5
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Environment
    INFO: hibernate.properties not found
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Environment buildBytecodeProvider
    INFO: Bytecode provider name : cglib
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Environment
    INFO: using JDK 1.4 java.sql.Timestamp handling
    Testsuite: org.openxava.facturacion.test.ClienteTest
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Configuration configure
    INFO: configuring from resource: /hibernate.cfg.xml
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: Configuration resource: /hibernate.cfg.xml
    Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
    ------------- Standard Error -----------------
    may 20, 2013 12:08:47 PM org.hibernate.cfg.annotations.Version
    INFO: Hibernate Annotations 3.3.1.GA
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Environment
    INFO: Hibernate 3.2.5
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Environment
    INFO: hibernate.properties not found
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Environment buildBytecodeProvider
    INFO: Bytecode provider name : cglib
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Environment
    INFO: using JDK 1.4 java.sql.Timestamp handling
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Configuration configure
    INFO: configuring from resource: /hibernate.cfg.xml
    may 20, 2013 12:08:47 PM org.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: Configuration resource: /hibernate.cfg.xml
    ------------- ---------------- ---------------
    Null Test: Caused an ERROR
    null
    java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:188)
    Test org.openxava.facturacion.test.ClienteTest FAILED

     
  • Javier Paniza

    Javier Paniza - 2013-05-23

    Hola Fernando,

    si ese test lo ejecutas desde dentro del Eclipse, ¿funciona?
    Si añades una clase de test jUnit normal y corriente en el proyecto, con un método test vacio que siempre funcion y la ejecutas con tu entorno, ¿funciona?


    Ayuda a otros en este foro como yo te ayudo a ti.
    ¿Necesitas más ayuda? Usa el soporte profesional de OpenXava

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks