Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Installing Jetty in a Target- Can't resolve javax.el

Thanks for your reply, Jan. Yes I've seen that documentation, and I looked through it again just now to make sure I'm not missing something. That page, like every other jetty documentation and discussion I've seen in my online searching, discusses deploying jetty into an OSGI container. I have an app that deploys into an OSGI container, and it includes the jetty bundles and their dependencies, and it works.

I'm asking about how I can incorporate jetty into my app in a more appropriate way. The way I'm doing it now, the jetty bundles are copied into my eclipse workspace along with the bundles I've developed, and all these bundles are built against my RCP target environment (in eclipse during dev time, and by Maven using the tycho-p2-director plugin).

But this is not the right way to incorporate third party code into an RCP app. It should be in my RCP target along with the other third party code that I'm using. But when I do that, jetty is unable to satisfy the dependency on javax.el 3.0.0, even though I have that bundle also in my target environment.

As for that bundle, I didn't just grab the jar from Maven and deploy it. I created an RCP Plug-in that wraps the javax.el jar, using the eclipse wizard for creating a new "Plug-in from existing jar archive". This creates an appropriate manifest file for an RCP Plug-in, with the build path configured to expose the packages contained in the wrapped jar archive. As I mentioned, I exported the javax.el package on the Runtime tab of the Manifest editor, and also tried assigning to that package version 3.0.0, to satisfy the version checking at the package level, since the error message seems to indicate that jetty is expressing the dependency as an "Import-Package" constraint rather than a "Require-Bundle" constraint.

This is, as I understand it, a typical way to incorporate third party code into an RCP app, and I've done it many times with other third party code (including the Jetty jars that run successfully when bundled with my custom code instead of in the target).

So the question I have is: why does the jetty bundle loaded from the jetty update site not recognize that the dependence on package javax.el 3.0.0 is satisfied, even though I have a bundle in my target environment with that name and version, which exports package javax.el 3.0.0?

This is an RCP question, so maybe this is not the right list in which to ask it. But I know that what I'm doing is standard RCP practice, and I suspect that if I ask why it's not working in an RCP forum, someone is going to tell me to go ask the jetty people.

-Mark

On 9/25/15 7:15 PM, Jan Bartel wrote:
For osgi, you can't necessarily use the javax.* jars from maven, as in my experience they often do not contain the correct manifests. If you follow the advice on the page above,you should be ok.

Jan

On 26 September 2015 at 05:27, Mark Leone <midnightjava@xxxxxxxxxxx> wrote:
Correction: I downloaded the javax.e1-3.0.0 jar. I mistakenly identified it as the "jetty 3.0.0" jar.


On 09/25/2015 02:18 PM, Mark Leone wrote:
I have an RCP app that uses the jetty websocket client. It's been working fine with the jetty bundles packaged along with the code I developed, because I wasn't successful at getting them installed in my RCP target. Now I took the time to give it my best effort, and after hours of trying I reached a dead end.

I read in this post (https://dev.eclipse.org/mhonarc/lists/jetty-users/msg04454.html) that with the later versions of Jetty (I'm using 9.2.5) the required version of some dependencies are not included in equinox and also not available from orbit, so I need to download them myself and install them. I thought I did that correctly, but jetty is not satisfied.

When I try to resolve my target with the jetty bundles included, it fails with this message:

org.eclipse.jetty.osgi.boot.jsop 9.2.5.v20141112 requires 'package javax.el [3.0.0,3.1.0)' but it could not be found.

So I downloaded the jetty 3.0.0 jar which contains package javax.el. I created a plug-in from this jar file, and named it javax.el with version 3.0.0. I exported the package javax.el on the run tab, and also tried specifying the package version as 3.0.0.

Then I added a location to my target, pointing it at the folder which contains the jetty plug-in I created. When I look at the content tab of the target editor, I see see my plug-in there and it's selected.

But I continue to get the same message in the target editor when I try to resolve the target. I believe I've successfully added the bundle I created to my target, but it's a package dependency that is failing. Am I supposed to do something further to make that package available? I don't know anything to do other than to export it. Are there other strategies I can use to get jetty working in my target? I don't find any useful discussion of people doing this when I searched the Internet, but surely I'm not the only one who is trying to use jetty in an RCP target.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top