I am new to the portlet factory designer. I have very good knowledge on IBM portal but very less in portlet factory.
I am trying to do all the getting started kind of projects.
I am able to run the sample project
Tutorial – Creating a Web Application Project
Tutorial – Creating a Simple Portlet
but not able to create a SQL Call Builder to create some interactions with the database.
I tried the EmployeeDatasource keyword (entering into the builder fields) but the builder don't sense it and says its wrong. I am running Portlet factory designer onto the WAS CE. I have checked into WAS CE console the EmployeeDatasource but when i try to enter into the builder it says wrong.
Do we have simple link of tuorial or some hint to make it work. I am going crazy.
Pls help !
This topic has been locked.
5 replies Latest Post - 2012-05-15T08:08:53Z by B5N4_Wing_Lee
Pinned topic Not able to create a SQL Call builder using EmployeeDatasource in IBM WASCE
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-05-15T08:08:53Z at 2012-05-15T08:08:53Z by B5N4_Wing_Lee
DGawron 10000054HC250 PostsACCEPTED ANSWER
Re: Not able to create a SQL Call builder using EmployeeDatasource in IBM WASCE2010-06-16T20:05:48Z in response to SumitSinghTCS13It sounds like you are manually entering the value "EmployeeDatasource" into the DataSource input of the builder. Depending upon the app server valid dataSource names typically begin with "java:comp/env/" or "jdbc/". That's probably the issue here. Try pressing "Fetch DataSource Names" then see what names are listed in the DataSource input drop down. The listed names are those visible to WPF. If no names are displayed, then your deployed WAR does not have access to any datasources.
SumitSinghTCS13 120000HM9W2 PostsACCEPTED ANSWER
Re: Not able to create a SQL Call builder using EmployeeDatasource in IBM W2010-06-17T10:58:40Z in response to DGawronThanks Dave ! But when i am creating the portlet factory project WAR - a basic one and deploying onto the IBM WAACE the fetch data source is not generating the any enteries in the list. Now after drilling a lot I found I have to uncomment some stuff as per followign instructions:
"You will need to uncomment these references and modify them for your environment. The files you will be editing are the project's: WEB-INF/bin/deployment/wasce.web.xml and WEB-INF/geronimo-web.xml Be sure to "uncomment" the sample resource references, but leave the basic structure of these files in tact. "
Now I am able to get the EmployeeDataSource (out of box datasource that comes with the WASCE installtion) after clicking the fectch datasource.
I will be trying to do the same for the seperate ORACLE DB instance. Will it work ?
Overall - Do we have to make the manual changes and entries in these two xml files for this button to work (Fetch Datasource) ? Is this what I should keep in mind always ?
Appreciate your technical expertise on this area !
SystemAdmin 110000D4XK532 PostsACCEPTED ANSWER
Re: Not able to create a SQL Call builder using EmployeeDatasource in IBM W2010-06-21T17:33:51Z in response to SumitSinghTCS13You are correct: When using WAS CE, you will need to modify both files.
Here's an overview of one way:
Download and install a JDBC Driver
Download a JDBC driver for your database.
Log in to WAS CE Admin console.
Select "Repository" from the navigation. On the page that follows, upload the jdbc jar for the jdbc driver you downloaded. This makes it available to the appserver.
Configure the a Database Pool
Select "Database Pool" from navigation
Select "Using the Geronimo Database Pool Wizard"
Follow the wizard instructions. You'll be asked for uname/pw, jdbc connection url, db server hostname, etc.
When prompted, test the service to verify connectivity.
Modify WEB-INF/bin/deployment/wasce.web.xml and WEB-INF/geronimo-web.xml in your project
In the WAS CE Admin Console, click "Usage" for the datasouce you just created. This will give you the <dependency> and <resource-ref> sections you'll need when modifying these two files. Read closely. Also, you should change the <res-ref-name> to something more meaningful. For example, instead of <res-ref-name>jdbc/MyDataSource</res-ref-name>, you could choose <res-ref-name>jdbc/MyOracleDataSource</res-ref-name>
Re-deploy your project.
If there are no errors in your xml files, then your new DAtasource will show up in the builder's "SQL Datasource" input when you click Fetch Datasource Names
B5N4_Wing_Lee 270005B5N41 PostACCEPTED ANSWER
Re: Not able to create a SQL Call builder using EmployeeDatasource in IBM W2012-05-15T08:08:53Z in response to SystemAdminHi Sam,
I have the same problem(upon clicking "create table", it complains the datasource is not valid), even if I modified web.xml and geronimo-web.xml, the problem still exists. I also tried to modify wasce.web.xml under /WEB-INF/bin/deployment/, but the project cannot be deployed-the deploying process exited and didn't display any error message.
Any advise? Looking forward.
DGawron 10000054HC250 PostsACCEPTED ANSWER
Re: Not able to create a SQL Call builder using EmployeeDatasource in IBM W2010-06-22T14:00:41Z in response to SumitSinghTCS13You only need to modify these 2 files when you use WASCE as the dev server. WebSphere datasources are automatically made visible to the WPF WAR if you define them in a general enough scope to cover where WPF runs.
You must be using a release earlier than 6.1.5. As I recall, in 6.1.5 the sample WASCE datasource is automatically defined and available without needing to edit the deployment descriptors.