Nullpointer with JDBC DataSource getConnection()
What is a NullPointerException, and how do I fix it?
What exactly is an environment variable? I know that VARIABLE=value creates an environment variable, and export VARIABLE=value makes it available to processes created by the current shell. env shows the current environment variables, but where do they live? What comprises an environment variable (or an environment, for that matter)? My internet connection used to be a direct LAN connection to my provider. Back then, everything would load fine on both Windows and Ubuntu (dual boot). However, a while ago they started needing me to dial (PPPoE) using a username and password. Gateway, subnet mask, IP, DNS servers all stayed the same. But since then, I haven't been able to browse certain websites on Ubuntu, even though there have been no such issues on Windows. Some example websites are -  (although share.ovi.com loads fine, and nokia.com loads fine),  (works on Chrome(ium) and Opera but not on Firefox (both 3.6 and 4)) Mozilla  and other random websites.  Some of the websites that don't load show timeout messages and for some websites (like the moz addons one), the browser will keep trying to load without an end (I've left it like that even for hours but not noticed anything different happen).  I have tried changing the DNS servers to public ones. I have even tried booting from a Fedora LiveCD and then changing the DNS to those (and even to the ones of OpenDNS), but the exact same thing happens. What could be inherently wrong with some config within Linux itself that is causing this problem?  Does anyone know why this is happening and how it can be fixed?  Note: This question has been  on SU, but not gotten any responses.  Update: Just saw  that someone else was having similar problem and solved it by putting a NetworkManager.conf file in /etc/NetworkManager. What needs to be in that file? What counts as a 'large' raid 5 array? Unable to preserve ownership in a copy but able with a move? How to show the full path of a file or directory in the terminal? I need to know how the directory name in order to type it out in the terminal. How do I access the names of directories?   Windows Explorer used to have a title bar with the full path. Can someone please help me figure out how to see the full path of a certain file? How can mixed content compromise an entire HTTPS session? Google Chrome is probably one of the stricter browsers out there in terms of highlighting SSL errors.  Most browsers will point out when you are viewing an HTTPS page which loads insecure images/Javascript, I understand how this is a security issue - an attacker could have modified the non-SSL content in a way which gives them access to the secure content, injected some javascript for example.  However once you have viewed an HTTPS page with mixed content, Google Chrome will continue showing you the mixed content warning (a red line through the 'https://') for as long as you stay browsing the same domain, even for subsequent pages which only include other HTTPS resources. Only once you navigate to another domain, or open a fresh tab does it tell you you're secure again.  What is the danger it's protecting you from here? How could mixed content on a previous page actually affect the security of subsequent secured pages? I understand that mixed content should be flagged up, but there must be a specific reason that Google is persisting this warning, other than "Well you still need to know about it" SEO repeated keywords in domain and url I have my bachelors degree in engineering science: computer science, option electrotechnic. I have a good understanding of basic mechanics and dynamics, calculus (differential equations).  The books I'm now having a look at are:       What book do you recommend for studying fluid dynamics on my own and why? Bold italic vectors I am trying to display vectors as bold and italic. The command \mathbf sets the letters non-italic. I also googled a bit and stumbled upon \mathbf{\em y} or \mathbfit{y}, which all didn't work.  I hope someone can help me on this. What insect is this? (India) Can anyone tell me what kind of insect (if it is one) is this...!! Or is it the pupa of some insect?  Well I don't think that the whole big thing is the insect itself, it appears to be just a kind of protection or shelter which moves along with the tiny little thing that keeps on popping out and going it so as to move. Location:  India Could the universe's antimatter be hiding in black holes? As far as we know almost all the mass in the universe is matter, not antimatter. There are three scenarios:   The universe started off with more matter than antimatter and the small amount of antimatter has mostly been converted to energy via collisions with matter The universe started off with equal amounts of matter and antimatter and some unknown process caused the situation we see today The universe started off with less matter than antimatter and somehow the ratio reversed (I've never heard this discussed as it seems so unlikely)   We reason that mass is matter because if there were large amounts of antimatter they should produce antimatter galaxies, which would give off huge amounts of energy when they interact with matter galaxies. This has never been observed so we conclude that all galaxies, therefore all mass in the universe is matter.  As I understand it there are two main types of black holes, stellar remnants (the collapsed remnants of dead stars with more than two solar masses) and super-massive black holes at the centre of many galaxies, including one thought to be at the centre of our own galaxy.  Stellar black holes are obviously originally composed of matter, for the same reason that all galaxies are composed of matter.  We don't know how super-massive black holes formed. Is there enough mass in them to contain all the antimatter in the universe if matter and antimatter were originally created in equal quantities? I realise this shifts the unknown mechanism from "why was more matter created than antimatter" to "why is antimatter more likely to form super-massive black holes" but is this hypothetical scenario possible? Prove: $\gcd(a,b) = \gcd(a, b + at)$. When I launch an app, the focus doesn't move to the opened app Let's say I have Gthumb open, and then launch Nautilus from the Unity launcher (in 12.04). Why does it sometimes not focus the mouse on Nautilus, which I just launched? Instead, the focus remains on Gthumb while Nautilus opens in front of Gthumb (and not being focused on).  Is this correct behaviour? Prove that the additive groups of $\Bbb Z$ and $\Bbb Q$ are not isomorphic.    It is hard to create a map that will show homomorphism. I want to know is there a way to render Shadows only in Blender's new EEVEE Render Engine. I want my objects in a separate collection and a ground plane on a separate collection(to receive shadows from the objects collection).I want to render the shadows only and not the objects. Fine-tuning "Open safe files after downloading" What happens with the force of gravity when the distance between two objects is 0? so I had my first approximation to the gravity equation  \begin{equation} F=GmM/r^2 \end{equation} and some questions arose that my teacher couldnt respond: if r approximates to 0 with mM being constant, then the force should tend to infinity, right? so that being true, then if we would travel to the center of the earth, we would be crushed by gravity? if so, how can there be anything right in the center of the earth? wouldnt anything there be compressed and destroyed by the infinite force?  having that in mind, my next question is as gravity force is measured from the center of an object, any part of the same object which is not at the center would be affected by the same object's gravity? if so, how can we differentiate between two objects that are not in a vacuum? my question originated thinking in us standing on the earth, in contact with it, are we, in a gravitational sense, one object? this lead to the last question, if gravity is a property of matter, then how applying the same logic as before, how does it work between two neutrons?(chose neutrons because i assumed it would be more difficult obtaining gravitational force if there was electrostatic forces from charges inbetween) do two newtrons in contact count as 1 gravitational object? and how thats its own gravity affect the newtron from center and out? Why do electrons move towards anode in the Photoelectric effect experiment? Consider a Photoelectric effect experiment apparatus as shown in Figure 11.1    The variation of photocurrent with the voltage applied across $\mathrm{A}$ and $\mathrm{C}$ is as shown in Figure 11.3.    My question –     Why is the current non-zero even if the voltage is zero?    Consider a situation in which the voltage across the plates is zero. Photons of sufficient frequency strike the outermost surface of the cathode, emitter plate $\mathrm{C}$. Electrons become free from the attraction of nucleus as their net energy becomes positive.  Why I think that there should be no net current?  As soon as photons strike the outermost surface of the cathode(assumed to be $1$ to $10$ atomic diameters thick), electrons become free. Now, as the electrons have kinetic energy, they'll come out of that outermost surface. Now, the electrons(with kinetic energy) should have an equal probability of going in every direction of the surface. So, around half of the electrons should go in the right direction towards the anode and strike it and half should go to the left, trying to penetrate the inner surfaces of the cathode plate.   Now, the electrons which will go to the right will face some field due to the space charge present in the tube but nevertheless, some electrons will definitely reach the anode plate. After they strike with the anode plate, they'll face some resistance but still, some electrons will reach the low resistance copper wires connected to the anode plate and milliammeter.  Now, consider the electrons which go towards left. They'll definitely face resistance from cathode plate but some will still reach the copper wire.  Now, as there is no potential difference applied between $\mathrm{A}$ and $\mathrm{C}$, there is no need of commutator and voltmeter. So, the ammeter is connected in series with the anode plates and cathode plates with copper wires.  Now, if there is steady state current in the circuit, electrons emitted to any one of the sides should dominate over the other. But the number of electrons emitted on both the sides is same, and all the electrons should face the same resistance as the current(electrons) should flow in a closed loop. But if the number and velocity of electrons coming from both the sides are same, there should be no net current. But there is. Why?  Edit –  From the answers of anna v and mmainville, it can be seen that the emission of electrons is dependent on the angle of emission of light.  But still, the question remains. If the electrons emitted towards anode have enough energy to complete the circuit and again reach the holes in cathode despite the resistance in between, the electrons emitted to the left should have enough energy to come to anode plate via copper wires and again get ejected through anode plate by the virtue of their kinetic energy and reach the cathode plate. In this case too, the current should be zero which is not true. Why? Unwanted behaviour from dict.fromkeys Convert continuous numeric values to discrete categories defined by intervals