You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Alexander Buloichik <Al...@epam.com> on 2007/12/11 16:04:26 UTC

newbie questions

Hi, All !

I installed OpenEJB, saw mailing lists and http://openejb.apache.org/, but there are some questions exists.

1. Is there any detailed description for openejb.xml format ?

2. OpenEJB 3.0 beta 1 works strange with JNDI:

	IAddressLH addr=(IAddressLH)findContext.lookup("AddressEJBLocalHome");  // works good
	findContext.bind("AddressEntity", addr);                                // works good
	Object o=findContext.lookup("AddressEntity");                           // doesn't works - javax.naming.NameNotFoundException: Name "AddressEntity" not found.
	at org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:172)
	at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:129)
	at javax.naming.InitialContext.lookup(InitialContext.java:392)


3. I can't build openejb from sources by maven:
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.openejb.jee.oejb3.OpenejbJarTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.328 sec <<< FAILURE!
Running org.apache.openejb.jee.oejb2.OpenejbJarTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.781 sec
Running org.apache.openejb.jee.oejb2.ConversionTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec
Running org.apache.openejb.jee.wls.JaxbWlsTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.375 sec
Running org.apache.openejb.jee.JeeTest
Tests run: 6, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.765 sec <<< FAILURE!
Running org.apache.openejb.jee.jpa.PersistenceXmlTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!
Running org.apache.openejb.jee.jpa.JaxbTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.406 sec

Results :

Tests in error: 
  testAll(org.apache.openejb.jee.oejb3.OpenejbJarTest)
  testEjbJar(org.apache.openejb.jee.JeeTest)
  testAll(org.apache.openejb.jee.jpa.PersistenceXmlTest)

Tests run: 17, Failures: 0, Errors: 3, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to D:\Work\tests - openEJB 3\container\openejb-jee\target\surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26 seconds
[INFO] Finished at: Tue Dec 11 17:00:19 EET 2007
[INFO] Final Memory: 37M/63M
[INFO] ------------------------------------------------------------------------

WBR, Alex.

Re: newbie questions

Posted by David Blevins <da...@visi.com>.
On Dec 12, 2007, at 2:20 AM, Alexander Buloichik wrote:

> Hello, Jacek !
>
>>> 1. Is there any detailed description for openejb.xml format ?
>
>> I don't know about more user-friendly description than the schema  
>> itself [1]. What do you need it for? Provided you do some advanced  
>> stuff you shouldn't need it yet.
>
>> [1] https://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/resources/schema/openejb.xsd
>
> Thanks, it's better than nothing, but it's not enough. I want to  
> define message container. Where can I find parameters description,  
> like InstanceLimit, etc. ? Or where can I find datasource parameters  
> description, like maximum allowed connections, etc. ?

Working on getting our docs filled out, the primary reason we're still  
label ourselves beta.  I've taken a crack at a doc for you.

    http://cwiki.apache.org/OPENEJBx30/mdb-container.html

Definitely give any feedback you can think of on what you'd like to  
see more of in that doc.

-David




RE: newbie questions

Posted by Alexander Buloichik <Al...@epam.com>.
Hello, Jacek !

> Ah, OPENEJB-701 [1] struck again.

> [1] https://issues.apache.org/jira/browse/OPENEJB-701

Aha, thank you. Is there any chanse to this issue will be fixed before 3.0 release ? And when 3.0 release is planned ?

>> My system is Windows XP with java 1.6_03. I found problem. My system locale is be_BY. So, my ejb-jar-example1.xml contains line:
>> =====================
>> <!-- $Rev: 600204 $ $Date: 2007-12-02 00:35:03 +0200 (??, 02 ??? 2007) 
>> $ --> ===================== But in JeeTest.java we read this UTF-8 
>> file by unspecified charset in the method readContent.

>Thanks for reporting. It seems that there's something wrong with svn client that checked out the sources. I work with pl_PL locale and the file's got:

> <!-- $Rev: 600204 $ $Date: 2007-12-01 23:35:03 +0100 (Sat, 01 Dec 2007) $ -->

I see cyrillic characters instead '?' in "(??, 02 ??? 2007)" in ejb-jar-example1.xml - it's belarusian names of day and month. If you see "??" in source message, then seems to cyrillic fonts is not displayed in your system.
I'm not sure what it's bug in svn client - Is it required to have english names for month and day in "Rev" ?. Both my SVN clients produce the same file (with belarusian names). I'm using Subclipse module for Eclipse and TortoiseSVN.

Anyway, it's not a right way to convert bytes to chars without specify locale.

WBR, Alex.

Re: newbie questions

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Dec 12, 2007 12:59 PM, Alexander Buloichik
<Al...@epam.com> wrote:

> Sorry, I can't send full ejb-jar.xml, but there is a part which can't be loaded:
...
> It's not valid by http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd of course, but it's valid by http://java.sun.com/dtd/ejb-jar_2_0.dtd

Ah, OPENEJB-701 [1] struck again.

[1] https://issues.apache.org/jira/browse/OPENEJB-701

> My system is Windows XP with java 1.6_03. I found problem. My system locale is be_BY. So, my ejb-jar-example1.xml contains line:
> =====================
> <!-- $Rev: 600204 $ $Date: 2007-12-02 00:35:03 +0200 (??, 02 ??? 2007) $ -->
> =====================
> But in JeeTest.java we read this UTF-8 file by unspecified charset in the method readContent.

Thanks for reporting. It seems that there's something wrong with svn
client that checked out the sources. I work with pl_PL locale and the
file's got:

<!-- $Rev: 600204 $ $Date: 2007-12-01 23:35:03 +0100 (Sat, 01 Dec 2007) $ -->

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

RE: newbie questions

Posted by Alexander Buloichik <Al...@epam.com>.
Hello, Jacek ! 

>> Another problem what OpenEJB doesn't understand ejb-jar.xml from EJB2.1. It's not a great problem for me, but it can be problem for other peoples.

