Julien Martin

Ranch Hand
+ Follow
since Apr 24, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
8
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Julien Martin

Hi!

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?

    Regards,

    J.
    4 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).

    J.
    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:

    org.eclipse.persistence.exceptions.ValidationException
    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:
    and
    ?

    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?

    Regards,

    Julien.

    Here are my entities:







    Hello,

    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?
    Hello,

    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:
    -gemini-blueprint-core-1.0.0.RELEASE.jar
    -gemini-blueprint-extender-1.0.0.RELEASE.jar
    -gemini-blueprint-io-1.0.0.RELEASE.jar

    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:
    -gemini-blueprint-core
    -gemini-blueprint-extender
    -gemini-blueprint-io

    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?

    Regards,

    Julien.
    Thank you for your reply Yeray.
    I finally went on to use f:param which works well in my case.
    J.
    6 years ago
    JSF
    Hello,

    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?

    Regards,
    6 years ago
    JSF
    Hello,
    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,
    Julien.

    Mark,
    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.

    Regards,
    Julien.
    6 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?
    Julien.
    6 years ago
    Sorry it does time out but the method still hangs indefinitely. Here is what the log says:


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


    Why then won't it roll back the transaction??
    Regards,
    Julien.
    6 years ago