I'm developing a view for an application I'm working on, and I'm using jface with RAP. I thought it wouldn't be difficult but I'm not really making any progresses. I have a sketch of what I need to do, but I can't even start the application. Google doesn't help that much :/
Any tip to help me get started?
I tried developing a minimal working example, but it simply doesn't work. Anytime I start the application, I got this error:
java.lang.IllegalStateException: No context available outside of the
request processing.
I'm pretty sure this is a noob error, but I can't fix this! Any idea on what I might be doing wrong?
The following should be a comment! But I have not enough reps.
There is too little information from you to reproduce the issue but I assume you are mixing up setup options provided by RAP. Read the Building Applications part in the Developer's Guide completely. An outstanding well worked out tutorial can be found here which might help you to understand the differences. Try to create your project with all three setup options (1 RAP with OSGi, 2 RAP with Workbench, 3 RWT Standalone).
Just guessing: In the FAQ is a quite similar error description which might help. No context available outside of the request service lifecycle.
Related
I hope this is the right place to post this question. The web applications stack exchange did not look suitable based on the other questions asked on there so I guessed this might be the best place to put this question.
I have a java eclipse project that works as I would like it which takes in an image locally from the adjacent file path and performs the required action on this image before returning a double value at the end after all the calculations. To do these calculations I use the OpenCV library which is essential to the core functionality of the application.
The issue I am having is to deploy this application so that the the application when it receives a request will take in an image (preferably as a .jpg but this can be changed if absolutely essential) and then after the application has carried out the required task send back the resulting number. In future this will be sent and received by an Android app which will just take the photo, compress it and send it away before receiving and displaying the answer but for now I'm just trying to get my project onto an accessible server.
I have tried to use Heroku and followed their tutorials and instructions which encourages the use of Maven but I could not properly insert the dependencies for my project as it used an external jar. I spent a lot of time checking through the various solutions online to this issue but a lot of them felt like workarounds which only worked in some cases and none were working for me. I am open to using this again if there is an elegant solution that is simple to follow.
The main sections of this question that I am asking is for the simplest way to take my working eclipse project which uses an external library, modify it to take in an image via server request and then send back a number result. I also would like a suggestion as to which cloud-based service would be suitable for this project and allow me simply to put my code on their service and allow a test user to run this code whenever I want with reasonable availability.
Sorry for the long-winded explanation and I hope I have provided enough information. I have been trying to work out how to do these things with the help of tutorials and suggestions for a few weeks now but have no previous experience with making a web server as everything I have created has been a local program.
Thanks for your help and suggestions
I have installed Eclipse Mars2 and when I try to save changes I got a message saying "Processing JAX-RS changes... (Waiting)" and Eclipse freezes for a couple of minutes. I'm developing a spring-mvc maven based application using jboss as server (I don't know whether this is relevant or not).
In this answer a nullPointer is gotten, but I can't see any errors whatsoever. I can't find the "jax-rs- support" option in my project either.
Any clues?
Thank you very much!
The reason for this problem to exist is unclear. A quick Google for the problem doesn't seem to bring up any existing bug report.
Meanwhile, whatever processing features Eclipse has for JAX-RS are quite superfluous and you can easily do without - especially if you do not actually use JAX-RS in your project. So in this case disabling the builder which you will find in the Project properties does the trick to make the problem go away.
You can uncheck JAX-RS from project->properties->project facets . This helped me
After a lot of work i manage to finish a java web aplication with netbeans using primefaces/glassfish server (it is a e-shop that we developed for a school project). I use xampp (mySql) in order to fiddle around with a database that i use in the web app.
My problem is that i have no idea on how to upload this to a server. What am i supposed to install on it ?, i dont even know what os to use :/ . Im really bad at the "internet part" of this project and since this was my last school year i can not reach for my professor to ask him for help.
I know my question is vague but please help me to finish this project because it would help me a lot to find a job in the future.
I should also mention that i use a mysql-connector-java-5.1.38-bin.jar .If im not wrong this allows me to send data throw a TCP connection right? My main problem is that im missing the Full picture ,I know how to write basic code in java , i know how to build the xhtml pages and how to bind them to the java code behind but other than that i dont get how the rest of this works.
Any help is greatly appreciated.
Edit: as i said im bad at this. if you just post a generic link on "how to set up a Javaweb" i will not be able to follow . Im asking here ,on this forum because i want human answer. I need someone to post a 4-5 line explanation and like 8 bulletins on what to do like
*install linux
*Build and export your project.
*install glassfish standalone.
etc
The thinks google returns to me are like 400 pages of glassfish documentation and really hard to follow guides on how to do what i want. Of course i could waste the next month or so just reading and trying to figure out how everything comes together (witch i inevitably have to do)but i feel like im only 15 clicks away. I just want a practical answer.
You need an application server to "upload" the code. Use tomcat, its simple and has plenty of documentation available.
If you are using XAMPP, you may be familiar with Apache Server, which runs , among other things PHP. For Java, you need application server to run the server side code.
It doesnt matter which OS you want to use, Java runs on all. You just need to download and install tomcat for the OS you want to run it on.
Please refer to http://tomcat.apache.org/
I must point out that there are many more Application servers which are available. Tomcat is one of the most popular for learning purpose.
I have developed some web applications before and everything is well documented and there is a framework for anything. I am new to Swing and desktop application development and I found that documentation is sparse and you have to figure out a lot of things by experimenting.
I've been googling for a few hours on how to setup NatTable and I couldn't find anything. I was surprised no one asked the question before. I just want some instructions on how to get the basics working on Eclipse and NetBeans. I was using Eclipse in the past but I think I will use NetBeans for this project as the Swing GUI editor is better.
Is NatTable exclusive to Eclipse or will it also work with NetBeans? If someone can post screenshots of the setup procedure, that would be awesome.
Any help is appreciated.
Thanks in advance.
The NatTable project has a website that contains some information. It doesn't cover everything, but how to install and use it is explained:
https://www.eclipse.org/nattable/documentation.php?page=getting_started
Currently NatTable is building a SWT control. Swing is not supported. That might change in the future.
I am developing a project using the Play framework. Yesterday, 'something' happened and my Play.Configuration object is null after initialisation. I have tried retracing my steps but I am unable to locate the change that I have made that has resulted in the error!
Although Google is usually my friend, I have not been able to find much information on this problem. Does anyone know where I can / should start looking to try to resolve this?
Thanks to Morten Kjetland, who provided this answer on the play-framework google group, I have found the reason for the error was as follows:
It looks like you run the test
directly in IntelliJ.
When you do it like this, Play it self
is not running - nor is it
initialized.
When running tests that use Play
features like that you have to run
them in play:
"play test" and goto
http://localhost:9000/#tests
or "play auto-test"
-Morten
Embarrassingly I did know about #tests url, but I was a little naiive and thought that if I had the Play running then intelliJ would somehow magically find that instance of Play (not sure why I thought that) and conduct the tests accordingly.
Anyway - I hope my mistake will help someone else in the future - and thanks again to the helpful people on stack overflow and particularly the play-framework google group!