| Author |
Need help in deploying EJB in websphere 6.1
|
|
|
| Hi,
I am getting some problem in deploying EJB.
I created a jar file contains ejb classes and ejb-jar.xml and a war file which contain a Servlet and a web.xml file.
Than i combined the jar and war with application.xml in EAR file.
but when i try to deploy this ear file it gives deploymetdescriptor load exception.
I checked it completely but it is all fine.
the ejb-jar.xml is...
<ejb-jar>
<description>MY WAS EJB application </description>
<display-name>Select Query</display-name>
<enterprise-beans>
<session>
<ejb-name>SelectData</ejb-name>
<home>ejb.SelectDataHome</home>
<remote>ejb.SelectData</remote>
<ejb-class>ejb.SelectDataBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
i am deploying my first ejb. please help.
thank you in advance.
| |
|
| hi,
ok help me buy telling where could be the problem.
As i am getting error in the first step of deployment by selecting the ear file
"The EAR file might be corrupt or incomplete.
AppDeploymentException: [null] org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: IWAE0022E Exception occurred loading deployment descriptor for module "jarName.jar" in EAR file "C:\IBM\WebSphere\AppServer2\profil
es\AppSrv01\wstemp\92668751\upload\EarNa
me.ear"
Structure of files is
Ear contain three files jar,war and META-INF\application.xml
war file contain jsp,servlet and WEB-INF\web.xml
jar file contain ejbHome,ejbRemote,ejbBean and META-INF\ejb-jar.xml
please reply.
| |
| Randy Schnier 2007-03-15, 1:30 pm |
| Try replacing the first line of your ejb-jar.xml with the following. I suspect your DD is missing some parameters that are needed by the parser.
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="2.1"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
sumit1201@gmail.com wrote:
> Hi,
>
> I am getting some problem in deploying EJB.
> I created a jar file contains ejb classes and ejb-jar.xml and a war file which contain a Servlet and a web.xml file.
> Than i combined the jar and war with application.xml in EAR file.
> but when i try to deploy this ear file it gives deploymetdescriptor load exception.
> I checked it completely but it is all fine.
> the ejb-jar.xml is...
>
>
>
> <ejb-jar>
> <description>MY WAS EJB application </description>
> <display-name>Select Query</display-name>
> <enterprise-beans>
> <session>
> <ejb-name>SelectData</ejb-name>
> <home>ejb.SelectDataHome</home>
> <remote>ejb.SelectData</remote>
> <ejb-class>ejb.SelectDataBean</ejb-class>
> <session-type>Stateless</session-type>
> <transaction-type>Bean</transaction-type>
> </session>
> </enterprise-beans>
> </ejb-jar>
>
> i am deploying my first ejb. please help.
> thank you in advance.
>
| |
|
| Hi Randy,
thank you for reading my message.
I did the same as you suggested me and i passed from that error but one more is standing in my way. Please give me two more minutes to suggest some solution.
Now the exception is in application.xml
file is shown with the error.
<?xml version="1.0" encoding="ISO-8859-1"?>
<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>Today </display-name>
<module>
<web>
<web-uri>app.war</web-uri>
<context-root>/app</context-root>
</web>
</module>
<module>
<ejb>select.jar</ejb>
</module>
</application>
[3/16/07 12:36:13:658 IST] 00000027 SystemErr R Stack trace of nested exception:
[3/16/07 12:36:13:658 IST] 00000027 SystemErr R org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadException: IWAE0007E Could not load resource "META-INF/application.xml" in archive " C:\IBM\WebSphere\AppServer2\profiles\App
Srv01\wst
emp\92668751\upload\Query.ear"
Stack trace of nested exception:
Wrapped exception
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'application'.
| |
|
| Please suggest me where I am going wrong in application.xml file.
the file is...
<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee ">http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>Today </display-name>
<module>
<web>
<web-uri>app.wa r</web-uri>
<context-root>/app</context-root>
</web&g t;
</module>
<module>
<ejb>select.jar</ejb>
</module>
</application>
I am getting ResourceLoadException
IWAE0007E Could not load resource "META-INF/application.xml" in archive " C:\IBM\WebSphere\AppServer2\profiles\App
Srv01\wstemp\92668751\upload\Query.ear "
Please help.
| |
| Ken Hygh 2007-03-19, 7:27 am |
| sumit1201@gmail.com wrote:
> Please suggest me where I am going wrong in application.xml file.
> the file is...
>
> <application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee ">http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
> <display-name>Today </display-name>
> <module>
> <web>
> <web-uri>app.wa r</web-uri>
> <context-root>/app</context-root>
> </web&g t;
> </module>
> <module>
> <ejb>select.jar</ejb>
> </module>
>
> </application>
>
> I am getting ResourceLoadException
> IWAE0007E Could not load resource "META-INF/application.xml" in archive " C:\IBM\WebSphere\AppServer2\profiles\App
Srv01\wstemp\92668751\upload\Query.ear "
>
> Please help.
Well, web-uri is clearly wrong.
Ken
| |
|
| Sorry the correct file is.
<?xml version="1.0" encoding="ISO-8859-1"?>
<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>Today </display-name>
<module>
<web>
<web-uri>app.war</web-uri>
<context-root>/app</context-root>
</web>
</module>
<module>
<ejb>select.jar</ejb>
</module>
</application>
would you please tell me the exact uri.
Thank you
| |
|
| the actual uri is this which is giving error
<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
Please suggest me.
Thank you.
| |
|
| Hi folk,
I deployed the EJB on websphere but on accessing a servlet i am getting error :
"Cannot instantiate class: org.jnp.interfaces.NamingContextFactory"
Can anyone help me in this.
I didnot put anything in classpath.
But i am able to access pre-deployed samples application of EJB.
Please help
Sumit
| |
| Ken Hygh 2007-03-27, 7:17 am |
| sumit1201@gmail.com wrote:
> Hi folk,
>
> I deployed the EJB on websphere but on accessing a servlet i am getting error :
>
> "Cannot instantiate class: org.jnp.interfaces.NamingContextFactory"
>
> Can anyone help me in this.
> I didnot put anything in classpath.
> But i am able to access pre-deployed samples application of EJB.
> Please help
>
> Sumit
You'll need to look into your code to find out where you're using this
class. It is not an IBM-supplied class.
Ken
|
|
|
|