Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes BEA/Weblogic and the fly likes WEBLOGIC webservices- JSE load on startup failure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "WEBLOGIC webservices- JSE load on startup failure" Watch "WEBLOGIC webservices- JSE load on startup failure" New topic
Author

WEBLOGIC webservices- JSE load on startup failure

arvindh seshadri
Ranch Hand

Joined: May 10, 2005
Posts: 45
Hi ,
I wrote a simple JAXRPC jse and tried to deploy in weblogic 81 and i am receiving the following exception

<Oct 4, 2005 12:50:25 PM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "WebServiceS
ervlet" failed to preload on startup in Web application: "pojo_jserpc".
javax.servlet.ServletException: Web Service init() failed: java.lang.NullPointer
Exception


The following is the code snippet of my JSE


/******************************************************************/


public class CurrencyJSE implements currency.CurrencyIntfc , ServiceLifecycle {


ServletEndpointContext ctx = null;
ServletContext servletContext = null;
int maxTry =5;
Hashtable currencyTable = null;




public void init(Object context) throws javax.xml.rpc.ServiceException
{


ctx = (ServletEndpointContext)context;
servletContext = ctx.getServletContext();
/*String env= servletContext.getInitParameter("MAX_TRY");
if(env == null)
{
env="5";
}
System.out.println("MAX TRY="+env);
maxTry = Integer.parseInt(env);*/

currencyTable = new Hashtable();

currencyTable.put("AUD", "30") ;
currencyTable.put("USD", "44") ;
currencyTable.put("SGD", "28") ;
currencyTable.put("MYR", "10") ;
currencyTable.put("CAD", "32") ;
currencyTable.put("INR", "1") ;





}

public String getCurrency(String toCountry , String amount)
{
String value = null;
String result = null;
int currentValue = 0;

result = (String)currencyTable.get(toCountry);

currentValue = Integer.parseInt(amount)* Integer.parseInt(result);

System.out.println("Current value="+currentValue);

value = String.valueOf(currentValue);
return value;
}

public void destroy()
{
System.out.println("CurrencyJSE DESTROYED *********");
}

)
/**********************************************************************/
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
The SCDJWS certification exam is vendor-independent and does not deal with Weblogic web services. I'm moving this discussion to the BEA/Weblogic forum. Please continue this discussion there.

Thank you for your comprehension


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
 
subject: WEBLOGIC webservices- JSE load on startup failure