• 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Network Adaptor Could Not Establish Connection

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have set up a web application running on WebSphere Advanced Single Server. However, the following error will occur occasionally. It is shown in the "default_server_stderr.log".
Does anyone have idea on what the problem is?
Thanks!
------------------------------------------------
com.ibm.websphere.ce.cm.StaleConnectionException: Io exception: The Network Adapter could not establish the connection
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.ibm.ejs.cm.portability.PortabilityLayerImpl.translateException(PortabilityLayerImpl.java:249)
at com.ibm.ejs.cm.portability.PortabilityLayerImpl.translateException(PortabilityLayerImpl.java:146)
at com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:944)
at com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:860)
at com.ibm.ejs.cm.pool.ConnectionPool.findFreeConnection(ConnectionPool.java:810)
at com.ibm.ejs.cm.pool.ConnectionPool.findConnectionForTx(ConnectionPool.java:718)
at com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:650)
at com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:297)
at com.ibm.ejs.cm.DataSourceImpl$1.run(DataSourceImpl.java:129)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:127)
at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:102)
at eng._Head_jsp_0.getConnection(_Head_jsp_0.java:142)
at eng._Head_jsp_0._jspService(_Head_jsp_0.java:293)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:301)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:445)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:579)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:665)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:124)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:218)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:125)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:137)
------------------------------------------------
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a database Connection problem.
Check / Send your connection String.
 
Mandy Yan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your help!
Here is the function used for getting connection.
--------------------------------------------------
Connection getConnection(){
Connection dbConnection = null;
try{
Hashtable parms = new Hashtable();
parms.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
InitialContext ctx = new InitialContext(parms);
ds = (DataSource)ctx.lookup("jdbc/oracle9DS");
dbConnection = ds.getConnection();
}
catch (Exception e) {
System.out.println("Naming service exception: " + e.getMessage());
e.printStackTrace();
}
return dbConnection;
}
--------------------------------------------------
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check your JDBC URL and check if the db service is running.
 
Mandy Yan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The db service is running.
The error appears after the system has not been accessed for some day, say one night.
If someone goes to the server and activate it (e.g. move the mouse), the error will not appear.
 
Baba Batsha
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
during the night did the db service stop and start?
 
Mandy Yan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have asked the DBA.
He said the db service is always on.
 
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic