I work with WAS and WCS 5.1, all is fine until i send some .jsp and a new instancexml.xml (with minimal changes : new cacheurl tags).
When i click a page, i received this error:
[02.02.04 15:09:15:468 GMT+01:00] a74a0a5c ServletInstan X Uncaught service() exception thrown by
servlet {0}: {1}
"WCS
JSP Compiler"
com.sun.jsp.JspWithNoErrorPageException: Server caught unhandled exception from JSP [shoppingcart_frame.jsp]
at javax.servlet.ServletException.<init>(ServletException.java:132)
at com.ibm.websphere.servlet.error.ServletErrorReport.<init(ServletErrorReport.java:43)
at com.ibm.servlet.engine.webapp.WebAppErrorReport.<init WebAppErrorReport.java:32)
at com.sun.jsp.JspWithNoErrorPageException.<init(JspWithNoErrorPageException.java:26)
at D_0003a.WebSphere.WCS.stores.web.InFashion.InFashion_shoppingcart_frame_jsp_1._jspService(InFashion_shoppingcart_frame_jsp_1.java(Compiled Code))
at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:175)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:159)
at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:608)
at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:580)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:105)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:353)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:729)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:655)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:338)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:175)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:93)
at com.ibm.commerce.webcontroller.JspExecUnit.execute(JspExecUnit.java)
....
I have investigated and i find this exception:
javax.naming.CommunicationException: 'null'
in this code:
private static
String[] loadDataSources(Properties properties)
{
dataSources = new Hashtable();
Properties properties1 = new Properties();
properties1.setProperty("java.naming.factory.initial", "com.ibm.ejs.ns.jndi.CNInitialContextFactory");
properties1.setProperty("java.naming.provider.url", getProviderURL());
log(getProviderURL());
properties1.setProperty("java.naming.security.principal", getJdbcUsername("DB2"));
log(getJdbcUsername("DB2"));
properties1.setProperty("java.naming.security.credentials", getJdbcPassword("DB2"));
log(getJdbcPassword("DB2"));
String s = properties.getProperty("DataSource", "");
StringTokenizer stringtokenizer = new StringTokenizer(s, ",");
int i = stringtokenizer.countTokens();
InitialContext initialcontext = null;
Object obj = null;
try {
initialcontext = new InitialContext(properties1);
}
catch(javax.naming.NamingException ece1)
{
log(ece1);
}
if(i > 0)
{
String as[] = new String[i];
for(int j = 0; j < as.length; j++)
{
String s1 = stringtokenizer.nextToken().trim();
as[j] = s1.toLowerCase();
log("codigo 13");
try {
obj = initialcontext.lookup(s1);
}
catch(javax.naming.NamingException ece2)
{
log(ece2);
}
DataSource datasource = (DataSource)PortableRemoteObject.narrow(obj, javax.sql.DataSource.class);
dataSources.put(as[j], datasource);
}
return as;
}
return null;
}
Could you help me, why i obtained this exception when i insert a new jsp (that uses EJBs)?