If jdbc/testDS is the name defined of DataSource in Weblogic DataSource ds = (DataSource)ctx.lookup("jdbc/testDS"); will work fine.
Where is the servlet placed in ur code?
Thanks for the reply.
See when I have changed bc4j.xfg from java:comp/env/jdbc/testDS to jdbc/testDS, it is showing all data coming up from DB.
That means I have a datasource with that name.
But only in case of servlet its not working.
Servlet is there in ViewController -> Application Sources
Also, I think using this inside Webcenter as a shared library is making problem.
If I run this page standalone it works perfectly fine.
The servlet is in adf application of which you created a shared lib and webcenter project is referring it right?
Which projects bc4j.xml you modified to rectify the errors? Is it the adf application?
I have a ADF project containing taskflow and servlet as well.
I have created ADF jar of the View Controller.
And then created a generic project, added adf jar to it and deployed the generic project in spaces as Shared Library.
Now I am using the taskflow of the ADF project in my spaces.
I think I need to register my servlet in extension project as well.
Umm, but it is able to find servlet class and servlet is unable to find the DS. Well try and see the outcome.
I am not getting any error after changin bc4j.xfg...but image is not visible through servlet, rest all data coming from AM is fine.
That means servlet is not reachable. It might be trying to find servlet in spaces`s web.xml and it`s not there.
Ok , Then we should register the servlet also. check and try.
Yes it resolved the issue.