Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

WEBLOGIC webservices- JSE load on startup failure

Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

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)
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 *********");

Author & Gold Digger
Posts: 7617
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic