Fixing Exception — Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)


If you are working with Spring Roo and suddenly start getting exception “Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)” then make sure you have _Configurable.aj ITD in your project. This ITD makes the sure that your entity classes have all the required dependencies like EntityManager injected in them. Configurable ITD  looks like as shown below

privileged aspect Movie_Roo_Configurable {

    declare @type: Movie: @Configurable;

}

2 thoughts on “Fixing Exception — Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)

  1. zorooo

    Thank you very much!
    Your blog entry did lead me to the problem that I was missing the @Configurable annotation.

    Reply
  2. sikamaro

    Hi M Shekhar,
    Thanks for all your shared informations, you save lives with it.

    I had the same problem in google app engine, everything works fine locally,
    but when i deploy it on google app engine, i have this exception :

    Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)

    I’m using spring roo + jsf, i fixed some serialization problems befor, but i don’t now how to fix it.

    Many thx

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s