Re: newbie questions

2007-12-12 Thread David Blevins


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

2007-12-12 Thread Alexander Buloichik
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:
>> =
>>  = 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:

> 

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

2007-12-12 Thread Jacek Laskowski
On Dec 12, 2007 12:59 PM, Alexander Buloichik
<[EMAIL PROTECTED]> 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:
> =
> 
> =
> 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:



Jacek

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


RE: newbie questions

2007-12-12 Thread Alexander Buloichik
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:
=

MailSenderEJB
pack.MailSenderBean
Container
Auto-acknowledge

javax.jms.Queue
Durable




SearchJMS
pack.SearchJMSBean
Container
Auto-acknowledge

javax.jms.Topic
NonDurable


=
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:
=

=
But in JeeTest.java we read this UTF-8 file by unspecified charset in the 
method readContent.


WBR, Alex.


Re: newbie questions

2007-12-12 Thread Jacek Laskowski
On Dec 12, 2007 11:20 AM, Alexander Buloichik
<[EMAIL PROTECTED]> 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.

[EMAIL PROTECTED] /cygdrive/c/oss/openejb3
$ svn up
At revision 603548.

[EMAIL PROTECTED] /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

2007-12-12 Thread Alexander Buloichik
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)
   

Re: newbie questions

2007-12-11 Thread Jacek Laskowski
On Dec 11, 2007 4:04 PM, Alexander Buloichik
<[EMAIL PROTECTED]> 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