You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Filippo Diotalevi <fi...@gmail.com> on 2006/11/29 16:27:18 UTC

"Automatic" deployment of ejb

Hi,
  I'm looking at the example (helloworld-stateful-pojo) and trying to
write other examples... however, in the mentioned example you use the
ejb-jar.xml deployment descriptor and set the property
properties.setProperty("openejb.deployments.classpath", "true");
to specify you want to load the descriptor using the classpath.

Since with ejb3 the descriptor is optional for stateless beans, in my
example I'm using no descriptors at all. Is this way of doing already
supported by the current snapshot of openejb?
-- 
Filippo Diotalevi

Re: "Automatic" deployment of ejb

Posted by David Blevins <da...@visi.com>.
On Nov 29, 2006, at 10:54 AM, Filippo Diotalevi wrote:

> On 11/29/06, David Blevins <da...@visi.com> wrote:
>> FYI, I just published new snapshots for you as I'm not sure how old
>> the existing snapshots were.
>
> Thank David, btw, I'm trying to work with the trunk right now but I
> have some test errors in container/core (see a stack at the end of the
> mail)
>
> I think the error might be quite significant, since I tried to build
> openejb without tests (-Dmaven.test.skip=true), it builds correctly,
> but the example helloworld-stateful-pojo does not run anymore
> (apparently some method signatures are changed).

It seems you've got an out of date source tree as that method was  
changed yesterday:

   http://svn.apache.org/viewvc?view=rev&revision=480276

I just did a new checkout and 'mvn clean install' and everything  
built fine.

-David

> --
> Filippo
>
> org.apache.maven.surefire.booter.SurefireExecutionException:
> org.apache.openejb. SomeoneBrokeSurefireAndThisIsADirtyHackForItTest;
> nested exception is java.lang. NoSuchMethodError:
> org.apache.openejb.core.CoreDeploymentInfo.getAuthorizedRoles
> (Ljava/lang/reflect/Method;)[Ljava/lang/String;; nested exception is
> org.apache. maven.surefire.testset.TestSetFailedException:
> org.apache.openejb.SomeoneBrokeSu refireAndThisIsADirtyHackForItTest;
> nested exception is java.lang.NoSuchMethodEr ror:
> org.apache.openejb.core.CoreDeploymentInfo.getAuthorizedRoles(Ljava/ 
> lang/re
> flect/Method;)[Ljava/lang/String;
> org.apache.maven.surefire.testset.TestSetFailedException:
> org.apache.openejb.Som eoneBrokeSurefireAndThisIsADirtyHackForItTest;
> nested exception is java.lang.NoS uchMethodError:
> org.apache.openejb.core.CoreDeploymentInfo.getAuthorizedRoles(Lj
> ava/lang/reflect/Method;)[Ljava/lang/String;
> java.lang.NoSuchMethodError:
> org.apache.openejb.core.CoreDeploymentInfo.getAutho
> rizedRoles(Ljava/lang/reflect/Method;)[Ljava/lang/String;
>        at  
> org.apache.openejb.core.stateless.StatelessContainer.invoke(Stateless
> Container.java:99)
>        at org.apache.openejb.core.ivm.EjbHomeProxyHandler.create 
> (EjbHomeProxyHa
> ndler.java:193)
>        at org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke 
> (EjbHomeProxyH
> andler.java:105)
>        at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke 
> (BaseEjbProxyHa
> ndler.java:185)
>        at  
> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13Invo
> cationHandler.java:48)
>        at $Proxy40.create(Unknown Source)
>        at org.apache.openejb.test.DerbyTestDatabase.start 
> (DerbyTestDatabase.jav
> a:124)
>        at org.apache.openejb.test.TestManager.start 
> (TestManager.java:71)
>        at org.apache.openejb.iTest.setUp(iTest.java:50)
>        at org.apache.openejb.test.TestSuite.run(TestSuite.java:40)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.
> java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at org.apache.maven.surefire.junit.JUnitTestSet.execute 
> (JUnitTestSet.jav
> a:210)
>        at  
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> tSet(AbstractDirectoryTestSuite.java:135)
>        at  
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
> stractDirectoryTestSuite.java:160)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:81)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.
> java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at  
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
> refireBooter.java:182)
>        at org.apache.maven.surefire.booter.SurefireBooter.main 
> (SurefireBooter.j
> ava:743)
>


Re: "Automatic" deployment of ejb

Posted by Filippo Diotalevi <fi...@gmail.com>.
On 11/29/06, David Blevins <da...@visi.com> wrote:
> FYI, I just published new snapshots for you as I'm not sure how old
> the existing snapshots were.

Thank David, btw, I'm trying to work with the trunk right now but I
have some test errors in container/core (see a stack at the end of the
mail)

I think the error might be quite significant, since I tried to build
openejb without tests (-Dmaven.test.skip=true), it builds correctly,
but the example helloworld-stateful-pojo does not run anymore
(apparently some method signatures are changed).

--
 Filippo

org.apache.maven.surefire.booter.SurefireExecutionException:
org.apache.openejb. SomeoneBrokeSurefireAndThisIsADirtyHackForItTest;
nested exception is java.lang. NoSuchMethodError:
org.apache.openejb.core.CoreDeploymentInfo.getAuthorizedRoles
(Ljava/lang/reflect/Method;)[Ljava/lang/String;; nested exception is
org.apache. maven.surefire.testset.TestSetFailedException:
org.apache.openejb.SomeoneBrokeSu refireAndThisIsADirtyHackForItTest;
nested exception is java.lang.NoSuchMethodEr ror:
org.apache.openejb.core.CoreDeploymentInfo.getAuthorizedRoles(Ljava/lang/re
flect/Method;)[Ljava/lang/String;
org.apache.maven.surefire.testset.TestSetFailedException:
org.apache.openejb.Som eoneBrokeSurefireAndThisIsADirtyHackForItTest;
nested exception is java.lang.NoS uchMethodError:
org.apache.openejb.core.CoreDeploymentInfo.getAuthorizedRoles(Lj
ava/lang/reflect/Method;)[Ljava/lang/String;
java.lang.NoSuchMethodError:
org.apache.openejb.core.CoreDeploymentInfo.getAutho
rizedRoles(Ljava/lang/reflect/Method;)[Ljava/lang/String;
        at org.apache.openejb.core.stateless.StatelessContainer.invoke(Stateless
Container.java:99)
        at org.apache.openejb.core.ivm.EjbHomeProxyHandler.create(EjbHomeProxyHa
ndler.java:193)
        at org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyH
andler.java:105)
        at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHa
ndler.java:185)
        at org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13Invo
cationHandler.java:48)
        at $Proxy40.create(Unknown Source)
        at org.apache.openejb.test.DerbyTestDatabase.start(DerbyTestDatabase.jav
a:124)
        at org.apache.openejb.test.TestManager.start(TestManager.java:71)
        at org.apache.openejb.iTest.setUp(iTest.java:50)
        at org.apache.openejb.test.TestSuite.run(TestSuite.java:40)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:210)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:135)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:160)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:81)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:182)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:743)

Re: "Automatic" deployment of ejb

Posted by David Blevins <da...@visi.com>.
FYI, I just published new snapshots for you as I'm not sure how old  
the existing snapshots were.

-David

On Nov 29, 2006, at 8:41 AM, David Blevins wrote:

> On Nov 29, 2006, at 7:27 AM, Filippo Diotalevi wrote:
>
>> Hi,
>>  I'm looking at the example (helloworld-stateful-pojo) and trying to
>> write other examples... however, in the mentioned example you use the
>> ejb-jar.xml deployment descriptor and set the property
>> properties.setProperty("openejb.deployments.classpath", "true");
>> to specify you want to load the descriptor using the classpath.
>>
>> Since with ejb3 the descriptor is optional for stateless beans, in my
>> example I'm using no descriptors at all. Is this way of doing already
>> supported by the current snapshot of openejb?
>
> We don't yet support having no ejb-jar.xml at all, but I think if  
> you add an ejb-jar.xml with nothing but <ejb-jar/> inside you  
> should get far enough to where we'll start looking for beans in the  
> archive.
>
> -David
>
>> -- 
>> Filippo Diotalevi
>>
>


Re: "Automatic" deployment of ejb

Posted by David Blevins <da...@visi.com>.
On Nov 29, 2006, at 8:41 AM, David Blevins wrote:

> On Nov 29, 2006, at 7:27 AM, Filippo Diotalevi wrote:
>
>> Hi,
>>  I'm looking at the example (helloworld-stateful-pojo) and trying to
>> write other examples... however, in the mentioned example you use the
>> ejb-jar.xml deployment descriptor and set the property
>> properties.setProperty("openejb.deployments.classpath", "true");
>> to specify you want to load the descriptor using the classpath.
>>
>> Since with ejb3 the descriptor is optional for stateless beans, in my
>> example I'm using no descriptors at all. Is this way of doing already
>> supported by the current snapshot of openejb?
>
> We don't yet support having no ejb-jar.xml at all, but I think if  
> you add an ejb-jar.xml with nothing but <ejb-jar/> inside you  
> should get far enough to where we'll start looking for beans in the  
> archive.
>

Going to hack this in.   We'll see if I can't get it done for you in  
short order.

-David


> -David
>
>> -- 
>> Filippo Diotalevi
>>
>


Re: "Automatic" deployment of ejb

Posted by David Blevins <da...@visi.com>.
On Nov 29, 2006, at 7:27 AM, Filippo Diotalevi wrote:

> Hi,
>  I'm looking at the example (helloworld-stateful-pojo) and trying to
> write other examples... however, in the mentioned example you use the
> ejb-jar.xml deployment descriptor and set the property
> properties.setProperty("openejb.deployments.classpath", "true");
> to specify you want to load the descriptor using the classpath.
>
> Since with ejb3 the descriptor is optional for stateless beans, in my
> example I'm using no descriptors at all. Is this way of doing already
> supported by the current snapshot of openejb?

We don't yet support having no ejb-jar.xml at all, but I think if you  
add an ejb-jar.xml with nothing but <ejb-jar/> inside you should get  
far enough to where we'll start looking for beans in the archive.

-David

> -- 
> Filippo Diotalevi
>