Search Results

Search found 10 results on 1 pages for 'ceilingfish'.

Page 1/1 | 1 

  • Cannot load JRubyEngine because org.apache.bsf.util.BSFEngineImpl not found

    - by Ceilingfish
    Hi, I'm trying to use JRuby in a custom application, and I don't seem to be able to load the JRubyEngine object. My class looks like functionally similar to this: public class ScriptEngine { private static ScriptEngine engine = new JRubyEngine(); public void run(final String script, final Map<String,Object> input) { final Bindings context = engine.createBindings(); context.putAll(input); try { engine.eval(script,context); } catch (ScriptException e) { log.error("Failed to execute script: "+getScript(),e); } } } However this fails at compilation with the complaint: [javac] Compiling 486 source files to /workspace/myProject/build/src [javac] /workspace/myProject/src/net/ceilingfish/ScriptEngine.java:31: cannot access org.apache.bsf.util.BSFEngineImpl [javac] class file for org.apache.bsf.util.BSFEngineImpl not found [javac] private static ScriptEngine engine = new JRubyEngine(); [javac] ^ [javac] 1 error Does anyone have any insights on where I can get this class from? Or if there is a better way to be instantiating a JRubyEngine object.

    Read the article

  • Problem with cometd and jetty 6 / 7

    - by Ceilingfish
    Hi chaps, I'm trying to get started with cometd (http://cometd.org/) and jetty 6 or 7, but I seem to be having problems. I've got an ant script that packages my code up into a war with the cometd 1.1.1 binaries and jetty binaries that are appropriate to the version of jetty I deploy the war to (so 7.1.2.v20100523 binaries when I deploy to jetty 7.1.2.v20100523 and 6.1.24 when I deploy to 6.1.24). I first tried getting a setup with version 7.1.2.v20100523, but when I tried to deploy I got a very long stack trace sample of which is: 2010-05-26 15:32:12.906:WARN::Problem processing jar entry org/eclipse/jetty/util/MultiPartOutputStream.class java.io.IOException: Invalid resource at org.eclipse.jetty.util.resource.URLResource.getInputStream(URLResource.java:204) at org.eclipse.jetty.util.resource.JarResource.getInputStream(JarResource.java:113) at org.eclipse.jetty.annotations.AnnotationParser$2.processEntry(AnnotationParser.java:575) at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:152) at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:82) at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:64) at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:75) at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:587) at org.eclipse.jetty.annotations.AbstractConfiguration.parseWebInfLib(AbstractConfiguration.java:107) at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:68) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:992) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:579) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:381) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:182) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:497) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:135) at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:77) at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:490) at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:355) at org.eclipse.jetty.util.Scanner.scan(Scanner.java:306) at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:258) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) 2010-05-26 15:32:12.907:WARN::Problem processing jar entry org/eclipse/jetty/util/MultiPartWriter.class java.io.IOException: Invalid resource at org.eclipse.jetty.util.resource.URLResource.getInputStream(URLResource.java:204) at org.eclipse.jetty.util.resource.JarResource.getInputStream(JarResource.java:113) at org.eclipse.jetty.annotations.AnnotationParser$2.processEntry(AnnotationParser.java:575) at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:152) at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:82) at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:64) at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:75) at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:587) at org.eclipse.jetty.annotations.AbstractConfiguration.parseWebInfLib(AbstractConfiguration.java:107) at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:68) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:992) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:579) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:381) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:182) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:497) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:135) at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:77) at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:490) at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:355) at org.eclipse.jetty.util.Scanner.scan(Scanner.java:306) at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:258) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) 2010-05-26 15:32:12.907:WARN::Problem processing jar entry org/eclipse/jetty/util/Attributes.class java.io.IOException: Invalid resource at org.eclipse.jetty.util.resource.URLResource.getInputStream(URLResource.java:204) at org.eclipse.jetty.util.resource.JarResource.getInputStream(JarResource.java:113) at org.eclipse.jetty.annotations.AnnotationParser$2.processEntry(AnnotationParser.java:575) at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:152) at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:82) at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:64) at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:75) at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:587) at org.eclipse.jetty.annotations.AbstractConfiguration.parseWebInfLib(AbstractConfiguration.java:107) at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:68) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:992) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:579) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:381) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:182) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:497) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:135) at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:77) at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:490) at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:355) at org.eclipse.jetty.util.Scanner.scan(Scanner.java:306) at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:258) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Seemed to go through all the jetty binaries and complain about each class file. When I tried to deploy to 6.1.24 I got org.mortbay.util.MultiException[java.lang.NoClassDefFoundError: org/eclipse/jetty/util/ajax/JSON$Source, java.lang.NoClassDefFoundError: org/eclipse/jetty/util/thread/ThreadPool] at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:656) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mortbay.start.Main.invokeMain(Main.java:194) at org.mortbay.start.Main.start(Main.java:534) at org.mortbay.start.Main.start(Main.java:441) at org.mortbay.start.Main.main(Main.java:119) My web.xml looks like this: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <servlet> <servlet-name>cometd</servlet-name> <servlet-class>org.cometd.server.continuation.ContinuationCometdServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>cometd</servlet-name> <url-pattern>/cometd/*</url-pattern> </servlet-mapping> <servlet> <servlet-name>initializer</servlet-name> <servlet-class>uk.co.dubit.nexus.comet.BayeuxInitializer</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <!-- <filter> <filter-name>cross-origin</filter-name> <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class> </filter> <filter-mapping> <filter-name>cross-origin</filter-name> <url-pattern>/cometd/*</url-pattern> </filter-mapping> --> </web-app> note cross origin filter is commented out. The class didn't seem to exist when I tried to run on 6.1.24 (which as far as I understand is the correct behaviour, yes?). Sorry for the noob question but does anyone know what I'm doing wrong here? Regards, Tom

    Read the article

  • rspec & rails 3 cannot find model object

    - by Ceilingfish
    I'm trying to put some specs around a new rails 3 project I am working on, and my first test doesn't seem to be able to find a model. I've installed rspec from the command line using: sudo gem install rspec --pre and then I put the following in my Gemfile gem "rspec-rails", ">= 2.0.0.beta.1" But when I run my test I get ./spec/models/world_spec.rb:1: uninitialized constant World (NameError) rake aborted! Command /opt/local/bin/ruby -Ilib -Ispec "./spec/models/world_spec.rb" failed /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/lib/rspec/core/rake_task.rb:71:in `define' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1112:in `verbose' /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/lib/rspec/core/rake_task.rb:57:in `send' /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/lib/rspec/core/rake_task.rb:57:in `define' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /opt/local/bin/rake:19:in `load' /opt/local/bin/rake:19 My spec is in spec/models/world_spec.rb, and looks like describe World, "#hello" do it "should be invalid" do World.new.should be_invalid? end end I tried adding a line like require "app/model/world" and require "world" but to no success. Does anyone know what I'm doing wrong?

    Read the article

  • Uploadify and rails 3 authenticity tokens

    - by Ceilingfish
    Hi chaps, I'm trying to get a file upload progress bar working in a rails 3 app using uploadify (http://www.uploadify.com) and I'm stuck at authenticity tokens. My current uploadify config looks like <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $("#zip_input").uploadify({ 'uploader': '/flash/uploadify.swf', 'script': $("#upload").attr('action'), 'scriptData': { 'format': 'json', 'authenticity_token': encodeURIComponent('<%= form_authenticity_token if protect_against_forgery? %>') }, 'fileDataName': "world[zip]", //'scriptAccess': 'always', // Incomment this, if for some reason it doesn't work 'auto': true, 'fileDesc': 'Zip files only', 'fileExt': '*.zip', 'width': 120, 'height': 24, 'cancelImg': '/images/cancel.png', 'onComplete': function(event, data) { $.getScript(location.href) }, // We assume that we can refresh the list by doing a js get on the current page 'displayData': 'speed' }); }); </script> But I am getting this response from rails: Started POST "/worlds" for 127.0.0.1 at 2010-04-22 12:39:44 ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): Rendered /opt/local/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms) Rendered /opt/local/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (6.6ms) Rendered /opt/local/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (12.2ms) This appears to be because I'm not sending the authentication cookie along with the request. Does anyone know how I can get the values I should be sending there, and how I can make rails read it from HTTP POST rather than trying to find it as a cookie?

    Read the article

  • migrating an embedded jetty server from v6 to v7

    - by Ceilingfish
    Hi chaps, I have an embedded servlet which I use in unit tests, looks like this: public class UnitTestWebservices extends AbstractHandler { private Server server; private Map<Route,String> data = new HashMap<Route,String>(); public UnitTestWebservices(int port) throws Exception { server = new Server(port); server.setHandler(this); server.start(); } public void handle(String url, HttpServletRequest request, HttpServletResponse response, int arg3) throws IOException, ServletException { final Route route = Route.valueOf(request.getMethod(), url); final String content = data.get(route); if(content != null) { final ServletOutputStream stream = response.getOutputStream(); stream.print(content); stream.flush(); stream.close(); } else { response.sendError(HttpServletResponse.SC_NOT_FOUND); } } .... } That's written using version 6.1.24 of Jetty. I tried switching over to use Jetty 7.1.1.v20100517, and updated that code to this: public class UnitTestWebservices extends AbstractHandler { private Server server; private Map<Route,String> data = new HashMap<Route,String>(); public UnitTestWebservices(int port) throws Exception { server = new Server(port); server.setHandler(this); server.start(); } public void handle(String url, Request request, HttpServletRequest servletRequest, HttpServletResponse response) throws IOException, ServletException { final Route route = Route.valueOf(request.getMethod(), url); final String content = data.get(route); request.setHandled(true); response.setContentType("application/json"); if(content != null) { response.setStatus(HttpServletResponse.SC_OK); final Writer stream = response.getWriter(); stream.append(content); } else { response.sendError(HttpServletResponse.SC_NOT_FOUND); } } } But whenever I tried to access make a request to the server it would hang indefinitely. Has anyone experienced anything similar?. It also printed this into the log: log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log). log4j:WARN Please initialize the log4j system properly. org.eclipse.jetty.server.Server@670655dd STOPPED +-UnitTestWebservices@50ef5502 started

    Read the article

  • Java library to encode / decode AMF

    - by Ceilingfish
    Hi chaps, I currently have a Java server that talks to a Flash client by passing JSON encoded data over a binary socket connection. Is there a way on either side to encode / decode packets as AMF instead of JSON? It seems to me that there should be some native support in Flash player for doing this? All the implementations I have found of AMF serialization seem to be embedded inside an application framework. Simiarly so, does anyone know if it's possible to decode AMF packets independently of a connection implementation in Flash?

    Read the article

  • Storing a repository in subversion and git

    - by Ceilingfish
    Hi, I'm currently trying to convince my company to migrate to git from subversion, and one thing that would be really helpful would be to allow me to store a repository in subversion and git at the same time (then I can show them how easy it is to do in git what they've spent an hour trying to do in subversion). I guess that I could put my subversion repository straight into git, but this seems to leave loads of .svn artifacts in each directory. Does anyone know if there's a way to avoid this?

    Read the article

  • Is it possible to programmatically talk to MSN messenger / Live messenger?

    - by Ceilingfish
    Hi chaps, I've been researching how to interact with the MSN messenger / Live messenger service programmatically and I can't find any real documentation on this. The documentation for the Live services only seem to implement in Javascript (they're here: http://dev.live.com/Messenger/) It would be possible to reverse engineer this API to obtain the web services that it is actually using, but I am guessing that they didn't provide the sources for a reason (which means that those web services aren't meant for direct access). However I can't find any other official APIs that allow programmatic access (more specifically no APIs that mention sockets, web services, or a proper programming language like Java or .Net). Does anyone know if an API like that exists?

    Read the article

  • Rails uploaded file blank

    - by Ceilingfish
    Hi chaps, I'm trying to upload a file to the server using a HTTP multipart form in rails, and for some reason it's turning up blank at the other end. I can see it being received in the rails log thusly: Processing Admin::HeadlinesController#update (for 127.0.0.1 at 2010-03-08 12:26:13) [PUT] Parameters: {"commit"=>"Save changes", "action"=>"update", "_method"=>"put", "authenticity_token"=>"mK70XRk5gOPUwXOcNboT/4K8PD9RBM7GqCOlEUKZwcA=", "headline"=>{"position"=>"1", "location"=>"primary", "attachment_id"=>"13", "headline_content"=>"questionnaires", "article_id"=>"3", "image"=>#<File:/tmp/RackMultipart20100308-63211-1vym9nj-0>}, "id"=>"140", "controller"=>"admin/headlines"} But if I have a look in /tmp/RackMultipart20100308-63211-1vym9nj-0 the file is blank. Am I right in thinking that this should be the file that I uploaded? I'm running Phusion Passenger 2.2.7 on Apache 2.2.13, with ruby 1.8.7 and rails 2.3.5, on OSX 10.6.2

    Read the article

  • Odd behaviour with scala method syntax

    - by Ceilingfish
    Hi chaps, I hit a bit of a quirk of scala's syntax I don't really understand object Board { def getObjectAt(x:Int, y:Int):Placeable = return locations(x)(y) } works fine. But object Board { def getObjectAt(x:Int, y:Int):Placeable { return locations(x)(y) } } returns the error Board.scala:8: error: illegal start of declaration return locations(x)(y) I found some stuff that says the second form convinces the scala compiler you're trying to specify an expansion to the return type Placeable. Is there a way I can fix this, or should I just avoid specifying a return type here?

    Read the article

1