You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2014/03/02 21:20:45 UTC

test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

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.

Re: test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

Posted by mauro2java2011 <ma...@gmail.com>.
I have found the xml-api.jar from xerces website .
Tank you
Il giorno 02/mar/2014 22.00, "mauro2java2011 [via OpenEJB]" <
ml-node+s979440n4668083h48@n4.nabble.com> ha scritto:

> escuse me but not found
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://openejb.979440.n4.nabble.com/test-examples-with-netbeans-not-work-without-maven-I-USE-the-jars-from-openejb4-6-0-lib-tp4668075p4668083.html
>  To unsubscribe from test examples with netbeans not work without maven. I
> USE the jars from openejb4.6.0/lib, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4668075&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2NjgwNzV8LTExMTcxODc2MjU=>
> .
> NAML<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
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-tp4668075p4668088.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

Posted by mauro2java2011 <ma...@gmail.com>.
escuse me but not found




--
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-tp4668075p4668083.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you can check the class is not here with: for i in lib/*.jar; do jar
tf $i | grep ElementTraversal; done

the file is xml-apis as said earlier (in tomee-plus)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-03-02 21:42 GMT+01:00 mauro2java2011 <ma...@gmail.com>:
> into what file i can found it form a tomee1.6.0 plus version?
>
>
>
>
> --
> 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-tp4668075p4668081.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

Posted by mauro2java2011 <ma...@gmail.com>.
into what file i can found it form a tomee1.6.0 plus version?




--
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-tp4668075p4668081.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

Posted by Romain Manni-Bucau <rm...@gmail.com>.
xml-apis is missing from openejb-standalone so just add it
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-03-02 21:34 GMT+01:00 mauro2java2011 <ma...@gmail.com>:
> escuse me i have posted 2 times the same post. but now i have deleted  one .
> I have only added yje jars from the openejb/lib to netbeans java project .
>
> before i have created a global library for reuse .
> I would use without maven
> the glabal library created iy is used to compile time and test.
> what you suggest ?
>
>
>
> --
> 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-tp4668075p4668078.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

Posted by mauro2java2011 <ma...@gmail.com>.
escuse me i have posted 2 times the same post. but now i have deleted  one .
I have only added yje jars from the openejb/lib to netbeans java project . 

before i have created a global library for reuse .
I would use without maven
the glabal library created iy is used to compile time and test.
what you suggest ?



--
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-tp4668075p4668078.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

Posted by mauro2java2011 <ma...@gmail.com>.
 java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal  

this class is not present into the jars of  openejb/lib  ????




--
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-tp4668075p4668080.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: test examples with netbeans not work without maven. I USE the jars from openejb4.6.0/lib

Posted by Romain Manni-Bucau <rm...@gmail.com>.
duplicated?
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-03-02 21:20 GMT+01:00 mauro2java2011 <ma...@gmail.com>:
> 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.