BundleInstall.begin throws exception [message #519216] |
Mon, 08 March 2010 06:15 |
|
I have two questions both related:
What exactly is BundleInstall.begin() trying to accomplish? I have read the code a little bit, and I see that its trying to "create a generation directory" and copy my bundle directory in to it. What exactly is a generation directory and why is it trying to copy my bundle directory in to it. Is it trying to cache or something?
The other question is an issue actually. My bundle is not installing simply because it contains a file with chinese file name. The following exception will tell it all:
Caused by: java.io.FileNotFoundException: /opt/server/ds/bundles/com.x.y.ds/���� eam-ds.jar.bak (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.eclipse.osgi.internal.baseadaptor.AdaptorUtil.copyDir(AdaptorUtil.java:54)
at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:75)
The reason its giving FileNotFound is that the filename is chinese and it cant recognize it. Does anyone know how I can avoid this?
OS: Solaris 10 (Chinese)
[Updated on: Mon, 08 March 2010 06:17] Report message to a moderator
|
|
|
|
|
|
|
|
Re: BundleInstall.begin throws exception [message #520343 is a reply to message #520190] |
Fri, 12 March 2010 01:39 |
|
Now I am completely done. . What we do is that we hava a launcher that will set the parent classloader type to "fwk" and start equinox invoking EclipseStarter via reflection. We read a list of bundles from a property file and for each of them in the list we do something like:
Bundle bundle = context.installBundle(bundleLoc);
bundle.start();
From your previous reply it seems that I dont need to do installBundle() every time. Am I doing something worng here?
|
|
|
|
Re: BundleInstall.begin throws exception [message #520360 is a reply to message #520345] |
Fri, 12 March 2010 05:37 |
|
I do an installBundle() for a bundle every time my application starts. Does the framework remeber the bundles even after the jvm exits(note that I am not using SimpleConfigurator or any other custom launcher). I do now understand that it does copy all bundles in to the framework storage, but somehow the next time it starts up the Framework.getBundleByLocation() returns null each time, so it doesent seem to remeber my previous bundles. Do you mean that, in a general scenario, installBundle needs to be done once and once only during the first run for the entire lifetime.
I tried "reference:",, in which case, the bundles are not copied to storage area. So what exactly is "reference:" protocol. Is it part of standard OSGI spec. Is there any document for it?
[Updated on: Fri, 12 March 2010 07:58] Report message to a moderator
|
|
|
|
Re: BundleInstall.begin throws exception [message #520598 is a reply to message #520466] |
Sat, 13 March 2010 01:51 |
|
I knew about the clean property, but never thought the problem could be so trivial. The property was burried in deep in some god-forsaken configuration file. After removing thid property it does remeber installed bundles.
The original problem remains though. But I think it won't be a equinox problem, but an encoding related issue.
Thanks Tom.
|
|
|
Powered by
FUDForum. Page generated in 0.06034 seconds