• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problem while fetching connection object through Websphere configured DataSource

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working with WebSphere Application Server 5.1. I have created the DataSource with J2C Authentication properties. I got an error while accessing the Datasouce through JNDI Look up. The error as follows:

[3/6/05 16:39:32:281 IST] 1264b590 ConnectionFac I J2CA0122I: Resource
reference jdbc/GpsDataSource could not be located, so default values of the following are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)
[Other attributes]

isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)

Can any one help me out in this regard?
 
author & internet detective
Posts: 42173
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Jayaseelan",
We're pleased to have you here with us in the JDBC forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
 
Jeanne Boyarsky
author & internet detective
Posts: 42173
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, I'm moving this to our WebSphere forum because it sounds more like a server configuration issue.

and Welcome to JavaRanch!
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In version 5 WebSphere "prefers" you to create a Resource Reference in the web.xml file. This can be done in WSAD under the resource sub tab of the Deployment Descriptor (aka web.xml).

The reference is an alias for the actual JNDI name and can only be accessed via a specific context path. So if your datasource name is "mydb" as defined in the server config and you create the alias for it in the web.xml "mydbalias", then you would have to use the name "java:comp/env/mydbalias".

Hope this helped.
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to add one note to Heath's reply..............if you are looking the datasource up from within your EJB container, you would need to define your resource reference within your EJB deployment descriptor.

-Ed
 
Shiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic