getting an unkown error in my spring-mvc with hibernate integration project i am creating a spring-mvc project in which i had used hibernate integration.In this i have 2 classes one is operationdao which is used to perform hibernate operation and other is my convtroller class.  Code of operationDao class:   public class OperationDao {   Configuration cfg=null; public OperationDao() {   // TODO Auto-generated constructor stub     cfg=new Configuration();   cfg.configure("hibernate.cfg.xml"); } public String saveShop(shops s) {    SessionFactory factory=cfg.buildSessionFactory();   Session session=factory.openSession();   org.hibernate.Transaction t=session.beginTransaction();   try   {       Query query=session.createQuery("from shops");       query.setCacheable(true);       List&lt;shops&gt; list=query.list();       Iterator&lt;shops&gt; i=list.iterator();       while(i.hasNext())       {           shops shps=i.next();           if(shps.getShops_string().equals(s.getShops_string()))           {               return "done-2";           }       }       session.save(s);       t.commit();       return "done"+String.valueOf(s.getId());   }   catch(Exception e)   {       t.rollback();       return "done-1";   }   finally   {       session.close();   }  } }    code in my Controller class:   public class EmpController {   OperationDao dao;   public EmpController() {       // TODO Auto-generated constructor stub       dao=new OperationDao();   }   @RequestMapping("/saveShop") public void saveShop(@ModelAttribute("shop") shops shop,HttpServletResponse responce) {       String i=dao.saveShop(shop);       try {           responce.getWriter().println(i);       } catch (IOException e) {           // TODO Auto-generated catch block           e.printStackTrace();       } } }    But when i am trying to run my project on server,it shows me following error:     org.springframework.beans.factory.BeanCreationException: Error   creating bean with name 'empController': Injection of autowired   dependencies failed; nested exception is   org.springframework.beans.factory.BeanCreationException: Could not   autowire field: work.OperationDao work.EmpController.dao; nested   exception is org.springframework.beans.factory.BeanCreationException:   Error creating bean with name 'dao' defined in ServletContext resource   [/WEB-INF/spring-servlet.xml]: Instantiation of bean failed; nested   exception is org.springframework.beans.BeanInstantiationException:   Could not instantiate bean class [work.OperationDao]: Constructor   threw exception; nested exception is java.lang.NoClassDefFoundError:   org/hibernate/cfg/Configuration   But when i am creating instance of OpertionDao class for testing purpose than it doesn't show any error.so why error is coming in creating bean. Please Help i a badly stuck.  Thanks in Advance:
Why am I getting a NoClassDefFoundError in Java? I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?
Motivation for Ramanujan's mysterious $\pi$ formula The following formula for $\pi$ was discovered by Ramanujan: $$\frac1{\pi} = \frac{2\sqrt{2}}{9801} \sum_{k=0}^\infty \frac{(4k)!(1103+26390k)}{(k!)^4 396^{4k}}\!$$   Does anyone know how it works, or what the motivation for it is? Why do eukaryotic organisms have introns in their DNA? We touched on introns and exons in my bio class, but unfortunately we didn't really talk about why Eukaryotes have introns. It would seem they would have to have some purpose since prokaryotes do not have them and they evolved first chronologically, but I could easily be wrong. Did the junk sections of DNA just evolve there by some sort of randomness or necessity as opposed to an actual evolutionary advantage? Why hasn't evolution stopped us from having introns since they seem to be a 'waste' of time and DNA? Why do prokaryotes not have introns? What vintage movie had this blue floating holographic head talking to some kind of military installation? When to use "click" and "click on" When is Gauss' law not applicable? Shipping Labels not received for round trip courier service for UK Visa using VFS Global I purchased the round-trip courier service through VFS Global. In the instructions, it states that you will receive in a separate email the shipping labels for this courier service. I receive Registration Details and Transaction Details only. No Shipping labels. I have called VFS Global in NY,NY and no human being access to ask questions, just an insane phone tree that does not answer my questions on how to get shipping labels that were never sent. I have called the British Consul in Atlanta and she could not answer my questions then transferred me to the same phone tree message that I receive through the British Consulate. I have sent emails to customercare@vfsglobal.com, info.vfsnewyork@vfsglobal.com, NYscanhub.escalate@vfsglobal.com, DLUKVInewyorksensitive@fco.gov.uk and I have received no response from anyone.  Frustrated. I do not know what to do. Please help me!! Can I read and write to the same file in Linux without overwriting it? I try to prove the following formula:  $$n!=\prod_{k=1}^n \operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$$  I noticed that  $\upsilon_{p}(\operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)) = s$ iff $\lfloor n/(p^{s+1}) \rfloor &lt; k \leq \lfloor n/(p^{s}) \rfloor $ var.replace is not a function Evaluate forecasting ability of GARCH models with RMSE and MAE Proof that the One-Dimensional Simple Harmonic Oscillator is Non-Degenerate? The standard treatment of the one-dimensional  (SHO) using the raising and lowering operators arrives at the countable basis of eigenstates $\{\vert n \rangle\}_{n = 0}^{\infty}$ each with corresponding eigenvalue $E_n = \omega \left(n + \frac{1}{2}\right)$. Refer to this construction as the abstract solution.  How does the abstract solution also prove uniqueness? Why is there only one unique sequence of countable eigenstates? In particular, can one prove the state $\vert 0\rangle$ is the unique ground state without resorting to coordinate representation? (It would then follow that the set $\{\vert n \rangle\}_{n = 0}^{\infty}$ is also unique.)  The uniqueness condition is obvious if one solves the problem in coordinate representation since then one works in the realm of differential equations where uniqueness theorems abound. Most textbooks ignore this detail (especially since they often solve the problem both in coordinate representation and abstractly), however I have found two exceptions:   Shankar appeals to a theorem which proves one-dimensional systems are non-degenerate, however this is unsatisfactory for two reasons:   Not every one-dimensional system is non-degenerate, however a general result can be proven for a large class of potentials (the SHO potential is in such a class). The proof requires a departure from the abstract solution since it classifies the potentials according to their functional properties.  Griffiths addresses this concern in a footnote stating that the equation $a \vert 0\rangle = 0$ uniquely determines the state $\vert 0\rangle$. Perhaps this follows from the abstract solution, however I do not see how. Android: Using default styles Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$ We regularly get questions about wormholes on this site. See for example  and . Various wormhole solutions are known, of which my favourite is  because it's closest to what every schoolboy (including myself many decades ago) thinks of as the archetypal wormhole.  The trouble is that Visser has pulled the same trick as  of starting with the required (local) geometry and working out what stress-energy tensor is required to create it. So Visser can tell us that if we arrange exotic string along the edges of a cube the spacetime geometry will locally look like a wormhole, but we know nothing about what two regions of spacetime are connected.  My question is this: suppose I construct a Visser wormhole by starting in Minkowksi spacetime with arbitrarily low densities of exotic matter and gradually assembling them into the edges of a cube, how would the spacetime curvature evolve as I did so?  I'm guessing that I would end up with something like Wheeler's bag of gold spacetime. So even though I would locally have something that looked like a wormhole it wouldn't lead anywhere interesting - just to the inside of the bag. I'm also guessing that my question has no answer because it's too hard to do any remotely rigorous calculation. Still, if anyone does know of such calculations or can point me to references I would be most interested. I need to run Firefox browser from terminal. Browser works fine, but terminal still waits for Firefox to return and if I do CTRL+C, it terminates Firefox. How to run command to make Firefox work independently from terminal? What are examples where a "naive bootstrap" fails? How bad for TeX is omitting braces {}, even if the result is the same? Sometimes writing braces and omitting them produces the same result:  \tilde{\psi}  \mathrm{e}^{\mathrm{i} \pi}   vs  \tilde \psi   \mathrm e^{\mathrm i \pi}   Or (taken from Werner's comment below)   \frac{1}{2} vs \frac12   If that's the case, how bad for the quality of my code is omitting them? Of course, if one compiles a pair of formulas, there is no difference. But, since I ignore how TeX works, my point is: if one writes long codes with these habits,   doesn't TeX go somehow crazy because I'm not writing as it expects?   For instance, does it have any effect on how fast are long documents compiled? Any reason to keep them? I'm trying to create an item that can break certain blocks, but also has a colored name in 1.13.2   Here's the command I'm using.  /give iAugust minecraft:shears{display:{Name:"[{\"text\":\"Arcane Shears\",\"color\":\"aqua\",\"italic\":false,\"bold\":false}]CanDestroy:[minecraft:iron_bars]"}}   But it only has a colored name, and it can't break specific blocks. How do you reopen a closed question? What are the main differences between VirtualBox networking types? I'm trying to use VirtualBox to host a couple of VMs.  Each VM should be able to connect to the Internet (this is needed primarily to install software) My Host browser should be able to connect to the Guest VMs.  Also I need to be able to ssh to the Guest VMs.     This is why I want each VM to have a static IP address.     This will also allow the VMs to connect to each other, say for database connectivity.  I have done this with VMware Fusion.  However, VMware has lately bitten me too often and destroyed so much work that I want to try VirtualBox.  But I'm not a network guru and don't know which type of networking I want.  So what I'm asking is simple:  What are the main differences between networking types. This could help me find out which type of networking I should use in my case.  And of course if anyone has a link to any documentation of how to do what I want, that would be greatly appreciated.  Thanks, ge