Sorry, I mean EJB2.0(I'm using WebLogic 8.1).

>Could you send the ejb-jar.xml in question?

Sorry, I can't send full ejb-jar.xml, but there is a part which can't be loaded:
=================================
        <message-driven>
            <ejb-name>MailSenderEJB</ejb-name>
            <ejb-class>pack.MailSenderBean</ejb-class>
            <transaction-type>Container</transaction-type>
            <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
            <message-driven-destination>
                <destination-type>javax.jms.Queue</destination-type>
                <subscription-durability>Durable</subscription-durability>
            </message-driven-destination>
        </message-driven>
        
        <message-driven>
            <ejb-name>SearchJMS</ejb-name>
            <ejb-class>pack.SearchJMSBean</ejb-class>
            <transaction-type>Container</transaction-type>
            <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
            <message-driven-destination>
                <destination-type>javax.jms.Topic</destination-type>
                <subscription-durability>NonDurable</subscription-durability>
            </message-driven-destination>
        </message-driven>
=================================
It's not valid by http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd of course, but it's valid by http://java.sun.com/dtd/ejb-jar_2_0.dtd


>> javax.xml.bind.UnmarshalException
>>  - with linked exception:
>> [com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceExcep
>> tion: Invalid byte 1 of 1-byte UTF-8 sequence.]

>Never seen it before. Is it on Java 5? Describe your build environment so we could hunt it down.

My system is Windows XP with java 1.6_03. I found problem. My system locale is be_BY. So, my ejb-jar-example1.xml contains line:
=====================
<!-- $Rev: 600204 $ $Date: 2007-12-02 00:35:03 +0200 (??, 02 ??? 2007) $ -->
=====================
But in JeeTest.java we read this UTF-8 file by unspecified charset in the method readContent.


WBR, Alex.

Re: newbie questions

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Dec 12, 2007 11:20 AM, Alexander Buloichik
<Al...@epam.com> wrote:

> Thanks, it's better than nothing, but it's not enough. I want to define message container. Where can I find parameters description, like InstanceLimit, etc. ? Or where can I find datasource parameters description, like maximum allowed connections, etc. ?

https://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/resources/default.openejb.conf
would be a good start. We definitely need to describe it. I think it
is somewhere, but...wait it's here -
http://openejb.apache.org/configuration.html and here -
http://openejb.apache.org/containers.html. Go to openejb's website and
in the right-hand menu there's the Configuration section. That's where
these docs await you.

> Another problem what OpenEJB doesn't understand ejb-jar.xml from EJB2.1. It's not a great problem for me, but it can be problem for other peoples.

Could you send the ejb-jar.xml in question?

> I see container\openejb-jee\target\surefire-reports\org.apache.openejb.jee.oejb3.OpenejbJarTest.txt :
>
> =====================================
> -------------------------------------------------------------------------------
> Test set: org.apache.openejb.jee.oejb3.OpenejbJarTest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.313 sec <<< FAILURE!
> testAll(org.apache.openejb.jee.oejb3.OpenejbJarTest)  Time elapsed: 0.281 sec  <<< ERROR!
> javax.xml.bind.UnmarshalException
>  - with linked exception:
> [com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.]

Never seen it before. Is it on Java 5? Describe your build environment
so we could hunt it down.

> I forgot it before, thank you. But I have the same result with -Dassemble now.

-Dassemble enables building assemblies, like openejb-standalone and
such. See assembly directory.

> I used http://openejb.apache.org/source-code.html for build openejb from sources. I get sources from http://svn.apache.org/repos/asf/openejb/trunk/openejb3, then run "mvn clean install -Dassemble"

I'm rebuilding openejb3 with no m2 local repository to see whether
it's reproducible.

jlaskowski@dev /cygdrive/c/oss/openejb3
$ svn up
At revision 603548.

jlaskowski@dev /cygdrive/c/oss/openejb3
$ java -version
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

RE: newbie questions

Posted by Alexander Buloichik <Al...@epam.com>.
Hello, Jacek !

>> 1. Is there any detailed description for openejb.xml format ?

> I don't know about more user-friendly description than the schema itself [1]. What do you need it for? Provided you do some advanced stuff you shouldn't need it yet.

> [1] https://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/resources/schema/openejb.xsd

Thanks, it's better than nothing, but it's not enough. I want to define message container. Where can I find parameters description, like InstanceLimit, etc. ? Or where can I find datasource parameters description, like maximum allowed connections, etc. ? 

>> 2. OpenEJB 3.0 beta 1 works strange with JNDI:
>>
>>         IAddressLH addr=(IAddressLH)findContext.lookup("AddressEJBLocalHome");  // works good
>>         findContext.bind("AddressEntity", addr);                                // works good
>>         Object o=findContext.lookup("AddressEntity");                           // doesn't works - javax.naming.NameNotFoundException: Name "AddressEntity" not found.
>>         at org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:172)
>>         at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:129)
>>         at javax.naming.InitialContext.lookup(InitialContext.java:392)

> I need to reproduce it. It might be a bug. I see you use EJB 2.1-style ejbs. Is that really necessary? Why do you bind ejb objects to jndi?

Sure, it's necessary. I store some objects in JNDI. Also, I'm working with EJB2.1 since my projects works with WebLogic 8.1.
Another problem what OpenEJB doesn't understand ejb-jar.xml from EJB2.1. It's not a great problem for me, but it can be problem for other peoples.

>> Running org.apache.openejb.jee.oejb3.OpenejbJarTest
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.328 sec <<< FAILURE!

>Is this trunk or a openejb3.0-beta-1 branch? Could you show us target/surefire-reports/org.apache.openejb.jee.oejb3.OpenejbJarTest.txt?

