You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2014/03/02 21:26:33 UTC

Re: twat examples openejb with netbeans without maven

is xml-api present?

btw you have few other solutions to avoid depedencies downloading
(select one of the three):
1) run mvn clean install -DskipTests on all examples you want when you
are online then add -o to maven command line (or offline in your
settings https://maven.apache.org/settings.html )
2) run mvn dependencies:copy-dependencies on all projects and save
target/dependency folder and use it as lib
3) run mvn ant:ant then change maven.repo.local var to point to a
local folder (close to 1))

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:16 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/twat-examples-openejb-with-netbeans-without-maven-tp4668074.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.