Model.java:  import lombok.Data; @Entity @Table(name = "CUSTOMER") @Data public class Model{ @Id @Column(name = "UNIQ_ID") private String uniqId; @Column(name = "CUSTOMER_ID",insertable = false,updatable=false) private String customerId; @Column(name = "STATUS") private String status; @ManyToOne @JoinColumn(name = "CUSTOMER_ID") private Customer model; }   ModelRepository.java  public interface ModelRepository extends JpaRepository&lt;Model,  String&gt;,JpaSpecificationExecutor&lt;Model&gt; { }   ModelService.java  @Inject private ModelRepository modelRepo; @Transactional public void registerCustomermodel(Model modeldata) {     modelRepo.save(modeldata); }    public static void main(String[] args) {     ModelService cs=new ModelService();     Model model=new Model();     model.setCustomerId("111000000373");     model.setUniqId("117");     model.setStatus("null");     cs.registerCustomermodel(model); }   All my data source configuration files are well figured, while executing this im getting null pointer exception. Can anyone explain what are the possible reasons?
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
My csv export displaying html, how to get rid of? Do I need to upgrade RAM from 4GB to 8GB for Android development? I'm an android developer and have laptop with 4GB RAM. When I compile my project the RAM is used at 100%.    If I add more RAM will it solve the problem? Cardinality of equivalence relations in $\mathbb{N}$ I came across this long proof on this site:    But I would like to know whether my direction can work.  Say we want to find the cardinality of all equivalence relations in $\mathbb{N}$. Since it is a subset of all relations in $\mathbb{N}$, I conclude it has a cardinality smaller or equal to $\aleph$. Now, define an injective function from $P(\mathbb{N})$ to the set of equivalence relations by matching each subset of $\mathbb{N}$ with the identity relation (which is an equivalence relation in $\mathbb{N}$.  Therefore the cardinality of all equivalence relations in $\mathbb{N}$ is greater or equal to $\aleph$ and using CSB we get the desired result.  Seems legit? The drawer has M different colored socks. What is the least amount of socks I that I need to draw to guarntee N pairs So in my discrete math class, we all know that if the drawer has 2 different colored socks, you need to pull out 3 socks to ensure a pair.   However, I am puzzled after there are more different colored socks and more pairs of socks.  For example, if there are 3 different colored socks in the drawer and I need to draw out 50 pairs, at least how many socks do I need to draw out to ensure that I have 50 pairs of sock?  How about if there are M different colored socks in the drawer and I need to draw out N pairs, at least how many socks do I need to draw out to ensure that I have N pairs of sock?  Are there any general formulas for these types of problem? Or are there any rules for this type of question? What is numeric promotion? I have this recipe for cheese curds that I want to try: , but it specifically calls for raw milk which is near to impossible to get here. I make yogurt with pasteurized milk and it works no problem, but does cheese somehow work differently? Is there a filesystem that is "friendly" to both windows and Linux? Monochromatic squares in a colored plane SElinux: allow httpd to connect to a specific port My system is running CentOS 6.4 with apache2.2.15. SElinux is enforcing and I'm trying to connect to a local instance of redis through my python/wsgi app. I get Error 13, Permission denied. I could fix this via the command:  setsebool -P httpd_can_network_connect  However, I don't exactly want httpd to be able to connect to all tcp ports. How can I specify which ports/networks httpd is allowed to connect to? If I could make a module to allow httpd to connect to port 6379 ( redis ) or any tcp on 127.0.0.1, that would be preferable. Not sure why my paranoia is so strong on this, but hey...  Anyone know? What happened to Yachiru? According to the , Yachiru disappeared leaving her belongings after the fight with Gremmy. She is said to be "gone" by Kenpachi in the penultimate chapter of the original series.  I use "original" because there might be extra chapters announced as the other big announcement.  So, what happened to her? Was she part of his Zanpakutou or something? Is there any way to find out if a file is a directory?  I have the file name in a variable. In Perl I can do this:  if(-d $var) { print "it's a directory\n" } Displaying layout marks in a document set with different layouts Is there any package that allows for the display of layout marks within a document where the layout changes several times throughout? I'm using the geometry facilities to issuing \newgeometry commands throughout my document, but it doesn't update the displayed layout and neither does the showframe package or the facilities of the memoir class.  EDIT: As Werner has pointed out, the showframe option of the geometry package displays correctly any updated page layout set by issuing \newgeometry commands.   My trouble came out of the fact that I'm issuing also \pagecolor commands and the page color seems to be hiding the layout lines typeset according to the geometry package. My confusion only worsened because the showframe package layout lines were not hidden by the page color (the package got the layout wrong on some pages, though). So, it all boils down to a conflict with the page color.   Even though I'm using geometry's showframe option for "debugging" ends, and I don't mind to have no page color at that stage of development, is it possible to override this problem and have at the same time both the page layout displayed by geometry as well as the page colored?   Btw, should I open a new question given that the problem is actually different from the originally posted one? Which meta am I supposed to post on? I'm mostly active on  and we have a separate . Most of my questions on IT Security meta have answers with links here. So my question is, where am I supposed to post what i.e. feature request, bug report, behavior questions? an "X is an X is an X" what does this mean? I am reading  (I must say, with great delight but that's not relevant) and  Canadian is a Canadian is a Canadian A citizen is a citizen is a citizen.  I do not understand this structure. Why not just &quot;A citizen is a citizen&quot;? What is the meaning of repeating this? pkexec command in a .desktop file I made a .desktop file for Androxyde's Flashtool (utility for Sony Xperia devices that I have to open with an executable file in its folder) that requires root privileges to use fastboot utilities. I used to make it work with gksu, but I'm on Ubuntu 15.04 and gksu is now old.  I tried to modify the exec line from Exec=gksu /home/natasha/FlashTool/FlashTool to Exec=pkexec /home/natasha/FlashTool/FlashTool Then, I read about pkexec doesn't allow to run X11 applications and so I override in this way:      The problem now is: It asks me the password but the Flashtool's GUI doesn't start. BUT if I execute that command in terminal, the program starts without problems. What can I do? Will Stack Overflow's engine be (someday, or ever) open sourced? Evidence for quantum gravity from gravitational waves The rumor spreads that .  I am far from being an experimentalist, but I want to know if there is any chance that the mentioned observations will reveal any experimental evidence for quantum gravity.  Personally, I feel like this is merely impossible as gravitational waves should propagate in agreement with classical General Relativity. But I might very well not see pitfalls if there are any.  UPDATE: by "evidence for quantum gravity" I mean experimental results which don't agree with predictions of General Relativity or its classical generalizations. They might be coming from string theory or loop gravity or from a completely different approach which we haven't discovered yet. I want to understand what are the chances that new physics will show up during the upcoming  gravitational wave observations.  Also, I expect gravitational waves to be in a highly coherent state, thus making the individual gravitons unobservable. Is this true? can you explain me the working of this circuit in detail? this circuit is a occupancy light circuit i want to know the working of the transistor regarding base,collector and emitter in the transitor Everytime I try to sudo something at the terminal, I get a warning message:  alexandre@XPS-15Z $ sudo mount file.iso /mnt/ -o loop [sudo] password for alexandre:  no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory   It's just annoying to get that all the time. How do I solve that? I'm on Ubuntu 14.04 (upgraded from 13.10) How much should a "button of Cure Light Wounds" cost (should it be available at all?)