Tried this on CF-Server to no avail. We are trying to get CF MX 6.1 running as a J2EE application under JRun.
We are getting this error when trying to load and initialize a Java Class object coldfusion.server.ServiceFactory$ServiceNotAvailableException: The DataSource service is not available. The object tag is as follows. <cfobject type="JAVA" action="Create" name="MapperAdaptor" class="com.newsstand.library.WWWMapperAdaptor"> We then call the init function including the data source name that we use throughout the system and get the above error. The Java here fails. import coldfusion.server.DataSourceService; import coldfusion.server.ServiceFactory; . . . public WWWMapperAdaptor(String dataSourceName, String username) throws Exception { // Get a service locator from the cold fusion server. DataSourceService ds = ServiceFactory.getDataSourceService(); // Lookup the specific datasource. dataSource = ds.getDatasource(dataSourceName); this.username = username; // Get the list of subscriptions belonging to this user. // Loads data into the subscriptions and userData instance variables. fillInSubscriptions(); } Specifically on this line: DataSourceService ds = ServiceFactory.getDataSourceService(); But this CF works just fine. // This will dump all of the services in CFMX <cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory"> <cfdump var="#factory#"> // This will dump the datasources and drivers manipulating datasources is as simple as modifying // the structure datasources below <cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory"> <cfset sqlexecutive = factory.getDataSourceService()> <cfset drivers=sqlexecutive.drivers> <cfset datasources=sqlexecutive.datasources> <cfdump var="#sqlexecutive#" label="DataSource Factory"> <cfdump var="#datasources#" label="DataSources"> <cfdump var="#drivers#" label="Database Drivers"> Currently the class file is in a path referenced by the specific CF instance. My Java developer feels that this is a class loader problem and we are moving this class file to the same location as the system wide CF jar files. All of this works just fine in stand alone mode. Shawn McKee Manager, Web Development NewsStand, Inc. 8620 Burnet Rd., Suite 400 Austin, TX 78757 USA 512-334-5100 NewsStand Inc. is the leader in digital delivery of newspapers, magazines and other print publications. Our user-friendly technology and innovative media distribution is changing the way people read. Now, we have over 125 titles (in several languages) for purchase as either single copies or subscriptions that can be easily downloaded on your PC. Follow the link below to try a free copy of The New York Times. Select "Try a free sample" and click on "Add to cart." <http://newsstand.com/?fuseaction=signup&promo_id=2295> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase RoboHelp from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=59 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190082 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54