Help coderanch get a
new server
by contributing to the fundraiser

Julien Martin

Ranch Hand
+ Follow
since Apr 24, 2004
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Julien Martin


I know this post is a somewhat old but I am running into the same problem...

I haven't put my jdbc jar in any endorsed directory and yet I get the same issue. Can one of you please elaborate on the solution?

My environment is:
  • Tomcat 7
  • Spring 3.2.3

  • The problem occurs when I run the following tests:

    Here is my mvc-dispatcher-servlet.xml file:

    and finally the stacktrace:

    Can anyone please help?


    11 years ago

    James Sutherland wrote:Since you state most of your data in common, you would probably be better off using SINGLE_TABLE inheritance instead of JOINED.

    What specific problems are you having?

    Hello James,

    Here is a partial list of the problems I have:
    -I find it difficult to factor operations on the subclasses, e.g. I want to be able to operate on all advertisements belonging to a given account (using a given account_ID); since the account_ID FK/JoinColumn is located in subclasses of Advertisement, I have to write as many methods as there are subclasses.
    -A corollary of the above reason is that I have to maintain 4 Advertisement DAOs one for each class (one for Advertisement superclass and three for the Advertisement subclasses).

    I have been working with a data model for quite a while. I now believe the model is flawed but I am not sure how to improve it.

    Basically my domain model is a small ads website for parents seeking nannies/childminders and childminders seeking babies to look after.

    The domain model currently has an base Account class that is subclassed by two ParentAccount and ChildminderAccount classes. I also have base Advertisement class that is subclassed by three ChildminderAdvertisement, ParentToParentAdvertisment and ParentToChildminderAdvertisement classes.

    Most of the attributes are common to subclasses and therefore located in the super class.

    To list a few differences between subclasses:
    -A ChildminderAccount may have a Curriculum/Resume attached to it but a ParentAccount may not.
    -A ChildminderAccount is further refined by specifiying whether the Childminder(generic) is a Nanny(specific)/BabySitter(specific)/etc.

    This means that the ChildminderAccount subclass has relationships to other tables that the ParentAccount subclass does not have.

    The inheritance is currently implemented by the JPA layer using the Joined strategy (see JPA documentation: )

    I am facing a number of problems with the current design:
    -I am having problems running operations common to base classes.
    -I often find myself re-implementing methods for subclasses, I have too many DAOs.

    As I said above, I am not sure how to improve the design: whether to forgo inheritance altogether (db level) or whether to go for another inheritance strategy...

    Any clue welcome.
    I am still struggling with my JPA entities.

    Here is what I have tried:

    In my Advertisement entity class:

    Here is what I now get:

    Exception Description: The @JoinColumns on the annotated element [field advertisementToTimeSlotToDayJoinCollection] from the entity class [class com.bignibou.domain.Advertisement] is incomplete. When the source entity class uses a composite primary key, a @JoinColumn must be specified for each join column using the @JoinColumns. Both the name and the referencedColumnName elements must be specified in each such @JoinColumn.

    James Sutherland wrote:Do not use an EmbeddedId use and IdClass.

    Do not map the foreign keys as Basic, just add @Id to the ManyToOnes.

    Hello James,

    Thanks for the reply.

    Should I keep both classes:

    I keep getting the following compilation error:

    - There is no primary key attribute to match the ID class attribute timeslotID

    Here are my entities after I modified according to your advice:
    PK class:

    Thanks a lot for your reply James,

    I am actually realizing that my domain is a bit more complicated that what I described initially.

    My domain is as follows: I have an Advertisement entity engaged in a many to many relationship with a TimeSlot entity with a join entity sitting in between the two entities: AdvertisementToTimeSlotToDayJoin. There is actually a third entity Day which I have omitted.

    The only value that is not know in advance, as far as the constructor of AdvertisementToTimeSlotToDayJoinPK is concerned is the Avertisement PK, wich is autogenerated. How then can I persist my Avertisement together with its related join entities?



    Here are my entities:


    My use case is as follows: I use MySQL and JPA 2 and I have two entities: Order and LineItem that are associated by a OneToMany relationship.

    I would like for the GUI layer to persist the Order together with the LineItems at the same time (using the Order PK).

    Bearing in mind that the PK of Order is auto-generated by MySQL and is part of the PK of LineItem, I don't know how to retrieve the generated Order PK in order to use it for the LineItem PK within the same transaction.

    Is there any special JPA configuration I could use to achieve this?

    Can anyone help please?

    I am new to eclipse RCP. I am trying to integrate eclipse gemini blueprint into an eclipse RCP application.

    Basically I have go three jars:

    How do I create plugins from those three jars? I have tried to create three plugins (create plugin from existing jar archive) from the three jars naming the three plugins as follows:

    But then I am having trouble starting (osgi meaning) the following plugin: org.eclipse.gemini.blueprint.extender as stated in the gemini blueprint documentation. It just does not appear in the plugins tab of the run configuration.

    Can anyone please help?


    Thank you for your reply Yeray.
    I finally went on to use f:param which works well in my case.
    12 years ago

    I am trying to pass two parameters i.e. (nomComposantARejouer, typeFileARejouer) to an action method (gestionnaireMessagesController.rejouerMessage) using the setPropertyActionListener (we use jsf 1.2).

    Here is the relevant jsp code:

    However, I always get a NPE because both parameters are null when used in the action method:

    FYI, the variables and can be displayed without problem and are not null.

    Also ignore the h:columnHeaderFacet tags. They are inhouse tags that I've renamed.

    I am not sure what I am getting wrong. Can anyone please help?

    12 years ago
    I have an application that performs computations through a monte carlo simulation. I use a completion service but my main never exits.
    Can anyone please help?
    Thanks in advance,

    I tried as you advised. Same behaviour as before...

    I don't know if that is relevant but here is how my method is called:

    Please let me know if the fact that my bean is called from a swingworker matters or not.

    13 years ago
    Hi Mark,

    I managed to isolate the problem. I now know it has nothing to do with the java mail api.

    Here is my method:

    I deliberately throw a RuntimeException from the envoyerMail method and it hangs where it is noted //here. I also know that Spring does create the beans properly and advises them propertly according to the @Transactional annotation because it says so in the logs. It is as if my method wouldn't manage to rethow the RuntimeException...
    What could I be getting wrong?
    13 years ago
    Sorry it does time out but the method still hangs indefinitely. Here is what the log says:

    ERROR [18:13:24,990] ( - org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host:, port: 25;
    nested exception is: connect timed out. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host:, port: 25;
    nested exception is: connect timed out; message exceptions (1) are:
    Failed message 1: javax.mail.MessagingException: Could not connect to SMTP host:, port: 25;
    nested exception is: connect timed out

    Why then won't it roll back the transaction??
    13 years ago