Problems with cursor and shortcuts when using JNLP services on MAC OS X

After invoking the JNLP services on a MAC I loose the ability to set the cursor and invoke keyboard shortcuts. On Windows this is not a problem, so I believe it is a bug and I have reported it to Apple. Meanwhile, I would appreciate if someone could help me with finding a work-around. To identify the problem run the following code with Java Web Start (i.e., you need to add the program to a jar and launch it using a JNLP script). You also need to include the javax.jnlp package.
Observe that the cursor changes to cross-hairs when entering the circle. After invoking the Open file menu item, the cursor does not change any longer. Shortcut key do not work either, but if you open the menu and close it again without selecting any of the menu items, the shortcuts are OK again.
package bugreport;
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import javax.swing.*;
import javax.jnlp.*;
public class Demo2 extends JPanel implements Runnable, MouseMotionListener {
    private int centerX = 100;
    private int centerY = 100;
    private int radius = 50;
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Demo2());
    public void run() {
        int menuMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
        final JFrame frame = new JFrame("Bug Demo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setPreferredSize(new Dimension(200, 200));
        addMouseMotionListener(this);
        JMenuBar menuBar = new JMenuBar();
        frame.setJMenuBar(menuBar);
        //File menu
        JMenu fileMenu = new JMenu("File");
        fileMenu.setMnemonic('F');
        menuBar.add(fileMenu);
        //openMenuItem
        JMenuItem openMenuItem = new JMenuItem("Open...");
        openMenuItem.setMnemonic('O');
        openMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, menuMask));
        openMenuItem.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                openFile();
        fileMenu.add(openMenuItem);
        frame.add(this);
        frame.pack();
        frame.setResizable(false);
        frame.setVisible(true);
    @Override
    public void paintComponent(Graphics g) {
        g.clearRect(0, 0, getWidth(), getHeight());
        g.setColor(Color.BLUE);
        g.fillOval(centerX - radius, centerY - radius, 2 * radius, 2 * radius);
    public void mouseDragged(MouseEvent e) {
    public void mouseMoved(MouseEvent e) {
        int dx = e.getX() - centerX;
        int dy = e.getY() - centerY;
        if (dx * dx + dy * dy < radius * radius) {
            setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
        } else {
            setCursor(Cursor.getDefaultCursor());
    private void openFile() {
        FileOpenService fos = null;
        try {
            fos = (FileOpenService) ServiceManager.lookup("javax.jnlp.FileOpenService");
        } catch (UnavailableServiceException ex) {
            JOptionPane.showMessageDialog(this, "Service unavailable", "Open", JOptionPane.ERROR_MESSAGE);
        if (fos != null) {
            try {
                FileContents fc = fos.openFileDialog(null, null);
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Service unavailable", "Open", JOptionPane.ERROR_MESSAGE);
}Edited by: James_Vagabond on Oct 29, 2009 9:35 AM

Barbara, Thanks very much taking the time to respond to my posting. Your input and directions were just what I needed.I accessed the print settings in the pull down menu, setup the print options including the color profile for Elements and the Printer to sRGB, and printed my picture. This resolved all the invalid color problems I was having, but I did notice that there was a hint of magenta overall in the picture. I had read an article that said to use Canon Color Matching instead of Color Sync to prevent that but I couldn't make that change in the pull down menu. I tried in the Presets dialog box but that didn't appear to be possible. Should I make that change as well?
Also, in my travels through Elements 13 I notice under Edit->Color Settings that there were options for No Color Mgmt, Optimize for Screen, for Printing, or ability to chose one or the other (real time I assume). How do those options fit into this scenario?
Thanks again

Similar Messages

  • [SOLVED] Problems with systemd's journal when using syslog() in C

    Hi,
    I have a problem with journalctl and syslog output within a C program:
    When I use journalctl in follow mode:
      $ journalctl -f
    and I run the folowing program in another terminal
    #include <stdio.h>
    #include <syslog.h>
    int main()
    FILE *pf;
    int i;
    /* logging made in file /var/log/syslog */
    openlog("martins",LOG_CONS,LOG_USER);
    pf = fopen("not_here","r");
    if (!pf)
    syslog(LOG_ERR | LOG_USER,"oops -- %m\n");
    return 0;
    no syslog error message appears in the journal.
    But, when I modify the programm by adding a 'sleep(1);' right before 'return 0;'
    there is a correct error message shown in the journal.
    Is this a bug in systemd? Or do I understand something wrong with systemd's journal?
    I'm actually running
    linux-3.10-12-1-lts
    systemd 207
    with a 32Bit installation
    Thanks for any hints,
    Martin
    Last edited by thesofty (2013-10-01 19:10:13)

    Now, I understand what's going on:
    1) There is an known issue about a race condition in journald when the logging process exits. In this case the message isn't assigned to the user whose process generated the message.
    2) Apparently the group of the journal files have been changed from 'adm' to 'systemd-journal' in Arch Linux around April 2013.
    But still I only have been member of 'adm' as described in the journal tutorial on http://0pointer.de/blog/projects/journalctl.html. So I  can only see syslog messages, which are correctly assigned to my own user account. The messages with the race condition, as mentioned above, have been invisible to me.
    After joining to the new right group again:
      $ sudo usermod -d G  martin systemd-journal
    I also see the syslog messaes just before exiting the process again :-).

  • Problem with variables in formulas when using CrystalReportViewer

    Post Author: Aksu
    CA Forum: Formula
    Hi! I have a problem with variables in Crystal Reports formulas, when using CrystalDecisions.Windows.Forms.CrystalReportViewer class from VS2005-project. ReportViewer always gives error:*************Crystal Report Windows Forms ViewerThis field name is not known.Details: errorKindError in File C:\{dir&#93;}\{file}.rpt:Error in formula <mCustomerAttributes>.'Dim result As String'This field name is not known.Details: errorKind ************* Report without variables works fine with Viewer and in Crystal Reports Designer report with variables works also fine. I have tried with both "formula-syntaxes" - basic and crystal. But Viewer always gives error when trying to define new variable.I think the problem might be with CR -versions, because VS-project has formerly been designed to VS2003 and CR9 or 10. Now I'm using VS2005 and CR11. Though I have changed all references to new CrystalDecisions-asseblies (Ver.11.0.3300.0), when I debug the project and checkout the Viewers ReportSources FormatEngine Shows version CR9_2.... I have no idea where it gets this version...***************DEBUG-view when Viewer is created *******************CrystalReportViewer    |_        ReportSourceClassFactoryName ... , Version=11.0.3300.0 , ...    |_            ReportSource            |_                FormatEngine    {CrystalDecisions.CrystalReports.Engine.FormatEngine}                        |_                        ClientVersionHeader    {CrystalDecisions.Shared.ReportServiceVersionHeader}                            |_                            |    version = 920     (int)                            |_                                Static members                                            |_                                        VER_CR9    = 920    (int)**************************************** Could anyone have any answers or tips for this problem? I'd really appreciate it... ---Aksu

    Has anyone been able to answer this question?
    I am having the same problem:
    I am designing a report in Crystal Reports XI Developer that contains parameters, which are passed to a stored procedure and are also used within formulas ( in Crystal Syntax ie. {?FORMAT_ID} ) in the report itself.
    I can run the report successfully in CRXI Developer.  The formulas use the correct values from the parameters entered during execution and everything looks good.
    I then deploy the report to Business Objects Enterprise XI.  I do all of the things necessary to manage the report including setting up the proper database connection information and default parameter values.
    When I run the report using the Crystal Report Viewer, I get the following error message:
    Error in File Forecasting.rpt:
    Error in formula <Report Format>.
    'if (not isNull({?FORMAT_ID} ) ) then
    This field name is not known.
    Details: errorKind
    This happens when I press the "Preview" button in the Manage Object dialog from Crystal or when I run the report using InfoView.
    I have changed the formulas and it doesn't seem to matter what the specific content of the formula is; other than the existence of a parameter reference in the formula.  If I comment out the parameter and replace it with a hard-coded value, it gets through the formula fine.
    Does Business Objects Enterprise XI support crystal reports with parameter references in the formulas?
    Thanks,
    Tim H.
    Edited by: Tim Haley on Nov 25, 2008 11:11 PM
    Edited by: Tim Haley on Nov 25, 2008 11:12 PM

  • Problems with a Business Object when using data RAW.

    Hi,
      I've created a Z bapi with parameter tables as
        FILE_BIN like SDOKCNTBIN
    The structure SDOKCNTBIN has one RAW field.
    When I go to SWO1 and implement a new Bapi, the following error occurs:
    "Field SDOKCNTBIN -LINE is too large to be included in container"
    Does anyone knows why when I declare an structure with a field RAW, gives that error?
    Thanks in advance!

    Does this occur when using Immediate Mode?
    Here's a blurb from my ADF Toy Store paper about Batch Mode and immediate mode.
    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adftoystore/readme.html#batchmode

  • Problem with logic:equal tag when used with bean:write

    Hi All,
    I have a problem with logic:equal.When i tried to use the following piece of code its not working
    <logic:equal name="var in session" value="<bean:write name='var in request'/>">
    Do some thing
    </logic:equal>
    its not working i know we cant use nested tags
    is thr any alternative instead of using a scriplet

    A scriptlet expression is about all you can do.
    <bean:define id="tempVar" name="var in request"/>
    <logic:equal name="var in session" value="<%= tempVar %>">
    ...If you have a JSP2.0 container with EL enabled, then you could use an EL expression instead of the standard <%= expr %>

  • Having problems with audio and video when exporting to quicktime

    I've exported a couple of keynote presentations to Quicktime and uploaded to youtube with no problems. I've now added a motion background in my intro, which looks great in keynote, but, it would appear that it causes problems. The mov file does play the animation, but, not as it was recorded, the audio then becomes out of sync and the advance on slides is all over the place with some not appearing. Is this a common problem? I am exporting at best quality and 1280 x 720, leaving all other settings as preset. I suspect that if I drop the background altogether it will work, but, it looks so great in keynote that'd be a shame. Any tips?

    I'm confused with the aspect ratio when I crop them i know I have to lock the aspect but should I keep it on Original? Also i'm wondering when it comes to export them what size should I be placing if I want to print all sizes.
    The crop aspect lock only comes into play while you are actively resizing the crop boundary. LR always works in a freehand manner, except that if the ratio is locked, adjusting the crop frame is allowed to alter its size and location and angle - but not its shape. If the ratio is not locked, you will be changing the crop shape freely if/when you drag the corner or edge handles around. The rest of the time, the lock makes no difference; and it is just as possible BTW to lock a random freehand aspect ratio, as it is to lock one of the standard preset ones.
    If you are uploading an exported copy for printing, you could simply upload a JPG made at the original resolution (as cropped for composition and angle) - that is, unchecking the whole resizing section of the Export dialog - and give the printer instructions as to how large the various prints are to be. Or I suppose, you could resize to the largest of the sizes that you require, but you will then need to negotiate a pixels-per-inch "resolution" setting that will be appropriate - since, when resizing to a page size, this figure governs the pixel content of the file produced.
    I would suggest that in the case of an export without resizing, where a generous quantity of pixels are included for the sorts of page sizes mentioned, you will likely not see any discernible printed benefit from setting the highest JPG quality setting for your export, but will be fine with around quality 6 to 8 - which brings the file sizes down significantly. Most often, printing services will presume that you have selected sRGB colourspace for your export, unless something different has been pre-agreed.

  • Problem with spaces in filenames when using ODI tools

    Hi everyone,
    has anyone of you ever encountered the following behaviour:
    When using any ODI tool related to file manipulation the tool does not work if the file parameter value contains a blank/space. Example:
    OdiFileDelete "-DIR=c:temp" "-FILE=Test this.txt" "-RECURSE=NO" "-CASESENS=NO" "-NOFILE_ERROR=YES"
    In this case an error will occur saying the file does not exist although it exists in the directory.
    Has anyone a workaround for this?
    Thanks in advance,
    Hauke

    Hi Madha,
    thanks for the prompt answer.
    We decided to rename the files to make the tools work. Definitely not always applicable but in our case it's possible. Any hint why the behaviour is designed like this?
    Regards,
    Hauke

  • Problem with Itunes and Remote when external DAC is used

    I am using IPad Remote app to connect to itunes library paired a windows vista Toshiba Laptop.
    When  the pc speaks are used or the iPad for audio reproduction, everything works OK, and iPad Remote can connect to iTunes Library.
    Unfortunately when the optical audio output of the PC is used for audio reproduction through an external DAC, amplifier and speakers, iPad cannot connect to iTunes library!
    Thanks in advance.

    Perhaps Tom could assist.

  • Problems with some web parts when using XSLT

    I have a page on which I have several web parts. Some web parts are custom while others are OOB and only XSLT is applied on them.  
    I am using 2 WFEs with NLB. Problem is when I do iisreset on one of the WFE then the OOB web parts with XSLT start giving error. You know the standard error "corelation ID....bla bla bla". Anyway the error automatically goes away after a 2, 3 minutes.
    So basically if I do iisreset or stop the iis, and then load that page, then all custom web parts load fine except those OOB web parts with XSLT. And then they too start working fine after 2, 3 minutes if I reload page.  
    What could be the reason for that? Looks like some service on which XSLT depends take time to load!? And once that service is loaded then they start working fine?  Or it could be due to distributed cache or something!?

    Hi  Frank,
    Which version of the SharePoint 2010 did you use?
    In June 2011 CU code was added to the DataFormWebPart (which is used to display list data) that if an XSLT transform took longer than 5 seconds, a StackOverflowException was thrown. This was done to avoid
    a potential Denial Of Service attack on SharePoint if crafted XML could be sent that would continually clog up the XSLT, thereby stopping pages from rendering.
    In August 2011 CU the transform "timeout" was reduced from 5 seconds to 1.
    So, any list with XSLT that takes longer than 1 second to parse in an XSLT transform goes *boom*.
    After you perform an IIS reset , the cache of the page was cleared and you encountered the error. Once the page is cached, there is no error.
    You can try to set up XSLT Timeout with the following PS commands:
    $farm = Get-SPFarm
    $farm.XsltTransformTimeOut = 5
    $farm.Update()
    Reference:
    http://social.msdn.microsoft.com/Forums/sharepoint/de-DE/44cfd798-be7a-4436-8786-bd44049e7def/sp2010-column-filter-causing-unable-to-display-web-part-error-and-a-stack-overflow-exception?forum=sharepointgeneralprevious
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Problems with JBO errors displaying when using custom insert VO methods

    Hi!
    I have a problem I hope I can explain :).
    I have a VO that has custom execute and insert methods implemented in application module.
      public void executeWithParamsMyViewG(String asID)
        // find the view
        MyViewImpl loMyViewImpl =
          getMyViewG();
        loMyViewImpl.setNamedWhereClauseParam("IDParm", asID);
        // execute the querry
        loMyViewImpl.executeQuery();
      public void insertRow(String asID)
        MyViewImpl loMyViewImpl =
          getMyViewG();
        // create new row
        Row loRow = loMyViewImpl.createRow();
        // set fields in new row
        loRow.setAttribute("ID", asID);
        loRow.setAttribute("MyAttribute", "A");
        loRow.setAttribute("MyAttribute2",
                           afContext.getProcessScope().get("MyParm"));
        // insert new row
        loMyViewImpl.insertRow(loRow);
      }I have custom error handler with
        public void reportException(DCBindingContainer bc, Exception ex) {
           //Force JboException's reported to the binding layer to avoid
           //printing out the JBO-XXXXX product prefix and code.
          disableAppendCodes(ex);
          super.reportException(bc, ex);
        private void disableAppendCodes(Exception ex) {
          if (ex instanceof JboException) {
            JboException jboEx = (JboException) ex;
           jboEx.setAppendCodes(false);
            Object[] detailExceptions = jboEx.getDetails();
            if ((detailExceptions != null) && (detailExceptions.length > 0)) {
              for (int z = 0, numEx = detailExceptions.length; z < numEx; z++) {
                disableAppendCodes((Exception) detailExceptions[z]);
        }I also have custom phase listener and page lifecycle but without any 'important' methods overridden.
    Than I have a jspx with af:processChoiceBar for navigation, Create button binded to insertRow method, commit and rollback buttons and form with input fields. One of them is required, but with validation on server side, not on client side (showRequired instead of required).
    My problem is this:
    If I add an empty row, leave all the fields blank and try to commit I get required field message, which is OK. But if I use af:processChoiceBar (previous page, next page, select any of the pages), the message is not displayed. The message is displayed after when I try to return to this page. If I debug the exception in reportException method has the code 27024 for DeferredRowValidationException, not the required attribute error which is displayed.
    Can anyone help me with this please, I've wasted a lot of time on this now.
    Regards!
    BB

    Hi,
    Does anyone know why this would not be working. It's really irritating!

  • Problem with checkbox in JTable when using MyTableModel

    Hi all,
    I have been trawling these message boards for days looking for the answer to my question but have not had any success.
    I am extending AbstractTabel model to create MyTableModel which returns a vector containing the results of a MySql query. One column in this query returns a "0" or "1" which I then store as the boolean value into the vector so that it is rendered as a checkbox on the screen.
    I have also overridden the setValueAt method. THe problem is that when I attempt to check the box in the table, the checkbox isn't actually checking.
    Do I need to implement some sort of listener which picks up the user clicking the box and refresh the model?
    Here is my model code:
    public class MyTableModel extends AbstractTableModel {
        private Vector v = null;
        int listId;
        MyTableModel(int listId){
            this.listId = listId;
            v = new ListItemManagement().getFullList(listId);
       public Class getColumnClass(int c) {
            switch(c) {
                case 6:
                    return Boolean.class;
                default:
                    return Object.class;
        public String getColumnName(int colIndex){
            return ((String[])v.get(0))[colIndex];
        public int getColumnCount() {
            return ((String[])v.get(0)).length;
        public int getRowCount() {
            return (v.size() - 1);
        public Object getValueAt(int rowIndex, int colIndex) {
            return ((Object[])v.get(rowIndex + 1))[colIndex];
        public void setValueAt(Object aValue, int rowIndex, int colIndex) {
            System.out.println("Value: " + String.valueOf(aValue));
            Object row[] = (Object[]) v.elementAt(rowIndex);
            if(colIndex<6){
                row[colIndex] = (String)aValue;
            else{
                row[colIndex] = (Boolean)aValue;
            v.setElementAt(row, rowIndex);
            fireTableCellUpdated(rowIndex, colIndex);
        public boolean isCellEditable(int row, int col) {
            //Note that the data/cell address is constant,
            //no matter where the cell appears onscreen.
            return ! (col < 6);
        }Here is the getFullList function which returns the vector:
                rs = stmt.executeQuery();
                ResultSetMetaData colData = rs.getMetaData();
                int columnCount = colData.getColumnCount();
                String[] columnNames = new String[columnCount];
                for (int i = 0; i < columnCount; i++){
                    columnNames[i] = colData.getColumnName(i + 1);
                Vector v = new Vector();
                v.add(columnNames);
                while (rs.next()){
                    Object[] values = new Object[columnCount];
                    for (int i = 0; i < (columnCount-1); i++){
                        values[i] = rs.getString(i + 1);
                    int sel = rs.getInt("selected");
                    System.out.println(sel);;
                    if(sel==0){
                        values[columnCount-1]=new Boolean(false);
                    else if (sel==1)
                        values[columnCount-1]=new Boolean(true);
                    v.add(values);
                rs.close();
                stmt.close();
                return v;

    Thanks for the replies, much appreciated.
    I've looked at the Swing jtable tutorial and added a TableModelListener and have managed to achieve the desired results but for one thing.
    When I attempt to check the box on the first row of the jTable I get a runtime error:
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayStoreException: java.lang.Boolean
    at project.MyTableModel.setValueAt(MyTableModel.java:65)
    I have been playing around with the setValueAt method and it is in my original post. Here is how it currently looks:
        public void setValueAt(Object aValue, int rowIndex, int colIndex) {
            System.out.println("Value: " + String.valueOf(aValue));
            Object row[] = (Object[]) v.elementAt(rowIndex);
            if(colIndex<6){
                row[colIndex] = (String)aValue;
            else{
                    if(getValueAt(rowIndex,colIndex).toString()=="true"){
                    row[6] = new Boolean(false);
                else{
                    row[6] = new Boolean(true);
            v.setElementAt(row, rowIndex);
            fireTableCellUpdated(rowIndex, colIndex);
        }

  • Problems with new MacBook Pro when using Front Row

    I posted this in the MacBook Pro forum, but someone suggested I post it here, so here goes...
    I just picked up a new 15" MacBook Pro 2.4 last night. I was very excited, as I've wanted one for a while now, but when I tried to watch a dvd in Front Row a few strange things happened that I've never seen anyone post about on this board.
    First, when I selected play from the DVD's menu, Front Row quit. I launched it again and everything seemed fine as the dvd was now playing, but then I noticed that the backlit keyboard would light up and turn off every minute or two. This went on for the whole time I was watching the disc... about a couple of hours... the keys would light up then they'd be unlit and then light up again.
    Finally, while I was watching the dvd the screen went blank... there was still audio, but no picture to go along with it. After I touched the trackpad the video came back. This happened a couple of times.
    I don't think it should matter, but I'll also mention that I was using the MacBook Pro on battery while all this happened.
    So, has anyone else experienced these issues? I tried looking through all the posted topics, but couldn't find anything related to my experience with Front Row. I'm debating on whether I should exchange my MacBook Pro as I may just have a lemon.
    If anyone has any advice/tips I'd greatly appreciate it. Thanks!

    I would be curious to know if the same kinds of things happen when you are using the AC power? It's possible that the ambient light was just at the point where the keyboard backlight would turn on and different parts of the movie would make it just light or just dark enough to turn the backlight on or off...
    -Doug

  • OS X 10.8  Problems with images and layout when printing to PDF from any web browser

    Hi there,  I just bought a new macbook air and running OS X 10.8.  This problem happens in both Safari or Chrome:  When I go to print to a PDF file, the website suddenly drops most images and formatting, ending up in a very old-fashioned layout.  Is this something new with OS X 10.8, or any other suggestions as to what I can do?
    BEFORE:
    WHILE PRINTING:

    NewOSX10.8 User wrote:
    No difference.  I have discovered that it is probably the websit (weird) that is mainly at fault, as I tried the same thing on 2 other machines and the same thing happens to a varying degree on this website, and a lesser degree on other sites.  Thanks for your help, it may not be OS X 10.8 at the root of the problem.
    Yes if it prints to a printer in the same manner, and it occurs regardless of browser it is the website.

  • Problems with parity and flow control using visa serial

    I am trying to create a basic user interface with the options that my
    company uses most often for a force indicator.  You can configure
    the indicator over serial, as well as read the values off the
    indicator.  I am trying to create the user interface so that using
    producer/consumer loops with events, once you change a value, it will
    write that new value to the serial port, ie the device. 
    The problem I am having is transfering the parity and flow control
    values for the serial config to the Basic read write VI.  The
    problem is that once the consumer loop executes, it will write the
    values correctly to the VI, but then the outer loop executes 200 ms
    later and clears the values.  I know that this is normal behavior
    and that in order to keep the values stored, normally you would use a
    shift register.  I tried to use this and had some issues with
    correct data types/array mis-mtaches, ets, so I created an indicator
    and had a local vaible read the indicator, which seems to be working
    for the stop bits, read bits, baud rate, etc, but not the parity anf
    flow control.  I always get "blank" outputs for theses values (if
    you enable the digital display you can see that they are outputing the
    value 0 which correspondes to None in both cases, which is
    correct).  Even though it appears that it is outputting the
    correct value, I get an error that says the VISA property is
    invalid.  I initally did a search and found that my stop bit
    control was wrong (outputting double instead of integer), but I could
    not find anything on the parity/flow control issue.  I even tried
    to copy the serial config controls from the basic serial read/write to
    my dialog box and that did not work either.
    I would be grateful for any suggestions.
    Thanks
    Kenny
    Kenny
    Attachments:
    BGI_main pandc.zip ‏232 KB

    I should add that I am using LV 8.0 and that the serial config
    indicator in the consumer loop will be off the frontpanel in the final
    VI so that it is not visible to the user.
    Kenny

  • Problem of cycle and stackoverflow when using JPA @OneToMany mapping Tag

    Hello everyone!
    Description:
    We are using the tag @OneToMany to map a collection of objects in an entity. In the other side, we use the tag @ManyToOne to map the father.
    Our simple example for testing consist of the following entities:
    This is the class Child:
    @Entity
    @Table(name="TEST_CHILD")
    public class Child implements Serializable{
    @Id
    @Column(name="ID_CHILD")
    private Long id;
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_FATHER", referencedColumnName="ID_FATHER")
    private Father father;
    and this is the Father class:
    @Entity
    @Table(name="TEST_FATHER")
    public class Father implements Serializable{
    @Id
    @Column(name="ID_FATHER")
    private Long id;
    @OneToMany(mappedBy="father", fetch=FetchType.EAGER)
    private List<Child> children;
    Problem:
    When a select over this entities is realized, we are getting the folling exception:
    The following Error is thrown by the VM [java.lang.StackOverflowError]. ErrorQueueHandler will just trace it. The caller component should take care to process it properly.
    java.lang.StackOverflowError
    at java.lang.Class.searchMethods(Class.java:2646)
    We've already used @OneToMany and @ManyToOne mapping in many other projects, and we've tried different parameters on the tags as well, but we still getting the exception. If applying fetch mode Lazy to the @OneToMany we had an detatched exception, cause ou the context. Anyways, we need and would like to use the EAGER loading mode.
    So what seems to happen is that the application runs into a cycle when loading the "father" attribute of Child, recreating the list collection within it.
    This same configuration works just fine in other implementations (i.e.: Hibernate JPA implementation), and many other examples over the web are not different of our implementation.
    Any suggestion of how we could solve this problem? Is this a standart behavior of mapping using Sap JPA?
    Evandro Pomatti
    Edited by: Evandro Pomatti on Dec 9, 2010 9:55 PM

    hi evandro,
    now I got same kind of error, how did you fix, pls help if you have remembered,
    hi all,
    I am getting folowing error in my JAVA portal system when executing webservices in WSnavigator.
    if anyone would have been faced this kind of error pls help me.
    The following Error is thrown by the VM [java.lang.StackOverflowError]. ErrorQueueHandler will just trace it. The caller component should take care to process i
    t properly.
    completere error log
    #2.#2014 04 27 23:52:42:197#0-500#Warning#com.sap.engine.core.thread.impl3.ErrorQueueHandler#
    com.sap.ASJ.krn_thd.000025#BC-JAS-COR#kernel.sda#C0000AF060EF002D000001A901AA0076###com.sap.engine.core.thread.impl3.ErrorQueueHandler#Guest#0##9586B2DBCCBD11E3
    A75E0000033325C2#9586b2dbccbd11e3a75e0000033325c2#9586b2dbccbd11e3a75e0000033325c2#0#Thread[ErrorQueueWatchDog,5,main]#Plain##
    The following Error is thrown by the VM [java.lang.StackOverflowError]. ErrorQueueHandler will just trace it. The caller component should take care to process i
    t properly.
    java.lang.StackOverflowError
            at java.security.AccessController.doPrivileged(Native Method)
            at java.io.FilePermission.init(FilePermission.java:183)
            at java.io.FilePermission.<init>(FilePermission.java:249)
            at sun.net.www.protocol.file.FileURLConnection.getPermission(FileURLConnection.java:198)
            at sun.security.provider.PolicyFile.canonicalizeCodebase(PolicyFile.java:1784)
            at sun.security.provider.PolicyFile.access$700(PolicyFile.java:264)
            at sun.security.provider.PolicyFile$7.run(PolicyFile.java:1247)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1243)
            at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1190)
            at com.sap.engine.services.security.jacc.provider.PolicyImpl.implies(PolicyImpl.java:71)
            at com.sap.security.core.UmePolicy.implies(UmePolicy.java:696)
            at com.sap.security.core.role.jacc.JACCPolicy.implies(JACCPolicy.java:367)
            at java.security.ProtectionDomain.implies(ProtectionDomain.java:222)
            at java.security.AccessControlContext.checkPermission(AccessControlContext.java:354)
            at java.security.AccessController.checkPermission(AccessController.java:549)
            at com.sap.engine.services.keystore.impl.security.CodeBasedSecurityConnector.checkPermissions_readEntry(CodeBasedSecurityConnector.java:542)
    and also find heap log info
    -----------  H E A P   C H E C K  -----------
    Suspension of other threads succeeded.
    6 Java thread local allocation buffers currently in use.
    Scanning young generation space 314368K,   1% used [0x0a00020000000000, 0x0a00020000334838, 0x0a00020013300000)
    Scanning young generation space 157184K,   0% used [0x0a00020013300000, 0x0a00020013300000, 0x0a0002001cc80000)
    Scanning young generation space 157184K,   0% used [0x0a0002001cc80000, 0x0a0002001cc80000, 0x0a00020026600000)
    Scanning old generation space 2516992K,  21% used [0x0a00020026600000, 0x0a000200c0000000)
    Scanning permanent generation space 409600K,  99% used [0x0a000200c0000000, 0x0a000200d9000000)
    Checked the complete java heap.
    ---  N O   H E A P   C O R R U P T I O N  ---
    -----------  R E G I S T E R   R E G I O N S  -----------
    Register pc points to 0x09000000332ef3a8, which is not a known memory location
    Register lr points to 0x09000000332ef388, which is not a known memory location
    Register ctr points to 0x0900000033421bc0, which is not a known memory location
    Register r0 points to 0x0000000000000000, which is not a known memory location
    Register r1 points into the stack of JavaThread "HTTP Worker [@1753615133]" [_thread_in_vm (_call_back), id=25193, stack(0x000000011a5ef888,0x000000011a6ef888)]
    Dump of memory region around register r1 at 0x000000011a6e2a70
       0x000000011a6e29f0 00 00 00 01 1A 6E 2A 70 00 00 00 00 00 00 00 15 [.....n*p........]
       0x000000011a6e2a00 09 00 00 00 33 63 12 DC 09 00 10 00 A6 6A F9 60 [....3c.......j.`]
       0x000000011a6e2a10 00 00 00 00 12 4C 35 C0 0A 00 01 00 16 3D 60 78 [.....L5......=`x]
       0x000000011a6e2a20 09 00 00 00 33 FB 54 98 00 00 00 00 33 F4 90 28 [....3.T.....3..(]
       0x000000011a6e2a30 09 00 10 00 A6 4D 98 10 00 00 00 01 1A 6E 2A E8 [.....M.......n*.]
       0x000000011a6e2a40 00 00 00 00 00 00 00 00 00 00 00 00 15 A8 00 69 [...............i]
       0x000000011a6e2a50 00 00 00 00 15 A8 00 69 09 00 00 00 33 F4 90 38 [.......i....3..8]
       0x000000011a6e2a60 00 00 00 00 00 00 01 08 00 00 00 00 00 00 00 00 [................]
    => 0x000000011a6e2a70 00 00 00 01 1A 6E 2B 60 00 00 00 00 00 00 00 08 [.....n+`........]
    Register r2 points to 0x09001000a66af960, which is not a known memory location
    Register r3 points to 0x00000001188fa130, which is not a known memory location
    Register r4 points to 0x0a000100163d6098, which is not a known memory location
    Register r5 points to 0x0900000033f49038, which is not a known memory location
    Register r6 points to 0x0000000000000108, which is not a known memory location
    Register r7 points to 0x09001000a648c308, which is not a known memory location
    Register r8 points to 0x09001000a64cf2b4, which is not a known memory location
    Register r9 points to 0x0000000000000000, which is not a known memory location
    Register r10 points to 0x0000000000000000, which is not a known memory location
    Register r11 points to 0x0000000000000000, which is not a known memory location
    Register r12 points to 0x09000000332ef388, which is not a known memory location
    Register r13 points into the stack of JavaThread "HTTP Worker [@2116488621]" [_thread_in_native (_at_safepoint), id=25450, stack(0x000000011a6f4888,0x000000011a
    7f4888)]
    [error occurred during error reporting (dumping memory regions for register values), id 0xb
    Exception details: SIGSEGV at pc=0
    Problematic frame: v  ~StubRoutines::SafeFetch32 (sp=0x000000011a6e1240) (pc=0x0a00010000067b58)]
    hs_err_pid26214604.log: END

Maybe you are looking for