Daily Archives

Articles indexed Thursday March 29 2012

Page 3/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Windows 7 can't boot with Ubuntu on different hard drive

    - by dellphi
    I use a dual boot with two hard disks and two OS is Ubuntu 10.04 and Windows 7. Windows 7 installed on the first disk, first partition. Grub is installed on a second hard disk MBR, and Ubuntu installed on an extended partition on a second hard drive. When I select Windows 7 on the Grub menu, the HDD lamp lights up briefly and then black screen on the monitor, with the status of the keyboard is still functioning. Until now (with the default boot from first HDD), I have to press F12 to get into the Grub to run Linux on a second HDD. output of fdisk -l grub.cfg. I want to retain Grub to remain on the second HDD, and Windows 7 could choose from the menu provided by Grub. But I do not get how, I hope anyone can help.

    Read the article

  • How Is there anyway to Compile Notepad++?

    - by user44179
    I really like using Notepad++ to write HTML and such. After I started using Ubuntu I looked around for an alternative to Notpad++. I found a thread which lead me to try Geany and a few others, but I really miss Notepad++. Is there anyway I could compile it from the source code to use on Ubuntu? I know its written in C++. Could I just open it in Code::Blocks and compile it? You can get the source here. I wouldn't mind hearing about other alternatives, but really want to know if compiling it is possible. Thanks

    Read the article

  • Music player that remembers last song and playlist

    - by user654628
    I am looking for something similar to winamp. I have seen other threads but I have tried some solutions and they did not work. I tried Banshee that comes with Ubuntu 11.10 but it does not open last song. I tried Rhythmbox with the remember last song plugin however it does not remember the playlist I got the song from so it would start shuffling all my music. I tried Amarok and it does the same thing as Banshee except cannot even play my playlist and starts playing all my music. I tried audacious but importing my playlist .m3u doesnt allow me to select the individual playlists and play them. I just moved from Windows using winamp and would like a music player that can open playlists .m3u and when I open the application later that it opens the last song and playlist and I can press the play hotkey and music will start playing on startup similar to winamp. I do not care about any additional functionality or user interface.

    Read the article

  • How can i add more wallpapers in 11.10?

    - by bjnobrega
    How do I increase the amount of wallpapers that appear on the menu for customizing the desktop with my backgrounds in 11.10? I added more images to the respective folder in /usr/share/background as root, but the list does not remain persistent. The images in 11:10 changes alone. So I want to add funds to enhance the environment. When I copy the images to the folder /usr/share/backgrounds the list is updated and increased. But only for the first time. Thereafter, the system ignores the other images, and the list of funds has become original as first. Any help?

    Read the article

  • Is real estate boom again in India?

    - by skzameen
    The present real estate scenario in India is very good. The real estate boom in India is interlinked directly to the industrial, Commercial and economic growth with stability and strong presence of international companies throughout India have made the preferred destination for investment in real estate sector. India is a one of the fast growing economic stock markets For more information about residential and commercial projects or properties log on to www.zameen-zaidad.com, or email to [email protected] Contact Us Zameen-zaidad.com Ph: - +91-11-40024002 M: - +91-9810445860 Share your opinion for www.zameen-zaidad.com portal

    Read the article

  • Where do I place XNA content pipeline references?

    - by Zabby Wabby
    I am relatively new to XNA, and have started to delve into the use of the content pipeline. I have already figured out that tricky issue of adding a game library containing classes for any type of .xml file I want to read. Here's the issue. I am trying to handle the reading of all XML content through use of an XMLHandler object that uses the intermediate deserializer. Any time reading of such data is required, the appropriate method within this object would be called. So, as a simple example, something like this would occur when a character levels: public Spell LevelUp(int levelAchived) { XMLHandler.FindSkillsForLevel(levelAchived); } This method would then read the proper .xml file, sending back the spell for the character to learn. However, the XMLHandler is having issues even being created. I cannot get it to use the using namespace of Microsoft.Xna.Framework.Content.Pipeline. I get an error on my using statement in the XMLHandler class: using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate; The error is a typical reference error: Type or namespace name "'Pipeline' does not exist in the namespace 'Microsoft.Xna.Framework.Content' (are you missing an assembly reference?)" I THINK this is because this namespace is already referenced in my game's content. I would really have no issue placing this object within my game's content (since that is ALL it deals with anyways), but the Content project does not seem capable of holding anything but content files. In summary, I need to use the Intermediate Deserializer in my main project's logic, but, as far as I can make out, I can't safely reference the associated namespace for it outside of the game's content. I'm not a terribly well-versed programmer, so I may be just missing some big detail I've never learned here. How can I make this object accessible for all projects within the solution? I will gladly post more information if needed!

    Read the article

  • Making particle bounce off a line with friction

    - by Dlaor
    So I'm making a game and I need a particle to bounce off a line. I've got this so far: public static Vector2f Reflect(this Vector2f vec, Vector2f axis) //vec is velocity { Vector2f result = vec - 2f * axis * axis.Dot(vec); return result; } Which works fine, but then I decided I wanted to be able to change the bounciness and friction of the bounce. I got bounciness down... public static Vector2f Reflect(this Vector2f vec, Vector2f axis, float bounciness) //Bounciness goes from 0 to 1, 0 being not bouncy and 1 being perfectly bouncy { var reflect = (1 + bounciness); //2f Vector2f result = vec - reflect * axis * axis.Dot(vec); return result; } But when I tried to add friction, everything went to hell and back... public static Vector2f Reflect(this Vector2f vec, Vector2f axis, float bounciness, float friction) //Does not work at all! { var reflect = (1 + bounciness); //2f Vector2f subtract = reflect * axis * axis.Dot(vec); Vector2f subtract2 = axis * axis.Dot(vec); Vector2f result = vec - subtract; result -= axis.PerpendicularLeft() * subtract2.Length() * friction; return result; } Any physics guys willing to help me out with this? (if you're not sure what I mean with the friction of a bounce see this: http://www.metanetsoftware.com/technique/diagrams/A-1_particle_collision.swf)

    Read the article

  • How are these bullets done?

    - by Mike
    I really want to know how the bullets in Radiangames Inferno are done. The bullets seem like they are just billboard particles but I am curious about how their tails are implemented. They can curve so this means they are not just a billboard. Also, they appear continuous which implies that the tails are not made of a bunch of smaller particles (I think). Can anyone shead some light on this for me?

    Read the article

  • In OpenGl ES 2, should I allocate multiple transformation matrices?

    - by thm4ter
    In OpenGl ES 2, should I declare just one transformation matrix, and share it across all objects or should I declare a transformation matrix in each object that needs it? for clarification... something like this: public class someclass{ public static float[16] transMatrix = new float[16]; ... public static void translate(int x, int y){ //do translation here } } public class someotherclass{ ... void draw(GL10 unused){ someclass.translate(10,10); //draw } } verses something like this: public class obj1{ public static float[16] transMatrix = new float[16]; ... void draw(GL10 unused){ //translate //draw } } public class obj2{ public static float[16] transMatrix = new float[16]; ... void draw(GL10 unused){ //translate //draw } }

    Read the article

  • 2D wave-like sprite movement XNA

    - by TheBroodian
    I'm trying to create a particle that will 'circle' my character. When the particle is created, it's given a random position in relation to my character, and a box to provide boundaries for how far left or right this particle should circle. When I use the phrase 'circle', I'm referring to a simulated circling, i.e., when moving to the right, the particle will appear in front of my character, when passing back to the left, the particle will appear behind my character. That may have been too much context, so let me cut to the chase: In essence, the path I would like my particle to follow would be akin to a sine wave, with the left and right sides of the provided rectangle being the apexes of the wave. The trouble I'm having is that the position of the particle will be random, so it will never be produced at the same place within the wave twice, but I have no idea how to create this sort of behavior procedurally.

    Read the article

  • How can I load .FBX files?

    - by gardian06
    I am looking into options for the model assets for my game. I have gotten pretty good with Blender, and want to use C++/DirectX9 (don't need all the excess from 10+), but Blender 2.6 exports .fbx not .x (by nature) and supposedly what is exported from Blender to .x is not entirely stable. In short how do I import .fbx models (I can work around not having animations if I must) into DirectX9? Is there a middleware, or conversion tool that will maintain stability?

    Read the article

  • How to move a line of sprites in a sine wave?

    - by electroflame
    So, I'm spawning a horizontal line of enemies that I would like to have move in a nice wave. Currently I tried: Enemy.position.X += Enemy.velocity.X; Enemy.position.Y += -(float)Math.Cos(Enemy.position.X / 200) * 5; This...kind of works. But the wave is not a true wave. The top and bottom of one pass are not the same (e.g. 5 for the top, and -5 for the bottom (I don't mean literal points, I just meant that it's not symmetrical)). Is there a better way to do this? I would like the whole line to move in a wave, so it looks fluid. By that, I mean that it should look like each enemy is "following" the one in front of it. The code I posted does have this fluidity to it, but like I said, it's not a perfect wave. Any ideas? Thanks in advance.

    Read the article

  • How to do reflective collisions with particles hitting background tiles?

    - by Shawn LeBlanc
    In my 2d pixel old-school platformer, I'm looking for methods for bouncing particles off of background tiles. Particles aren't affected by gravity and collisions are "reflective". By that I mean a particle hitting the side of a square tile at 45 degrees should bounce off at 45 degrees as well. We can assume that tiles will always be perfectly square. No slopes or anything. What are efficient methods and algorithms to do this? I'd be implementing this on a Sega Genesis.

    Read the article

  • Detecting End of Animation

    - by Will
    So I am making a death animation for a game. enemy1 is a UIImageView, and what I'm doing is when an integer is less than or equal to zero, it calls this deathAnimation which only happens once. What I want to do is use a CGPointMake right when the animation is finished being called. Note that before the deathAnimation is called, there is another animation that is constantly being called 30 times a second. I'm not using anything like cocos2d. if (enemy1health <= 0) { [self slime1DeathAnimation]; //How can i detect the end of this animation } This is how the animation is done -(void)slime1DeathAnimation{ enemy1.animationImages = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"Slime Death 1.png"], [UIImage imageNamed:@"Slime Death 2.png"], [UIImage imageNamed:@"Slime Death 3.png"], [UIImage imageNamed:@"Slime Death 4.png"], [UIImage imageNamed:@"Slime Death 5.png"], nil]; enemy1.animationDuration = 0.5; enemy1.animationRepeatCount = 1; [enemy1 startAnimating]; } If you need more code just ask

    Read the article

  • Resultant Vector Algorithm for 2D Collisions

    - by John
    I am making a Pong based game where a puck hits a paddle and bounces off. Both the puck and the paddles are Circles. I came up with an algorithm to calculate the resultant vector of the puck once it meets a paddle. The game seems to function correctly but I'm not entirely sure my algorithm is correct. Here are my variables for the algorithm: Given: velocity = the magnitude of the initial velocity of the puck before the collision x = the x coordinate of the puck y = the y coordinate of the puck moveX = the horizontal speed of the puck moveY = the vertical speed of the puck otherX = the x coordinate of the paddle otherY = the y coordinate of the paddle piece.horizontalMomentum = the horizontal speed of the paddle before it hits the puck piece.verticalMomentum = the vertical speed of the paddle before it hits the puck slope = the direction, in radians, of the puck's velocity distX = the horizontal distance between the center of the puck and the center of the paddle distY = the vertical distance between the center of the puck and the center of the paddle Algorithm solves for: impactAngle = the angle, in radians, of the angle of impact. newSpeedX = the speed of the resultant vector in the X direction newSpeedY = the speed of the resultant vector in the Y direction Here is the code for my algorithm: int otherX = piece.x; int otherY = piece.y; double velocity = Math.sqrt((moveX * moveX) + (moveY * moveY)); double slope = Math.atan(moveX / moveY); int distX = x - otherX; int distY = y - otherY; double impactAngle = Math.atan(distX / distY); double newAngle = impactAngle + slope; int newSpeedX = (int)(velocity * Math.sin(newAngle)) + piece.horizontalMomentum; int newSpeedY = (int)(velocity * Math.cos(newAngle)) + piece.verticalMomentum; for those who are not program savvy here is it simplified: velocity = v(moveX² + moveY²) slope = arctan(moveX / moveY) distX = x - otherX distY = y - otherY impactAngle = arctan(distX / distY) newAngle = impactAngle + slope newSpeedX = velocity * sin(newAngle) + piece.horizontalMomentum newSpeedY = velocity * cos(newAngle) + piece.verticalMomentum My Question: Is this algorithm correct? Is there an easier/simpler way to do what I'm trying to do?

    Read the article

  • Mockito upgrade causes null pointer problems

    - by Ann Addicks
    We upgraded from mockito-all-1.8.5.jar to mockito-all-1.9.0.jar and now see null pointers when using annotations for the classes being mocked. Here is an example: @Mock private static IAccountManager accountManager; @Mock private static IBusinessUnitManager businessUnitManager; private static Gson parser; @InjectMocks private static DownloadController downloadController; @BeforeClass public static void setUpBeforeClass() throws Exception { parser = new Gson(); downloadController = new DownloadController(accountManager, businessUnitManager, parser); } @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); Mockito.reset(accountManager, businessUnitManager); } As soon as accountManager is referenced in the download controller, it throws a npe. This worked in 1.8.5.

    Read the article

  • Game doesn't Quit properly

    - by W.K.S
    I have an app that so far consists of two Activities: The Main Menu Activity. The Game Activity The Main Menu Activity contains a button that starts the Game Activity with the following code: public void onClick(View clickedButton) { switch(clickedButton.getId()) { case R.id.buttonPlay: Intent i = new Intent("apple.banana.BouncingBallActivity"); startActivity(i); break; } When the user is done with the Game Activity, he presses the back button. This calls the onPause() method first, which pauses the animation thread of the game. It then calls the onStop() which calls finish() on the activity altogether. The user is returned to the Main Menu activity. The code is outlined below: public class BouncingBallActivity extends Activity{ private BouncingBallView bouncingBallView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); bouncingBallView = new BouncingBallView(this); bouncingBallView.resume(); setContentView(bouncingBallView); } @Override protected void onPause() { super.onPause(); bouncingBallView.pause(); } @Override protected void onResume() { super.onResume(); bouncingBallView.resume(); } @Override protected void onStop() { super.onStop(); this.finish(); } } The problem is that this only works if I launch the application from Eclipse. When I click on the app icon, the game starts from the Game Activity. The main menu activity does not appear. I am not clear about why this happens. It could be something to do with the manifest. I've pasted the relevant portions below: <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".BouncingBallActivity" android:label="@string/app_name" android:screenOrientation="landscape" > <intent-filter> <action android:name="apple.banana.BouncingBallActivity" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name=".MainMenu" android:label="@string/app_name" android:screenOrientation="portrait" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> I'd really appreciate any help with this. Thanks.

    Read the article

  • Getting code-first Entity Framework to build tables on SQL Azure

    - by NER1808
    I am new the code-first Entity Framework. I have tried a few things now, but can't get EF to construct any tables in the my SQL Azure database. Can anyone advise of some steps and settings I should check. The membership provider has no problems create it's tables. I have added the PersistSecurityInfo=True in the connection string. The connection string is using the main user account for the server. When I implement the tables in the database using sql everything works fine. I have the following in the WebRole.cs //Initialize the database Database.SetInitializer<ReykerSCPContext>(new DbInitializer()); My DbInitializer (which does not get run before I get a "Invalid object name 'dbo.ClientAccountIFAs'." when I try to access the table for the first time. Sometime after startup. public class DbInitializer:DropCreateDatabaseIfModelChanges<ReykerSCPContext> { protected override void Seed(ReykerSCPContext context) { using (context) { //Add Doc Types context.DocTypes.Add(new DocType() { DocTypeId = 1, Description = "Statement" }); context.DocTypes.Add(new DocType() { DocTypeId = 2, Description = "Contract note" }); context.DocTypes.Add(new DocType() { DocTypeId = 3, Description = "Notification" }); context.DocTypes.Add(new DocType() { DocTypeId = 4, Description = "Invoice" }); context.DocTypes.Add(new DocType() { DocTypeId = 5, Description = "Document" }); context.DocTypes.Add(new DocType() { DocTypeId = 6, Description = "Newsletter" }); context.DocTypes.Add(new DocType() { DocTypeId = 7, Description = "Terms and Conditions" }); //Add ReykerAccounttypes context.ReykerAccountTypes.Add(new ReykerAccountType() { ReykerAccountTypeID = 1, Description = "ISA" }); context.ReykerAccountTypes.Add(new ReykerAccountType() { ReykerAccountTypeID = 2, Description = "Trading" }); context.ReykerAccountTypes.Add(new ReykerAccountType() { ReykerAccountTypeID = 3, Description = "SIPP" }); context.ReykerAccountTypes.Add(new ReykerAccountType() { ReykerAccountTypeID = 4, Description = "CTF" }); context.ReykerAccountTypes.Add(new ReykerAccountType() { ReykerAccountTypeID = 5, Description = "JISA" }); context.ReykerAccountTypes.Add(new ReykerAccountType() { ReykerAccountTypeID = 6, Description = "Direct" }); context.ReykerAccountTypes.Add(new ReykerAccountType() { ReykerAccountTypeID = 7, Description = "ISA & Direct" }); //Save the changes context.SaveChanges(); } and my DBContext class looks like public class ReykerSCPContext : DbContext { //set the connection explicitly public ReykerSCPContext():base("ReykerSCPContext"){} //define tables public DbSet<ClientAccountIFA> ClientAccountIFAs { get; set; } public DbSet<Document> Documents { get; set; } public DbSet<DocType> DocTypes { get; set; } public DbSet<ReykerAccountType> ReykerAccountTypes { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { //Runs when creating the model. Can use to define special relationships, such as many-to-many. } The code used to access the is public List<ClientAccountIFA> GetAllClientAccountIFAs() { using (DataContext) { var caiCollection = from c in DataContext.ClientAccountIFAs select c; return caiCollection.ToList(); } } and it errors on the last line. Help!

    Read the article

  • How to insert result of mysql_real_escape_string() into oracle database?

    - by Prat
    For inserting special characters in data like (,')etc., I am using musql_real_escape_string() function & it's working fine. Now I want to use same variable while inserting values in Oracle. $str = 'N.G.Palace\'s Building', 'xyzcity', '12345678','India','100001',12 Here $str is result of mysql_real_escape_string(). so it escapes special character. Now my code for oracle is like this-: $qry ="INSERT INTO Ora_table(ship_to_street, ship_to_city,ship_to_country, ship_to_telephone, order_id, record_no) VALUES(".$str); So my doubt is Oracle is not accepting values return by mysql_real_escape_string i.e. Palace\'s (like this as this mysql function attach \ before 'single quote)? So can anybody tell me ho9w can I use that variable $str to insert data into Oracle? Also I tried like this also-: "q"."'"."c".$str."c"."'" can we use this for multiple values like in my case...though still I am unable to inser data in oracle? plz help.

    Read the article

  • Conditional row count in linq to nhibernate doesn't work

    - by Lucasus
    I want to translate following simple sql query into Linq to NHibernate: SELECT NewsId ,sum(n.UserHits) as 'HitsNumber' ,sum(CASE WHEN n.UserHits > 0 THEN 1 ELSE 0 END) as 'VisitorsNumber' FROM UserNews n GROUP BY n.NewsId My simplified UserNews class: public class AktualnosciUzytkownik { public virtual int UserNewsId { get; set; } public virtual int UserHits { get; set; } public virtual User User { get; set; } // UserId key in db table public virtual News News { get; set; } // NewsId key in db table } I've written following linq query: var hitsPerNews = (from n in Session.Query<UserNews>() group n by n.News.NewsId into g select new { NewsId = g.Key, HitsNumber = g.Sum(x => x.UserHits), VisitorsNumber = g.Count(x => x.UserHits > 0) }).ToList(); But generated sql just ignores my x => x.UserHits > 0 statement and makes unnecessary 'left outer join': SELECT news1_.NewsId AS col_0_0_, CAST(SUM(news0_.UserHits) AS INT) AS col_1_0_, CAST(COUNT(*) AS INT) AS col_2_0_ FROM UserNews news0_ LEFT OUTER JOIN News news1_ ON news0_.NewsId=news1_.NewsId GROUP BY news1_.NewsId How Can I fix or workaround this issue? Maybe this can be done better with QueryOver syntax?

    Read the article

  • Extending existing Class in Symfony

    - by Dar Hamid
    I am new to symfony. I have created a registration form using the code: $user = new Register(); $form = $this->createForm(new RegisterType(), $user); In the RegisterType class i have 5 fields (for example).I store the values in database when the user registers with the system. Now I display the EDIT page using following code: $user = $em->getRepository('MysiteUserBundle:Register')->find($id); $form = $this->createForm(new RegisterType(), $user); The problem with the EDIT code however is that it displays me all of the fields mentioned in RegisterType class.Is it possible to display only some fields. If yes how can this be achieved. Any help will be appreciated

    Read the article

  • SDL versus GLFW?

    - by user697111
    What are the pros and cons to each? It seems they serve the same purpose. I have a few demos with each and they seem about the same. Performance or cross platform wise, is one better than the other? The only thing I notice is that SDL seems to have more "helper" libraries (fonts, images, mixer, built in sound support, etc). On its site, GLFW claims to be more "OpenGL" focused, but still have to use a GLEW to get any newer OpenGL features (same with SDL). I guess I'm leaning towards using SDL now (more mature, more features, more community). Are there any reasons I've missed why GLFW stands out and I should use it instead of SDL?

    Read the article

  • How to develop a Jquery plugin to find the first child that match with a selector?

    - by Ivan
    I'm trying to make a Jquery plugin (findFirst()) to find the first child with a given characteristics (something in the middle of the find() and children() functions. For instance, given this markup: <div id="start"> <div> <span>Hello world</span> <ul class="valid-result"> ... </ul> <ul class="valid-result"> <li> <ul class="not-a-result"> ... </ul> </li> </ul> <div> <ul class="valid-result"> ... </ul> </div> </div> </div> If you ask for $("#start").findFirst('ul') it should return all ul lists that I have tagged with the valid-result class, but not the ul with class not-a-result. It is, this function has to find the first elements that matches with a given selector, but not the inner elements that match this selector. This is the first time I try to code a Jquery function, and what I've already read doesn't helps me too much with this. The function I have developed is this: jQuery.fn.findFirst = function (sel) { return this.map(function() { return $(this).children().map(function() { if ($(this).is(sel)) { return $(this); } else { return $(this).findFirst(sel); } }); }); } It works in the sense it tries to return the expected result, but the format it returns the result is very rare for me. I suppose the problem is something I don't understand about Jquery. Here you have the JFiddle where I'm testing. EDIT The expected result after $("#start").findFirst('ul') is a set with all UL that have the class 'valid-result' BUT it's not possible to use this class because it doesn't exist in a real case (it's just to try to explain the result). This is not equivalent to first(), because first returns only one element!

    Read the article

  • Can i configure emacs to use gdb like a graphical debugger?

    - by Joey Carson
    I'm pretty sure that this how other IDE's do it, e.g. on windows eclipse uses the output of gdb from MinGW (the windows port of GNU toolchain) to map where execution is in the source code and what values variables hold, etc. I'm stuck using gdb via a script that prepares our application in a chroot and does some other bootstrap for debug purposes. Once the script starts moving, the output is all gdb. Is there any way that I can configure emacs so that it will use gdb's output and allow for a sort of graphical debugger, comparable to that of eclipse or ms visual studio?

    Read the article

  • Hibernate @Transactional not starting transaction

    - by rhinds
    I have a web app using Hibernate, and I am attempting to persist some data, but it is failing to persist within a Transaction despite using the @Transactional annotation. My service class is as follows: @Service("profileService") public class ProfileService { private EntityManager entityManager; @Autowired private AccountService accountService; @Autowired private ProfileDAOImpl profileDao; @PersistenceContext public void setEntityManager(EntityManager em) { this.entityManager = em; } @Transactional public void addConnectionToAccount(SocialConnection sc) { entityManager.persist(sc); } } The addConnectionToAccount() method is being called from another Spring bean in a normal method, and the ProfileService class is currently being injected there: public class HibernateConnectionRepository implements ConnectionRepository { @Inject private ProfileService profileService; @Override @Transactional public void addConnection(SocialConnection sc) { try { profileService.addConnectionToAccount(accountId, sc); } catch (Exception e) { e.printStackTrace(); } } I tried putting the @Transactional annotation on the calling method in the vain hope that it might make a difference but nothing. Previously I have experienced problems like this its been because the object being persisted does not satisfy table restrictions (such as non-nullable columns as null) or because the method is being called from within the same class and the calling method is not Transactional, but neither of those are the case here.. Any ideas? it just fails silently, the logs are as follows: 2012-03-26 22:25:04,702 [http-bio-8085-exec-9] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - trace com.mchange.v2.resourcepool.BasicResourcePool@1bc25c8 [managed: 3, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@e5b006) 2012-03-26 22:25:04,710 [http-bio-8085-exec-9] DEBUG org.hibernate.SQL - select SEQ_COUNT from SEQUENCE where SEQ_NAME = 'PO_SEQ' for update 2012-03-26 22:25:04,711 [http-bio-8085-exec-9] DEBUG org.hibernate.SQL - update SEQUENCE set SEQ_COUNT = ? where SEQ_COUNT = ? and SEQ_NAME = 'PO_SEQ' 2012-03-26 22:25:04,723 [http-bio-8085-exec-9] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - trace com.mchange.v2.resourcepool.BasicResourcePool@1bc25c8 [managed: 3, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@e5b006) 2012-03-26 22:25:04,723 [http-bio-8085-exec-9] DEBUG org.hibernate.event.internal.AbstractSaveEventListener - Generated identifier: 2200, using strategy: org.hibernate.id.MultipleHiLoPerTableGenerator UPDATE Also wanted to mention that the HibernateConnectionRepository bean is not annotated and is actually being configured in an @Configuration class (if this makes any difference? not used @Configuration classes much). The method to create the bean is as follows: @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionRepository connectionRepository() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (authentication == null) { throw new IllegalStateException("Unable to get a ConnectionRepository: no user signed in"); } ApplicationUser user = (ApplicationUser) authentication.getPrincipal(); return usersConnectionRepository().createConnectionRepository(String.valueOf(user.getAccountId())); } The bean is scoped to the logged in user, but may also be created multiple times for each user..

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >