Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Simple run fails (eclipse helios sr1 jee)(Trying to make jetty run in osgi container.)
Simple run fails (eclipse helios sr1 jee) [message #634494] Fri, 22 October 2010 00:11 Go to next message
Alex  is currently offline Alex Friend
Messages: 2
Registered: October 2010
Junior Member
Hi.

I have OS: ubuntu 10.04 lts and I'm new to eclipse and osgi.

Following this example http://www.javaworld.com/javaworld/jw-06-2008/jw-06-osgi3.html I tried to run somethin similar, if not identical, only instead of adding these bundles to my workspace and hit run, I ran a configuration doing this:

Run>Run Configurations>
from the list on the left i chose osgi framework
clicked new
on the bundles pane I checked the bundles:

org.eclipse.osgi_3.6.1.R36x_v20100806
javax.servlet_2.5.0.v200910301333
org.apache.commons.logging_1.0.4.v200904062259
org.apache.commons.logging_1.0.4.v201005080501
org.eclipse.equinox.http.registry_1.1.0.v20100503
org.eclipse.equinox.http.servlet_1.1.0.v20100503
org.eclipse.equinox.common_3.6.0.v20100503
org.eclipse.osgi.services_3.2.100.v20100503
org.eclipse.equinox.registry_3.5.0.v20100503
org.eclipse.equinox.http.jetty_2.0.0.v20100503
org.mortbay.jetty.util_6.1.23.v201004211559
org.mortbay.jetty.server_6.1.23.v201004211559

(I tried first by just checking the same later versions of the bundles in the eg above
and after some crashes I figured out the dependencies and added the appropriate bundles required. I tried as well to pick the start levels of each bundle so as to be greater than the levels of the bundles on which it depends)

left all the rest to default and the result was all the bundles active except org.eclipse.equinox.http.jetty, which caused some exceptions

(by pressing ss i get this)
id State Bundle
0 ACTIVE org.eclipse.osgi_3.6.1.R36x_v20100806
1 ACTIVE javax.servlet_2.5.0.v200910301333
3 ACTIVE org.apache.commons.logging_1.0.4.v200904062259
4 ACTIVE org.apache.commons.logging_1.0.4.v201005080501
5 ACTIVE org.eclipse.equinox.http.registry_1.1.0.v20100503
7 ACTIVE org.eclipse.equinox.http.servlet_1.1.0.v20100503
9 ACTIVE org.eclipse.equinox.common_3.6.0.v20100503
10 ACTIVE org.eclipse.osgi.services_3.2.100.v20100503
13 ACTIVE org.eclipse.equinox.registry_3.5.0.v20100503
14 RESOLVED org.eclipse.equinox.http.jetty_2.0.0.v20100503
15 ACTIVE org.mortbay.jetty.util_6.1.23.v201004211559
16 ACTIVE org.mortbay.jetty.server_6.1.23.v201004211559

As you'll see bellow the main problem is jetty is asking to use/bind port 80 but jvm wont allow it... I also have tomcat installed, but it wasn't running...

everything I saw on screen since hitting run:

osgi> 2010-10-22 02:59:27.093:WARN::failed SelectChannelConnector@0.0.0.0:80: java.net.SocketException: Permission denied
2010-10-22 02:59:27.094:WARN::failed Server@7afaa550: java.net.SocketException: Permission denied

!SESSION 2010-10-22 02:59:26.047 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -dev file:/home/alex/workspace/.metadata/.plugins/org.eclipse.pde .core/aide/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog -console

!ENTRY org.eclipse.equinox.http.jetty 4 0 2010-10-22 02:59:27.098
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.http.jetty.internal.Activator.start() of bundle org.eclipse.equinox.http.jetty.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
Caused by: org.osgi.service.cm.ConfigurationException: default : Permission denied
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.up dated(HttpServerManager.java:111)
at org.eclipse.equinox.http.jetty.internal.Activator.start(Acti vator.java:60)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
... 11 more
Caused by: java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelI mpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java :59)
at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChan nelConnector.java:216)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectC hannelConnector.java:315)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCy cle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCy cle.java:50)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.up dated(HttpServerManager.java:109)
... 15 more
Root exception:
org.osgi.service.cm.ConfigurationException: default : Permission denied
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.up dated(HttpServerManager.java:111)
at org.eclipse.equinox.http.jetty.internal.Activator.start(Acti vator.java:60)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
Caused by: java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelI mpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java :59)
at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChan nelConnector.java:216)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectC hannelConnector.java:315)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCy cle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCy cle.java:50)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.up dated(HttpServerManager.java:109)
... 15 more

!ENTRY org.eclipse.osgi 4 0 2010-10-22 02:59:27.103
!MESSAGE Bundle org.eclipse.equinox.http.jetty_2.0.0.v20100503 [14] is not active.

Re: Simple run fails (eclipse helios sr1 jee) [message #634498 is a reply to message #634494] Fri, 22 October 2010 00:23 Go to previous messageGo to next message
Alex  is currently offline Alex Friend
Messages: 2
Registered: October 2010
Junior Member
SOLVED

The solution is to apply this JVM argument on the arguments tab:

-Dorg.osgi.service.http.port=8380

Solution link: https://blog.itu.dk/SMDD-E2009/2009/08/15/first-lecture/
Re: Simple run fails (eclipse helios sr1 jee) [message #988357 is a reply to message #634498] Thu, 29 November 2012 15:01 Go to previous message
Torben Christensen is currently offline Torben ChristensenFriend
Messages: 1
Registered: November 2012
Junior Member
Hi

Where do I apply this argument?
I need to configure this on a mac (mac OSX 10.8.2).

Regards,
T
Previous Topic:OSGi + Logback + slf4j - Eclipse Run Configuration
Next Topic:Workbench application and OSGi
Goto Forum:
  


Current Time: Sat Dec 20 20:57:27 GMT 2014

Powered by FUDForum. Page generated in 0.01707 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software