I'm trying to connect to my datasource which I've configured in weblogic, but something goes wrong, any help out there? Im i doing the jndi-name/res-ref-name right??
JNDI Name: jdbc/fisk
Am i using them wrong? In Oracle documentation it says:
<res-ref-name> Specifies the name of a resource reference.
<jndi-name> Specifies a JNDI name for the resource.
Should the <jndi-name> be jdbc/fisk?
Also tried this, only trying to connect to the weblogic datasource, but didn't work?
Are you setting JNDI name based on application or changing the application based on jndi name. I think the later part is more easy. Which weblogic version are you on? You can check the JNDI name through Admin Console?
I am not sure why are you needing those XML files after setting up the data-source. Why not you write a simple client and see if you are able to get the connection from the pool? I strongly believe you would need a weblogic.jar.
Akhilesh Trivedi wrote:I am not sure why are you needing those XML files after setting up the data-source. Why not you write a simple client and see if you are able to get the connection from the pool? I strongly believe you would need a weblogic.jar.
That was what I meant in my last post, I realised I might not need them unless i want to rename the datasource. But it still doesnt work. Haven't found any information about any weblogic.jar?
What I'm not using is the INITIAL_CONTEXT_FACTORY, there are plenty of examples not using this one?
And another thing, i get the error:
namingexception String index out of range: -1
Johan Blo wrote:Im supposed to do a resource lookup, the JNDI name is already set in weblogic? (feels confused)
Yes it is already set in weblogic at the time when you create the pool/data-source. It is after you creating the data-source you go on with a client to get a connection from the pool and further on the way.