Re: Migrating EAR artifact from WebSphere to WASCE

2005-11-25 Thread David Jencks


On Nov 24, 2005, at 9:01 PM, Siraj Mohamed wrote:



Hi Aaron,

I am not using Geronimo-application.xml but this is my  
openejb-jar.xml's

header block.

?xml version=1.0?

openejb-jar xmlns=http://www.openejb.org/xml/ns/openejb-jar;
configId=ejb-RXMeta
parentId=org/apache/geronimo/Server


Please note that I was able to test my hello world ejb sample on WASCE
successfully and I do not see such exceptions.

As you suggested, I tried to deploy through command-line and it seems  
it

gives me a descriptive exception like:

Error: Unable to distribute RXMeta.ear: Unable to initialize
 EJBContainer GBean: ejbNameImportService

 com/xmeta/client/ServiceClientException


It seems that this class not found in the classpath. But I have many
supporting JARs to my RXMeta.ear application and I have copied them all
into lib\endorsed of WASCE. That's the way we do on WebSphere (copying
them into lib\ext folder). It looks like it doesn't picking up.


Would you suggest a better way of handling supported JARs to my
application at deployment time other than I bundle all my JARs to the
EAR?


The geronimo way to do this is with dependencies in your application  
deployment plan.


First, decide where in the geronimo repository your jars should go.   
For instance, if they are produced by virtusa, they would go in  
virtusa/jars/.  It is best to label the jars with a version number, so  
you might end up with a jar


${GERONIMO_HOME}/repository/virtusa/jars/MyJar-1.0.jar

Next, write an application plan to include your dependencies and the  
openejb-jar plan (I am assuming that you are in fact deploying an ear,  
not just an ejb jar file).


?xml version=1.0 encoding=UTF-8?
!--

Copyright 2004-2005 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the License);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an AS IS BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
implied.

See the License for the specific language governing permissions and
limitations under the License.
--

!-- $Rev: 47568 $ $Date: 2004-09-30 01:21:54 -0700 (Thu, 30 Sep 2004)  
$ --


application
xmlns=http://geronimo.apache.org/xml/ns/j2ee/application-1.0;
configId=RXMeta
  parentId=org/apache/geronimo/Server


dependency
groupIdvirtusa/groupId
artifactIdMyJar/artifactId
version1.0/version
/dependency

module
ejbejb-RXMeta/ejb
   openejb-jar xmlns=http://www.openejb.org/xml/ns/openejb-jar;
configId=ejb-RXMeta
  
(the rest of your ejb plan here)
/module


/application


You can include as many dependency elements as you need.  The jars  
listed in the dependencies will be in your application's classloader,  
but not available to any other applications (unless they also list them  
as dependencies or use your application as a parent).


You can either include the plan in the ear file or, as I prefer, keep  
it separate.  If you wish to use the hot deployer you need to include  
the plan in the ear.


Thanks
david jencks




Thanks,
Siraj

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Mulder
Sent: Thursday, November 24, 2005 8:41 PM
To: user@geronimo.apache.org
Subject: Re: Migrating EAR artifact from WebSphere to WASCE

It's curious that it can't find EJB classes.  Can you post the header
block of your openejb-jar.xml (and geronimo-application.xml if this is
in an EAR)?  It may be that you're using the wrong parentId?

?xml version=1.0 encoding=UTF-8?
openejb-jar
xmlns=http://www.openejb.org/xml/ns/openejb-jar-2.0;
configId=MyConfigName
parentId=org/apache/geronimo/Server
  ...

Though I'm assuming that the configurations in WASCE are named the
same as in Geronimo -- maybe we ought to ask one of the IBM folks to
confirm.  (Or you can go to the system deployment list in the console
and check yourself.)

If that looks right, you could also try deploying using the
command-line tool instead of the console and just make sure you get
the same error (that is, make sure it's not a problem specific to the
console).

Thanks,
Aaron

On 11/24/05, Siraj Mohamed [EMAIL PROTECTED] wrote:




Hi All,



I am evaluating Geronimo/WASCE to migrate my application from

WebSphere to

WASCE. As a start, I removed all websphere specific configuration

files

bundled with EAR such as ibm-application-bnd.xmi, ibm-ejb-jar-bnd.xmi,
ibm-ejb-jar-ext.xmi and ibm_ejbext.properties. Also I created
openejb-jar.xml based on the information of jboss.xml and bundled it

with

EAR.



For example, if jboss.xml contains like:



session

 ejb-nameSandboxService/ejb-name

 jndi-nameSandboxService/jndi-name

 resource-ref

