A Problem Deploying a Plug-in with ETL [message #639460] |
Tue, 16 November 2010 16:25 |
Andy Ed Messages: 64 Registered: December 2009 |
Member |
|
|
Hi,
I'm attempting, for the first time, to deploy my ETL files in a plug-in. I have a problem extracting a URL from the bundle in the following code. I use the URL to create a file to pass to the parser.
module = createModule();
// Create the path to the bundle
IPath bundlePath = new Path(etlPath.segment(0).toString());
// Create the path to the ETL file (relative to the bundle)
IPath filePath = new Path(etlPath.toString()).removeFirstSegments(1);
// Get the bundle and file, convert the file to a file URI
Bundle bundle = Platform.getBundle(bundlePath.toString());
URL url = FileLocator.find(bundle, filePath, null);
java.net.URI fileURI = FileLocator.toFileURL(url).toURI();
File etlFile = new File(fileURI);
module.parse(etlFile);
FileLocator.find(bundle, filePath, null) works in my development environment, but not in the deployed system.
My questions are: is this the correct approach for accessing the ETL file in a deployed plug-in? If so, why does FileLocator (and other methods) fail to return the URL ?
Cheers, Andy
|
|
|
Re: A Problem Deploying a Plug-in with ETL [message #639618 is a reply to message #639460] |
Wed, 17 November 2010 08:35 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi Andy,
Two thoughts:
1. Could you check that the folder containing your transformation is
exported in the compiled plugin (should be checked in the "Build" tab of
MANIFEST.MF)
2. The code I'm using to find ETL/EOL files in EuGENia looks a bit
different:
....
URI uri = bundle.getResource("transformations/t.etl").toURI();
module.parse(uri);
....
Could you please give these a go and let me know if any of them fixes
the problem?
Cheers,
Dimitris
On 16/11/2010 16:26, Andy wrote:
> Hi,
> I'm attempting, for the first time, to deploy my ETL files in a plug-in.
> I have a problem extracting a URL from the bundle in the following code.
> I use the URL to create a file to pass to the parser.
>
>
> module = createModule();
> // Create the path to the bundle
> IPath bundlePath = new Path(etlPath.segment(0).toString());
> // Create the path to the ETL file (relative to the bundle)
> IPath filePath = new Path(etlPath.toString()).removeFirstSegments(1);
> // Get the bundle and file, convert the file to a file URI
> Bundle bundle = Platform.getBundle(bundlePath.toString());
> URL url = FileLocator.find(bundle, filePath, null);
> java.net.URI fileURI = FileLocator.toFileURL(url).toURI();
> File etlFile = new File(fileURI);
>
> module.parse(etlFile);
>
>
> FileLocator.find(bundle, filePath, null) works in my development
> environment, but not in the deployed system. My questions are: is this
> the correct approach for accessing the ETL file in a deployed plug-in?
> If so, why does FileLocator (and other methods) fail to return the URL ?
>
> Cheers, Andy
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03376 seconds