BUG Community

Welcome! Log In

Forums BUG SDK 'Find BUG Services' returns Error (Linux)

Subscribe to 'Find BUG Services' returns Error (Linux)  12 posts, 6 voices

Log in to reply to this topic
 
Oct 7, 2007 3:40pm
Img_missing_medium matt.gauger 15 posts

Running Eclipse 3.2 on Ubuntu 7 "Feisty Fawn" (will upgrade to 3.3 when Ubuntu lets me; I also have Eclipse 3.3 Europa in its own directory with its own separate workspace)

When I go to create a new BUG Project and try to search for the Services so I can add them, I get this error in a window:
Unable to connect on port 8082

Please consult log file for additional details


When I tail the log for the workspace, I see:
!ENTRY com.buglabs.dragonfly 4 0 2007-10-07 14:27:46.997
!MESSAGE Unable to connect on port 8082
!STACK 0
java.net.ConnectException: Connection refused
at gnu.java.net.PlainSocketImpl.connect(libgcj.so.70)
at java.net.Socket.connect(libgcj.so.70)
at java.net.Socket.connect(libgcj.so.70)
at gnu.java.net.protocol.http.HTTPConnection.getSocket(libgcj.so.70)
at gnu.java.net.protocol.http.HTTPConnection.getOutputStream(libgcj.so.70)
at gnu.java.net.protocol.http.Request.dispatch(libgcj.so.70)
at gnu.java.net.protocol.http.HTTPURLConnection.connect(libgcj.so.70)
at gnu.java.net.protocol.http.HTTPURLConnection.getInputStream(libgcj.so.70)
at com.buglabs.dragonfly.util.WSHelper.get(Unknown Source)
at com.buglabs.dragonfly.util.BugWSHelper.getPrograms(Unknown Source)
at com.buglabs.dragonfly.util.BugWSHelper.getAllServices(Unknown Source)
at com.buglabs.dragonfly.ui.wizards.bugProject.NewProjectMainPage$6.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:479)
at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:265)
at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1107)
at com.buglabs.dragonfly.ui.wizards.bugProject.NewProjectMainPage$5.widgetSelected(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2856)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at com.buglabs.dragonfly.ui.actions.LaunchNewProjectWizard.run(Unknown Source)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2856)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at java.lang.reflect.Method.invoke(libgcj.so.70)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)


Dunno what's up with that, to be honest. I didn't see anything like this mentioned anywhere, so I thought it deserved a thread.
Oct 7, 2007 4:12pm
Medium Bug Labs team finsprings 268 posts

Any chance you would have something else listening on 8082 that would have prevented Eclipse/Dragonfly/VirtualBUG (whichever part uses it) form getting it? You could do a ‘netstat -an|grep -i listen’ to see what ports your machine is listening on prior to running Eclipse.

Oct 7, 2007 5:54pm
Img_missing_medium matt.gauger 15 posts

Nope.

I did figure this out, and I feel kind of silly about it.

Even though Java 1.6.x is installed, Ubuntu pointed Eclipse at the GCJ 1.4 runtime. Fixed that and I'm in business.

Finding FlickrUppr to be a big help in understanding the 'structure' of an app on the Bug, but is migrating most of the functionality into a new class (FlickrUpprApp in the flickruppr.ui dir) really a good practice?

Edit:
New problems, same machine.

When booting the Virtual BUG, I get a 'hang to Debug mode' error showing me in the UI that looks like this:


Looks like some issue with Concierge.
Oct 8, 2007 7:09am
Medium Bug Labs team kgilmer 215 posts

Matt,

Yes, GCJ in Ubuntu is a problem. We basically rip it out of our dev environments just to be safe. This error looks to be another Java configuration issue. Let me think about this and get back to you.

Oct 8, 2007 5:10pm
Img_missing_medium matt.gauger 15 posts

kengilmer
Matt,

Yes, GCJ in Ubuntu is a problem. We basically rip it out of our dev environments just to be safe. This error looks to be another Java configuration issue. Let me think about this and get back to you.


Whats' the best way to rip it out? I can't remove it with apt-get because it tries to take Eclipse with it, but I have set Eclipse to only see 1.6, and linked 1.6 over the other java bin dirs, so no matter what PATH you're using, it should end up finding 1.6

Better yet, now that I think about it, are you guys using any other distros than Ubuntu at Bug Labs, preferrably one whose package manager has a stub package for Java 1.6 (or at least doesn't try to give you GCJ) and supports Eclipse Europa 3.3?

I might look at installing Gentoo or one of the source-based distros with lots of packages to choose from if they offer those.
Oct 8, 2007 6:06pm
Img_missing_medium aroman 21 posts

Hi Matt,

I am glad FlickrUppr is useful to you. Initially the application logic was part of the service tracker. However, I felt that it should be extracted into a separate class for the following reason: the job of the service tracker is to track services, leaving the application logic might make this less obvious and harder to understand.

Sometimes it’s a good idea to separate responsibilities (http://www.objectmentor.com/resources/articles/.... This way if there’s a need for us to track additional services for other purposes the Application code will not be affected. If the application needs to change for whatever reason the service tracker remains intact.

As to whether it makes sense to put the application code in filckruppr.ui packages, probably not ;).

These are all great questions. I’m glad flickruppr is serving it’s purpose as an "educational" example.

Regards,
Angel

Oct 8, 2007 6:15pm
Img_missing_medium aroman 21 posts

Hi Matt,

The least intrusive method I’ve found to resolve the gcj issue is to modify your PATH variable and place sun’s java<somestuff>/bin directory first on your path.

Make sure this works by checking the output of "java -version" or "which java".

Regards,
Angel

Oct 8, 2007 6:35pm
Img_missing_medium matt.gauger 15 posts

aroman
Hi Matt,

The least intrusive method I've found to resolve the gcj issue is to modify your PATH variable and place sun's java<somestuff>/bin directory first on your path.

Make sure this works by checking the output of "java -version" or "which java".

Regards,
Angel


java 1.6 is getting exported as the first entry in my path variable in my .bashrc so it should be okay. java -version, "which java" "whereis java" etc all show up fine.

Since my Linux machine has Europa sitting in a tarball waiting to go (not installed by Ubuntu's apt-get/synaptic tools) and my own install of java 1.6, I removed GCJ and the Ubuntu-installed Eclipse earlier, but I haven't had the time to set it up as I'm off to night class. I'll check back in later tonight w/ whether it worked or not.

Thanks aroman & kengilmer for the help,

- Matt
Oct 9, 2007 9:28am
Medium Bug Labs team agordon 74 posts

If you are using a .deb packaged Java environment, you may be able to use the update-alternatives command.

Ubuntu has some information on their wiki on how to set up Java in their distro. I usually roll my own .deb with make-jpkg, then install it and do an update-alternatives --config java to point at the newly installed jre or jdk.
Oct 9, 2007 3:17pm
Img_missing_medium Ryan P 22 posts

That was a good link, thanks. :-)

Oct 10, 2007 11:22pm
Medium Bug Labs team kgilmer 215 posts

Matt, is this issue resolved for you?

Oct 10, 2007 11:28pm
Img_missing_medium matt.gauger 15 posts

It is, in that I’m no longer having this problem. My solution was to install my own copy of Sun’s 1.6 JRE (w/o the .deb packaging mentioned farther up the thread) and make sure that it is symlinked to places where the GCJ Jav