Re: Migrating EAR artifact from WebSphere to WASCE

2005-11-24 Thread Aaron Mulder
It's curious that it can't find EJB classes.  Can you post the header
block of your openejb-jar.xml (and geronimo-application.xml if this is
in an EAR)?  It may be that you're using the wrong parentId?

?xml version=1.0 encoding=UTF-8?
openejb-jar
xmlns=http://www.openejb.org/xml/ns/openejb-jar-2.0;
configId=MyConfigName
parentId=org/apache/geronimo/Server
  ...

Though I'm assuming that the configurations in WASCE are named the
same as in Geronimo -- maybe we ought to ask one of the IBM folks to
confirm.  (Or you can go to the system deployment list in the console
and check yourself.)

If that looks right, you could also try deploying using the
command-line tool instead of the console and just make sure you get
the same error (that is, make sure it's not a problem specific to the
console).

Thanks,
Aaron

On 11/24/05, Siraj Mohamed [EMAIL PROTECTED] wrote:



 Hi All,



 I am evaluating Geronimo/WASCE to migrate my application from WebSphere to
 WASCE. As a start, I removed all websphere specific configuration files
 bundled with EAR such as ibm-application-bnd.xmi, ibm-ejb-jar-bnd.xmi,
 ibm-ejb-jar-ext.xmi and ibm_ejbext.properties. Also I created
 openejb-jar.xml based on the information of jboss.xml and bundled it with
 EAR.



 For example, if jboss.xml contains like:



 session

  ejb-nameSandboxService/ejb-name

  jndi-nameSandboxService/jndi-name

  resource-ref

 res-ref-namexmeta_defaultDS/res-ref-name

 jndi-namejava:/jdbc/ASBDataSource/jndi-name

  /resource-ref

 method-attributes

 /method-attributes

  /session



 It is re-written in the openejb-jar.xml like this:



 session

  ejb-nameSandboxService/ejb-name

  jndi-nameSandboxService/jndi-name

  resource-ref

 ref-namexmeta_defaultDS/ref-name

 resource-linkASB/resource-link

  /resource-ref

   /session

  /session



 My EAR contains lots of stat full and stateless beans.



 When I tried to deploy it on WASCE, I am getting exception and following are
 the stack traces



 16:53:06,817 ERROR [Deployer] Deployment failed due to

 java.lang.NoClassDefFoundError: javax/ejb/EJBObject

   at java.lang.ClassLoader.findBootstrapClass(Native
 Method)

   at java.lang.ClassLoader.findBootstrapClass0(Unknown
 Source)

   at java.lang.ClassLoader.loadClass(Unknown Source)

   at java.lang.ClassLoader.loadClass(Unknown Source)

   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown
 Source)

   at java.lang.ClassLoader.loadClass(Unknown Source)

   at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:140)

   at java.lang.ClassLoader.loadClass(Unknown Source)

   at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:140)

   at java.lang.ClassLoader.loadClass(Unknown Source)

   at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:140)

   at java.lang.ClassLoader.loadClass(Unknown Source)

   at
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:140)

   at java.lang.ClassLoader.loadClass(Unknown Source)

   at
 org.apache.geronimo.naming.deployment.ENCConfigBuilder.assureInterface(ENCConfigBuilder.java:646)

   at
 org.apache.geronimo.naming.deployment.ENCConfigBuilder.assureEJBObjectInterface(ENCConfigBuilder.java:628)

   at
 org.openejb.deployment.SessionBuilder.initContext(SessionBuilder.java:398)

   at
 org.openejb.deployment.OpenEJBModuleBuilder.initContext(OpenEJBModuleBuilder.java:334)

   at
 org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.invoke(generated)

   at
 net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)

   at
 org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

   at
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)

   at
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:760)

   at
 org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)

   at
 org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)

   at
 org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)

   at
 org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$97bf9acb.initContext(generated)

   at
 org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:334)

   at
 org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(generated)

   at
 net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)

   at
 org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

   at
 

Re: Migrating EAR artifact from WebSphere to WASCE

2005-11-24 Thread Krishnakumar B
Hi Siraj,

EJBObject is part of j2ee spec jar. These are loaded when server startsup.

1) can u ensure there are no errors during server startup.
2) U can add dependent jars to repository and use dependency in plan
to load these classes rather than adding then to ur EAR application.

Regards
Krishnakumar B