Yes, this is trunk(http://svn.apache.org/repos/asf/openejb/trunk/openejb3). 

I see container\openejb-jee\target\surefire-reports\org.apache.openejb.jee.oejb3.OpenejbJarTest.txt :

=====================================
-------------------------------------------------------------------------------
Test set: org.apache.openejb.jee.oejb3.OpenejbJarTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.313 sec <<< FAILURE!
testAll(org.apache.openejb.jee.oejb3.OpenejbJarTest)  Time elapsed: 0.281 sec  <<< ERROR!
javax.xml.bind.UnmarshalException
 - with linked exception:
[com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.]
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:196)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:167)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)
	at org.apache.openejb.jee.oejb3.OpenejbJarTest.testAll(OpenejbJarTest.java:49)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334)
	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:977)
Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:674)
	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:547)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(XMLEntityScanner.java:1242)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanComment(XMLScanner.java:756)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanComment(XMLDocumentFragmentScannerImpl.java:1034)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:936)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:194)
	... 27 more

=====================================

>> Running org.apache.openejb.jee.JeeTest Tests run: 6, Failures: 0, 
>> Errors: 1, Skipped: 0, Time elapsed: 0.765 sec <<< FAILURE!
>> Running org.apache.openejb.jee.jpa.PersistenceXmlTest
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!

>I need the corresponding txt files too. You may also disable running the tests at openejb3 build with -Dmaven.test.skip as follows:

The same error in the other failed tests.

>  mvn -Dmaven.test.skip clean install

>Don't forget to run the build with -Dassemble.

I forgot it before, thank you. But I have the same result with -Dassemble now.

>BTW, What documentation do you follow to build openejb? What documentation is not provided? What do you miss as far as the documentation's concerned?

I used http://openejb.apache.org/source-code.html for build openejb from sources. I get sources from http://svn.apache.org/repos/asf/openejb/trunk/openejb3, then run "mvn clean install -Dassemble"


WBR, Alex.

Re: newbie questions

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Dec 11, 2007 4:04 PM, Alexander Buloichik
<Al...@epam.com> wrote:

> 1. Is there any detailed description for openejb.xml format ?

I don't know about more user-friendly description than the schema
itself [1]. What do you need it for? Provided you do some advanced
stuff you shouldn't need it yet.

[1] https://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/resources/schema/openejb.xsd

> 2. OpenEJB 3.0 beta 1 works strange with JNDI:
>
>         IAddressLH addr=(IAddressLH)findContext.lookup("AddressEJBLocalHome");  // works good
>         findContext.bind("AddressEntity", addr);                                // works good
>         Object o=findContext.lookup("AddressEntity");                           // doesn't works - javax.naming.NameNotFoundException: Name "AddressEntity" not found.
>         at org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:172)
>         at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:129)
>         at javax.naming.InitialContext.lookup(InitialContext.java:392)

I need to reproduce it. It might be a bug. I see you use EJB 2.1-style
ejbs. Is that really necessary? Why do you bind ejb objects to jndi?

> Running org.apache.openejb.jee.oejb3.OpenejbJarTest
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.328 sec <<< FAILURE!

Is this trunk or a openejb3.0-beta-1 branch? Could you show us
target/surefire-reports/org.apache.openejb.jee.oejb3.OpenejbJarTest.txt?

> Running org.apache.openejb.jee.JeeTest
> Tests run: 6, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.765 sec <<< FAILURE!
> Running org.apache.openejb.jee.jpa.PersistenceXmlTest
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!

I need the corresponding txt files too. You may also disable running
the tests at openejb3 build with -Dmaven.test.skip as follows:

  mvn -Dmaven.test.skip clean install

Don't forget to run the build with -Dassemble.

BTW, What documentation do you follow to build openejb? What
documentation is not provided? What do you miss as far as the
documentation's concerned?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl