Exceptions during deployment of testsupport EARs

2007-02-08 Thread Prasad Kashyap

The deployment-testsuite/test-deployments deploys the following 2 ears
in succession, hits the context-root URL in a browser and then
undeploys it again.

org.apache.geronimo.testsupport/test-ear-j2ee_1.3/2.0-SNAPSHOT/ear
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

This used to work fine until recently. Now the ear that deploys second
throws the following exception (seen during testrun)

[WARNING] Caused by:
org.apache.geronimo.kernel.config.InvalidConfigException:
org.apache.geronimo.kernel.GBeanAlreadyExistsException: GBean already
registered: geronimo:J2EEServer=geronimo,name=cmp,j2eeType=GBean
[WARNING]   at 
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:366)
[WARNING]   at 
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
[WARNING]   at 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
[WARNING]   ... 35 more
[WARNING] Caused by:
org.apache.geronimo.kernel.GBeanAlreadyExistsException: GBean already
registered: geronimo:J2EEServer=geronimo,name=cmp,j2eeType=GBean
[WARNING]   at 
org.apache.geronimo.kernel.basic.BasicRegistry.register(BasicRegistry.java:88)
[WARNING]   at 
org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.java:355)
[WARNING]   at 
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:363)
[WARNING]   ... 37 more


Is this something that the conversion tool is doing ?

When the same 2 ears are deployed from CLI using the deploy tool, a
much misleading exception like the following gets thrown:

  Caused by:
   org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException:
   Configuration already exists:
   org.apache.geronimo.testsupport/test-ear-j2ee_1.3/2.0-SNAPSHOT/ear
   at
org.apache.geronimo.system.configuration.RepositoryConfigurationStore.createNewConfigurationDir(RepositoryConfigurationStore.java:177)
   at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:470)

Cheers
Prasad


Re: Exceptions during deployment of testsupport EARs

2007-02-08 Thread Dain Sundstrom

On Feb 8, 2007, at 6:17 PM, Prasad Kashyap wrote:


org.apache.geronimo.kernel.GBeanAlreadyExistsException: GBean already
registered: geronimo:J2EEServer=geronimo,name=cmp,j2eeType=GBean


This the PersistenceUnit naming problem I pointed out yesterday.  The  
JPA deployer is not picking a very unique names and we quickly run  
into conflicts.


-dain


Re: Exceptions during deployment of testsupport EARs

2007-02-08 Thread Prasad Kashyap

Dain was referring to this -
http://www.nabble.com/Persistence-deployer-bugs--tf3189760.html

Will wait on David Jencks to fix this soon :-)

Cheers
Prasad

On 2/8/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:

On Feb 8, 2007, at 6:17 PM, Prasad Kashyap wrote:

> org.apache.geronimo.kernel.GBeanAlreadyExistsException: GBean already
> registered: geronimo:J2EEServer=geronimo,name=cmp,j2eeType=GBean

This the PersistenceUnit naming problem I pointed out yesterday.  The
JPA deployer is not picking a very unique names and we quickly run
into conflicts.

-dain



Re: Exceptions during deployment of testsupport EARs

2007-02-12 Thread Prasad Kashyap

Jenck's patch seeems to have fixed the persistence bugs. However these
are the new exceptions seen when the same 2 test ears are deployed.

Background Context:
---
The deployment-testsuite/test-deployments deploys the following 2 ears
in succession, hits the context-root URL in a browser and then
undeploys it again.

org.apache.geronimo.testsupport/test-ear-j2ee_1.3/2.0-SNAPSHOT/ear
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

This used to work fine until recently.


Problem #1: Starting an app with EJBs

   Error: Operation failed: start of
   org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
   failed
Unknown start exception

Configuration
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
   failed to start due to the following reasons:
 The service
EJBModule=ejb.jar,J2EEApplication=org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=StatefulSessionBean,name=SimpleStatefulSession
   did not start because
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?J2EEApplication=org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
   did not start.
 The service
J2EEApplication=org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
   did not start because the doStart method threw an exception.

   org.apache.openejb.OpenEJBException: Error building bean
   'SimpleCMPEntity'.  Exception: class java.lang.NullPointerException:
   null: null

at 
org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:61)
at 
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:379)
at 
org.apache.openejb.assembler.classic.Assembler.createEjbJar(Assembler.java:303)
at 
org.apache.geronimo.openejb.OpenEjbSystemGBean.createEjbJar(OpenEjbSystemGBean.java:184)


Full stack traces here -
http://rifers.org/paste/show/3524
http://rifers.org/paste/show/3525

Problem # 2: Undeploy
---
The apps distribute but fail to start. Undeploying them leaves behind
ejb.jar and ejb-cmp2.jar which are locked by the running server. The
server has to be stopped, these files deleted and only then can the
app be re-installed again.

Cheers
Prasad


On 2/8/07, Prasad Kashyap <[EMAIL PROTECTED]> wrote:

Dain was referring to this -
http://www.nabble.com/Persistence-deployer-bugs--tf3189760.html

Will wait on David Jencks to fix this soon :-)

Cheers
Prasad

On 2/8/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
> On Feb 8, 2007, at 6:17 PM, Prasad Kashyap wrote:
>
> > org.apache.geronimo.kernel.GBeanAlreadyExistsException: GBean already
> > registered: geronimo:J2EEServer=geronimo,name=cmp,j2eeType=GBean
>
> This the PersistenceUnit naming problem I pointed out yesterday.  The
> JPA deployer is not picking a very unique names and we quickly run
> into conflicts.
>
> -dain
>



Re: Exceptions during deployment of testsupport EARs

2007-02-12 Thread David Blevins


On Feb 12, 2007, at 7:29 PM, Prasad Kashyap wrote:


Jenck's patch seeems to have fixed the persistence bugs. However these
are the new exceptions seen when the same 2 test ears are deployed.

Background Context:
---
The deployment-testsuite/test-deployments deploys the following 2 ears
in succession, hits the context-root URL in a browser and then
undeploys it again.

org.apache.geronimo.testsupport/test-ear-j2ee_1.3/2.0-SNAPSHOT/ear
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

This used to work fine until recently.


So for problem #1 I checked in a fix which should at least not result  
in a null pointer exception.  We'll see what it throws next :)


For #2 that'll take some debugging, but I think I may have an idea of  
how to fix.


Quick question, how do I run the deployment-testsuite/test-deployments ?

-David





Problem #1: Starting an app with EJBs

   Error: Operation failed: start of
   org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
   failed
Unknown start exception

Configuration
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
   failed to start due to the following reasons:
 The service
EJBModule=ejb.jar,J2EEApplication=org.apache.geronimo.testsupport/ 
test-ear-j2ee_1.4/2.0-SNAPSHOT/ 
ear,j2eeType=StatefulSessionBean,name=SimpleStatefulSession

   did not start because
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear? 
J2EEApplication=org.apache.geronimo.testsupport/test-ear- 
j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar

   did not start.
 The service
J2EEApplication=org.apache.geronimo.testsupport/test-ear- 
j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar

   did not start because the doStart method threw an exception.

   org.apache.openejb.OpenEJBException: Error building bean
   'SimpleCMPEntity'.  Exception: class  
java.lang.NullPointerException:

   null: null

   	at org.apache.openejb.assembler.classic.EjbJarBuilder.build 
(EjbJarBuilder.java:61)
  	at  
org.apache.openejb.assembler.classic.Assembler.createApplication 
(Assembler.java:379)
   	at org.apache.openejb.assembler.classic.Assembler.createEjbJar 
(Assembler.java:303)
   	at org.apache.geronimo.openejb.OpenEjbSystemGBean.createEjbJar 
(OpenEjbSystemGBean.java:184)



Full stack traces here -
http://rifers.org/paste/show/3524
http://rifers.org/paste/show/3525

Problem # 2: Undeploy
---
The apps distribute but fail to start. Undeploying them leaves behind
ejb.jar and ejb-cmp2.jar which are locked by the running server. The
server has to be stopped, these files deleted and only then can the
app be re-installed again.

Cheers
Prasad


On 2/8/07, Prasad Kashyap <[EMAIL PROTECTED]> wrote:

Dain was referring to this -
http://www.nabble.com/Persistence-deployer-bugs--tf3189760.html

Will wait on David Jencks to fix this soon :-)

Cheers
Prasad

On 2/8/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
> On Feb 8, 2007, at 6:17 PM, Prasad Kashyap wrote:
>
> > org.apache.geronimo.kernel.GBeanAlreadyExistsException: GBean  
already

> > registered: geronimo:J2EEServer=geronimo,name=cmp,j2eeType=GBean
>
> This the PersistenceUnit naming problem I pointed out  
yesterday.  The

> JPA deployer is not picking a very unique names and we quickly run
> into conflicts.
>
> -dain
>







Re: Exceptions during deployment of testsupport EARs

2007-02-13 Thread Prasad Kashyap

On 2/13/07, David Blevins <[EMAIL PROTECTED]> wrote:


On Feb 12, 2007, at 7:29 PM, Prasad Kashyap wrote:

> Jenck's patch seeems to have fixed the persistence bugs. However these
> are the new exceptions seen when the same 2 test ears are deployed.
>
> Background Context:
> ---
> The deployment-testsuite/test-deployments deploys the following 2 ears
> in succession, hits the context-root URL in a browser and then
> undeploys it again.
>
> org.apache.geronimo.testsupport/test-ear-j2ee_1.3/2.0-SNAPSHOT/ear
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>
> This used to work fine until recently.

So for problem #1 I checked in a fix which should at least not result
in a null pointer exception.  We'll see what it throws next :)

For #2 that'll take some debugging, but I think I may have an idea of
how to fix.

Quick question, how do I run the deployment-testsuite/test-deployments ?


The easiest way is to edit the geronimo/testsuite/pom.xml and comment
out all other child modules. Just leave the deployment-testsuite in
place. Then run 'mvn".

But for you to recreate and test this, just use the CLI deploy tool to
deploy your copy of
trunk\testsupport\test-deployment-j2ee_1.4\test-ear-j2ee_1.4\target\test-ear-j2ee_1.4-2.0-SNAPSHOT.ear
to a standalone running server.



-David


Cheers
Prasad



>
>
> Problem #1: Starting an app with EJBs
> 
>Error: Operation failed: start of
>org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>failed
>   Unknown start exception
>
>   Configuration
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>failed to start due to the following reasons:
>  The service
> EJBModule=ejb.jar,J2EEApplication=org.apache.geronimo.testsupport/
> test-ear-j2ee_1.4/2.0-SNAPSHOT/
> ear,j2eeType=StatefulSessionBean,name=SimpleStatefulSession
>did not start because
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?
> J2EEApplication=org.apache.geronimo.testsupport/test-ear-
> j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
>did not start.
>  The service
> J2EEApplication=org.apache.geronimo.testsupport/test-ear-
> j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
>did not start because the doStart method threw an exception.
>
>org.apache.openejb.OpenEJBException: Error building bean
>'SimpleCMPEntity'.  Exception: class
> java.lang.NullPointerException:
>null: null
>
>   at org.apache.openejb.assembler.classic.EjbJarBuilder.build
> (EjbJarBuilder.java:61)
>   at
> org.apache.openejb.assembler.classic.Assembler.createApplication
> (Assembler.java:379)
>   at org.apache.openejb.assembler.classic.Assembler.createEjbJar
> (Assembler.java:303)
>   at org.apache.geronimo.openejb.OpenEjbSystemGBean.createEjbJar
> (OpenEjbSystemGBean.java:184)
>
>
> Full stack traces here -
> http://rifers.org/paste/show/3524
> http://rifers.org/paste/show/3525
>
> Problem # 2: Undeploy
> ---
> The apps distribute but fail to start. Undeploying them leaves behind
> ejb.jar and ejb-cmp2.jar which are locked by the running server. The
> server has to be stopped, these files deleted and only then can the
> app be re-installed again.
>
> Cheers
> Prasad
>
>
> On 2/8/07, Prasad Kashyap <[EMAIL PROTECTED]> wrote:
>> Dain was referring to this -
>> http://www.nabble.com/Persistence-deployer-bugs--tf3189760.html
>>
>> Will wait on David Jencks to fix this soon :-)
>>
>> Cheers
>> Prasad
>>
>> On 2/8/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
>> > On Feb 8, 2007, at 6:17 PM, Prasad Kashyap wrote:
>> >
>> > > org.apache.geronimo.kernel.GBeanAlreadyExistsException: GBean
>> already
>> > > registered: geronimo:J2EEServer=geronimo,name=cmp,j2eeType=GBean
>> >
>> > This the PersistenceUnit naming problem I pointed out
>> yesterday.  The
>> > JPA deployer is not picking a very unique names and we quickly run
>> > into conflicts.
>> >
>> > -dain
>> >
>>
>




Re: Exceptions during deployment of testsupport EARs

2007-02-13 Thread Prasad Kashyap

   org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
   failed to start due to the following reasons:
 The service
EJBModule=ejb.jar,J2EEApplication=org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=StatefulSessionBean,name=SimpleStatefulSession
   did not start because
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?J2EEApplication=org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
   did not start.
 The service
J2EEApplication=org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
   did not start because the doStart method threw an exception.

   org.apache.openejb.OpenEJBException: Error building bean
'SimpleCMPEntity'.  Exception: class
java.lang.IllegalArgumentException: Persistence unit cmp for
persistence-context-ref openejb/cmp not found: Persistence unit cmp
for persistence-context-ref openejb/cmp not found

at
   
org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:61)
at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:379)
at
   
org.apache.openejb.assembler.classic.Assembler.createEjbJar(Assembler.java:303)
at
org.apache.geronimo.openejb.OpenEjbSystemGBean.createEjbJar(OpenEjbSystemGBean.java:184)

Full stack trace here :
http://rifers.org/paste/show/3534

Messages as seen in the server 'startup' window or 'geronimo run'
[severity=ERROR,message=unexpected element
(uri:"http://www.openejb.org/openejb-jar/1.1";,
local:"cmp-connection-factory"). Expected elements are
<{http://www.openejb.org/openejb-jar/1.1}ejb-deployment>,locator=[node=null,object=null,url=null,line=25,col=29,offset=-1]]


Here are some exceptions in the geronimo.log
13:10:48,203 INFO  [OpenEJB] Using directory
C:\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT\var\temp for stateful
session passivation
13:11:20,890 WARN  [OpenEJB] Auto-deploying ejb
SimpleStatelessSession:
EjbDeployment(deployment-id=geronimo-deploymentUtil23155.tmpdir/SimpleStatelessSession,
container-id=Default Stateless Container)
13:11:20,890 WARN  [OpenEJB] Auto-deploying ejb SimpleStatefulSession:
EjbDeployment(deployment-id=geronimo-deploymentUtil23155.tmpdir/SimpleStatefulSession,
container-id=Default Stateful Container)
13:11:20,890 WARN  [OpenEJB] Auto-deploying ejb SimpleBMPEntity:
EjbDeployment(deployment-id=geronimo-deploymentUtil23155.tmpdir/SimpleBMPEntity,
container-id=Default BMP Container)
13:11:20,890 WARN  [OpenEJB] Auto-deploying ejb SimpleCMPEntity:
EjbDeployment(deployment-id=geronimo-deploymentUtil23155.tmpdir/SimpleCMPEntity,
container-id=Default CMP Container)
13:11:31,255 ERROR [GBeanInstance] Problem in doFail of
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?J2EEApplication=org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
java.lang.NullPointerException
at 
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:455)
at 
org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:427)
at 
org.apache.geronimo.openejb.OpenEjbSystemGBean.removeEjbJar(OpenEjbSystemGBean.java:191)

Cheers
Prasad


On 2/13/07, David Blevins <[EMAIL PROTECTED]> wrote:


On Feb 12, 2007, at 7:29 PM, Prasad Kashyap wrote:

> Jenck's patch seeems to have fixed the persistence bugs. However these
> are the new exceptions seen when the same 2 test ears are deployed.
>
> Background Context:
> ---
> The deployment-testsuite/test-deployments deploys the following 2 ears
> in succession, hits the context-root URL in a browser and then
> undeploys it again.
>
> org.apache.geronimo.testsupport/test-ear-j2ee_1.3/2.0-SNAPSHOT/ear
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>
> This used to work fine until recently.

So for problem #1 I checked in a fix which should at least not result
in a null pointer exception.  We'll see what it throws next :)

For #2 that'll take some debugging, but I think I may have an idea of
how to fix.

Quick question, how do I run the deployment-testsuite/test-deployments ?

-David


>
>
> Problem #1: Starting an app with EJBs
> 
>Error: Operation failed: start of
>org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>failed
>   Unknown start exception
>
>   Configuration
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>failed to start due to the following reasons:
>  The service
> EJBModule=ejb.jar,J2EEApplication=org.apache.geronimo.testsupport/
> test-ear-j2ee_1.4/2.0-SNAPSHOT/
> ear,j2eeType=StatefulSessionBean,name=SimpleStatefulSession
>did not start because
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?
> J2EEApplication=org.apache.geronimo.testsupport/test-

Re: Exceptions during deployment of testsupport EARs

2007-02-14 Thread David Blevins
[grr - wrote most of this email yesterday morning but then the net in  
my area went down for the rest of the day ]


On Feb 13, 2007, at 10:26 AM, Prasad Kashyap wrote:


   org.apache.openejb.OpenEJBException: Error building bean
'SimpleCMPEntity'.  Exception: class
java.lang.IllegalArgumentException: Persistence unit cmp for
persistence-context-ref openejb/cmp not found: Persistence unit cmp
for persistence-context-ref openejb/cmp not found



This one I suspect is related to David J's recent fixing of the JPA  
code in Geronimo.  Will have to get Dain to look at that.



Messages as seen in the server 'startup' window or 'geronimo run'
[severity=ERROR,message=unexpected element
(uri:"http://www.openejb.org/openejb-jar/1.1";,
local:"cmp-connection-factory"). Expected elements are
<{http://www.openejb.org/openejb-jar/1.1}ejb-deployment>,locator= 
[node=null,object=null,url=null,line=25,col=29,offset=-1]]


This is the result of the above issue, but it's totally the wrong  
exception.  So I went ahead and implemented some code to attempt to  
sniff out which exception to throw; essentially we try to parse  
things as a v3 openejb-jar.xml then if that fails we parse it as a v2  
openejb-jar.xml and do the conversion, if that fails were were just  
throwing the first v3 exception.  Now it tries to parse the file a  
third time and makes a guess at which version you were going for and  
throws the hopefully right exception.  It'll be completely accurate  
if you used namespaces in your doc.  If not, well



13:11:31,255 ERROR [GBeanInstance] Problem in doFail of
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear? 
J2EEApplication=org.apache.geronimo.testsupport/test-ear- 
j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar

java.lang.NullPointerException
	at  
org.apache.openejb.assembler.classic.Assembler.destroyApplication 
(Assembler.java:455)
	at  
org.apache.openejb.assembler.classic.Assembler.destroyApplication 
(Assembler.java:427)
	at org.apache.geronimo.openejb.OpenEjbSystemGBean.removeEjbJar 
(OpenEjbSystemGBean.java:191)


This issue should be fixed.  I also fixed the issue you mentioned  
about if deployment fails that you cannot undeploy the application.   
Give that a try and let me know.


New snapshots have been published.

-David



Cheers
Prasad


On 2/13/07, David Blevins <[EMAIL PROTECTED]> wrote:


On Feb 12, 2007, at 7:29 PM, Prasad Kashyap wrote:

> Jenck's patch seeems to have fixed the persistence bugs. However  
these

> are the new exceptions seen when the same 2 test ears are deployed.
>
> Background Context:
> ---
> The deployment-testsuite/test-deployments deploys the following  
2 ears

> in succession, hits the context-root URL in a browser and then
> undeploys it again.
>
> org.apache.geronimo.testsupport/test-ear-j2ee_1.3/2.0-SNAPSHOT/ear
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>
> This used to work fine until recently.

So for problem #1 I checked in a fix which should at least not result
in a null pointer exception.  We'll see what it throws next :)

For #2 that'll take some debugging, but I think I may have an idea of
how to fix.

Quick question, how do I run the deployment-testsuite/test- 
deployments ?


-David


>
>
> Problem #1: Starting an app with EJBs
> 
>Error: Operation failed: start of
>org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0- 
SNAPSHOT/ear

>failed
>   Unknown start exception
>
>   Configuration
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>failed to start due to the following reasons:
>  The service
> EJBModule=ejb.jar,J2EEApplication=org.apache.geronimo.testsupport/
> test-ear-j2ee_1.4/2.0-SNAPSHOT/
> ear,j2eeType=StatefulSessionBean,name=SimpleStatefulSession
>did not start because
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?
> J2EEApplication=org.apache.geronimo.testsupport/test-ear-
> j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
>did not start.
>  The service
> J2EEApplication=org.apache.geronimo.testsupport/test-ear-
> j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
>did not start because the doStart method threw an exception.
>
>org.apache.openejb.OpenEJBException: Error building bean
>'SimpleCMPEntity'.  Exception: class
> java.lang.NullPointerException:
>null: null
>
>   at org.apache.openejb.assembler.classic.EjbJarBuilder.build
> (EjbJarBuilder.java:61)
>   at
> org.apache.openejb.assembler.classic.Assembler.createApplication
> (Assembler.java:379)
>   at  
org.apache.openejb.assembler.classic.Assembler.createEjbJar

> (Assembler.java:303)
>   at  
org.apache.geronimo.openejb.OpenEjbSystemGBean.createEjbJar

> (OpenEjbSystemGBean.java:184)
>
>
> Full stack traces here -
> http://rifers.org/paste/show/3524
> http://rifers.org/paste/show/3525
>
> Problem # 2: U

Re: Exceptions during deployment of testsupport EARs

2007-02-14 Thread Prasad Kashyap

On 2/14/07, David Blevins <[EMAIL PROTECTED]> wrote:

[grr - wrote most of this email yesterday morning but then the net in
my area went down for the rest of the day ]

On Feb 13, 2007, at 10:26 AM, Prasad Kashyap wrote:

>org.apache.openejb.OpenEJBException: Error building bean
> 'SimpleCMPEntity'.  Exception: class
> java.lang.IllegalArgumentException: Persistence unit cmp for
> persistence-context-ref openejb/cmp not found: Persistence unit cmp
> for persistence-context-ref openejb/cmp not found
>

This one I suspect is related to David J's recent fixing of the JPA
code in Geronimo.  Will have to get Dain to look at that.

> Messages as seen in the server 'startup' window or 'geronimo run'
> [severity=ERROR,message=unexpected element
> (uri:"http://www.openejb.org/openejb-jar/1.1";,
> local:"cmp-connection-factory"). Expected elements are
> <{http://www.openejb.org/openejb-jar/1.1}ejb-deployment>,locator=
> [node=null,object=null,url=null,line=25,col=29,offset=-1]]

This is the result of the above issue, but it's totally the wrong
exception.  So I went ahead and implemented some code to attempt to
sniff out which exception to throw; essentially we try to parse
things as a v3 openejb-jar.xml then if that fails we parse it as a v2
openejb-jar.xml and do the conversion, if that fails were were just
throwing the first v3 exception.  Now it tries to parse the file a
third time and makes a guess at which version you were going for and
throws the hopefully right exception.  It'll be completely accurate
if you used namespaces in your doc.  If not, well

> 13:11:31,255 ERROR [GBeanInstance] Problem in doFail of
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?
> J2EEApplication=org.apache.geronimo.testsupport/test-ear-
> j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
> java.lang.NullPointerException
>   at
> org.apache.openejb.assembler.classic.Assembler.destroyApplication
> (Assembler.java:455)
>   at
> org.apache.openejb.assembler.classic.Assembler.destroyApplication
> (Assembler.java:427)
>   at org.apache.geronimo.openejb.OpenEjbSystemGBean.removeEjbJar
> (OpenEjbSystemGBean.java:191)

This issue should be fixed.  I also fixed the issue you mentioned
about if deployment fails that you cannot undeploy the application.
Give that a try and let me know.

New snapshots have been published.


Undeploy still leaves behind some jar files. This prevents another
deploy. This is from a build which was done at 6 pm EST on a totally
clean local repo.

Cheers
Prasad



-David


> Cheers
> Prasad
>
>
> On 2/13/07, David Blevins <[EMAIL PROTECTED]> wrote:
>>
>> On Feb 12, 2007, at 7:29 PM, Prasad Kashyap wrote:
>>
>> > Jenck's patch seeems to have fixed the persistence bugs. However
>> these
>> > are the new exceptions seen when the same 2 test ears are deployed.
>> >
>> > Background Context:
>> > ---
>> > The deployment-testsuite/test-deployments deploys the following
>> 2 ears
>> > in succession, hits the context-root URL in a browser and then
>> > undeploys it again.
>> >
>> > org.apache.geronimo.testsupport/test-ear-j2ee_1.3/2.0-SNAPSHOT/ear
>> > org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>> >
>> > This used to work fine until recently.
>>
>> So for problem #1 I checked in a fix which should at least not result
>> in a null pointer exception.  We'll see what it throws next :)
>>
>> For #2 that'll take some debugging, but I think I may have an idea of
>> how to fix.
>>
>> Quick question, how do I run the deployment-testsuite/test-
>> deployments ?
>>
>> -David
>>
>>
>> >
>> >
>> > Problem #1: Starting an app with EJBs
>> > 
>> >Error: Operation failed: start of
>> >org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-
>> SNAPSHOT/ear
>> >failed
>> >   Unknown start exception
>> >
>> >   Configuration
>> > org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear
>> >failed to start due to the following reasons:
>> >  The service
>> > EJBModule=ejb.jar,J2EEApplication=org.apache.geronimo.testsupport/
>> > test-ear-j2ee_1.4/2.0-SNAPSHOT/
>> > ear,j2eeType=StatefulSessionBean,name=SimpleStatefulSession
>> >did not start because
>> > org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?
>> > J2EEApplication=org.apache.geronimo.testsupport/test-ear-
>> > j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
>> >did not start.
>> >  The service
>> > J2EEApplication=org.apache.geronimo.testsupport/test-ear-
>> > j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
>> >did not start because the doStart method threw an exception.
>> >
>> >org.apache.openejb.OpenEJBException: Error building bean
>> >'SimpleCMPEntity'.  Exception: class
>> > java.lang.NullPointerException:
>> >null: null
>> >
>> >   at org.apache.openejb.assembler.classic.EjbJarBuilder.build
>> > (EjbJarBuilder.java:

Re: Exceptions during deployment of testsupport EARs

2007-02-14 Thread David Blevins


On Feb 14, 2007, at 7:10 PM, Prasad Kashyap wrote:


On 2/14/07, David Blevins <[EMAIL PROTECTED]> wrote:


> 13:11:31,255 ERROR [GBeanInstance] Problem in doFail of
> org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?
> J2EEApplication=org.apache.geronimo.testsupport/test-ear-
> j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
> java.lang.NullPointerException
>   at
> org.apache.openejb.assembler.classic.Assembler.destroyApplication
> (Assembler.java:455)
>   at
> org.apache.openejb.assembler.classic.Assembler.destroyApplication
> (Assembler.java:427)
>   at  
org.apache.geronimo.openejb.OpenEjbSystemGBean.removeEjbJar

> (OpenEjbSystemGBean.java:191)

This issue should be fixed.  I also fixed the issue you mentioned
about if deployment fails that you cannot undeploy the application.
Give that a try and let me know.

New snapshots have been published.


Undeploy still leaves behind some jar files. This prevents another
deploy. This is from a build which was done at 6 pm EST on a totally
clean local repo.



Ok.

Is there a stacktrace or error of some kind on the undeploy and the  
subsequent failed deploy?


-David





Re: Exceptions during deployment of testsupport EARs

2007-02-14 Thread Prasad Kashyap

On 2/14/07, David Blevins <[EMAIL PROTECTED]> wrote:


On Feb 14, 2007, at 7:10 PM, Prasad Kashyap wrote:

> On 2/14/07, David Blevins <[EMAIL PROTECTED]> wrote:
>>
>> > 13:11:31,255 ERROR [GBeanInstance] Problem in doFail of
>> > org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear?
>> > J2EEApplication=org.apache.geronimo.testsupport/test-ear-
>> > j2ee_1.4/2.0-SNAPSHOT/ear,j2eeType=EJBModule,name=ejb.jar
>> > java.lang.NullPointerException
>> >   at
>> > org.apache.openejb.assembler.classic.Assembler.destroyApplication
>> > (Assembler.java:455)
>> >   at
>> > org.apache.openejb.assembler.classic.Assembler.destroyApplication
>> > (Assembler.java:427)
>> >   at
>> org.apache.geronimo.openejb.OpenEjbSystemGBean.removeEjbJar
>> > (OpenEjbSystemGBean.java:191)
>>
>> This issue should be fixed.  I also fixed the issue you mentioned
>> about if deployment fails that you cannot undeploy the application.
>> Give that a try and let me know.
>>
>> New snapshots have been published.
>
> Undeploy still leaves behind some jar files. This prevents another
> deploy. This is from a build which was done at 6 pm EST on a totally
> clean local repo.
>

Ok.

Is there a stacktrace or error of some kind on the undeploy and the
subsequent failed deploy?


No. That's the sad part. This is the log output on the undeploy
22:02:46,713 INFO  [DirectoryMonitor] Hot deployer notified that an
artifact was removed:
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

Quite normal. Then this is the output on the next deploy

   Error: Unable to distribute test-ear-j2ee_1.4-2.0-SNAPSHOT.ear:
   org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException:
   Configuration already exists:
   org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

   Configuration already exists:
   org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

Here's the test jar-
http://people.apache.org/~prasad/test-ear-j2ee_1.4-2.0-SNAPSHOT.ear

Source:
http://svn.apache.org/viewvc/geronimo/server/trunk/testsupport/test-deployment-j2ee_1.4/



-David






Re: Exceptions during deployment of testsupport EARs

2007-02-14 Thread David Blevins


On Feb 14, 2007, at 7:36 PM, Prasad Kashyap wrote:


On 2/14/07, David Blevins <[EMAIL PROTECTED]> wrote:


On Feb 14, 2007, at 7:10 PM, Prasad Kashyap wrote:
> Undeploy still leaves behind some jar files. This prevents another
> deploy. This is from a build which was done at 6 pm EST on a  
totally

> clean local repo.
>

Ok.

Is there a stacktrace or error of some kind on the undeploy and the
subsequent failed deploy?


No. That's the sad part. This is the log output on the undeploy
22:02:46,713 INFO  [DirectoryMonitor] Hot deployer notified that an
artifact was removed:
org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

Quite normal. Then this is the output on the next deploy

   Error: Unable to distribute test-ear-j2ee_1.4-2.0-SNAPSHOT.ear:

org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException:

   Configuration already exists:
   org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

   Configuration already exists:
   org.apache.geronimo.testsupport/test-ear-j2ee_1.4/2.0-SNAPSHOT/ear

Here's the test jar-
http://people.apache.org/~prasad/test-ear-j2ee_1.4-2.0-SNAPSHOT.ear

Source:
http://svn.apache.org/viewvc/geronimo/server/trunk/testsupport/test- 
deployment-j2ee_1.4/


Ok, there's definitely something stuck somewhere in Geronimo-land now  
-- possibly caused by a failed ejb something-or-other.  (very  
specific, huh :)


Hey David J., do you have any ideas off the top of your head on under  
what circumstances we might consider an ear (not sure how to phrase)  
still deployed or unsuccessfully undeployed?


-David






-David










Re: Exceptions during deployment of testsupport EARs

2007-02-14 Thread David Jencks


On Feb 14, 2007, at 8:01 PM, David Blevins wrote:






Here's the test jar-
http://people.apache.org/~prasad/test-ear-j2ee_1.4-2.0-SNAPSHOT.ear

Source:
http://svn.apache.org/viewvc/geronimo/server/trunk/testsupport/ 
test-deployment-j2ee_1.4/


Ok, there's definitely something stuck somewhere in Geronimo-land  
now -- possibly caused by a failed ejb something-or-other.  (very  
specific, huh :)


Hey David J., do you have any ideas off the top of your head on  
under what circumstances we might consider an ear (not sure how to  
phrase) still deployed or unsuccessfully undeployed?


I've run into this problem more times than I can count, but haven't  
investigated.  All I know is that if you manually delete the  
directory from the g. repo you can then deploy.  So I wonder we could  
do one of 2 things:


1. try harder to delete the directory on undeploy, maybe with more  
finally blocks
2. look harder to see if something's there on deploy, such as the  
config.ser file.  If missing, it seems like we could rm the dir and  
deploy anyway.


But I haven't investigated thoroughly

Would be great to get this fixed.

thanks
david jencks



-David






-David












Re: Exceptions during deployment of testsupport EARs

2007-02-15 Thread Prasad Kashyap

On 2/14/07, David Jencks <[EMAIL PROTECTED]> wrote:



On Feb 14, 2007, at 8:01 PM, David Blevins wrote:



Here's the test jar-
http://people.apache.org/~prasad/test-ear-j2ee_1.4-2.0-SNAPSHOT.ear

Source:
http://svn.apache.org/viewvc/geronimo/server/trunk/testsupport/test-deployment-j2ee_1.4/

Ok, there's definitely something stuck somewhere in Geronimo-land now --
possibly caused by a failed ejb something-or-other.  (very specific, huh :)

Hey David J., do you have any ideas off the top of your head on under what
circumstances we might consider an ear (not sure how to phrase) still
deployed or unsuccessfully undeployed?

I've run into this problem more times than I can count, but haven't
investigated.  All I know is that if you manually delete the directory from
the g. repo you can then deploy.  So I wonder we could do one of 2 things:

1. try harder to delete the directory on undeploy, maybe with more finally
blocks
2. look harder to see if something's there on deploy, such as the config.ser
file.  If missing, it seems like we could rm the dir and deploy anyway.



In this case, the files left behind in the
repository\org\apache\geronimo\testsupport\test-ear-j2ee_1.4\2.0-SNAPSHOT\test-ear-j2ee_1.4-2.0-SNAPSHOT.ear
directory are

ejb.jar  <--- this file is bundled in the ear
ejb-cmp2.jar  <-- this file gets generated by the conversion tool, I think

There is such a big lock on these 2 files that the server has to be
stopped before they can be deleted.

Cheers
Prasad



But I haven't investigated thoroughly

Would be great to get this fixed.

thanks
david jencks



-David






-David