hii..
anyone please help me wat to do avoid the below mentioned error ..and to get
connection object.
but now i got a new problem..
in the ConnectionFactory Implmentation class...
fot the getConnection() method ..i have written
getConnection() {
ConnectionImpl obj =
*null*;
obj= (ConnectionImpl)
cm.allocateConnection(mcf, *null*);
return obj;
}
mcf - managed connectionfactory reference
cf-connectionfactory instance got through lookup
but when i try to invoke a cf.getConnection() method i ma getting the
following exceptio(also the ConnectionFactory is not null,i mean lookup is
sucessful):
RAR5117 : Failed to obtain/create connection from connection pool [
myrapool7 ]. Reason : null
exception
javax.resource.spi.ResourceAllocationException: Error in allocating a
connection. Cause: null
at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:353)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
at
com.ra.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:40)
at
com.ra.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:30)
at com.ra.ServletRA.doGet(ServletRA.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: com.sun.enterprise.resource.PoolingException
at
com.sun.enterprise.resource.AbstractResourcePool.createSingleResource(AbstractResourcePool.java:899)
at
com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java:1752)
at
com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:917)
at
com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:225)
at
com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:516)
at
com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
at
com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
at
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:313)
... 39 more
please tell me wat to do..in order to obtain the connection object...
thanku soo much...
-rama.
On 9/2/08, Rama Sundari <sundari.drs_at_gmail.com> wrote:
>
> hi...
> thanku so much for giving me some useful source..
>
> but now i got a new problem..
> in the ConnectionFactory Implmentation class...
> fot the getConnection() method ..i have written
>
> getConnection() {
>
> ConnectionImpl obj =
> *null*;
>
> obj= (ConnectionImpl)
> cm.allocateConnection(mcf, *null*);
>
> return obj;
>
> }
>
> mcf - managed connectionfactory reference
>
> cf-connectionfactory instance got through lookup
> but when i try to invoke a cf.getConnection() method i ma getting the
> following exceptio(also the ConnectionFactory is not null,i mean lookup is
> sucessful):
>
> RAR5117 : Failed to obtain/create connection from connection pool [
> myrapool7 ]. Reason : null
> exception
> javax.resource.spi.ResourceAllocationException: Error in allocating a
> connection. Cause: null
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:353)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
> at
> com.ra.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:40)
> at
> com.ra.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:30)
> at com.ra.ServletRA.doGet(ServletRA.java:68)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at
> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
> at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
> Caused by: com.sun.enterprise.resource.PoolingException
> at
> com.sun.enterprise.resource.AbstractResourcePool.createSingleResource(AbstractResourcePool.java:899)
> at
> com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java:1752)
> at
> com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:917)
> at
> com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:225)
> at
> com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:516)
> at
> com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
> at
> com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
> at
> com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:313)
> ... 39 more
>
>
> please tell me wat to do..in order to obtain the connection object...
>
> thanku soo much...
> -rama.
>
>
>
> On 9/2/08, Jagadish Prasath Ramu <Jagadish.Ramu_at_sun.com> wrote:
>>
>> You (RAR developer) will provide implementations of
>> ManagedConnectionFacotry, ConnectionFactory, Connection etc.,
>> App. developer/administrator will create a connector-resource (and
>> connector-connection-pool). This resource will be bound to jndi,
>> application will do a lookup and get the connection-factory (provided by
>> your RAR) to create connections (provided by your RAR) to the EIS.
>>
>> You can refer MailConnector sample (with source code) and the
>> application that uses the mail-connector.
>>
>> Book : "J2EE(TM) Connector Architecture and Enterprise Application
>> Integration"
>>
>> http://www.amazon.com/Connector-Architecture-Enterprise-Application-Integration/dp/0201775808/ref=si3_rdr_bb_product
>>
>>
>>
>>
>> On Tue, 2008-09-02 at 14:32 +0530, Rama Sundari wrote:
>> >
>> > hi..
>> >
>> > while implementing the interfaces where do we need to specify the
>> > connection with eis..i mean how does the resource adapter
>> > implementation bind with the eis?...
>> >
>> > do i need to do any look up for this..or there is other method to do..
>> > please tell me the correct procedure...
>> >
>> >
>> > -thanks,
>> > rama.
>> >
>> > On 8/31/08, glassfish_at_javadesktop.org <glassfish_at_javadesktop.org>
>> > wrote:
>> > Hi,
>> >
>> > To implement
>> > createConnectionFactory([b]ConnectionManager[/b]), you only
>> > have to return a new instance of your connection factory
>> > class:
>> > [code]
>> > public Object createConnectionFactory(ConnectionManager cm)
>> > throws ResourceException {
>> > {
>> > return new com.ra.ConnectionFactoryImpl(this, cm);
>> > }
>> > [/code]
>> >
>> > I don't speak english and It's difficult for me to explain how
>> > to implement ALL mandatory interfaces. But for other
>> > implementation details, I would recommend you to download
>> > "J2EE Connector Architecture 1.0.1 Sample Source"
>> > from "http://java.sun.com/j2ee/sdk_1.3/".
>> > (althought I haven't tried the sample with Glassfish, the
>> > "cciblackbox" adapter seems a good example for CCI).
>> >
>> > You may also want to read these tutorials and examples:
>> >
>> > CCI connector:
>> >
>> http://java.sun.com/developer/technicalArticles/J2EE/connectorclient/resourceadapter.html
>> > (but it doesn't cover the "Interaction" interface).
>> >
>> > DataSource connector:
>> > http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-jca2.html
>> >
>> > Custom interface connector:
>> > http://www.oracle.com/technology/pub/articles/prabhu_jca.html
>> > and the "mailconnector" JCA 1.5 adapter example from J2EE 1.4
>> > Tutorial samples.
>> >
>> >
>> > Good luck.
>> > [Message sent by forum member 'jmarine' (jmarine)]
>> >
>> > http://forums.java.net/jive/thread.jspa?messageID=296411
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> > users-unsubscribe_at_glassfish.dev.java.net
>> > For additional commands, e-mail:
>> > users-help_at_glassfish.dev.java.net
>> >
>> >
>> >
>> >
>> > --
>> > Thanks,
>> > Rama Sundari.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
>
> --
> Thanks,
> Rama Sundari.
--
Thanks,
Rama Sundari.