Need help in deploying EJB in websphere 6.1
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Application Server > Need help in deploying EJB in websphere 6.1




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Need help in deploying EJB in websphere 6.1  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-14-07 12:29 PM

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 whi
ch 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 exc
eption.
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.






[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-15-07 06:27 AM

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 f
ile

"The EAR file might be corrupt or incomplete.
AppDeploymentException: [null] org.eclipse.jst.j2ee.commonarchivecore.in
ternal.exception.DeploymentDescriptorLoadException: IWAE0022E Exception occu
rred 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.





[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  
Randy Schnier


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-15-07 06:30 PM

Try replacing the first line of your ejb-jar.xml with the following.  I susp
ect 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.s
un.com/xml/ns/j2ee           		[url]http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd[/ur
l]">


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 w
hich 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 e
xception.
> 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.
>





[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-16-07 12:29 PM

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 solu
tion.
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://ww
w.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee [
url]http://java.sun.com/xml/ns/j2ee/application_1_4.xsd[/url]">
<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 neste
d 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\A
ppServer2\profiles\AppSrv01\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 ele
ment 'application'.





[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-19-07 06:24 AM

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://ww
w.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\AppSrv
01\wstemp\92668751\upload\Query.ear 
"

Please help.





[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  
Ken Hygh


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-19-07 12:27 PM

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\AppS
rv01\wstemp\92668751\upload\Query.ea
r "
>
> Please help.

Well, web-uri is clearly wrong.

Ken





[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-20-07 12:29 PM

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://ww
w.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee [
url]http://java.sun.com/xml/ns/j2ee/application_1_4.xsd[/url]">
<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





[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-20-07 06:21 PM

the actual uri is this which is giving error

<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://ww
w.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.





[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-27-07 12:17 PM

Hi folk,

I deployed the EJB on websphere but on accessing a servlet i am getting erro
r :

"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





[ Post a follow-up to this message ]



    Re: Need help in deploying EJB in websphere 6.1  
Ken Hygh


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-27-07 12:17 PM

sumit1201@gmail.com wrote:
> Hi folk,
>
> I deployed the EJB on websphere but on accessing a servlet i am getting er
ror :
>
> "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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:42 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register