• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sun one webserver 6.1 -- javax.naming.NamingException: Cannot create resource instanc

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one help us on this:

We have configured a JDBC Connection pool:
eIpoPool with data source class name as:
oracle.jdbc.pool.OracleDataSource

We then created a JDBC Resource - JNDI Name
jdbc/primaryDB and associated the pool name
eipoPool

When we start the web server it is failing giving the following error:
Failed to retrieve pooled data source javax.naming.NamingException: Cannot create resource instance ***** javax.naming.NamingException: Cannot create resource instance

Can anyone help us on this.

r: javax.naming.NamingException: Cannot create resource instance
warning: CORE3283: stderr: at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:167)
warning: CORE3283: stderr: at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
warning: CORE3283: stderr: at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
warning: CORE3283: stderr: at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
warning: CORE3283: stderr: at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
warning: CORE3283: stderr: at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
warning: CORE3283: stderr: at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
warning: CORE3283: stderr: at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
warning: CORE3283: stderr: at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
warning: CORE3283: stderr: at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
warning: CORE3283: stderr: at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
warning: CORE3283: stderr: at javax.naming.InitialContext.lookup(InitialContext.java:347)
warning: CORE3283: stderr: at dbconnector.ConnectionPool.manageConnectionsToDb(ConnectionPool.java:37)
warning: CORE3283: stderr: at StartUpServlet.init(StartUpServlet.java:153)
warning: CORE3283: stderr: at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:921)
warning: CORE3283: stderr: at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
warning: CORE3283: stderr: at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3478)
warning: CORE3283: stderr: at org.apache.catalina.core.StandardContext.start(StandardContext.java:3760)
warning: CORE3283: stderr: at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
warning: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
warning: CORE3283: stderr: at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
warning: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
warning: CORE3283: stderr: at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
warning: CORE3283: stderr: at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
warning: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
warning: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
warning: CORE3283: stderr: at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
info: HTTP3072: [LS ls1] http://eipo:2200 ready to accept requests
startup: server started successfully

web.xml code -->
<resource-ref>
<description> Primary database </description>
<res-ref-name> jdbc/primaryDB </res-ref-name>
<res-type> javax.sql.DataSource </res-type>
<res-auth> Container </res-auth>
</resource-ref>

sun-web.xml code --->

<resource-ref>
<res-ref-name>jdbc/primaryDB</res-ref-name>
<jndi-name>primaryDB</jndi-name>
</resource-ref>

server.xml code:

<RESOURCES>
<JDBCCONNECTIONPOOL name="eipoPool" datasourceclassname="oracle.jdbc.pool.OracleDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="on" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
<PROPERTY name="User" value="ipo"/>
<PROPERTY name="URL" value="jdbc racle:thin:@10.176.4.61:1521:HSLBCAST"/>
<PROPERTY name="Password" value="assjam160106"/>
</JDBCCONNECTIONPOOL>
<JDBCRESOURCE jndiname="primaryDB" poolname="eipoPool" enabled="on"/>
</RESOURCES>

java code::

InitialContext initContext = new InitialContext();
DataSource source = (DataSource) initContext.lookup ("java:comp/env/jdbc/primaryDB");
Connection conn1 = source.getConnection();


Can anyone help us on this.
regards
chanda


Thanks & Regards,
chanda
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic