Problem: cannot implement TABLE_PER_CLASS inheritance

Hello, I'm using Jdev 11g, JPA (with EclipseLink 1.1.1) & EJB 3.0. I'm trying to build TABLE_PER_CLASS inheritance.
Here is entities' code:
Parent:@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@NamedQueries( { @NamedQuery(name = "Doc.findDoc",
query = "select o from Doc o where o.docDate between :begDate and :endDate")
public abstract class Doc implements Serializable {
@Id
@Column(name = "ID")
private Long id;
@Column(name = "DOC_NUMBER")
private String docNum;
@Column(name = "DOC_DATE")
@Temporal(TemporalType.TIMESTAMP)
private Date docDate;
public Doc() {
super();
Child:@Entity
@Table(name = "PAY_DOC")
public class PayDoc extends Doc implements Serializable{
@Column(name = "SUM")
private BigDecimal sumOfMoney;
public PayDoc() {
super();
persistence.xml looks like this:<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="context">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>java:/app/jdbc/jdbc/inform_oracam00DS</jta-data-source>
<class>Doc</class>
<class>PayDoc</class>
<properties>
<property name="eclipselink.target-server" value="WebLogic_10"/>
<property name="eclipselink.target-database" value="Oracle10g"/>
<property name="javax.persistence.jtaDataSource"
value="java:/app/jdbc/jdbc/inform_oracam00DS"/>
</properties>
</persistence-unit>
</persistence>
When I'm trying to call method, which calls Doc.findDoc query:
public List<Doc> queryDoc() {
Date begDate = new GregorianCalendar(2007, 10, 1).getTime();
Date endDate = new Date();
return em.createNamedQuery("Doc.findDoc").setParameter("begDate",
begDate,
TemporalType.TIMESTAMP).setParameter("endDate",
endDate,
TemporalType.TIMESTAMP).getResultList();
I get no table found SQL error and JPA is trying to execute query like
SELECT FROM DOC WHERE ...
Looks like EclipseLink sets wrong table name.
P.S. When I added second child, the query was the same and there was no union in it.
Edited by: tag on 26.08.2009 21:27

Hello,
As Anindita mentioned, this query will force reading from all the tables in the inheritance heirarchy, including the DOC table. Since it does not exist, you get the exception. I do not believe that any JPA provider could work in this senario, since the specification requires providers to query on Doc since it is marked as an Entity, even though you have marked it as an abstract class
I believe you might get past this problem if you mark the Doc class as a @MappedSuperClass instead of an entity. This will cause it to be correctly interpreted as not being instantiated, and so will not require a DOC table be defined.
Best Regards,
Chris

Similar Messages

  • Problem in implement blink Effect

    I have experience a problem when implement my blink effect
    The expected result is only the textarea component with value
    "3" should play the effect, but unfortunately the effect will move
    to another target when the data change.

    Feel free to downloasd the trial versions, but you cannot buy a full license after the trial runs out:
    Direct Download Links for Adobe Software
    Mylenium

  • A problem while implementing a file to file senario

    hi all :
         There is some problem while implement a file to file senario. the file couldn't be sent or recieved.
          and as I try to check Check the Sender File Adapter Status  via
         Runtime Workbench -> Component Monitoring -> Communication Channel Monitoring ,
         It is found that Adapter Engine has error status with red light.  Is it why the file couldn't be sent?
        Could you please tell me how to make Adapter Engine  available?
        Thank you very much!!!

    Hi Sony
    Error getting JPR configuration from SLD. Exception: No entity of class SAP_BusinessSystem for EC1.SystemHome.cnbjw3501 found
    No access to get JPR configuration
    Along with what experts suggested
    What is the type of Business system is this. Standalone Java?
    JPR can have problem if you have a business system thats not ABAP/Java type if this system is not having a SAP TS in landscape then create Java type.
    Thanks
    Gaurav

  • I had this problem: "cannot connect to itunes" while trying to download an app so i went to the settings and i kinda messed it up that now i have not apps or itunes icon on my ipad! :( can anyone help me?

    I had this problem: "cannot connect to itunes" while trying to download an app so i went to the settings and i kinda messed it up that now i have not apps or itunes icon on my ipad! can anyone help me?

    First, try a reset: hold down the home button along with the power button until you see the Apple, then let go.

  • Photoshop suddenly does not print to Epson 3880 - PROBLEM: Cannot print from Photoshop  After restart error message appears:  - "There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopen

    PROBLEM: Cannot print from Photoshop
    After restart error message appears:
    — “There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopened any documents.”
    • All print commands are greyed out and unavailable — even to call up the printer commands cannot be done.
    The printer printed fine until about 2 weeks ago when this error message appeared.  Printing continues from Pages, I-photo, preview etc. —  only Photoshop fails.
    The printer has been turned on and off, as have open documents been closed and open etc..   Preferences reset.  Repeatedly I have read through blogs and forums and attempted to contact Adobe — all without results
    Epson support struggled to find reason and several solutions were tried and they assume this is an Adobe problem.
    Running Mac Powerbook X 10.10.2 / Photoshop CS6 13.0.6.x64
    Attempting unsuccessfully to print to Epson 3880
    What Adobe support will be of help.
    Robert Darling —  2/19, 20, 21,22,23/2015

    Probably best to ask in Photoshop General Discussion
    This forum is about the Cloud as a delivery process, not about using individual programs
    If you start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Problem: Cannot send mail unless Password is transmitted insecurely & Port is set to 587.. Can receive mail but can't send..

    Problem: Cannot send mail unless Password is transmitted insecurely & Port is set to 587.. Can receive mail but can't send Code 501..
    Need help with T-bird.. My OS is Win XP-64..Have been using Mozilla for about 10 years with little or no problems.. This happened when I upgraded to 3.17.. Spent hours on T-Bird diagnostics web site.. Called Comcast & talked to a net tech.. he ran some tests on his end & had me log into my Comcast e-mail account & all worked well,, so he concluded the problem was in T-Bird.. He had me change my port to 587 & disable connection security & authentication to none & I was able to send mail.. That was all he could do.. Comcast was working.. the problem is in T-Bird.. Can any one help with this problem.. I don't want to send mail with my password transmitted insecurely..
    Thanks
    Richard

    It was not intended to be "snide". You said two separate things that at face value would be out of the ordinary.
    I considered if it might be a typo for 31.7. Since 31.5 is the current formal release, I would have to thank you for volunteering to test a pre-release beta version. If it was truly 3.1.7 then it would appear that you have chosen, or have become stuck with a somewhat ancient version. In either case it's harder to reach out to you with any meaningful comments or advice. However I do watch various other sites and newsgroups and I don't see a clamour of distressed users, so it seems fair to suppose that this feature isn't actually broken in 31.7.
    And you said XP 64. XP is obsolete and no longer supported and if there is a 64-bit version, then again you have set yourself apart from the mainstream.
    I had a look at the comcast site and found some puzzling recommendations. Some users come here asking how to set up a secured connection in Thunderbird when it isn't offered by the server. Comcast are different, in that they mention the ports 143 and 587, and also 993 and 465. So far so good, in that security is actually on offer, but they also suggest that you enable SSL, regardless of which port is being used. It would be unusual and unconventional to offer TLS or SSL on ports 143 and 587. STARTTLS would be more credible on these ports.
    Have you tried IMAP on 993 and SMTP on 465? SMTP on 587 with SSL, or TLS, is not impossible, but is improbable.

  • Problem in Implementing Filter BADI

    Hi Experts ,
               I have a problem in Implementing Standard BADI  OIJ_NOMIT_VALIDATION , this one is a Filter BADI , with Filter type OIJ_NOMITEM_CHCK . i created a implementation ZOIJ_NOMIT_VALIDATION with filter ZOIJ_NOMIT and write code in method VALIDATE . But this is not triggered. Any additional configuration needed for this ?
    Point will be awarded .
    Thanks and regards
    Renjith MP

    Hi Ranjit,
                  After implementing the Filter BADI.You can define the Filter type <b>attributes</b> section.
    Regards

  • Sync problem, cannot sync apps to iPhone from iTunes. i did it before. but now it just take backup.

    sync problem, cannot sync apps to iPhone from iTunes. i did it before. but now it just take backup. anyone plz help...

    Connect & select iPhone in iTunes Sudebar (iTunes > View > Show Sidebar), in Music tap (right pane top), select Sync Music and the music you want on iPhone then click Apply button (bottom right).
    http://support.apple.com/kb/VI72

  • WARNING: Problem validating implementation class. Exception declaration mis

    I have created sample class using JDevStudio10.1.3
    Added method getX() throws Ex (Ex implements Exception)
    Select class and generated J2EE 1.4 RPC webservices
    Got the warning :
    Generating WSDL and mapping file
    WARNING: Problem validating implementation class. Exception declaration mismatch between Implementation: mypackage.Class3 and Interface: mypackage.MyWebService3. Impl class Method: X declares exceptions not declared by the interface (mypackage.Exp)
    Now When I generated client proxy from the wsdl generated, Ex class is not getting generated.
    Can some one help me please.
    Thanks in advance

    If you are using Ex in the implemetation class, make sure that you also include the same in the interface (or SEI).
    If the implementation looks something like:
    public void doSomething() throws Ex {
    System.out.println("Is there something to do, now ?");
    then the SEI should be:
    public void doSomething() throws Ex, RemoteException;
    If your have ommited Ex, then you will have the warning you are seing, and there wont be any artifact generated for Ex in the WSDL.
    Because the Ex exception was not mapped to any WSDL artifact, there is no way you will see the Ex exception generated on the client side (or proxy).
    I have been able to reproduce your error message, so you should be all good.
    WARNING: Problem validating implementation class. Exception declaration mismatch between Implementation: bugyyy.MyServiceImpl and Interface: bugyyy.MyWebService. Impl class Method: doSomething declares exceptions not declared by the interface (bugyyy.Ex)
    Hope this helps,
    Eric

  • Problems during implementation........

    Can anyone please send me some problems faced during implementation at the five stages interacting with the client?Please send me to my mail [email protected]

    The major problem during implementation is gaps in AS-IS Study. If we do not study the peocess to the minute bit, then we tend to miss out critical requirement & this is realized during testing. Then the redo takes a longer time, compared to doing it correct initially. Ofcourse, Things will not be correct in first attempt, but if the number of things to redo is leasser, it becomes more convienent, as during testing phase, we are already overloaded with many activities to be taken care of.
    We should be very clear what is not possible in SAP or even if possible with development, but the particular development is not in scope of project, we require to say a clear NO to it.
    It is difficult to pin point the problems. If I share one of my experience, one of my project was fot service industry & the basic scenarios were periodic billing, mile stone billing & resource related billing & all three I had no prior experience. I had clue of Milestone & Periodic, but no clue of resouce related billing. I had to stuggle hard to get the scenario configured & configuring to the requirement of client. But finally I could do it successfully.
    Regards,
    Rajesh Banka
    Reward suitable points.

  • Studio Creator 2 environment problem - cannot find symbol

    This may be a classic newbie question, but I've been looking for an answer without success for three days now. Hopefully, someone that is familiar with configuring Sudio Creator 2 Update 1 environment can help me fix this.
    Problem: Cannot build a simple program within the SC2 IDE. Always get a "cannot find symbol" error related to System.out.printf(...).
    Details:
    I have a simple program, as follows:
    import java.io.* ;
    public class test {
        /** Creates a new instance of test */
        public test() {
        public static void main(String[] args) {
            // TODO code application logic here
            String result="Success!";
            System.out.print("system.out.print") ;
            System.out.printf( "Product is %s \n", result );
    }I can successfully compile this program from the command line using javac test.java and then execute java test (inside the same directory). The build and execution work flawlessly! Therefore, I assume the code is right.
    However, every time I try to build this program, I get one error
    init:
    deps-clean:
    Deleting directory C:\Projects\test\build
    clean:
    init:
    deps-jar:
    Created dir: C:\Projects\test\build\classes
    Compiling 1 source file to C:\Projects\test\build\classes
    C:\Projects\test\src\test.java:14: cannot find symbol
    symbol  : method printf(java.lang.String,java.lang.String)
    location: class java.io.PrintStream
            System.out.printf( "Product is %s \n", result );
    1 error
    BUILD FAILED (total time: 1 second)Here are two system vars that are probably most relevant (taken from WinXP, not from within the IDE).
    PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\program files\Sun\Creator2_1\java\bin;C:\Program Files\Java\jre1.6.0_03\bin;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\MySQL\MySQL Server 5.0\bin
    CLASSPATH = .;C:\Program Files\Java\jre1.6.0_03\lib;
    I haven't figured out where the internal environemt vars are in the SJSC2 IDE.
    I have tried uninstalling and reinstalling several times, and on a couple different computers, but I get exactly the same problem and results.
    Can someone please help me figure this out before I pull what's left of my hair out? ;-)
    Thanks!

    It looks like it's going to be a BUG in JSC2_Update1.
    I traded emails with Sun support today. They were able to duplicate the problem and are opening a bug report. Doesn't always mean that it really is a bug, but at least they're on it. ;-)
    In the meantime, the Sun rep suggested the folliwing:
    "Also, I suggest trying the NetBeans6.0 IDE. It offers the Creator
    features as Visual Web in NetBeans6.0. See the information :
    http://developers.sun.com/jscreator/index.jsp
    It also has links to migration guide."
    It's still open.

  • Cannot play  videos, says it needs flash player         problem, cannot install it

    cannot play videos  it says i need flash player  only one problem  cannot  install it have tried several times  even when it says install successful it still does not work my you tube videos work fine just my yahoo ones    thanks for your help   guys

    http://forums.adobe.com/thread/1195540

  • The type must implement the inherited abstract method???

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.ActiveEvent;
    import java.applet.*;
    public class MoveIt extends Applet implements ActionListener
         private Image cup;
         private Panel keyPad;
         public int yaxis = 15;
         public int xaxis = 15;
         private Button keysArray[];
         public void init()
              cup = getImage(getDocumentBase(), "cup.gif");
              Canvas myCanvas = new Canvas();
              setBackground(Color.blue);
              setLayout(new BorderLayout());
              Button up = new Button("Up");
              Button down = new Button("Down");
              Button right = new Button("Right");
              Button left = new Button("Left");
              Button center = new Button("Center");
              add(myCanvas, BorderLayout.NORTH);
              add(keyPad, BorderLayout.SOUTH);
              keyPad.add(up, BorderLayout.NORTH);
              up.addActionListener(this);
              keyPad.add(down, BorderLayout.SOUTH);
              down.addActionListener(this);
              keyPad.add(right, BorderLayout.EAST);
              right.addActionListener(this);
              keyPad.add(left, BorderLayout.WEST);
              left.addActionListener(this);
              keyPad.add(center, BorderLayout.CENTER);
              center.addActionListener(this);
         public void paint( Graphics g )
              g.drawImage( cup, xaxis, yaxis, this );
         public void ActionPerformed(ActionEvent e)
              String action = e.getActionCommand();
              if(action.equals("Up"))
                   yaxis = yaxis - 15;
              if(action.equals("Down"))
                   yaxis = yaxis + 15;
              if(action.equals("Left"))
                   xaxis = xaxis - 15;
              if(action.equals("Right"))
                   xaxis = xaxis + 15;
              if(action.equals("Center"))
                   xaxis = 125;
                   yaxis = 60;
    }How come there is an error:
    The type MoveIt must implement the inherited abstract method
    ActionListener.actionPerformed(ActionEvent)
    What the hell does that mean?

    A class that implements an interface must define the methods of the interface. Your applet (or the one you borrowed) states at the top that it implements the ActionListener interface. If you go to the API, you'll see that this interface declares a method "actionPerformed", and so this class must have a method that matches the one in the interface. I see that your applet will have some Buttons. You'll need an actionPerformed method if you want the buttons to use your class (this) as their action listener.
    Edit: I see that you already have an "ActionPerformed" method, but note that case matters, and this is not the same as "actionPerformed". Change one letter and you're on your way.
    Edited by: Encephalopathic on Jan 15, 2008 8:44 PM

  • Problem while implementing OSS note(1157904)

    HI,
    I am facing a problem while implementing  OSS note 1157904.I am getting a message  "no valid correction instruction".
    I checked support pack levels .I checked source code also, it is not implemented.
    Regards,
    Pratap.

    You need to get back to SAP. Sometimes notes have incorrect information in them.

  • My problem, cannot update application, how i want to change the store.

    my problem, cannot update application, how i want to change the store.

    Hello there muhamadamirul,
    To change the region your Apple ID is using use these instructions.
    Change your iTunes Store country
    Sign in to the account for the iTunes Store region you'd like to use. Tap Settings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region.
    Follow the onscreen process to change your region, agree to the terms and conditions for the region if necessary, and then change your billing information.
    From: iOS: Changing the signed-in iTunes Store Apple ID account
              http://support.apple.com/kb/ht1311
    Regards,
    Sterling

Maybe you are looking for

  • Export of PDF errors after the PDF generates on the server (File I/O error)

    We have Crystal 9 reports engine, developed with VS2003, which is being called from a VS2008 web app on a 32-bit server. The reports have been working okay, unless the file is of size > 600K. Then, right after the PDF is created in the C:\Windows\Tem

  • Satellite T110-10N - How to recalibrate my battery?

    Hi I have a Satellite T110-10N. The battery does not load 100% only on 50%. I like to know how recalibrate it.

  • Photos in ps touch

    Why does PS touch show my screen shots of nexus7 from gallery but not the pics from other albums in the gallery?  My photos do not show up in PS touch. Thanks...sfopilot

  • Ear Classpath problem

    I have an ear file that contains staiAppln.ear -> stai.war -> staiEJB.jar -> application.xml (defining stai.war as web module & staiEJB as EJB module) -> manifest.mf (empty except for version number) staiEJB.jar contains the various classes and EJBs

  • IPv6 dhcp

    I am testing IPv6 DHCP server in test lab with 3750 switch. Following is the details of the setup. Windows server 2008 r2 is configured as DHCP server. 3750 switch with ios 12.2(55)SE5 is used to connect DHCP server and client. DHCP server and client