On 11/25/05, Siraj Mohamed [EMAIL PROTECTED] wrote:

 Hi Aaron,

 I am not using Geronimo-application.xml but this is my openejb-jar.xml's
 header block.

 ?xml version=1.0?

 openejb-jar xmlns=http://www.openejb.org/xml/ns/openejb-jar;
 configId=ejb-RXMeta
 parentId=org/apache/geronimo/Server


 Please note that I was able to test my hello world ejb sample on WASCE
 successfully and I do not see such exceptions.

 As you suggested, I tried to deploy through command-line and it seems it
 gives me a descriptive exception like:

 Error: Unable to distribute RXMeta.ear: Unable to initialize
  EJBContainer GBean: ejbNameImportService

 com/xmeta/client/ServiceClientException


 It seems that this class not found in the classpath. But I have many
 supporting JARs to my RXMeta.ear application and I have copied them all
 into lib\endorsed of WASCE. That's the way we do on WebSphere (copying
 them into lib\ext folder). It looks like it doesn't picking up.


 Would you suggest a better way of handling supported JARs to my
 application at deployment time other than I bundle all my JARs to the
 EAR?

 Thanks,
 Siraj

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron
 Mulder
 Sent: Thursday, November 24, 2005 8:41 PM
 To: user@geronimo.apache.org
 Subject: Re: Migrating EAR artifact from WebSphere to WASCE

 It's curious that it can't find EJB classes.  Can you post the header
 block of your openejb-jar.xml (and geronimo-application.xml if this is
 in an EAR)?  It may be that you're using the wrong parentId?

 ?xml version=1.0 encoding=UTF-8?
 openejb-jar
xmlns=http://www.openejb.org/xml/ns/openejb-jar-2.0;
configId=MyConfigName
parentId=org/apache/geronimo/Server
  ...

 Though I'm assuming that the configurations in WASCE are named the
 same as in Geronimo -- maybe we ought to ask one of the IBM folks to
 confirm.  (Or you can go to the system deployment list in the console
 and check yourself.)

 If that looks right, you could also try deploying using the
 command-line tool instead of the console and just make sure you get
 the same error (that is, make sure it's not a problem specific to the
 console).

 Thanks,
Aaron

 On 11/24/05, Siraj Mohamed [EMAIL PROTECTED] wrote:
 
 
 
  Hi All,
 
 
 
  I am evaluating Geronimo/WASCE to migrate my application from
 WebSphere to
  WASCE. As a start, I removed all websphere specific configuration
 files
  bundled with EAR such as ibm-application-bnd.xmi, ibm-ejb-jar-bnd.xmi,
  ibm-ejb-jar-ext.xmi and ibm_ejbext.properties. Also I created
  openejb-jar.xml based on the information of jboss.xml and bundled it
 with
  EAR.
 
 
 
  For example, if jboss.xml contains like:
 
 
 
  session
 
   ejb-nameSandboxService/ejb-name
 
   jndi-nameSandboxService/jndi-name
 
   resource-ref
 
  res-ref-namexmeta_defaultDS/res-ref-name
 
  jndi-namejava:/jdbc/ASBDataSource/jndi-name
 
   /resource-ref
 
  method-attributes
 
  /method-attributes
 
   /session
 
 
 
  It is re-written in the openejb-jar.xml like this:
 
 
 
  session
 
   ejb-nameSandboxService/ejb-name
 
   jndi-nameSandboxService/jndi-name
 
   resource-ref
 
  ref-namexmeta_defaultDS/ref-name
 
  resource-linkASB/resource-link
 
   /resource-ref
 
/session
 
   /session
 
 
 
  My EAR contains lots of stat full and stateless beans.
 
 
 
  When I tried to deploy it on WASCE, I am getting exception and
 following are
  the stack traces
 
 
 
  16:53:06,817 ERROR [Deployer] Deployment failed due to
 
  java.lang.NoClassDefFoundError: javax/ejb/EJBObject
 
at java.lang.ClassLoader.findBootstrapClass(Native
  Method)
 
at java.lang.ClassLoader.findBootstrapClass0(Unknown
  Source)
 
at java.lang.ClassLoader.loadClass(Unknown Source)
 
at java.lang.ClassLoader.loadClass(Unknown Source)
 
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown
  Source)
 
at java.lang.ClassLoader.loadClass(Unknown Source)
 
at
 
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Multi
 ParentClassLoader.java:140)
 
at java.lang.ClassLoader.loadClass(Unknown Source)
 
at
 
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Multi
 ParentClassLoader.java:140)
 
at java.lang.ClassLoader.loadClass(Unknown Source)
 
at
 
 org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(Multi
 ParentClassLoader.java:140)
 
at java.lang.ClassLoader.loadClass(Unknown Source