Search Results

Search found 10480 results on 420 pages for 'session cookies'.

Page 101/420 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • How do you get the language from a session in Joomla?

    - by Moak
    I have some code that sets the lang var to the site default language. $lg = &JFactory::getLanguage(); $lg = explode('-',$lg->_default); $dlg = $lg[0]; if(!JRequest::getWord('lang', false )) JRequest::setVar('lang', $dlg ); however before setting it to $dlg I would like to find out if the language is stored in the user information or session. Can someone tell me how to check the session for language information?

    Read the article

  • Is it okay to mix session data with form and querystring values in a custom model binder?

    - by Byron Sommardahl
    Working on a custom model binder in ASP.NET MVC 2. Most of the time I am binding data from typical form or querystring data. There are times that I end up letting the model binder bind part of an object and get the rest out of session at the controller action level. Does it make better sense to bind the entire object from the model binder (e.g. querystring, form, and session)?

    Read the article

  • asp.net mvc 2 multithread

    - by Chris Cap
    I'm getting some weird behavior in asp.net MVC2 (at least it's not what I'm expecting). I have a controller httppost action that processes credit cards. I'm setting a session variable on the server to let me know if a user has attempted to process a card. I clear that session variable when I'm done. I am doing some very quick posts to test the process and the session variable is coming back null everytime because I clear the session variable at the end of the process. I have some debug prints that show me that the all requests are processed synchronously. That is...the first attempt occurs, it fails, session variable is cleared, second attempt tries and fails and the variable is cleared, etc... My first thought was that this was a side effect of debugging and that it just lined requests up for debugging purposes using the local webserver. So I put it on a development server and the same thing is occurring. Multiple submits/posts are processed synchronously. I even put a System.Threading.Sleep in there to make sure it would stop right after I set the session variable and it still won't even START the second request until the first is done. Has anyone else seen this behavior? My understanding was that a worker process was spawned for each request and that these actions could happen asychronously. Here's some psuedo code if (Session["CardCharged"] != null) return RedirectToAction("Index", "Problem"); Session["CardCharged"] = false; //starting the process System.Threading.Thread.Sleep(10000); //charge card here if (!providerResponse.IsApproved) { System.Diagnostics.Debug.WriteLine("failed"); Session["CardCharged"] = null; //have to allow them to charge again since this failed return View(myModel); } Session["CardCharged"] = true; return RedirectToAction("Index", "OrderComplete"); I should mention that my code ALWAYS fails the credit card check for testing purposes. I'm trying to test the situation where processing is STILL occurring and redirect the user elsewhere. I have set a dummy session variable elsewhere to assure that the session id "sticks". So I know the session id is the same for each request. Thanks

    Read the article

  • Can I use Upstart to start a script which requires the user's X session?

    - by ledneb
    I wrote a script which greps through the output of synclient to determine whether a laptop's touchpad has miraculously turned itself off (Ubuntu seems to /love/ doing this recently) and, if so, turns it back on. The script is something like this: #!/bin/bash while true ; do if [ `synclient | grep -e"TouchpadOff[\s]*1" | wc -l` -ge 1 ] ; then synclient TouchpadOff=0 fi sleep(3) done (I don't have the laptop to hand right now but you get the point! I will update later when I'm at my laptop if that's incorrect) So I tried running this as an upstart script so my touchpad can heal itself without any interaction. But it seems synclient doesn't find the current user's X session when my script is upstart'ed. I tried running it by using something like su -c myscript.sh ledneb in my script stanza, but to no avail. Should I be looking in the direction of /etc/X11/xinit/xinitrc rather than upstart? Is there a proper way to have this script run in the context of the current (or even a hard-coded) user's x session?

    Read the article

  • Handling Session timeout in asp.net so all info. is aviable before create/update record

    - by Jack
    I'm having problem with some data missing in the record. I've a ASP.net web app that take some information from the user then create a record on the database. It's your typical CRUD app but I've noticed lately that some record are missing couple fields. Where they are null value. I think it might have been an Session issue. What's the best way to handle session time out in a typical CRUD app? Thanks

    Read the article

  • Print over the internet from a remote linux session locally (on a Windows 7 machine) to the shared printers?

    - by obeliksz
    I'm trying to use a linux virtual machine as a file server for windows clients. I have successfully implemented remote file sharing (samba+ssh) with which I am able to print locally with a little program that I made for this purpose (jetforms style)... but I would like to hear about a somewhat more direct approach. How can I attach the printers to the server, so that I can for example open a file on the remote session and in the print dialogbox I would see my local printers (on the machine from which I have established a remote session)? I guess there should be some kind of putty tunneling, but dont know how. I have a windows 7 machine locally; there is a CentOS 6 VM over the internet. It has ssh, cups, and samba. I have found a question which asks the opposite: there is a windows based server to connect form linux but that windows has a domain, mine is just a simple windows workstation that is behind NAT and has a dynamic IP. That question is: Print from Linux to Windows networked printer.

    Read the article

  • Why is String Templating Better Than String Concatenation from an Engineering Perspective?

    - by stephen
    I once read (I think it was in "Programming Pearls") that one should use templates instead of building the string through the use of concatenation. For example, consider the template below (using C# razor library) <in a properties file> Browser Capabilities Type = @Model.Type Name = @Model.Browser Version = @Model.Version Supports Frames = @Model.Frames Supports Tables = @Model.Tables Supports Cookies = @Model.Cookies Supports VBScript = @Model.VBScript Supports Java Applets = @Model.JavaApplets Supports ActiveX Controls = @Model.ActiveXControls and later, in a separate code file private void Button1_Click(object sender, System.EventArgs e) { BrowserInfoTemplate = Properties.Resources.browserInfoTemplate; // see above string browserInfo = RazorEngine.Razor.Parse(BrowserInfoTemplate, browser); ... } From a software engineering perspective, how is this better than an equivalent string concatentation, like below: private void Button1_Click(object sender, System.EventArgs e) { System.Web.HttpBrowserCapabilities browser = Request.Browser; string s = "Browser Capabilities\n" + "Type = " + browser.Type + "\n" + "Name = " + browser.Browser + "\n" + "Version = " + browser.Version + "\n" + "Supports Frames = " + browser.Frames + "\n" + "Supports Tables = " + browser.Tables + "\n" + "Supports Cookies = " + browser.Cookies + "\n" + "Supports VBScript = " + browser.VBScript + "\n" + "Supports JavaScript = " + browser.EcmaScriptVersion.ToString() + "\n" + "Supports Java Applets = " + browser.JavaApplets + "\n" + "Supports ActiveX Controls = " + browser.ActiveXControls + "\n" ... }

    Read the article

  • SQLAuthority News – #TechEdIn – TechEd India 2012 Memories and Photos

    - by pinaldave
    TechEd India 2012 was held in Bangalore last March 21 to 23, 2012. Just like every year, this event is bigger, grander and inspiring. Pinal Dave at TechEd India 2012 Family Event Every single year, TechEd is a special affair for my entire family.  Four months before the start of TechEd, I usually start to build the mental image of the event. I start to think  about various things. For the most part, what excites me most is presenting a session and meeting friends. Seriously, I start thinking about presenting my session 4 months earlier than the event!  I work on my presentation day and night. I want to make sure that what I present is accurate and that I have experienced it firsthand. My wife and my daughter also contribute to my efforts. For us, TechEd is a family event, and the two of them feel equally responsible as well. They give up their family time so I can bring out the best content for the Community. Pinal, Shaivi and Nupur at TechEd India 2012 Guinea Pigs (My Experiment Victims) I do not rehearse my session, ever. However, I test my demo almost every single day till the last moment that I have to present it already. I sometimes go over the demo more than 2-3 times a day even though the event is more than a month away. I have two “guinea pigs”: 1) Nupur Dave and 2) Vinod Kumar. When I am at home, I present my demos to my wife Nupur. At times I feel that people often backup their demo, but in my case, I have backup demo presenters. In the office during lunch time, I present the demos to Vinod. I am sure he can walk my demos easily with eyes closed. Pinal and Vinod at TechEd India 2012 My Sessions I’ve been determined to present my sessions in a real and practical manner. I prefer to present the subject that I myself would be eager to attend to and sit through if I were an audience. Just keeping that principle in mind, I have created two sessions this year. SQL Server Misconception and Resolution Pinal and Vinod at TechEd India 2012 We believe all kinds of stuff – that the earth is flat, or that the forbidden fruit is apple, or that the big bang theory explains the origin of the universe, and so many other things. Just like these, we have plenty of misconceptions in SQL Server as well. I have had this dream of co-presenting a session with Vinod Kumar for the past 3 years. I have been asking him every year if we could present a session together, but we never got it to work out, until this year came. Fortunately, we got a chance to stand on the same stage and present a single subject.  I believe that Vinod Kumar and I have an excellent synergy when we are working together. We know each other’s strengths and weakness. We know when the other person will speak and when he will keep quiet. The reason behind this synergy is that we have worked on 2 Video Learning Courses (SQL Server Indexes and SQL Server Questions and Answers) and authored 1 book (SQL Server Questions and Answers) together. Crowd Outside Session Hall This session was inspired from the “Laurel and Hardy” show so we performed a role-playing of those famous characters. We had an excellent time at the stage and, for sure, the audience had a wonderful time, too. We had an extremely large audience for this session and had a great time interacting with them. Speed Up! – Parallel Processes and Unparalleled Performance Pinal Dave at TechEd India 2012 I wanted to approach this session at level 400 and I was very determined to do so. The biggest challenge I had was that this was a total of 60 minutes of session and the audience profile was very generic. I had to present at level 100 as well at 400. I worked hard to tune up these demos. I wanted to make sure that my messages would land perfectly to the minds of the attendees, and when they walk out of the session, they could use the knowledge I shared on their servers. After the session, I felt an extreme satisfaction as I received lots of positive feedback at the event. At one point, so many people rushed towards me that I was a bit scared that the stage might break and someone would get injured. Fortunately, nothing like that happened and I was able to shake hands with everybody. Pinal Dave at TechEd India 2012 Crowd rushing to Pinal at TechEd India 2012 Networking This is one of the primary reasons many of us visit the annual TechEd event. I had a fantastic time meeting SQL Server enthusiasts. Well, it was a terrific time meeting old friends, user group members, MVPs and SQL Enthusiasts. I have taken many photographs with lots of people, but I have received a very few back. If you are reading this blog and have a photo of us at the event, would you please send it to me so I could keep it in my memory lane? SQL Track Speaker: Jacob and Pinal at TechEd India 2012 SQL Community: Pinal, Tejas, Nakul, Jacob, Balmukund, Manas, Sudeepta, Sahal at TechEd India 2012 Star Speakers: Amit and Balmukund at TechEd India 2012 TechED Rockstars: Nakul, Tejas and Pinal at TechEd India 2012 I guess TechEd is a mix of family affair and culture for me! Hamara TechEd (Our TechEd) Please tell me which photo you like the most! Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority Author Visit, SQLAuthority News, SQLServer, T SQL, Technology Tagged: TechEd, TechEdIn

    Read the article

  • Google Analytics checkout page tracking problem

    - by Amir E. Habib
    I am running a multilingual website, each lang on a different domain name. I am trying to lead all purchase requests to the checkout progress, which has its own domain too. In order to keep Google Analytics tracking I've updated the Google Analytics code accordingly. I set the source domain to 'multiple top-level domains'. Everything is going fine so far unless in E-commerce Overview; the "Sources / Medium" is always showing as (direct) - or the name of the source domain. Since I am redirecting using PHP header(location:.. etc.) the Google _link method doesn't seem to be working properly - I want to focus on two questions: Should I create a new profile for the checkout domain in Google Analytics? (I am now using the profile ID of the source domain even though I move to the checkout domain, si that OK?) When I'm trying to pass the cookies of the source domain to the checkout domain, I notice that the Google cookies are copied to the new domain (the cookie path is .checkout-domain/) and they have the same values of the original cookies - But for some reason another set of cookies is created once I access a page with google analytics code in the checkout pages, with different values (same path). Feels like I'm doing something wrong here, so my question is - What am I doing wrong here? Does anyone have an idea how to pass the cookies to the checkout domain?

    Read the article

  • good/bad idea to use email address in php session variable? [closed]

    - by Stephan Hovnanian
    I'm developing some additional functionality for a client's website that uses the email address as a key lookup variable between various databases (email marketing system, internal prospect database, and a third shared DB that helps bridge the gap between the two). I'm concerned that storing a visitor's email address as a $_SESSION variable could lead to security issues (not so much for our site, but for the visitor). Anybody have suggestions or experience on whether this is okay to do, or if there's another alternative out there?

    Read the article

  • Are You Using Facebook with an Encrypted Session Yet?

    - by The Geek
    If you’re geeky and keep up with all the tech news, you probably already know that Facebook added an SSL feature, but for everybody else: You can make your Facebook profile more secure by turning this option on, and here’s how to do it. All we’re going to do is head into the Facebook profile settings and then check a box that forces the use of SSL encryption whenever possible. Easy Latest Features How-To Geek ETC Here’s a Super Simple Trick to Defeating Fake Anti-Virus Malware How to Change the Default Application for Android Tasks Stop Believing TV’s Lies: The Real Truth About "Enhancing" Images The How-To Geek Valentine’s Day Gift Guide Inspire Geek Love with These Hilarious Geek Valentines RGB? CMYK? Alpha? What Are Image Channels and What Do They Mean? Project M Brings Classic Super Smash Bro Style Gameplay to the Wii Now Together and Complete – McBain: The Movie [Simpsons Video] Be Creative by Using Hex and RGB Codes for Crayola Crayon Colors on Your Next Web or Art Project [Geek Fun] Flash Updates; Finally Supports Full Screen Video on Multiple Monitors 22 Ways to Recycle an Altoids Mint Tin Make Your Desktop Go Native with the Tribal Arts Theme for Windows 7

    Read the article

  • How do I totally disable all forms of session management in Xubuntu?

    - by Evan Carroll
    Xubuntu remembers things like xfce-terminal and chromium whenever my system starts up. I don't want that function to happen, ever. I want every restart to be fresh. How do I disable this functionality. I've seen numerous tutorials that unchecking the "Save sessions for future logins" screen in Log Off would work, but it does't seem to work for me. When the system comes back the other applications are open. I've also deleted the files in autostart, as per this question.

    Read the article

  • gvim configuration does not work like it should

    - by ganjan
    Hi. I have a little problem with my vim config. This what I got in my home/user/.gvimrc syntax enable "Enable syntax hl colorscheme peaksea set background=dark set gfn=Inconsolata:h11 set nonu set history=1000 set scrolloff=3 set number " turn on line numbers " Save a global session file on session close nmap SQ <ESC>:mksession! ~/.vim/session/Session.vim<CR>:wqa<CR> function! RestoreSession() if argc() == 0 "vim called without arguments execute 'source ~/.vim/session/Session.vim' end endfunction autocmd VimEnter * call RestoreSession() The colorsheme work, but the font has way to much spacing. Every sentence is twice as long. I installed the Inconsolata font and I have the same config on my windows 7 box and it works fine.

    Read the article

  • Download a website that requires log-in with HTTtrack Copier

    - by H.Moss
    Hi guys! I have been researching of how to download content of a site that requires username and password. This is actually harder than I thought it would be. I tried to use both HTTtrack Copier and followed the instruction below, but it's not working! Q: I can not access several pages (access forbidden, or redirect to another location), but I can with my browser, what's going on? A: You may need cookies! Cookies are specific data (for example, your username or password) that are sent to your browser once you have logged in certain sites so that you only have to log-in once. For example, after having entered your username in a website, you can view pages and articles, and the next time you will go to this site, you will not have to re-enter your username/password. To "merge" your personnal cookies to an HTTrack project, just copy the cookies.txt file from your Netscape folder (or the cookies located into the Temporary Internet Files folder for IE) into your project folder (or even the HTTrack folder)

    Read the article

  • OpenWorld Suggest-a-Session Voting on Oracle Mix now OPEN!

    - by keith.laker
    Last year the Oracle OpenWorld team decided to use Oracle Mix as a way to select some of the papers for OpenWorld and this year we are following the same process. The majority of papers for this year's conference have already been selected, however, there are some presentation slots still available so the OpenWorld team are giving you the chance to vote on which papers you want to see at this year's OpenWorld conference.The voting process has just opened and will close on June 20. I did a quick search on the list of sessions one paper really caught my eye: Case Study: Real-Time data warehousing and fraud detection with Oracle 11gR2 by Dr. Holger Friedrich. As a data warehouse product manager I would love to see this paper selected. I have attended a number of presentations over the years given by Holger and he is an excellent, knowledgeable and entertaining presenter. The subject area is, for me, very interesting as it covers topics that I know are important to our customers and this case study highlights the innovative use of key database features. I would strongly encourage everyone to please vote for this paper. You can vote for Holger's presentation by going here:https://mix.oracle.com/oow10/proposals/10566-case-study-real-time-data-warehousing-and-fraud-detection-with-oracle-11gr2There are some rules relating to the voting process and these are all explained here: https://mix.oracle.com/oow10/faqA Quick Overview of the voting rules?1) You have to a member of the Oracle Mix communityBut membership is free! To sign up for a Mix account and you are one your way. You can sign-up by clicking on the "Create an Account" link in the top right corner of the Oracle Mix home page: https://mix.oracle.com/2) You have to vote for 3 different papersBased on last year’s voting pattern, the Mix team found that a number of participants were only voting for their own sessions. This year voters are required to vote on at least three sessions. How do I find the list of presentations? The full list of all available presentations is here: https://mix.oracle.com/oow10/proposalsGood luck and happy voting. Look forward to seeing you all at OpenWorld.

    Read the article

  • Adapters, SOA Suite and More @Openworld 2012

    - by Ramkumar Menon
    You are invited to attend my sessions at Oracle Openworld 2012 at San Francisco! CON8627 - Administration and Management Essentials for Oracle SOA Suite 11g Session Speakers: Ramkumar Menon, Francis Ip Session Schedule: Monday, Oct 1, 1:45 PM - 2:45 PM - Session Location: Marriott Marquis - Salon 7 CON8642 - Cloud and On-Premises Applications Integration using Oracle Integration Adapters Session Speakers: Vikas Anand, Ramkumar Menon, Stephen Mcritchie Session Schedule: Wednesday, Oct 3, 1:15 PM - 2:15 PM Session Location: Moscone South - 310 And do stop by at the Oracle Integration Adapters Demo booth. Watch some live demos on how you can use our suite of Adapters to integrate and extend your Enterprise Applications! This is your opportunity to meet with our Engineering team, share with us your Integration use-cases and challenges, and hear from us on our Roadmap. The Oracle Integration Adapters booth is located at the Fusion Middleware Demopod area  from Monday, October 1 through Wednesday, October 3, 2012.

    Read the article

  • How to remove non-working session entries in LightDM?

    - by Lexalt
    I recently added Cairo Dock to my GNOME Shell in 11.10. Cairo Dock is GREAT, but I'm left with one little problem that I'd like to fix: after installing Cairo Dock, LightDM includes two extraneous entries to non-working desktops. (The entries to working desktops remain unaffected, so I guess I could just ignore the extraneous entries, but...) So I'd like to remove/edit the extraneous entries in LightDM. I've looked and looked for discussions on how to do so, but haven't had much luck. Any suggestions on how to go about editing the login menu in 11.10?

    Read the article

  • How can I debug what's slowing down new session logins?

    - by David Planella
    For a while, I've had an issue whereby it takes up to 5 minutes from the moment I enter my password in Lightdm's login screen until I can do anything with my computer. That's on Ubuntu 12.04. During that time, I see there is disk activity, but I'm not sure how to figure out what's causing it and whether that is the real cause. I've played around with Bootchart unsuccessfully. Any ideas on what the best way to debug this issue is?

    Read the article

  • Xfce session will not login from login prompt. Why?

    - by hydroparadise
    Well, not sure how I did it, but for some reason I am unable to get past the login screen on Xfce. What's odd is that I had set the machine up (from install) to login automatically. Then when I finish rebooting after installing sudo apt-get install openssh-server and sudo apt-get install vnc4server all the sudden I am getting prompted for my password. I proceed to type my password (successfully might I add) to login, the screen goes black for a second, then brings me right back to the same password prompt. I am able ssh in(now), but I get no love from workstation login. Maybe vnc4server is the culprit? What did I do? And can I fix it? EDIT: The guest account, however will let me login no problem. What gives? I have a sneaking feeling that this could be permission issue.

    Read the article

  • What are the signs that a ten days debugging session will not resolve an issue? [on hold]

    - by smonff
    Ten days ago, we fixed a bug on a large application and the hot fix has created a disappearing of some data from the user point of view (side effect). Data are not deleted, but have been set to hidden status. It could be possible to get the data back, but the thing seems to be hard: we've already spent 10 days to understand and reproduce the problem (mostly with SQL queries but sometimes it is necessary to update the database to test the application logic). My questions are : is 10 days a normal amount of time for these kind of problems? should we keep on and retrieve the data or should we give up this work (so the customer-relationship person will tell these users sorry for the loss, but your data have disappeared or maybe tell nothing at all)? what can be the signs that shows that we should stop to search for how to solve this issue? Edit about the context : we are a small team(3), users are not the customers, and lost data are not about the users money, bank or vital data. This is a question from a confused developer about development methodologies and business concerns, not about how we should deal with the customers.

    Read the article

  • How to deal with a ten days debugging session? [on hold]

    - by smonff
    Ten days ago, I fixed a bug on a large application and the hot fix has created a disappearing of some data from the user point of view. Data are not deleted, but have been set to hidden status. It could be possible to get the data back, but the thing seems to be hard: I've already spent 10 days to understand and reproduce the problem (mostly with complex SQL queries but sometimes it is necessary to update the database to test the application logic). Is 10 days a normal amount of time for these kind of problems? Should we keep on and retrieve the data or should we tell these users sorry for the loss, but your data have disappeared? Any advice on when to stop searching how to solve the issue?

    Read the article

  • testing dao with hibernate genericdao pattern with spring.Headache

    - by black sensei
    Hello good fellas! in my journey of learning hibernate i came across an article on hibernate site. i' learning spring too and wanted to do certain things to discover the flexibility of spring by letting you implement you own session.yes i don't want to use the hibernateTemplate(for experiment). and i'm now having a problem and even the test class.I followed the article on the hibernate site especially the section an "implementation with hibernate" so we have the generic dao interface : public interface GenericDAO<T, ID extends Serializable> { T findById(ID id, boolean lock); List<T> findAll(); List<T> findByExample(T exampleInstance); T makePersistent(T entity); void makeTransient(T entity); } it's implementation in an abstract class that is the same as the one on the web site.Please refer to it from the link i provide.i'll like to save this post to be too long now come my dao's messagedao interface package com.project.core.dao; import com.project.core.model.MessageDetails; import java.util.List; public interface MessageDAO extends GenericDAO<MessageDetails, Long>{ //Message class is on of my pojo public List<Message> GetAllByStatus(String status); } its implementation is messagedaoimpl: public class MessageDAOImpl extends GenericDAOImpl <Message, Long> implements MessageDAO { // mySContainer is an interface which my HibernateUtils implement mySContainer sessionManager; /** * */ public MessageDAOImpl(){} /** * * @param sessionManager */ public MessageDAOImpl(HibernateUtils sessionManager){ this.sessionManager = sessionManager; } //........ plus other methods } here is my HibernatUtils public class HibernateUtils implements SessionContainer { private final SessionFactory sessionFactory; private Session session; public HibernateUtils() { this.sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); } public HibernateUtils(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } /** * * this is the function that return a session.So i'm free to implements any type of session in here. */ public Session requestSession() { // if (session != null || session.isOpen()) { // return session; // } else { session = sessionFactory.openSession(); // } return session; } } So in my understanding while using spring(will provide the conf), i'ld wire sessionFactory to my HiberbernateUtils and then wire its method RequestSession to the Session Property of the GenericDAOImpl (the one from the link provided). here is my spring config core.xml <bean id="sessionManager" class="com.project.core.dao.hibernate.HibernateUtils"> <constructor-arg ref="sessionFactory" /> </bean> <bean id="messageDao" class="com.project.core.dao.hibernate.MessageDAOImpl"> <constructor-arg ref="sessionManager"/> </bean> <bean id="genericDAOimpl" class="com.project.core.dao.GenericDAO"> <property name="session" ref="mySession"/> </bean> <bean id="mySession" factory-bean="com.project.core.dao.SessionContainer" factory-method="requestSession"/> now my test is this public class MessageDetailsDAOImplTest extends AbstractDependencyInjectionSpringContextTests{ HibernateUtils sessionManager = (HibernateUtils) applicationContext.getBean("sessionManager"); MessageDAO messagedao =(MessageDAO) applicationContext.getBean("messageDao"); static Message[] message = new Message[] { new Message("text",1,"test for dummies 1","1234567890","Pending",new Date()), new Message("text",2,"test for dummies 2","334455669990","Delivered",new Date()) }; public MessageDAOImplTest() { } @Override protected String[] getConfigLocations(){ return new String[]{"file:src/main/resources/core.xml"}; } @Test public void testMakePersistent() { System.out.println("MakePersistent"); messagedao.makePersistent(message[0]); Session session = sessionManager.RequestSession(); session.beginTransaction(); MessageDetails fromdb = ( Message) session.load(Message.class, message[0].getMessageId()); assertEquals(fromdb.getMessageId(), message[0].getMessageId()); assertEquals(fromdb.getDateSent(),message.getDateSent()); assertEquals(fromdb.getGlobalStatus(),message.getGlobalStatus()); assertEquals(fromdb.getNumberOfPages(),message.getNumberOfPages()); } i'm having this error exception in constructor testMakePersistent(java.lang.NullPointerException at com.project.core.dao.hibernate.MessageDAOImplTest) with this stack : at com.project.core.dao.hibernate.MessageDAOImplTest.(MessageDAOImplTest.java:28) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at junit.framework.TestSuite.createTest(TestSuite.java:61) at junit.framework.TestSuite.addTestMethod(TestSuite.java:283) at junit.framework.TestSuite.(TestSuite.java:146) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:481) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888) )) How to actually make this one work.I know this is a lot to stuffs and i'm thanking you for reading it.Please give me a solution.How would you do this? thanks

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >