i have try to test the examples  of openejb/tomee on netbeans without maven
for use when i not have internet connections and i not would  wait for
download the dipendencies.

I have:
1 downloaded openejb standalone 4.6-0
2 extract the files.
3 into netbeans created a global library called openejb4.6.0lib and select
all jars from openejb/lib
4 i created a new java project (not web apps ) called simple-stateless
5 from project properties i have added the global lib created above:
openejb4.6.0lib 
6 into the sources packages i added the META-INF/ejb-jar.xml .
(the file b-jar.xml:

<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml//java/ejbjar_3_0.xsd";
         version="3.0">
  
</ejb-jar>


7 into sources packages i have added the package and java sources form
example
8 i create a junit test from class .
9 i replace the test class with the  source test from the example .

10 when i run the test i get the followin errors from consolle

i have try with jdk 1.6 and 1.7 and from wun7 and ubuntu from 2 different
pc.


---------------------------------
from consolle netbeans:

ant -f
E:\\documenti_mauro\\progetti_openejb_esempi_rifatti\\simple-stateless
-Dignore.failing.tests=true -Dnb.wait.for.caches=true test
init:
Deleting:
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\built-jar.properties
deps-jar:
Updating property file:
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\built-jar.properties
init:
deps-clean:
Updating property file:
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\built-clean.properties
Deleting directory
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build
clean:
Created dir:
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\classes
Created dir:
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\empty
Created dir:
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\generated-sources\ap-source-output
Compiling 1 source file to
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\classes
Copying 1 file to
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\classes
compile:
Created dir:
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\test\classes
Compiling 1 source file to
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\test\classes
compile-test:
Created dir:
E:\documenti_mauro\progetti_openejb_esempi_rifatti\simple-stateless\build\test\results
Testsuite: org.superbiz.stateless.basic.CalculatorTest
Exception in thread "main" java.lang.NoClassDefFoundError:
org/w3c/dom/ElementTraversal
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.newDocument(Unknown 
Source)
        at
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.startTestSuite(XMLJUnitResultFormatter.java:115)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireStartTestSuite(JUnitTestRunner.java:723)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:507)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1060)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:911)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 18 more
Testsuite: org.superbiz.stateless.basic.CalculatorTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

Testcase: org.superbiz.stateless.basic.CalculatorTest:BeforeFirstTest:
Caused an ERROR
Forked Java VM exited abnormally. Please note the time in the report does
not reflect the time until the VM exit.
junit.framework.AssertionFailedError: Forked Java VM exited abnormally.
Please note the time in the report does not reflect the time until the VM
exit.
        at 
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)


Test org.superbiz.stateless.basic.CalculatorTest FAILED (crashed)
test-report:
test:
BUILD SUCCESSFUL (total time: 11 seconds)



--
View this message in context: 
http://openejb.979440.n4.nabble.com/test-examples-with-netbeans-not-work-without-maven-I-USE-the-jars-from-openejb4-6-0-lib-tp4668075.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to