Deploying JAX-WS web service to weblogic server 9.2 - weblogic.developer.interest.webservices.general(Archived)

Hi,
I want to deploy webservice created with JAX-WS 2.1 RI to BEA Weeblogic Server 9.2. After some research on forums and groups I have:
sun-jaxws.xml
<endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">
<endpoint name="TSOrganization"
implementation="service.TsOrganizationImpl"
url-pattern="/SOA/tsorganization"/>
</endpoints>
web.xml
<web-app version="2.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/web-app_2_4.xsd">
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>TsOrganization</servlet-name>
<servlet-class>sun.com.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>TsOrganization</servlet-name>
<url-pattern>/SOA/tsorganization</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
weblogic.xml
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<context-root>/SOA/tsorganization</context-root>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
weblogic-application.xml
<weblogic-application xmlns="http://www.bea.com/ns/weblogic/90">
<application-param>
<param-name>webapp.encoding.default</param-name>
<param-value>UTF-8</param-value>
</application-param>
<prefer-application-packages>
<package-name>javax.jws.*</package-name>
</prefer-application-packages>
</weblogic-application >
application.xml
<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>TSOrganization</display-name>
<module>
<web>
<web-uri>TsOrganizationWS.war</web-uri>
<context-root>/SOA/tsorganization</context-root>
</web>
</module>
</application>
I've included all the libraries from JAX-WS 2.1.3 into WEB-INF/lib in war file, packed it into ear and deployed. When I try to start deployed application I get following error:
javax.servlet.ServletException: [HTTP:101249][weblogic.servlet.internal.WebAppServletContext#aed2df - appName: 'TSOrganization', name: '/SOA/tsorganization', context-path: '/SOA/tsorganization']: Servlet class sun.com.xml.ws.transport.http.servlet.WSServlet for servlet TsOrganization could not be loaded because the requested class was not found in the classpath . java.lang.ClassNotFoundException: sun.com.xml.ws.transport.http.servlet.WSServlet.
although the missing class is in jaxws-rt.jar included in WEB-INF/lib folder.
Any ideas what to try next? 

Ok.. with some help I found the error...
servlet class is com.sun... and not sun.com :-S
but everything else is right.. so it can be like reference for deploying jaxws service on weblogic 9.2.

Related

missing tags in weblogic.xml

Hello,
I am attempting to define an ejb reference in the weblogic.xml for my web app that wants to use a stateless session bean.
Here is my web.xml ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
<web-app>
<display-name>LiLTestClient</display-name>
<servlet>
<servlet-name>greeting</servlet-name>
<display-name>greeting</display-name>
<jsp-file>/greeting.jsp</jsp-file>
</servlet>
<servlet>
<servlet-name>response</servlet-name>
<display-name>response</display-name>
<jsp-file>/response.jsp</jsp-file>
</servlet>
<servlet>
<servlet-name>banner</servlet-name>
<display-name>banner</display-name>
<description>no description</description>
<jsp-file>/banner.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>greeting</servlet-name>
<url-pattern>/greeting</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>response</servlet-name>
<url-pattern>/response</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<ejb-ref>
<ejb-ref-name>ejb/LiLEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.directv.lil.ejb.LiLChannelsHome</home>
<remote>com.directv.lil.ejb.LiLChannels</remote>
</ejb-ref>
</web-app>
and here is my weblogic.xml
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<description>Test Client for LIL</description>
<reference-descriptor>
     <ejb-reference-description>
          <ejb-ref-name>ejb/LiLEJB</ejb-ref-name>
          <jndi-name>LiLEJB</jndi-name>
     </ejb-reference-description>
</reference-descriptor>
<context-root>LiLTestClient</context-root>
</weblogic-web-app>
The problem is that when I deploy the application and look at the weblogic.xml file on the server through the console
the entire reference-descriptor tag and sub-tags are completely gone.
What the heck am I doing wrong. I cannot see any obvious issue.
My appologies in advance if this issue has been raised in another post.
Any help would be appreciated.
Using Weblogic 8.1

red mark over web.xml

Hi following is the web.xml
I am creating a new project in a IDE .BUT there is RED MARK OVER THIS FILE.
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.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/web-app_2_4.xsd">
<display-name>
arun</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

WLS springframework portlets error NoClassDefFoundError: ehcache CacheExcep

Messages
Message icon - Error java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
Message icon - Warning Errors were encountered while performing this operation.
Doing this on 11g WLS using Spring
EAR File deployment + Expanded/Exploded WAR as a directory.
WEB-INF
lib/ehcache-1.2.3.jar
lib/hibernate-3.2.3.ga.jar
WEB.XML
===============
<?xml version = '1.0' encoding = 'UTF-8'?>
<web-app 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/web-app_2_4.xsd" version="2.4">
<display-name>Calendar Portlets</display-name>
<description>Calendar Portlets</description>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/context/applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>calendar.root</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.WebAppRootListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<!--Added by WSRP install tool-->

Weblogic War application sending the requests every 3 minuts

HI,
There are 2 managed servers in one unix box.
i have one war application deployed in cluster level. This war application will search the logs and will give particular content as a result.
The Jsp page will send the request and it is able to get the correct results within 3 minutes. if there are so many logs, it is giving unrealiable results as war application is sending the request again and in the interval of 3 mins.
Request parametes are get by servlet and this servlet will create the unix shellscript in background and it will execute in a box.
0-3 mins 1st .sh creating and executing..
3-6 mins 2nd .sh creats and starts the execution, once the 1 one is completed...
.
.
.
its becomes infinite loop...
after some time Browser is going to diagnostic error state..
to avoid this i tried to give some parameters in weblogic.xml file...but its not working..
please fine below weblogic.xml file
====================================
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
<session-descriptor>
</session-descriptor>
<jsp-descriptor>
<page-check-seconds>-1</page-check-seconds>
<debug>true</debug>
</jsp-descriptor>
<container-descriptor>
<resource-reload-check-secs>-1</resource-reload-check-secs>
<servlet-reload-check-secs>-1</servlet-reload-check-secs>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<logging>
<log-filename>/wls_domains/b2borap2/application_MT/logs/messagetracker.log</log-filename>
</logging>
</weblogic-web-app>
=======================================================
and web.xml file is
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<listener>
<listener-class>
com.tm.messagetracker.listeners.MTrackerSession
</listener-class>
</listener>
<servlet>
<servlet-name>Controller</servlet-name>
<servlet-class>com.tm.messagetracker.Controller</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Controller</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
=========================================
anyone please help me on above......Thanks in advance.. 
How is it related to Oracle B2B? If you need help on Weblogic front then please post your query in Weblogic Webapp forum -
WebLogic Server - WebApp / Servlet / JSP / Plugin
Regards,
Anuj

Error deploying sample application

Hi experts,
I am getting following error while deploying OAAM sample application:
Error: Unresolved Webapp Library references for "ServletContext#285871212[app:OAAMTester module:OAAMTester.war path:/OAAMTester spec-version:2.5]", defined in weblogic.xml [Extension-Name: oracle.oaam.libs, exact-match: false]
Even though i have deployed required libraries
My weblogic.xml :
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd
http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<library-ref>
<library-name>oracle.oaam.libs</library-name>
</library-ref>
</weblogic-web-app>
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>OAAMTester</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>OAAMTestServlet</display-name>
<servlet-name>OAAMTestServlet</servlet-name>
<servlet-class>com.au.oaam.test.OAAMTestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>OAAMTestServlet</servlet-name>
<url-pattern>/OAAMTestServlet</url-pattern>
</servlet-mapping>
<listener>
<listener-class>com.au.oaam.test.listener.SessionListener</listener-class>
</listener>
</web-app>
~
~
Thanks
H 
Hi!
Seems application missing this library. You need to add this library to either application or to the Weblogic server.
Note:
Also don't duplicate the same library in application and the server. You can use following entry to force the app to use only web-inf/lib libraries.
(weblogic.xml)
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
Nilum. 
Hi!
Seems application missing this library. You need to add this library to either application or to the Weblogic server.
Note:
Also don't duplicate the same library in application and the server. You can use following entry to force the app to use only web-inf/lib libraries.
(weblogic.xml)
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
Nilum.

Categories

Resources