Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363792 - EDT SQLDataSource init error - REST webservices - running on tomcat
Summary: EDT SQLDataSource init error - REST webservices - running on tomcat
Status: CLOSED DUPLICATE of bug 363870
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Yun Feng Ma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 05:13 EST by Chris Houben CLA
Modified: 2017-02-23 14:19 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Houben CLA 2011-11-15 05:13:05 EST
Build Identifier: 20110916-0149 (nighly build)

hi,

When I debug my libraries via debug in EDT, I have no problem.
But when I deploy my project on a tomcat server, I get an error while init of SQLDataSource.

I receive an error on statement ds SQLDataSource?{@resource{bindingkey = "NewDerby"}};
errormessage: EGL0040E No file name was provided to get resource.
example:

Code: 

// basic library
library customerLib

myCustomers CUSTOMER[]{};
myCustomer CUSTOMER;
rs SQLResultSet?;
	
	
function getCustomerList() returns(CUSTOMER[]);
		
try
  ds SQLDataSource?{@resource{bindingkey = "NewDerby"}};
  open rs from ds with #sql{select * from egl.customer order by customer_id};
  while (rs.setNext())
	get myCustomer from rs; myCustomers.appendElement(myCustomer);			
  end
onException(exception AnyException)

end

return(myCustomers);
end	
end

reply of Justin Spadea on EDT forum:
Hi Chris,

What's happening is the target project does not have the configuration set up that specifies which deployment descriptor is the default. Here's how you can work around this:

1. In your target web project create an empty file "rununit.properties" inside the Java source folder. This file should go in the root of this folder, not in one of the packages.

2. Paste the following into rununit.properties:
egl.application.property.file=mydd-bnd.xml

Where "mydd" is the name of your deployment descriptor, lowercased. This "-bnd.xml" file gets created during deployment and contains the resource bindings. It's located in the same place that you created rununit.properties.

-Justin

Reproducible: Always
Comment 1 Yun Feng Ma CLA 2011-11-15 10:51:45 EST
Hi Chris, could you attach your test application? Thanks a lot.
Comment 2 Yun Feng Ma CLA 2011-11-16 10:03:22 EST
Hi Chris,

One enhancement 363870 has been opened for this feature, and Justin is working on it. Thanks a lot.

*** This bug has been marked as a duplicate of bug 363870 ***
Comment 3 Matt Heitz CLA 2013-01-03 10:08:25 EST
Closing all bugs in the RESOLVED state with reason INVALID, WONTFIX, DUPLICATE, WORKSFORME, or NOT_ECLIPSE.