MySQLdb configuration with PyDev - pydev

How to setup MySqlDb with PyDev (eclipse plug-in). I tried finding but no success.
Can anyone provide any tutorial kind of links for the same.
Using Ubuntu

My suggested approach would be
Create virtualenv where you install all packages for your project
Install MySQLdb in this virtual environment (or even better, use PyMySQL drop in replacement which has better installation instructions and no native dependencies making it easier to install)
In Eclipse project settings, point it to use Python interpreter and PYTHONPATH from virtualenv

Related

Eclipse version for python develpment

What is the most clean Eclpse distro to use for python development?
All distro comes with Java plugin and other stuffs.
I just want a clean Eclipse distro + pydev.
For a pre-configured environment, see http://www.liclipse.com (note it's commercial -- and has other niceties).
Aside from it, the option is getting the Platform Runtime Binary and follow the instructions from http://pydev.org/download.html and http://pydev.org/manual_101_root.html to install PyDev.

Unable to install Plugins in Eclipse (jpbm)

I have a major problem with installing plugins in eclipse. I'm using ubuntu 10.04 64 bit and I installed:
Eclipse SDK
Version: 3.6.0
Build id: I20100608-0911
(Not by using the apt-get, via apt-get I get galileo, but that version didn't work as well)
The Plugin I want to install is: http://sourceforge.net/projects/jbpm/files/jBPM%203/jbpm-jpdl-3.2.7/ I have to use this plugin because its compatible with alresco (dms)
I tried to install the plugin via dropin and the normal way:
Help->Install new Software-> Add -> Archive -> select the downloaded *.jar.
When I hit OK, I get the following error message:
"Could not find jar:file:/home/xyxyx/jbpm.jar"
I tried to solve it by extracting the jar but no success. Putting the jar into the plugins folder and changing permissions won't help! I also tried different versions of eclipse on several systems. No success!
I have been looking for a solution all day! I tried some advice I found on stackoverflow. I don't use a proxy. I changed the update system to classic! Now I don't know what to do anymore.
Anything special I have to configure before I use eclipse on ubuntu besides installing the JDK?
Try to run the installed using the following command:
java -jar jbpm-installer-3.2.7.jar
On the other hand, you may want to use JBoss IDE which has integrated support for jBPM.

Failure creating clojure project in Netbeans

I decided to take a look at Clojure and thought the best and easiest method for me would be to use Netbeans with the Enclojure plugin as I didn't want to have to learn Emacs at the same time. I installed Netbeans 6.9.1 together with the latest JDK using the bundled install (on Windows 7). All went smoothly. I then followed the instructions at http://www.enclojure.org/gettingstarted for installing the enclojure plugin.
When creating a new Clojure application I get the following and see no project files :
java.io.IOException: Could not connect to URL nbresloc:/org/enclojure/ide/templates/project/ClojureProjectTemplate-1.1-distribution.zip. No such resource was found.
Maven is working using mvn --version
I have installed on both Windows 7 and Ubuntu 10.04 (same result).
I have looked on the Enclojure forum and there is a recent open thread for this issue, but it is not solved by anybody presently.
I have Java SE enabled in Netbeans
I have tried enabling the different platform versions of Clojure, 1.0.0, 1.1.0, etc..
The REPL seems to be working happily in Netbeans : (printf "hello") hellonill
I did try ClojureBox on Windows 7, but again that's Emacs, but emacs failed to start the server and hung there and became totally unresponsive.
I come from a .Net background (not Java) so my knowledge of the Java environment is somewhat lacking. My reason for looking at Clojure and not Java.
I am new to Netbeans
If you're interested in a working Maven pom, here is one I've used with Enclojure successfully:
http://puredanger.com/techfiles/100624/pom.xml
There are some project settings you'll need to change and a few dependencies to remove but it might be a good start. In general, I usually create the pom first and then just import the project into NetBeans rather than using the NetBeans options to create projects.
By the way, the REPL work in Enclojure has been split and is coming soon to the Eclipse plugin Counterclockwise.
I had written a small post on it on my blog.
Anyways here is the procedure:
On searching realized that this is a common problem for installing it on > Netbeans 7.. But with some manual tweeks managed to install it. Here are the instructions to install on Netbeans 7. plus:
Install Netbeans 7. You need only the Java SE version.
First Run of Netbeans after installation. Activate feature Java SE
Activate features is on the Start page or from Tools,->Plugins>Installed, click ‘Activate next to the Java SE support
Install Maven: It is HIGHLY recommended that you install maven: http://maven.apache.org/download.html
Go to the Netbeans->Preferences, click on the Miscellaneous tab and make sure the External Maven Home path is pointed to your maven install
Download the EnClojure 1.5 version from here. If you want to manually build, you can do that by following the instructions from here.
After downloading the file, In Netbeans: Goto:- Tools ->Plugins->Downloaded->Add Plugins->Downloaded
Then browse to the downloaded file. Later install by clicking at the “install : button.
Restart and you are on the go.
Visit here to build and run hello world project.Basically building the EnClojure 1.5 manually is the tough job. I hope above was useful.

installing glassfish on ubuntu karmic using synaptics package manager

I'm trying to learn to use glassfish for the first time. My IDE is netbeans and I've installed the glassfish plugin for netbeans. I opened up synaptics package manager and typed in glassfish. My choices were
imqv2
glassfish-activaton
glassfish-mail
glassfish-appserv
glassfish-toplink-essentials
glassfish-jmac-api
glassfish-javaee
I'm not sure what is in each package, or which package are needed. I can't seem to find anything that tells me anything descriptive about these packages.
I've seen a lot of tutorials on how to install glassfish, but I'd prefer to use apt-get / synaptics to install glassfish so that syntactics can take care of updating.
To strictly answer your question, I think that a typical install would at least include glassfish-appserv, glassfish-javaee, glassfish-toplink-essentials (for JPA).
But for development, I'd warmly recommend to use GlassFish v3 (because of the session preservation across deployments feature, to maximize productivity) and to install it manually in your home directory. Download the self-extracting installer file from here.
Do you want to run the latest and greatest software? It looks like Synaptic has Glassfish version 2 which is an entire major version out of date.
Just for the record: I love Ubuntu and their (well, Debian's) package management system. However, for any Java applications, I prefer to do manual installations. So, my Maven, Eclipse, Tomcat, Glassfish, etc. were all done through manual installs for the newest version... and because sudo apt-get install winds up throwing the app in some weird place and can have unexpected behavior.
Here is how you can do a manual install...
Download Glassfish: wget http://download.java.net/glassfish/v3/nightly/latest-glassfish.zip
Extract the archive anywhere on your filesystem
Inside your IDE such as Netbeans or Eclipse, setup a new server and point it at where you extracted the file
It's also useful to add a new environment variable to ~/.bashrc file, which will make it easier to start the server from the command-line, e.g. $GLASSFISH_HOME/bin/asadmin start-domain domain1
Another cool thing to try, if you're into maven, is to use the maven-embedded-glassfish-plugin. It's a clean way to get a web app up and running and not need to manually install glassfish and not even have to use an IDE.
You might also try asking this question at superuser.com if you really want to get it working with Synaptic.
i dont know if this here is still open...
but if you know how to handle shell commands on ubuntu then you might find this here helpful:
http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-311-on-ubuntu

Eclipse (on Ubuntu) do not have jsp, html and other web-files template

I installed Eclipse using Synaptic Package Manager (Ubuntu 9.10).
However, my Eclipse does not have any HTML template (in New dialog) or JSP template.
How can I fix it so that I will have some HTML and JSP templates overthere?
Fetch Eclipse plugin from http://download.eclipse.org/releases/galileo and select Web Developments stuffs solve the problem.
I do not recommend to install Eclipse from the ubuntu repository but to install it manually instead (and grab Eclipse IDE for Java EE Developers). Just be sure to check this answer to fix the "click problem" due to a bug with Eclipse 3.5 and GTK+ 2.8.
Update: The reasons to prefer a manual install are explained in EclipseIDE. First, there is no guarantee to find the most recent of Eclipse in the repository (in Ubuntu 9.04, the packaged version of Eclipse was totally outdated). Second, even if you find an up-to-date version (like for Ubuntu 9.10), you'll need to run Eclipse as root to install plugins not available in Package Manager - why did they start to package plugin, this is just crazy - which is not a good idea. User mode installation solves this problem.
You can install eclipse-wtp-webtools package for static html files. I can't find one for jsp though.