PACK statement
Can anyone brief me the answers for these questions?
1. What is the use of the PACK and UNPACK statement.
2. If i say a character is packed what does it means?
3. If i say a characted is unpacked what does it mean?
Regards,
Phyrose.
Hi,
PACK source TO destination.
This statement, which is forbidden in classes, converts the content of the data object source to the data type p of length 16 without decimal places. Decimal separator in source is ignored.
The data type of source must be character-type, flat, and its content must be interpretable as a numeric value. The data type of destination must be flat. If destination has the data type p, the interim result is assigned to it from left to right. Surplus characters are cut off on the left, and the decimal places are determined by the data type of destination. If destination does not have the data type p, the interim result is converted to the data type of destination according to the rules in the conversion table for source field type p.
The function of the statement PACK is based on the second half-byte of the code corresponding to a character in most character representations of the BCD representation for the corresponding numeric value. This compilation is generally known as "packing".
If the source field contains a number without a decimal separator, and the target field has dobj2 of data type p with sufficient length and without decimal places, the result of the PACK statement (which is forbidden in classes) corresponds to the result of the statement MOVE.
UNPACK f TO g.
Effect
Unpacks the packed field f and places it in the field g with leading zeros. If g is too short, it is truncated on the left.
eg
data: v_matnr like mara-matnr,
c_test(10) value '1234'.
unpack c_test to v_matnr.
v_matnr now contains 000000000000001234 .
Similar Messages
-
JTable is display too small, after a pack() it's too height
i have a table of 5 columns and 2 rows
it is placed on a scrollpane and then in an internal frame
the result is a table that is displayed too small (height=32 == getPreferredSize().height)
if i add a pack() statement then it is displayed too big, width is ok but height =~ 500 (should be approx. 100
what to do?thank you! i like the one-liner!
however it works only the first time, not the second time when rows are added
DefaultTableModel model;
JTable table;
String[] columnNames;
Object[][] data;
columnNames = new String[5];
columnNames[0] = "N"; columnNames[1] = "T"; columnNames[2] = "E";
columnNames[3] = "E"; columnNames[4] = "P";
data = new Object[2][5];
data[0][0] = "e"; data[0][1] = "i"; data[0][2] = "e"; data[0][3] = "-"; data[0][4] = "2";
data[1][0] = "s"; data[1][1] = "f"; data[1][2] = "s"; data[1][3] = "2"; data[1][4] = "2";
model = new DefaultTableModel(data, columnNames);
table = new JTable(model);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
// table is show with perfectheight of 2 rows
JScrollPane scrollPane = new JScrollPane(table);
internalFrame.add(scrollPane);
internalFrame.pack();
data = new Object[3][5];
data[0][0]="A0";data[0][1]="A1";data[0][2]="A2";data[0][3]="A3";data[0][4]="A4";
data[1][0]="b0";data[1][1]="b1";data[1][2]="b2";data[1][3]="b3";data[1][4]="b4";
data[2][0]="c0";data[2][1]="c1";data[2][2]="c2";data[2][3]="c3";data[2][4]="c4";
model = new DefaultTableModel(data,columnNames);
table.setModel(model);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
// still a height of 2 rows instead of 3i have the feeling that i make it too complex :-( -
Hi
how to convert char to packed decimal???
ThanksHi,
Use pack statement.
Example
DATA C_FIELD(4) TYPE C VALUE '0103',
P_FIELD(2) TYPE P.
PACK C_FIELD TO P_FIELD.
C_FIELD: C'0103' --> P_FIELD: P'103C'
Regards,
Prashant -
How to pass a struct to a DLL function and accessing it in another VI
Hi friends,
I am new to labview. I need to create a demo program in labview ,for displaying image from our own image capturing system. We have a DLL ( build in VC++) containing functions for capturing image from our system. Now I need to create a VI library for some of functions in DLL and Create a Demo program using those created subvi library . I used "Call Function node" and created some of subvi's.
Some of our DLL functions need to pass struct pointers. Our function prototype will be similar to the following function.
__declspec(dllexport) int __stdcall Initialize( unsigned char *imagebuffer,struct config *Configuration);
The passed struct is similar to
struct config
double val1[3];
unsigned short val2;
bool val3;
bool val4[3];
unsigned char val5;
unsigned char val6[3];
bool val7[26];
For passing "unsigned char *imagebuffer" I initialized array with "Numeric constant " and set the size of the array and send to the function.
The problem here is, I used this array in one of the subvi.
How can I use the returned imagebuffer array in my main demo program. How to connect the image array to subvi "Connecter Pane"
And which control can I use to display the image. The image data I get is form of 1-D Array .
The second problem is,
For passing the structure, I used "Bundle " and filled the bundle with all the datatypes as in my struct and passed to the function. Is it correct ? How to access this bundle after returned from function in another Vi. ie.) How to connect this bundle to the connter pane ?
Thanks for your valuable suggestions.
aajjf.
Message Edited by aajjf on 04-19-2007 05:34 AMaajjf wrote:
Hi friends,
I am new to labview. I need to create a demo program in labview ,for displaying image from our own image capturing system. We have a DLL ( build in VC++) containing functions for capturing image from our system. Now I need to create a VI library for some of functions in DLL and Create a Demo program using those created subvi library . I used "Call Function node" and created some of subvi's.
Some of our DLL functions need to pass struct pointers. Our function prototype will be similar to the following function.
__declspec(dllexport) int __stdcall Initialize( unsigned char *imagebuffer,struct config *Configuration);
The passed struct is similar to
struct config
double val1[3];
unsigned short val2;
bool val3;
bool val4[3];
unsigned char val5;
unsigned char val6[3];
bool val7[26];
For passing "unsigned char *imagebuffer" I initialized array with "Numeric constant " and set the size of the array and send to the function.
The problem here is, I used this array in one of the subvi.
How can I use the returned imagebuffer array in my main demo program. How to connect the image array to subvi "Connecter Pane"
And which control can I use to display the image. The image data I get is form of 1-D Array .
The second problem is,
For passing the structure, I used "Bundle " and filled the bundle with all the datatypes as in my struct and passed to the function. Is it correct ? How to access this bundle after returned from function in another Vi. ie.) How to connect this bundle to the connter pane ?
Thanks for your valuable suggestions.
aajjf.
Message Edited by aajjf on 04-19-2007 05:34 AM
You say nothing about how your cluster looks but I'm afraid you did the standard error here and placed arrays in it. That is not what the C structure is representing for several reasons.
First fixed size arrays in C are inlined inside a structure, so are not a pointer but for the case of your val1 element three doubles.
Second although not relevant here because of above point: LabVIEW arrays are not the same as C arrays. LabVIEW uses a pointer to a pointer and has the size of the array in elements prepended to the array data. C simply uses a pointer and all the rest is the programmers sorrow. The Call Library Node does convert the top level element of variables you pass according to the type configuration of that parameter but does no conversion of internal elements at all. So passing clusters with anything like arrays or strings is always wrong unless the DLL is aware of the specific datatypes LabVIEW uses.
Last but not least you can end up with alignment issues. Elements in structures are aligned by every C compiler to a certain value. This value can be defined by the programmer in the project settings or for Visual C through #pragma pack() statements in the C code. The alignment rule says that an variable is aligned to the smaller of the two values that are either a multiple of the variable element size or the alignment setting. Most 32bit code nowadays uses 8 bit default alignment but LabVIEW always uses 1 byte. In your case there is nothing to observe since the large variables are at the beginning. Otherwise you might have had to insert filler elements in the LabVIEW cluster.
One last thing bool is a C++ type only. Its size is 1 byte and incidentially this is the same LabVIEW uses for Booleans.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
How to resize the text field through the expression?
It is necessary that another layer was at 150 pixels to the right of the right side of the text field.
PACK
Syntax
PACK source TO destination.
Effect:
This statement, which is forbidden in classes, converts the content of the data object source to the data type p of length 16 without decimal places. In contrast to the conversion rules for elementary data types, a decimal separator in source is ignored. This assigns the converted content to the data object destination.
The data type of source must be character-type, flat, and its content must be interpretable as a numeric value. The data type of destination must be flat. If destination has the data type p, the interim result is assigned to it from left to right. Surplus characters are cut off on the left, and the decimal places are determined by the data type of destination. If destination does not have the data type p, the interim result is converted to the data type of destination according to the rules in the conversion table for source field type p.
Notes:
The function of the statement PACK is based on the second half-byte of the code corresponding to a character in most character representations of the BCD representation for the corresponding numeric value. This compilation is generally known as "packing".
If the source field contains a number without a decimal separator, and the target field has dobj2 of data type p with sufficient length and without decimal places, the result of the PACK statement (which is forbidden in classes) corresponds to the result of the statement MOVE. -
Null Pointer Exception, don't know why...
Hi everyone,
This may well be really simple, but it's driving me crazy...
The program puts lots of panels into other panels and when a combo box is set to a certain value the number of panels alters.
Here is some of the code:
* Fourth User
// First user main panel
pn_u4 = new JPanel();
pn_u4.setLayout( new BorderLayout(5,5) );
pn_u4.setPreferredSize( new Dimension(800,80) );
pn_u4.setBackground(Color.WHITE);
// First user top panel that goes into the
// main panel North
pn_u4T = new JPanel();
pn_u4T.setLayout( new BorderLayout(5,5) );
pn_u4T.setPreferredSize( new Dimension(800,40) );
pn_u4T.setBackground(Color.WHITE);
// First user bottom panel that goes into the
// main panel South
pn_u4B = new JPanel();
pn_u4B.setLayout( new BorderLayout(5,5) );
pn_u4B.setPreferredSize( new Dimension(800,40) );
pn_u4B.setBackground(Color.WHITE);
// First user top panel left, goes into the
// top panel West
pn_u4TL = new JPanel();
pn_u4TL.setLayout( new FlowLayout() );
pn_u4TL.setPreferredSize( new Dimension(400,40) );
pn_u4TL.setBackground(Color.WHITE);
lbl_u4Name = new JLabel("Name");
lbl_u4Name.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u4Name = new JTextField(28);
pn_u4TL.add(lbl_u4Name);
pn_u4TL.add(tf_u4Name);
// First user top panel right, goes into the
// top panel East
pn_u4TR = new JPanel();
pn_u4TR.setLayout( new FlowLayout() );
pn_u4TR.setPreferredSize( new Dimension(400,40) );
pn_u4TR.setBackground(Color.WHITE);
lbl_u4ID = new JLabel("GNAS ID");
lbl_u4ID.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u4ID = new JTextField(28);
pn_u4TR.add(lbl_u4ID);
pn_u4TR.add(tf_u4ID);
pn_u4T.add(pn_u4TL, BorderLayout.WEST);
pn_u4T.add(pn_u4TR, BorderLayout.EAST);
// First user bottom panel left, goes into the
// bottom panel West
pn_u4BL = new JPanel();
pn_u4BL.setLayout( new FlowLayout() );
pn_u4BL.setPreferredSize( new Dimension(400,40) );
pn_u4BL.setBackground(Color.WHITE);
lbl_u4Round = new JLabel("Round Name");
lbl_u4Round.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u4Round = new JTextField(24);
pn_u4BL.add(lbl_u4Round);
pn_u4BL.add(tf_u4Round);
// First user bottom panel right, goes into the
// bottom panel East
pn_u4BR = new JPanel();
pn_u4BR.setLayout( new FlowLayout() );
pn_u4BR.setPreferredSize( new Dimension(400,40) );
pn_u4BR.setBackground(Color.WHITE);
lbl_u4Bow = new JLabel("Bow Type ");
lbl_u4Bow.setFont( new Font("Times New Roman",Font.PLAIN,17) );
cb_u4Bow = new JComboBox();
cb_u4Bow.addActionListener(this);
cb_u4Bow.addItem(" Compound ");
cb_u4Bow.addItem(" Long Bow ");
cb_u4Bow.addItem(" Recurve ");
pn_u4BR.add(lbl_u4Bow);
pn_u4BR.add(cb_u4Bow);
pn_u4B.add(pn_u4BL, BorderLayout.WEST);
pn_u4B.add(pn_u4BR, BorderLayout.EAST);
pn_u4.add(pn_u4T, BorderLayout.NORTH);
pn_u4.add(pn_u4B, BorderLayout.SOUTH);
//pn_u3u4.add(pn_u4, BorderLayout.NORTH);
pn_2.add(pn_u1u2, BorderLayout.NORTH);
pn_2.add(pn_u3u4, BorderLayout.SOUTH);
//initialWindow.add(pn_topAll);//BorderLayout.NORTH);
initialWindow.add(pn_topAll, BorderLayout.NORTH);
initialWindow.add(pn_2, BorderLayout.CENTER);
pack(); There are a total of four users, but too much code to paste here,
Now there's the event listener:
public void actionPerformed(ActionEvent e)
if (e.getSource() == cb_noOfPeople)
if(cb_noOfPeople.getSelectedItem() == " 1 ")
*** if(pn_u3u4.getComponentCount() > 0)
pn_u3u4.remove(pn_u3);
pn_u3u4.remove(pn_u4);
else
if(pn_u1u2.getComponentCount() == 2)
pn_u1u2.remove(pn_u2);
else
initialWindow.repaint();
initialWindow.validate();
else if(cb_noOfPeople.getSelectedItem() == " 2 ")
if(pn_u3u4.getComponentCount() > 0)
pn_u3u4.remove(pn_u3);
pn_u3u4.remove(pn_u4);
else
pn_u1u2.add(pn_u2, BorderLayout.SOUTH);
initialWindow.repaint();
initialWindow.validate();
else if(cb_noOfPeople.getSelectedItem() == " 3 ")
if(pn_u3u4.getComponentCount() == 2)
pn_u3u4.remove(pn_u4);
else
pn_u1u2.add(pn_u2, BorderLayout.SOUTH);
pn_u3u4.add(pn_u3, BorderLayout.NORTH);
initialWindow.repaint();
initialWindow.validate();
else if(cb_noOfPeople.getSelectedItem() == " 4 ")
pn_u1u2.add(pn_u2, BorderLayout.SOUTH);
pn_u3u4.add(pn_u3, BorderLayout.NORTH);
pn_u3u4.add(pn_u4, BorderLayout.SOUTH);
initialWindow.repaint();
initialWindow.validate();
else
}Everything works until it reaches:
*** if(pn_u3u4.getComponentCount() > 0)
pn_u3u4.remove(pn_u3);
pn_u3u4.remove(pn_u4);
else
if(pn_u1u2.getComponentCount() == 2)
pn_u1u2.remove(pn_u2);
else
}(please ignore the three stars, just to indicate where that code was)
Wihout the above bit of code inplace everything works fine, I can change the value of the combo box and things are removed and added, but when I add the above if statements to the value "1" area, i get the null pointer, which doesn't make sence to me.
Exception in thread "main" java.lang.NullPointerException
at InitialScreen.actionPerformed(InitialScreen.java:601)
Thanks for help in advance (I can provide all 600 lines of code if needed)
VictoriaYour actionListener for your cb_noOfPeople is being fired before the rest of the components are being initialized. I just moved the addition of the actionListener to right before the pack() statement to ensure that all of your variables get initialized and it works like a charm. Here you go:
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import java.util.*;
* @author Victoria
* @version v1.01
* Start date 29th Nov 06
class InitialScreen extends JFrame implements ActionListener
Container initialWindow;
JLabel titleBar, lbl_noOfUsers, lbl_u1Name, lbl_u1ID, lbl_u1Bow, lbl_u1Round, lbl_u2Name, lbl_u2ID, lbl_u2Bow, lbl_u2Round, lbl_u3Name, lbl_u3ID, lbl_u3Round, lbl_u3Bow, lbl_u4Name, lbl_u4ID, lbl_u4Round, lbl_u4Bow;
JComboBox cb_noOfPeople, cb_u1Bow, cb_u2Bow, cb_u3Bow, cb_u4Bow;
JTextField tf_u1Name, tf_u1ID, tf_u1Round, tf_u2Name, tf_u2ID, tf_u2Round, tf_u3Name, tf_u3ID, tf_u3Round, tf_u4Name, tf_u4ID, tf_u4Round, tf_compDate, tf_compTime, tf_compID;
JPanel pn_1, pn_2, pn_3, pn_u1u2, pn_u3u4, pn_top, pn_top2, pn_top3, pn_topAll, pn_u1, pn_u1T, pn_u1TL, pn_u1TR, pn_u1B, pn_u1BL, pn_u1BR, pn_u2, pn_u2T, pn_u2TL, pn_u2TR, pn_u2B, pn_u2BL, pn_u2BR, pn_u3, pn_u3T, pn_u3TL, pn_u3TR, pn_u3B, pn_u3BL, pn_u3BR, pn_u4, pn_u4T, pn_u4TL, pn_u4TR, pn_u4B, pn_u4BL, pn_u4BR, pn_shootInfo, pn_button;
JButton but_go, but_reset, but_exit;
* Constructor for the initial screen
public InitialScreen()
// Create a window pane called initial Window
// and set it to a preferred size of 800x600
initialWindow = getContentPane();
initialWindow.setLayout( new BorderLayout(5,5) );
setPreferredSize( new Dimension(800,600) );
initialWindow.setBackground(Color.WHITE);
//pn_1 = new JPanel();
//pn_1.setLayout( new BorderLayout(5,5) );
//pn_1.setPreferredSize( new Dimension(800,40) );
//pn_1.setBackground(Color.WHITE);
pn_2 = new JPanel();
pn_2.setLayout( new BorderLayout(5,5) );
pn_2.setPreferredSize( new Dimension(800,40) );
pn_2.setBackground(Color.WHITE);
//pn_3 = new JPanel();
//pn_3.setLayout( new BorderLayout(5,5) );
//pn_3.setPreferredSize( new Dimension(800,40) );
//pn_3.setBackground(Color.WHITE);
// First top panel just houese the label that
// says what the program is and fill in info
pn_top = new JPanel();
pn_top.setLayout( new BorderLayout(5,5) );
pn_top.setPreferredSize( new Dimension(800,40) );
pn_top.setBackground(Color.WHITE);
titleBar = new JLabel("Archery Scoring Program - Please fill in the following information \n ", JLabel.CENTER);
titleBar.setFont( new Font("Times New Roman",Font.PLAIN,20) );
//pn_top.add(titleBar, BorderLayout.NORTH);
//pn_top.add(lbl_noOfUsers, BorderLayout.WEST);
//pn_top.add(cb_noOfPeople, BorderLayout.EAST);
pn_top.add(titleBar);
// Second panel contains the how many people
// ComboBox
pn_top2 = new JPanel();
pn_top2.setLayout(new FlowLayout());
pn_top2.setPreferredSize( new Dimension(360,40) );
pn_top2.setBackground(Color.WHITE);
lbl_noOfUsers = new JLabel("No of members shooting on this target");
lbl_noOfUsers.setFont( new Font("Times New Roman",Font.PLAIN,17) );
cb_noOfPeople = new JComboBox();
//cb_noOfPeople.addActionListener(this);
cb_noOfPeople.addItem(" 1 ");
cb_noOfPeople.addItem(" 2 ");
cb_noOfPeople.addItem(" 3 ");
cb_noOfPeople.addItem(" 4 ");
pn_top2.add(lbl_noOfUsers);
pn_top2.add(cb_noOfPeople);
// Third panel contains nothing but alligns
// the second panel correctly
pn_top3 = new JPanel();
pn_top3.setLayout( new FlowLayout() );
pn_top3.setPreferredSize( new Dimension(440,40) );
pn_top3.setBackground(Color.WHITE);
// Last top panel contains all the previous
// top panels and adds the other top
// panels to it
pn_topAll = new JPanel();
pn_topAll.setLayout( new BorderLayout(5,5) );
//pn_topAll.setPreferredSize( new Dimension(450,100) );
pn_topAll.setBackground(Color.WHITE);
pn_topAll.add(pn_top, BorderLayout.NORTH);
pn_topAll.add(pn_top2, BorderLayout.WEST);
pn_topAll.add(pn_top3, BorderLayout.EAST);
pn_u1u2 = new JPanel();
pn_u1u2.setLayout( new BorderLayout(5,5) );
pn_u1u2.setPreferredSize( new Dimension(800,160) );
pn_u1u2.setBackground(Color.WHITE);
* First User
* As long as the if statement is correctly working
* The first user panel will be added upon load
* User two, three and four will be added depending on
* the value of the combobox which asks how many
* users are shooting on the target
// First user main panel
pn_u1 = new JPanel();
pn_u1.setLayout( new BorderLayout(5,5) );
pn_u1.setPreferredSize( new Dimension(800,80) );
pn_u1.setBackground(Color.WHITE);
// First user top panel that goes into the
// main panel North
pn_u1T = new JPanel();
pn_u1T.setLayout( new BorderLayout(5,5) );
pn_u1T.setPreferredSize( new Dimension(800,40) );
pn_u1T.setBackground(Color.WHITE);
// First user bottom panel that goes into the
// main panel South
pn_u1B = new JPanel();
pn_u1B.setLayout( new BorderLayout(5,5) );
pn_u1B.setPreferredSize( new Dimension(800,40) );
pn_u1B.setBackground(Color.WHITE);
// First user top panel left, goes into the
// top panel West
pn_u1TL = new JPanel();
pn_u1TL.setLayout( new FlowLayout() );
pn_u1TL.setPreferredSize( new Dimension(400,40) );
pn_u1TL.setBackground(Color.WHITE);
lbl_u1Name = new JLabel("Name");
lbl_u1Name.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u1Name = new JTextField(28);
pn_u1TL.add(lbl_u1Name);
pn_u1TL.add(tf_u1Name);
// First user top panel right, goes into the
// top panel East
pn_u1TR = new JPanel();
pn_u1TR.setLayout( new FlowLayout() );
pn_u1TR.setPreferredSize( new Dimension(400,40) );
pn_u1TR.setBackground(Color.WHITE);
lbl_u1ID = new JLabel("GNAS ID");
lbl_u1ID.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u1ID = new JTextField(28);
pn_u1TR.add(lbl_u1ID);
pn_u1TR.add(tf_u1ID);
pn_u1T.add(pn_u1TL, BorderLayout.WEST);
pn_u1T.add(pn_u1TR, BorderLayout.EAST);
// First user bottom panel left, goes into the
// bottom panel West
pn_u1BL = new JPanel();
pn_u1BL.setLayout( new FlowLayout() );
pn_u1BL.setPreferredSize( new Dimension(400,40) );
pn_u1BL.setBackground(Color.WHITE);
lbl_u1Round = new JLabel("Round Name");
lbl_u1Round.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u1Round = new JTextField(24);
pn_u1BL.add(lbl_u1Round);
pn_u1BL.add(tf_u1Round);
// First user bottom panel right, goes into the
// bottom panel East
pn_u1BR = new JPanel();
pn_u1BR.setLayout( new FlowLayout() );
pn_u1BR.setPreferredSize( new Dimension(400,40) );
pn_u1BR.setBackground(Color.WHITE);
lbl_u1Bow = new JLabel("Bow Type ");
lbl_u1Bow.setFont( new Font("Times New Roman",Font.PLAIN,17) );
cb_u1Bow = new JComboBox();
cb_u1Bow.addActionListener(this);
cb_u1Bow.addItem(" Compound ");
cb_u1Bow.addItem(" Long Bow ");
cb_u1Bow.addItem(" Recurve ");
pn_u1BR.add(lbl_u1Bow);
pn_u1BR.add(cb_u1Bow);
pn_u1B.add(pn_u1BL, BorderLayout.WEST);
pn_u1B.add(pn_u1BR, BorderLayout.EAST);
pn_u1.add(pn_u1T, BorderLayout.NORTH);
pn_u1.add(pn_u1B, BorderLayout.SOUTH);
pn_u1u2.add(pn_u1, BorderLayout.NORTH);
* Second User
// First user main panel
pn_u2 = new JPanel();
pn_u2.setLayout( new BorderLayout(5,5) );
pn_u2.setPreferredSize( new Dimension(800,80) );
pn_u2.setBackground(Color.WHITE);
// First user top panel that goes into the
// main panel North
pn_u2T = new JPanel();
pn_u2T.setLayout( new BorderLayout(5,5) );
pn_u2T.setPreferredSize( new Dimension(800,40) );
pn_u2T.setBackground(Color.WHITE);
// First user bottom panel that goes into the
// main panel South
pn_u2B = new JPanel();
pn_u2B.setLayout( new BorderLayout(5,5) );
pn_u2B.setPreferredSize( new Dimension(800,40) );
pn_u2B.setBackground(Color.WHITE);
// First user top panel left, goes into the
// top panel West
pn_u2TL = new JPanel();
pn_u2TL.setLayout( new FlowLayout() );
pn_u2TL.setPreferredSize( new Dimension(400,40) );
pn_u2TL.setBackground(Color.WHITE);
lbl_u2Name = new JLabel("Name");
lbl_u2Name.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u2Name = new JTextField(28);
pn_u2TL.add(lbl_u2Name);
pn_u2TL.add(tf_u2Name);
// First user top panel right, goes into the
// top panel East
pn_u2TR = new JPanel();
pn_u2TR.setLayout( new FlowLayout() );
pn_u2TR.setPreferredSize( new Dimension(400,40) );
pn_u2TR.setBackground(Color.WHITE);
lbl_u2ID = new JLabel("GNAS ID");
lbl_u2ID.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u2ID = new JTextField(28);
pn_u2TR.add(lbl_u2ID);
pn_u2TR.add(tf_u2ID);
pn_u2T.add(pn_u2TL, BorderLayout.WEST);
pn_u2T.add(pn_u2TR, BorderLayout.EAST);
// First user bottom panel left, goes into the
// bottom panel West
pn_u2BL = new JPanel();
pn_u2BL.setLayout( new FlowLayout() );
pn_u2BL.setPreferredSize( new Dimension(400,40) );
pn_u2BL.setBackground(Color.WHITE);
lbl_u2Round = new JLabel("Round Name");
lbl_u2Round.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u2Round = new JTextField(24);
pn_u2BL.add(lbl_u2Round);
pn_u2BL.add(tf_u2Round);
// First user bottom panel right, goes into the
// bottom panel East
pn_u2BR = new JPanel();
pn_u2BR.setLayout( new FlowLayout() );
pn_u2BR.setPreferredSize( new Dimension(400,40) );
pn_u2BR.setBackground(Color.WHITE);
lbl_u2Bow = new JLabel("Bow Type ");
lbl_u2Bow.setFont( new Font("Times New Roman",Font.PLAIN,17) );
cb_u2Bow = new JComboBox();
cb_u2Bow.addActionListener(this);
cb_u2Bow.addItem(" Compound ");
cb_u2Bow.addItem(" Long Bow ");
cb_u2Bow.addItem(" Recurve ");
pn_u2BR.add(lbl_u2Bow);
pn_u2BR.add(cb_u2Bow);
pn_u2B.add(pn_u2BL, BorderLayout.WEST);
pn_u2B.add(pn_u2BR, BorderLayout.EAST);
pn_u2.add(pn_u2T, BorderLayout.NORTH);
pn_u2.add(pn_u2B, BorderLayout.SOUTH);
//pn_u1u2.add(pn_u2, BorderLayout.SOUTH);
pn_u3u4 = new JPanel();
pn_u3u4.setLayout( new BorderLayout(5,5) );
pn_u3u4.setPreferredSize( new Dimension(800,160) );
pn_u3u4.setBackground(Color.WHITE);
* Third User
// First user main panel
pn_u3 = new JPanel();
pn_u3.setLayout( new BorderLayout(5,5) );
pn_u3.setPreferredSize( new Dimension(800,80) );
pn_u3.setBackground(Color.WHITE);
// First user top panel that goes into the
// main panel North
pn_u3T = new JPanel();
pn_u3T.setLayout( new BorderLayout(5,5) );
pn_u3T.setPreferredSize( new Dimension(800,40) );
pn_u3T.setBackground(Color.WHITE);
// First user bottom panel that goes into the
// main panel South
pn_u3B = new JPanel();
pn_u3B.setLayout( new BorderLayout(5,5) );
pn_u3B.setPreferredSize( new Dimension(800,40) );
pn_u3B.setBackground(Color.WHITE);
// First user top panel left, goes into the
// top panel West
pn_u3TL = new JPanel();
pn_u3TL.setLayout( new FlowLayout() );
pn_u3TL.setPreferredSize( new Dimension(400,40) );
pn_u3TL.setBackground(Color.WHITE);
lbl_u3Name = new JLabel("Name");
lbl_u3Name.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u3Name = new JTextField(28);
pn_u3TL.add(lbl_u3Name);
pn_u3TL.add(tf_u3Name);
// First user top panel right, goes into the
// top panel East
pn_u3TR = new JPanel();
pn_u3TR.setLayout( new FlowLayout() );
pn_u3TR.setPreferredSize( new Dimension(400,40) );
pn_u3TR.setBackground(Color.WHITE);
lbl_u3ID = new JLabel("GNAS ID");
lbl_u3ID.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u3ID = new JTextField(28);
pn_u3TR.add(lbl_u3ID);
pn_u3TR.add(tf_u3ID);
pn_u3T.add(pn_u3TL, BorderLayout.WEST);
pn_u3T.add(pn_u3TR, BorderLayout.EAST);
// First user bottom panel left, goes into the
// bottom panel West
pn_u3BL = new JPanel();
pn_u3BL.setLayout( new FlowLayout() );
pn_u3BL.setPreferredSize( new Dimension(400,40) );
pn_u3BL.setBackground(Color.WHITE);
lbl_u3Round = new JLabel("Round Name");
lbl_u3Round.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u3Round = new JTextField(24);
pn_u3BL.add(lbl_u3Round);
pn_u3BL.add(tf_u3Round);
// First user bottom panel right, goes into the
// bottom panel East
pn_u3BR = new JPanel();
pn_u3BR.setLayout( new FlowLayout() );
pn_u3BR.setPreferredSize( new Dimension(400,40) );
pn_u3BR.setBackground(Color.WHITE);
lbl_u3Bow = new JLabel("Bow Type ");
lbl_u3Bow.setFont( new Font("Times New Roman",Font.PLAIN,17) );
cb_u3Bow = new JComboBox();
cb_u3Bow.addActionListener(this);
cb_u3Bow.addItem(" Compound ");
cb_u3Bow.addItem(" Long Bow ");
cb_u3Bow.addItem(" Recurve ");
pn_u3BR.add(lbl_u3Bow);
pn_u3BR.add(cb_u3Bow);
pn_u3B.add(pn_u3BL, BorderLayout.WEST);
pn_u3B.add(pn_u3BR, BorderLayout.EAST);
pn_u3.add(pn_u3T, BorderLayout.NORTH);
pn_u3.add(pn_u3B, BorderLayout.SOUTH);
//pn_u3u4.add(pn_u3, BorderLayout.NORTH);
* Fourth User
// First user main panel
pn_u4 = new JPanel();
pn_u4.setLayout( new BorderLayout(5,5) );
pn_u4.setPreferredSize( new Dimension(800,80) );
pn_u4.setBackground(Color.WHITE);
// First user top panel that goes into the
// main panel North
pn_u4T = new JPanel();
pn_u4T.setLayout( new BorderLayout(5,5) );
pn_u4T.setPreferredSize( new Dimension(800,40) );
pn_u4T.setBackground(Color.WHITE);
// First user bottom panel that goes into the
// main panel South
pn_u4B = new JPanel();
pn_u4B.setLayout( new BorderLayout(5,5) );
pn_u4B.setPreferredSize( new Dimension(800,40) );
pn_u4B.setBackground(Color.WHITE);
// First user top panel left, goes into the
// top panel West
pn_u4TL = new JPanel();
pn_u4TL.setLayout( new FlowLayout() );
pn_u4TL.setPreferredSize( new Dimension(400,40) );
pn_u4TL.setBackground(Color.WHITE);
lbl_u4Name = new JLabel("Name");
lbl_u4Name.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u4Name = new JTextField(28);
pn_u4TL.add(lbl_u4Name);
pn_u4TL.add(tf_u4Name);
// First user top panel right, goes into the
// top panel East
pn_u4TR = new JPanel();
pn_u4TR.setLayout( new FlowLayout() );
pn_u4TR.setPreferredSize( new Dimension(400,40) );
pn_u4TR.setBackground(Color.WHITE);
lbl_u4ID = new JLabel("GNAS ID");
lbl_u4ID.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u4ID = new JTextField(28);
pn_u4TR.add(lbl_u4ID);
pn_u4TR.add(tf_u4ID);
pn_u4T.add(pn_u4TL, BorderLayout.WEST);
pn_u4T.add(pn_u4TR, BorderLayout.EAST);
// First user bottom panel left, goes into the
// bottom panel West
pn_u4BL = new JPanel();
pn_u4BL.setLayout( new FlowLayout() );
pn_u4BL.setPreferredSize( new Dimension(400,40) );
pn_u4BL.setBackground(Color.WHITE);
lbl_u4Round = new JLabel("Round Name");
lbl_u4Round.setFont( new Font("Times New Roman",Font.PLAIN,17) );
tf_u4Round = new JTextField(24);
pn_u4BL.add(lbl_u4Round);
pn_u4BL.add(tf_u4Round);
// First user bottom panel right, goes into the
// bottom panel East
pn_u4BR = new JPanel();
pn_u4BR.setLayout( new FlowLayout() );
pn_u4BR.setPreferredSize( new Dimension(400,40) );
pn_u4BR.setBackground(Color.WHITE);
lbl_u4Bow = new JLabel("Bow Type ");
lbl_u4Bow.setFont( new Font("Times New Roman",Font.PLAIN,17) );
cb_u4Bow = new JComboBox();
cb_u4Bow.addActionListener(this);
cb_u4Bow.addItem(" Compound ");
cb_u4Bow.addItem(" Long Bow ");
cb_u4Bow.addItem(" Recurve ");
pn_u4BR.add(lbl_u4Bow);
pn_u4BR.add(cb_u4Bow);
pn_u4B.add(pn_u4BL, BorderLayout.WEST);
pn_u4B.add(pn_u4BR, BorderLayout.EAST);
pn_u4.add(pn_u4T, BorderLayout.NORTH);
pn_u4.add(pn_u4B, BorderLayout.SOUTH);
//pn_u3u4.add(pn_u4, BorderLayout.NORTH);
pn_2.add(pn_u1u2, BorderLayout.NORTH);
pn_2.add(pn_u3u4, BorderLayout.SOUTH);
//initialWindow.add(pn_topAll);//BorderLayout.NORTH);
initialWindow.add(pn_topAll, BorderLayout.NORTH);
initialWindow.add(pn_2, BorderLayout.CENTER);
// Boolean tests, to see if the combobox
// has been set, and if so how many panels to
// add to the initialWindow panel
if(u1 == true)
//initialWindow.add(pn_u1);
if(u2 == true)
pn_u1u2.add(pn_u2, BorderLayout.SOUTH);
//initialWindow.add(pn_u2);
initialWindow.repaint();
initialWindow.validate();
if(u3 == true)
pn_u3u4.add(pn_u3, BorderLayout.NORTH);
//initialWindow.add(pn_u3);
if(u4 == true)
pn_u3u4.add(pn_u4, BorderLayout.SOUTH);
//initialWindow.add(pn_u4);
cb_noOfPeople.addActionListener(this);
pack();
* Event listener for the initial screen
* Items it's listening to are:
* Combo Box - cb_noOfPoeple
* quit button
* login button
* reset button
public void actionPerformed(ActionEvent e)
if (e.getSource() == cb_noOfPeople)
if(cb_noOfPeople.getSelectedItem() == " 1 ")
if(pn_u3u4.getComponentCount() > 0)
pn_u3u4.remove(pn_u3);
pn_u3u4.remove(pn_u4);
else
if(pn_u1u2.getComponentCount() == 2)
pn_u1u2.remove(pn_u2);
else
initialWindow.repaint();
initialWindow.validate();
else if(cb_noOfPeople.getSelectedItem() == " 2 ")
if(pn_u3u4.getComponentCount() > 0)
pn_u3u4.remove(pn_u3);
pn_u3u4.remove(pn_u4);
else
pn_u1u2.add(pn_u2, BorderLayout.SOUTH);
initialWindow.repaint();
initialWindow.validate();
else if(cb_noOfPeople.getSelectedItem() == " 3 ")
if(pn_u3u4.getComponentCount() == 2)
pn_u3u4.remove(pn_u4);
else
pn_u1u2.add(pn_u2, BorderLayout.SOUTH);
pn_u3u4.add(pn_u3, BorderLayout.NORTH);
initialWindow.repaint();
initialWindow.validate();
else if(cb_noOfPeople.getSelectedItem() == " 4 ")
pn_u1u2.add(pn_u2, BorderLayout.SOUTH);
pn_u3u4.add(pn_u3, BorderLayout.NORTH);
pn_u3u4.add(pn_u4, BorderLayout.SOUTH);
initialWindow.repaint();
initialWindow.validate();
else
public static void main(String[] argv) { new InitialScreen().setVisible(true); }
} -
Some issues while testing EJB3 API
I'm running some EJB3 peristence test outside standalone and I'm running
into some issues that I did not see running the same code against the
Hibernate EntityManager implementation.
I'm currently using the Kodo 4.0EA3 download. Any help is appreciated.
I have the following table:
Table "public.beers"
Column | Type | Modifiers
id | integer | not null
brand | character varying(50) |
price | numeric(15,2) |
Indexes:
"beers_pkey" PRIMARY KEY, btree (id)
With the following class:
package com.springdeveloper.model;
import javax.persistence.*;
import java.io.Serializable;
@Entity
@Table(name="BEERS")
public class Beer implements Serializable {
private Long id;
private String brand;
private Double price;
public Beer() {
public Beer(Long id) {
this.id = id;
@Id(generate=GeneratorType.AUTO)
@Column(name="ID", nullable=false)
public Long getId() {
return id;
public void setId(Long id) {
this.id = id;
public String getBrand() {
return brand;
public void setBrand(String brand) {
this.brand = brand;
public Double getPrice() {
return price;
public void setPrice(Double price) {
this.price = price;
public String toString() {
return "[" + id + "] " + brand + " " + price;
Issues:
=======
1) If I don't have a column named type I get an error -
Exception in thread "main" <2|false|4.0.0EA3> kodo.util.StoreException:
ERROR: column t0.type does not exist {prepstmnt 14211340 SELECT t0.ID,
t0.TYPE, t0.brand, t0.price FROM BEERS t0 WHERE (t0.ID = ?) [reused=0]}
[code=0, state=42703]
Any way around this since there is no inheritance structure involved?
2) If I don't specify a fully qualified name for the first query I get
this error:
33 INFO [main] kodo.Runtime - Starting Kodo 4.0.0EA3
74 DEBUG [main] kodo.Runtime - License capabilities: "Kodo Standard
Edition,Kodo Community Edition,Kodo Evaluation Edition,Datacache Plug-
in,Custom Result Object Providers,Custom Mappings,Enterprise
Databases,Query Extensions,Performance Pack,Statement Batching,Kodo
Enterprise Edition,Managed Environment,Developer Tools,Custom
DBDictionaries" Expiration: "11/22/05 7:00 PM" Maintenance expiration:
"11/22/05 7:00 PM"
496 INFO [main] kodo.jdbc.JDBC - Using dictionary class
"kodo.jdbc.sql.PostgresDictionary".
1007 INFO [main] kodo.MetaData - Found 3 classes with metadata in 0
milliseconds.
Exception in thread "main" <4|false|4.0.0EA3>
kodo.persistence.ArgumentException: Could not resolve entity named "Beer".
at kodo.query.ejbql.EJBQLParser.populate(EJBQLParser.java:61)
at kodo.query.ExpressionStoreQuery.populateFromCompilation
(ExpressionStoreQuery.java:129)
at kodo.query.QueryImpl.compileForCompilation(QueryImpl.java:682)
at kodo.query.QueryImpl.compileForExecutor(QueryImpl.java:713)
at kodo.query.QueryImpl.getOperation(QueryImpl.java:1624)
at kodo.query.DelegatingQuery.getOperation(DelegatingQuery.java:136)
at kodo.persistence.QueryImpl.execute(QueryImpl.java:231)
at kodo.persistence.QueryImpl.getSingleResult(QueryImpl.java:258)
at KodoTest.main(KodoTest.java:16)
If I specify a fully qualified name for the EJBQL the first time I query
then I can just use 'Beer' in subsequent queries. It doesn't help to
specify '@Entity(name="Beer")' in the persistent class either.
Here is my query:
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Beer b = (Beer)em.createQuery(
"select object(o) from Beer o where o.id = :id")
.setParameter("id", new Long(2))
.getSingleResult();
System.out.println("Beer: " + b);
em.getTransaction().commit();
This works but is kind of ugly:
Beer b = (Beer)em.createQuery(
"select object(o) from com.springdeveloper.model.Beer o where
o.id = :id")
.setParameter("id", new Long(2))
.getSingleResult();
And here is my peristence.xml:
<?xml version="1.0"?>
<entity-manager>
<name>BeerDistributor</name>
<provider>kodo.persistence.PersistenceProviderImpl</provider>
<properties>
<!--
To evaluate or purchase a license key, visit http://
www.solarmetric.com
-->
<property name="kodo.LicenseKey" value="????-????-????-????-????"/>
<property name="kodo.PersistentClasses"
value="com.springdeveloper.model.Beer,
com.springdeveloper.model.Customer,
com.springdeveloper.model.Order"/>
<!--
Connection configuration.
-->
<property name="kodo.ConnectionURL" value="jdbc:postgresql://
localhost/test"/>
<property name="kodo.ConnectionDriverName"
value="org.postgresql.Driver"/>
<property name="kodo.ConnectionUserName" value="trisberg"/>
<property name="kodo.ConnectionPassword" value="????"/>
<!--
To disable logging, set value to 'none'.
To use Log4J, configure Log4J appropriately, and set value to
'log4j'.
To view trace of all SQL being executed, add 'SQL=TRACE' to value
below.
-->
<property name="kodo.Log" value="DefaultLevel=INFO, Runtime=DEBUG,
Tool=INFO"/>
</properties>
</entity-manager>
Thanks,
Thomas Risberg1) If I don't have a column named type I get an error -This, unfortunately, is something that we need to clarify in the spec
itself. Currently, the discriminator value and column for a class have
default values in the spec. So technically, every base class has a
discriminator column according to spec defaults.
Obviously this isn't practical. In fact Kodo already turns off
automatic discriminator columns for vertical and table-per-class
inheritance unless you explicitly give a discrimintor value or column.
So one way to not use a discriminator column in Kodo right now is to set
your inheritance type to JOINED or TABLE_PER_CLASS. Another way is to
use Kodo's kodo.persistence.jdbc.DiscriminatorStrategy annotation, which
allows you to name a non-standard or custom discriminator strategy.
Setting this annotation's value to "final" (an alias for Kodo's
kodo.jdbc.meta.strats.NoneDiscriminatorStrategy) will indicate that the
class doesn't need a discriminator because it won't be extended.
We will try to get this ironed out in future versions of the spec.
If I specify a fully qualified name for the EJBQL the first time I query
then I can just use 'Beer' in subsequent queries. It doesn't help to
specify '@Entity(name="Beer")' in the persistent class either.This sounds like a bug in our early access implementation. I have a
feeling it only occurs with property access entities -- if you change
your entity to use field access (which also means using Kodo
enhancement), I think you'd see the problem go away. I think it might
also go away if you performed some other persistence operation on a Beer
entity (such as a by-id lookup) before attempting the query. We'll make
sure to have this fixed for our next release. Thanks for the report. -
ClassCastException in KodoHelper
Hi Folks
I received a ClassCastException when invoking KodoHelper.getPersistenceManagerFactory(File). The exception implies to me that Kodo is casting its PersistenceManagerFactoryImpl class to some incompatible type.
Here is the contents of kodo.properties:
javax.jdo.PersistenceManagerFactoryClass=kodo.jdo.PersistenceManagerFactoryImpl
kodo.ConnectionURL=jdbc:hsqldb:file://c:/projects/temporal/db/temporaldb
kodo.ConnectionDriverName=org.hsqldb.jdbcDriver
kodo.ConnectionUserName=sa
kodo.ConnectionPassword=
kodo.MetaDataFactory=jdo
kodo.Log=DefaultLevel=WARN, Runtime=TRACE, Tool=TRACE
Here is the log output:
C:\dev\jdk1.5.0_07\bin\java -Didea.launcher.port=7542 "-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 5.1\bin" -Dfile.encoding=windows-1252 -classpath "C:\dev\jdk1.5.0_07\jre\lib\charsets.jar;C:\dev\jdk1.5.0_07\jre\lib\deploy.jar;C:\dev\jdk1.5.0_07\jre\lib\javaws.jar;C:\dev\jdk1.5.0_07\jre\lib\jce.jar;C:\dev\jdk1.5.0_07\jre\lib\jsse.jar;C:\dev\jdk1.5.0_07\jre\lib\plugin.jar;C:\dev\jdk1.5.0_07\jre\lib\rt.jar;C:\dev\jdk1.5.0_07\jre\lib\ext\dnsns.jar;C:\dev\jdk1.5.0_07\jre\lib\ext\localedata.jar;C:\dev\jdk1.5.0_07\jre\lib\ext\sunjce_provider.jar;C:\dev\jdk1.5.0_07\jre\lib\ext\sunpkcs11.jar;C:\projects\temporal\build\classes;C:\dev\kodo-4.0.1\lib\xml-apis.jar;C:\dev\kodo-4.0.1\lib\sqlline.jar;C:\dev\kodo-4.0.1\lib\jdbc2_0-stdext.jar;C:\dev\kodo-4.0.1\lib\xalan.jar;C:\dev\kodo-4.0.1\lib\jdo.jar;C:\dev\kodo-4.0.1\lib\kodo.jar;C:\dev\kodo-4.0.1\lib\jpa.jar;C:\dev\kodo-4.0.1\lib\xercesImpl.jar;C:\dev\kodo-4.0.1\lib\wldfchart.jar;C:\dev\kodo-4.0.1\lib\kodo-api.jar;C:\dev\kodo-4.0.1\lib\jdbc-hsql-1_8_0.jar;C:\dev\kodo-4.0.1\lib\jline.jar;C:\dev\kodo-4.0.1\lib\jca1.0.jar;C:\dev\kodo-4.0.1\lib\jndi.jar;C:\dev\kodo-4.0.1\lib\kodo-runtime.jar;C:\dev\kodo-4.0.1\lib\jta-spec1_0_1.jar;C:\dev\kodo-4.0.1\lib\kodo-wl81manage.jar;C:\dev\kodo-4.0.1\lib\kodo-jboss4manage.jar;C:\projects\temporal\build\config;C:\Program Files\JetBrains\IntelliJ IDEA 5.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain net.uk.roos.util.SeedDatabase
Using kodo configuration from resource: C:\projects\temporal\build\config\kodo.properties
0 TRACE [main] kodo.Runtime - Setting the given properties into configuration: {kodo.Log=DefaultLevel=WARN, Runtime=TRACE, Tool=TRACE, kodo.ConnectionPassword=, kodo.ConnectionURL=jdbc:hsqldb:file://c:/projects/temporal/db/temporaldb, javax.jdo.PersistenceManagerFactoryClass=kodo.jdo.PersistenceManagerFactoryImpl, kodo.MetaDataFactory=jdo, kodo.ConnectionUserName=sa, kodo.ConnectionDriverName=org.hsqldb.jdbcDriver}
281 INFO [main] kodo.Runtime - Starting Kodo 4.0.1
281 DEBUG [main] kodo.Runtime - License capabilities: "Kodo Standard Edition,Remote Commit Listeners,Kodo Community Edition,Datacache Plug-in,Enterprise Databases,Query Extensions,Performance Pack,Statement Batching,Kodo Enterprise Edition,Custom Fetch Groups,Managed Environment,Developer Tools,Custom DBDictionaries" Expiration: "-" Maintenance expiration: "-"
281 TRACE [main] kodo.Runtime - kodo.ManagementConfiguration: none
kodo.PersistenceServer: false
kodo.Compatibility: default
kodo.OrphanedKeyAction: log
kodo.jdbc.Schemas:
kodo.jdbc.LRSSize: query
kodo.DynamicDataStructs: false
kodo.RetryClassRegistration: false
kodo.jdbc.SchemaFactory: dynamic
kodo.ConnectionURL: jdbc:hsqldb:file://c:/projects/temporal/db/temporaldb
kodo.jdbc.SynchronizeMappings: false
kodo.BrokerImpl: default
kodo.ConnectionDriverName: org.hsqldb.jdbcDriver
kodo.MetaDataFactory: jdo
kodo.jdbc.MappingDefaults: jdo
kodo.ManagedRuntime: auto
kodo.QueryCompilationCache: true
kodo.ReadLockLevel: read
kodo.jdbc.FetchDirection: forward
kodo.DataCacheTimeout: -1
kodo.ClassResolver: default
kodo.ConnectionUserName: sa
kodo.jdbc.TransactionIsolation: default
kodo.IgnoreChanges: false
kodo.InverseManager: false
kodo.ConnectionRetainMode: on-demand
kodo.Sequence: table
kodo.SavepointManager: in-mem
kodo.ConnectionPassword:
kodo.AutoDetach:
kodo.TransactionMode: local
kodo.NontransactionalRead: true
kodo.DetachState: loaded
kodo.AutoClear: datastore
javax.jdo.PersistenceManagerFactoryClass: kodo.jdo.PersistenceManagerFactoryImpl
kodo.BrokerFactory: jdbc
kodo.Multithreaded: false
kodo.Log: DefaultLevel=WARN, Runtime=TRACE, Tool=TRACE
kodo.QueryCache: true
kodo.jdbc.UpdateManager: default
kodo.jdbc.ResultSetType: forward-only
kodo.ProxyManager: default
kodo.LockTimeout: -1
kodo.RetainState: true
kodo.RestoreState: immutable
kodo.FlushBeforeQueries: true
kodo.ConnectionFactoryMode: local
kodo.FetchBatchSize: -1
kodo.Optimistic: true
kodo.jdbc.EagerFetchMode: parallel
kodo.FetchGroups:
kodo.LockManager: pessimistic
kodo.jdbc.SubclassFetchMode: join
kodo.NontransactionalWrite: false
kodo.WriteLockLevel: write
Exception in thread "main" java.lang.ClassCastException: kodo.jdo.PersistenceManagerFactoryImpl
at kodo.runtime.KodoHelper.getPersistenceManagerFactory(KodoHelper.java:66)
at net.uk.roos.util.SeedDatabase.go(Unknown Source)
at net.uk.roos.util.SeedDatabase.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Process finished with exit code 1
Thanks and regards, Robin.
Robin Roos (robin at roos dot uk dot net)I solved my problem by defining a Properties object with the required configuration information and using JDOHelper.getPersistenceManagerFactory(Properties) instead of (File).
Kind regards, Robin. -
Kodo.util.InternalException: null
Hello,
I'm trying new persistence EJB3 implementation from SolarMetric:
kodo-4.0.0EA3
I have constructed a simple test app. And when I try to run it I get:
Exception in thread "main" <1|true|4.0.0EA3> kodo.util.InternalException:
null
at
kodo.synthetic.com.dalitest.ClientKodoSyntheticSubclassProxy.kodoNewObjectIdInstance(Unknown
Source)
at kodo.util.ApplicationIds.create(ApplicationIds.java:246)
at kodo.kernel.BrokerImpl.persist(BrokerImpl.java:2433)
at kodo.kernel.BrokerImpl.persistSafe(BrokerImpl.java:2379)
at kodo.kernel.BrokerImpl.persist(BrokerImpl.java:2366)
at kodo.kernel.DelegatingBroker.persist(DelegatingBroker.java:1275)
at kodo.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:519)
at com.dalitest.Test.main(Test.java:21)
Do you know what is going on?
Here is my code:
package com.dalitest;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;
public class Test
public static void main(String[] args)
EntityManagerFactory factory =
Persistence.createEntityManagerFactory("kodo");
EntityManager em = factory.createEntityManager();
Client c1 = new Client();
c1.setName("John Doe");
EntityTransaction t = em.getTransaction();
t.begin();
em.persist(c1);
t.commit();
and Client.java:
package com.dalitest;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.Column;
@Entity(access = AccessType.PROPERTY)
@Table(name="DALI_CLIENTS")
public class Client
private String id;
private String name;
public void setName(String name)
this.name = name;
@Column(name="NAME")
public String getName()
return name;
public void setId(String id)
this.id = id;
@Id
@Column(name="ID")
public String getId()
return id;
and my persistence.xml:
<?xml version="1.0"?>
<entity-manager>
<name>kodo</name>
<provider>kodo.persistence.PersistenceProviderImpl</provider>
<class>com.dalitest.Client</class>
<properties>
<property name="kodo.LicenseKey"
value="XXX" />
<property name="kodo.ConnectionURL"
value="XXX" />
<property name="kodo.ConnectionDriverName"
value="oracle.jdbc.driver.OracleDriver" />
<property name="kodo.ConnectionUserName" value="XXX" />
<property name="kodo.ConnectionPassword" value="XXX" />
<property name="kodo.Log" value="DefaultLevel=WARN, Tool=INFO" />
</properties>
</entity-manager>
Where I have masked some values with XXX for this post.
Thanks in advance,
RuslanAlso I tried to enable DEBUG mode
<property name="kodo.Log" value="DefaultLevel=WARN, Tool=INFO" />
And got the following output before this exception:
15 INFO [main] kodo.Runtime - Starting Kodo 4.0.0EA3
62 DEBUG [main] kodo.Runtime - License capabilities: "Kodo Standard
Edition,Kodo Community Edition,Kodo Evaluation Edition,Datacache
Plug-in,Custom Result Object Providers,Custom Mappings,Enterprise
Databases,Query Extensions,Performance Pack,Statement Batching,Kodo
Enterprise Edition,Managed Environment,Developer Tools,Custom
DBDictionaries" Expiration: "2/25/06 7:00 PM" Maintenance expiration:
"2/25/06 7:00 PM"
187 INFO [main] kodo.jdbc.JDBC - Using dictionary class
"kodo.jdbc.sql.OracleDictionary".
343 INFO [main] kodo.MetaData - Found 1 classes with metadata in 0
milliseconds.
422 INFO [main] kodo.MetaData - parse-class
422 INFO [main] kodo.MetaData - parse-package
Exception in thread "main" <1|true|4.0.0EA3> kodo.util.InternalException:
null
at
kodo.synthetic.com.dalitest.ClientKodoSyntheticSubclassProxy.kodoNewObjectIdInstance(Unknown
Source)
at kodo.util.ApplicationIds.create(ApplicationIds.java:246)
at kodo.kernel.BrokerImpl.persist(BrokerImpl.java:2433)
at kodo.kernel.BrokerImpl.persistSafe(BrokerImpl.java:2379)
at kodo.kernel.BrokerImpl.persist(BrokerImpl.java:2366)
at kodo.kernel.DelegatingBroker.persist(DelegatingBroker.java:1275)
at kodo.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:519)
at com.dalitest.Test.main(Test.java:21) -
Issue Installing SP2 for Windows Server 2008 SP1
Hello, I have a very annoying issue, and I hope someone can help a bro out.
Server: Windows Server 2008 SP1 64-bit
Issue: SP2 wont install on Windows Server 2008 SP1
This is what I am seeing when I check the event viewer:
1. (Information) Windows Servicing is setting package KB948465(Service Pack) state to Staging(Staging)
2. (Error) Windows Servicing failed to complete the process of changing update 948465-382_neutral_GDR from package KB948465(Service Pack) into Staging(Staging) state
I have no idea why this is coming up, nor why the server cant fix the issue, but now I am forced to deal with it. So if anyone has any helpful tips it would be greatly appreciated.
What I have done so far:
I have downloaded the standalone SP2 file from microsoft, and tried to install, still failed. Just sent me to the prereq page, which is pretty useless considering the fact I already have SP1 installed, and nothing new has changed physically or digitally
in the system.
Also, although not a huge issue, I also have a security update that is failing, basically with the same issue as the SP. Below is its Error event log.
(Error) Windows Servicing failed to complete the process of changing update 974318-11_neutral_LDR from package KB974318(Security Update) into Staging(Staging) state
Im hoping that upon discovering the SP issue, I can resolve the security update issue, as the errors have the same issue(failed to complete staging state).Thank you for your time.
~I will provide any further info if needed.Thank you for pointing me in the right direction Milos. Yes I ALWAYS google my issues before going on forums for help. And to no avail. However, below is the relevant info(sorry I did not post this the first time;first time dealing with an issue like this,
so I wasnt for shore what relevant data pertained to this issue):
I also did not copy and paste the entire log in here(obviously) because its huge, however I will post link to full file if requested/needed, but hopefully I grabbed the entire log for my SP2 update failure issue. All I can grab from this log is that the
CBS failed. However, I have no clue where to go after that..
WindowsUpdate.log:
2015-02-22 19:24:15:093
940 d10
AU AU initiated download, updateId = {D0ABB478-FFD1-448A-9058-939C0B427AD4}.107, callId = {2AFDE80E-EFBF-40A6-861B-32400AC5493B}
2015-02-22 19:24:15:093
940 d10
AU Setting AU scheduled install time to 2015-02-23 08:00:00
2015-02-22 19:24:15:106
940 1538
DnldMgr *************
2015-02-22 19:24:15:107
940 1538
DnldMgr ** START ** DnldMgr: Downloading updates [CallerId = AutomaticUpdates]
2015-02-22 19:24:15:107
940 1538
DnldMgr *********
2015-02-22 19:24:15:107
940 1538
DnldMgr * Call ID = {2AFDE80E-EFBF-40A6-861B-32400AC5493B}
2015-02-22 19:24:15:107
940 1538
DnldMgr * Priority = 1, Interactive = 0, Owner is system = 1, Explicit proxy = 0, Proxy session id = -1, ServiceId = {9482F4B4-E343-43B6-B170-9A65BC822C77}
2015-02-22 19:24:15:107
940 1538
DnldMgr * Updates to download = 1
2015-02-22 19:24:15:107
940 1538
Agent * Title = Windows Server 2008 Service Pack 2 for x64-based Systems (KB948465)
2015-02-22 19:24:15:108
940 1538
Agent * UpdateId = {D0ABB478-FFD1-448A-9058-939C0B427AD4}.107
2015-02-22 19:24:15:108
940 1538
Agent * Bundles 2 updates:
2015-02-22 19:24:15:108
940 1538
Agent * {A34F6A47-5AB9-44CB-AB3F-9FC64F7B903C}.107
2015-02-22 19:24:15:108
940 1538
Agent * {77DBCA97-29DC-42BA-9DB2-03C7B4D262D4}.107
2015-02-22 19:24:15:108
940 1538
DnldMgr *********** DnldMgr: Regulation Refresh [Svc: {9482F4B4-E343-43B6-B170-9A65BC822C77}] ***********
2015-02-22 19:24:15:108
940 1538
DnldMgr Contacting regulation server for 2 updates.
2015-02-22 19:24:15:109
940 1538
Misc Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\wuredir.cab:
2015-02-22 19:24:15:119
940 1538
Misc Microsoft signed: Yes
2015-02-22 19:24:15:123
940 1538
Misc Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\wuredir.cab:
2015-02-22 19:24:15:131
940 1538
Misc Microsoft signed: Yes
2015-02-22 19:24:15:134
940 1538
DnldMgr Regulation server path: https://www.update.microsoft.com/v6/UpdateRegulationService/UpdateRegulation.asmx.
2015-02-22 19:24:15:135
940 d10
AU # Pending download calls = 1
2015-02-22 19:24:15:135
940 d10
AU <<## SUBMITTED ## AU: Download updates
2015-02-22 19:24:15:644
940 1538
DnldMgr * Regulation call complete. 0x00000000
2015-02-22 19:24:15:661
940 1538
DnldMgr *********** DnldMgr: New download job [UpdateId = {A34F6A47-5AB9-44CB-AB3F-9FC64F7B903C}.107] ***********
2015-02-22 19:24:15:732
940 1538
DnldMgr * All files for update were already downloaded and are valid.
2015-02-22 19:24:15:732
940 1538
DnldMgr *********** DnldMgr: New download job [UpdateId = {77DBCA97-29DC-42BA-9DB2-03C7B4D262D4}.107] ***********
2015-02-22 19:24:15:733
940 1538
DnldMgr * Queueing update for download handler request generation.
2015-02-22 19:24:15:733
940 1538
DnldMgr Generating download request for update {77DBCA97-29DC-42BA-9DB2-03C7B4D262D4}.107
2015-02-22 19:24:16:095
940 1538
Handler Generating request for CBS update 77DBCA97-29DC-42BA-9DB2-03C7B4D262D4 in sandbox C:\Windows\SoftwareDistribution\Download\2c728f96f2387c9d64aed5c97088b631
2015-02-22 19:24:16:095
940 1538
Handler Selected payload type is ptExpress
2015-02-22 19:24:16:124
940 1538
Handler UH: DpxRestoreJob returned 0x80070002
2015-02-22 19:24:16:124
940 1538
Handler Detected download state is dsHavePackage
2015-02-22 19:25:32:077
940 dcc
AU AU received policy change subscription event
2015-02-22 19:26:21:898
940 d40
Handler FATAL: CBS called Error with 0x80070002,
2015-02-22 19:26:21:899
940 1538
Handler FATAL: UH: 0x80070002: Async stage operation failed in CUHCbsHandler::StageCbsPackage
2015-02-22 19:26:21:909
940 1538
Handler FATAL: Request generation for CBS update complete with hr=0x80070002 and pfResetSandbox=0
2015-02-22 19:26:21:909
940 1538
Handler FATAL: Error source is 106.
2015-02-22 19:26:21:909
940 1538
DnldMgr FATAL: DM:CAgentDownloadManager::GenerateAllDownloadRequests: GenerateDownloadRequest failed with 0x80070002.
2015-02-22 19:26:21:909
940 1538
DnldMgr Error 0x80070002 occurred while downloading update; notifying dependent calls.
2015-02-22 19:26:35:006
940 1538
Agent *********
2015-02-22 19:26:35:006
940 d10
AU >>## RESUMED ## AU: Download update [UpdateId = {D0ABB478-FFD1-448A-9058-939C0B427AD4}]
2015-02-22 19:26:35:007
940 1538
Agent ** END ** Agent: Downloading updates [CallerId = AutomaticUpdates]
2015-02-22 19:26:35:007
940 d10
AU # WARNING: Download failed, error = 0x80070002
2015-02-22 19:26:35:007
940 1538
Agent *************
2015-02-22 19:26:35:007
940 d10
AU #########
2015-02-22 19:26:35:007
940 1538
Report REPORT EVENT: {3C6B2054-CE6F-4A29-9E94-D44AB5C4963F}
2015-02-22 19:24:15:004-0500 1
147 101
{00000000-0000-0000-0000-000000000000}
0 0 AutomaticUpdates
Success Software Synchronization
Windows Update Client successfully detected 2 updates.
2015-02-22 19:26:35:008
940 d10
AU ## END ## AU: Download updates
2015-02-22 19:26:35:008
940 d10
AU #############
2015-02-22 19:26:35:008
940 d10
AU Setting AU scheduled install time to 2015-02-23 08:00:00
2015-02-22 19:26:35:008
940 1538
Report CWERReporter finishing event handling. (00000000)
2015-02-22 19:26:35:009
940 1538
Report REPORT EVENT: {85DD7E1D-0632-44FF-81F3-34E75B954869}
2015-02-22 19:26:22:129-0500 1
161 106
{D0ABB478-FFD1-448A-9058-939C0B427AD4}
107 80070002
AutomaticUpdates Failure
Content Download Error: Download failed.
2015-02-22 19:26:35:181
940 1538
Report CWERReporter::HandleEvents - WER report upload completed with status 0x8
2015-02-22 19:26:35:181
940 1538
Report WER Report sent: 7.4.7600.226 0x80070002 D0ABB478-FFD1-448A-9058-939C0B427AD4 Download 106 Unmanaged
2015-02-22 19:26:35:182
940 1538
Report CWERReporter finishing event handling. (00000000)
2015-02-22 19:26:40:009
940 1538
Report REPORT EVENT: {E88B7854-8974-46BE-B243-143ED103C6FF}
2015-02-22 19:26:35:009-0500 1
188 102
{00000000-0000-0000-0000-000000000000}
0 0 AutomaticUpdates
Success Content Install
Installation Ready: The following updates are downloaded and ready for installation. This computer is currently scheduled to install these updates on Monday, February 23, 2015 at 3:00 AM: - Security Update for Windows Server 2008 x64 Edition
(KB2507618)
2015-02-22 19:26:40:009
940 1538
Report CWERReporter finishing event handling. (00000000) -
Persistence by reachability with FK in PK
Hi,
I have a question concerning persistence-by-reachability in the
following scenario (also see code, log in attachment):
+ A composite aggregation between Attribute and AttributeType (Attribute
cannot be created without a valid Type) is mapped to the following schema:
CREATE TABLE ATTRIBUTE_TYPE (
ID NUMBER (4) NOT NULL,
TYPE NUMBER (2) NOT NULL,
CONSTRAINT ATTRIBUTE_TYPE_PK
PRIMARY KEY ( ID ) ) ;
CREATE TABLE ATTRIBUTE (
CLASS_ID NUMBER(4) NOT NULL,
TYPE_ID NUMBER (4) NOT NULL,
VALUE VARCHAR2 (100) NOT NULL,
CONSTRAINT ATTRIBUTE_PK
PRIMARY KEY ( CLASS_ID, TYPE_ID ) ) ;
ALTER TABLE ATTRIBUTE ADD CONSTRAINT ATTRIBUTE_FK
FOREIGN KEY (TYPE_ID)
REFERENCES ATTRIBUTE_TYPE (ID) ;
+ In the constructor of Attribute, the AttributeType is given as
parameter and both the instance variable type as typeId is set (and
type.getId() == typeId). Both classes use Application Identity.
private AttributeType type;
private int typeId;
private String value;
private int classId;
public Attribute(int pClassId, AttributeType pType, String pValue) {
this.classId = pClassId;
this.typeId = pType.getId();
this.type = pType;
this.value = pValue;
+ So, when persisting a new instance of Attribute of a new AttributeType
the ATTRIBUTE_FK constraint is violated:
javax.jdo.PersistentManager pm = ...
pm.currentTransaction().begin();
pm.makePersistent(new Attribute(10,new AttributeType(50,10),"KODO")));
pm.currentTransaction().commit();
According to the JDO Specification AttributeType is part of the object
closure of Attribute and is marked provisionally persistent by the
'Persistence-by-reachability' algorithm and made persistent at commit.
Apparently KODO doesn't take the FK constraint into account to derive
the order in which to make classes persistent. Is this assumption
correct? And is there a workaround for this?
Thanks in advance,
Stijn Van den EndenAssuming we're talking about Oracle, using deferred constraints has the
undesirable effect of forcing use of a non-unique index to enforce the FK
constraint.
Is there any other way with 2.5.5 to get Kodo to insert to the parent table,
and delete from the child tables first ?
Regards,
Chris.
"Stijn Van den Enden" <[email protected]> wrote in message
news:[email protected]...
Hi,
thanks a lot!
Marking the FK constraint as Defferable works fine for me.
ALTER TABLE ATTRIBUTE ADD CONSTRAINT ATTRIBUTE_FK
FOREIGN KEY (TYPE_ID)
REFERENCES ATTRIBUTE_TYPE (ID)
DEFERRABLE INITIALLY DEFERRED;
Thanx,
Stijn Van den Enden
Stephen Kim wrote:
Kodo 2.5.x does not do foreign key constraint analysis. You should
either use deferred database constraints (supported on several dbs) or
try using Kodo 3 (in RC stage) which can optionally do so (it is
disabled by default since it could have performance impact (analyzing
instead of simply executing SQL)).
Stijn Van den Enden wrote:
Hi,
I have a question concerning persistence-by-reachability in the
following scenario (also see code, log in attachment):
+ A composite aggregation between Attribute and AttributeType
(Attribute cannot be created without a valid Type) is mapped to the
following schema:
CREATE TABLE ATTRIBUTE_TYPE (
ID NUMBER (4) NOT NULL,
TYPE NUMBER (2) NOT NULL,
CONSTRAINT ATTRIBUTE_TYPE_PK
PRIMARY KEY ( ID ) ) ;
CREATE TABLE ATTRIBUTE (
CLASS_ID NUMBER(4) NOT NULL,
TYPE_ID NUMBER (4) NOT NULL,
VALUE VARCHAR2 (100) NOT NULL,
CONSTRAINT ATTRIBUTE_PK
PRIMARY KEY ( CLASS_ID, TYPE_ID ) ) ;
ALTER TABLE ATTRIBUTE ADD CONSTRAINT ATTRIBUTE_FK
FOREIGN KEY (TYPE_ID)
REFERENCES ATTRIBUTE_TYPE (ID) ;
+ In the constructor of Attribute, the AttributeType is given as
parameter and both the instance variable type as typeId is set (and
type.getId() == typeId). Both classes use Application Identity.
private AttributeType type;
private int typeId;
private String value;
private int classId;
public Attribute(int pClassId, AttributeType pType, String pValue) {
this.classId = pClassId;
this.typeId = pType.getId();
this.type = pType;
this.value = pValue;
+ So, when persisting a new instance of Attribute of a new
AttributeType the ATTRIBUTE_FK constraint is violated:
javax.jdo.PersistentManager pm = ...
pm.currentTransaction().begin();
pm.makePersistent(new Attribute(10,new AttributeType(50,10),"KODO")));
pm.currentTransaction().commit();
According to the JDO Specification AttributeType is part of the object
closure of Attribute and is marked provisionally persistent by the
'Persistence-by-reachability' algorithm and made persistent at commit.
Apparently KODO doesn't take the FK constraint into account to derive
the order in which to make classes persistent. Is this assumption
correct? And is there a workaround for this?
Thanks in advance,
Stijn Van den Enden
DEBUG [main] (JDBCPersistenceManagerFactory.java:241) -
[email protected]b9:
setup
DEBUG [main] (JDBCPersistenceManagerFactory.java:241) -
[email protected]b9:
setup
INFO [main] (LicenseChecker.java:162) - Starting Kodo JDO version
2.5.4 (kodojdo-2.5.4-20031001-1134) with capabilities: [Enterprise
Edition Features, Standard Edition Features, Lite Edition Features,
Evaluation License, Query Extensions, Performance Pack, Statement
Batching, Global Transactions, Developer Tools, Custom Database
Dictionaries, Enterprise Databases, Custom ClassMappings, Custom
ResultObjectProviders, Datacache Plug-in]
INFO [main] (LicenseChecker.java:162) - Starting Kodo JDO version
2.5.4 (kodojdo-2.5.4-20031001-1134) with capabilities: [Enterprise
Edition Features, Standard Edition Features, Lite Edition Features,
Evaluation License, Query Extensions, Performance Pack, Statement
Batching, Global Transactions, Developer Tools, Custom Database
Dictionaries, Enterprise Databases, Custom ClassMappings, Custom
ResultObjectProviders, Datacache Plug-in]
WARN [main] (LicenseChecker.java:181) - WARNING: Kodo JDO Evaluation
expires in 8 days. Please contact [email protected] for
information on extending your evaluation period or purchasing a
license.
WARN [main] (LicenseChecker.java:181) - WARNING: Kodo JDO Evaluation
expires in 8 days. Please contact [email protected] for
information on extending your evaluation period or purchasing alicense.
DEBUG [main] (JDBCPersistenceManagerFactory.java:444) -
[email protected]b9:
registering 1 classes: [class reachability.AttributeType]
DEBUG [main] (JDBCPersistenceManagerFactory.java:444) -
[email protected]b9:
registering 1 classes: [class reachability.AttributeType]
DEBUG [main] (MetaDataParser.java:136) - found JDO resource
package.jdo for reachability.AttributeType at
file:/F:/Sources/Projects/Bugs/jdo/kodo/reachability/package.jdo
DEBUG [main] (MetaDataParser.java:136) - found JDO resource
package.jdo for reachability.AttributeType at
file:/F:/Sources/Projects/Bugs/jdo/kodo/reachability/package.jdo
INFO [main] (JDOMetaDataParser.java:89) -
com.solarmetric.kodo.meta.JDOMetaDataParser@3020ad: parsing source:
file:/F:/Sources/Projects/Bugs/jdo/kodo/reachability/package.jdo
INFO [main] (JDOMetaDataParser.java:89) -
com.solarmetric.kodo.meta.JDOMetaDataParser@3020ad: parsing source:
file:/F:/Sources/Projects/Bugs/jdo/kodo/reachability/package.jdo
DEBUG [main] (MetaDataParser.java:204) - parsed
file:/F:/Sources/Projects/Bugs/jdo/kodo/reachability/package.jdo:
[com.solarmetric.kodo.meta.ClassMetaData@2200d5[;type=class
reachability.Attribute;loader=sun.misc.Launcher$AppClassLoader@12f6684;finis
hed=false;enhanced=false],
com.solarmetric.kodo.meta.ClassMetaData@64ab4d[;type=class
reachability.AttributeType;loader=sun.misc.Launcher$AppClassLoader@12f6684;f
inished=false;enhanced=true]]
>>>
DEBUG [main] (MetaDataParser.java:204) - parsed
file:/F:/Sources/Projects/Bugs/jdo/kodo/reachability/package.jdo:
[com.solarmetric.kodo.meta.ClassMetaData@2200d5[;type=class
reachability.Attribute;loader=sun.misc.Launcher$AppClassLoader@12f6684;finis
hed=false;enhanced=false],
com.solarmetric.kodo.meta.ClassMetaData@64ab4d[;type=class
reachability.AttributeType;loader=sun.misc.Launcher$AppClassLoader@12f6684;f
inished=false;enhanced=true]]
>>>
DEBUG [main] (ClassMetaData.java:305) - parsed metadata: type=class
reachability.AttributeType@110003;validate=true:
[com.solarmetric.kodo.meta.ClassMetaData@2200d5[;type=class
reachability.Attribute;loader=sun.misc.Launcher$AppClassLoader@12f6684;finis
hed=false;enhanced=false],
com.solarmetric.kodo.meta.ClassMetaData@64ab4d[;type=class
reachability.AttributeType;loader=sun.misc.Launcher$AppClassLoader@12f6684;f
inished=false;enhanced=true]]
>>>
DEBUG [main] (ClassMetaData.java:305) - parsed metadata: type=class
reachability.AttributeType@110003;validate=true:
[com.solarmetric.kodo.meta.ClassMetaData@2200d5[;type=class
reachability.Attribute;loader=sun.misc.Launcher$AppClassLoader@12f6684;finis
hed=false;enhanced=false],
com.solarmetric.kodo.meta.ClassMetaData@64ab4d[;type=class
reachability.AttributeType;loader=sun.misc.Launcher$AppClassLoader@12f6684;f
inished=false;enhanced=true]]
>>>
DEBUG [main] (ClassMetaData.java:327) - cached metadata:
type=reachability.Attribute@49d67c;loader=com.solarmetric.kodo.util.MultiLoa
derClassResolver@12f66a3
loaders: [sun.misc.Launcher$AppClassLoader@12f6684]; thread's context
class loader: sun.misc.Launcher$AppClassLoader@12f6684;validate=true:
com.solarmetric.kodo.meta.ClassMetaData@2200d5[;type=class
reachability.Attribute;loader=sun.misc.Launcher$AppClassLoader@12f6684;finis
hed=false;enhanced=false]
>>>
DEBUG [main] (ClassMetaData.java:327) - cached metadata:
type=reachability.Attribute@49d67c;loader=com.solarmetric.kodo.util.MultiLoa
derClassResolver@12f66a3
loaders: [sun.misc.Launcher$AppClassLoader@12f6684]; thread's context
class loader: sun.misc.Launcher$AppClassLoader@12f6684;validate=true:
com.solarmetric.kodo.meta.ClassMetaData@2200d5[;type=class
reachability.Attribute;loader=sun.misc.Launcher$AppClassLoader@12f6684;finis
hed=false;enhanced=false]
>>>
DEBUG [main] (ClassMetaData.java:327) - cached metadata:
type=reachability.AttributeType@110003;loader=com.solarmetric.kodo.util.Mult
iLoaderClassResolver@12f66a3
loaders: [sun.misc.Launcher$AppClassLoader@12f6684]; thread's context
class loader: sun.misc.Launcher$AppClassLoader@12f6684;validate=true:
com.solarmetric.kodo.meta.ClassMetaData@64ab4d[;type=class
reachability.AttributeType;loader=sun.misc.Launcher$AppClassLoader@12f6684;f
inished=false;enhanced=true]
>>>
DEBUG [main] (ClassMetaData.java:327) - cached metadata:
type=reachability.AttributeType@110003;loader=com.solarmetric.kodo.util.Mult
iLoaderClassResolver@12f66a3
loaders: [sun.misc.Launcher$AppClassLoader@12f6684]; thread's context
class loader: sun.misc.Launcher$AppClassLoader@12f6684;validate=true:
com.solarmetric.kodo.meta.ClassMetaData@64ab4d[;type=class
reachability.AttributeType;loader=sun.misc.Launcher$AppClassLoader@12f6684;f
inished=false;enhanced=true]
>>>
DEBUG [main] (ClassMetaData.java:305) - parsed metadata: type=class
java.lang.Object@16fd0b7;validate=true: []
DEBUG [main] (ClassMetaData.java:305) - parsed metadata: type=class
java.lang.Object@16fd0b7;validate=true: []
DEBUG [main] (ClassMetaData.java:344) - created metadata:
type=java.lang.Object@16fd0b7;loader=com.solarmetric.kodo.util.MultiLoaderCl
assResolver@12f66a3
loaders: [sun.misc.Launcher$AppClassLoader@12f6684]; thread's context
class loader: sun.misc.Launcher$AppClassLoader@12f6684;validate=true:
null
DEBUG [main] (ClassMetaData.java:344) - created metadata:
type=java.lang.Object@16fd0b7;loader=com.solarmetric.kodo.util.MultiLoaderCl
assResolver@12f66a3
loaders: [sun.misc.Launcher$AppClassLoader@12f6684]; thread's context
class loader: sun.misc.Launcher$AppClassLoader@12f6684;validate=true:
null
DEBUG [main] (ClassMetaData.java:344) - created metadata:
type=reachability.AttributeType@110003;loader=com.solarmetric.kodo.util.Mult
iLoaderClassResolver@12f66a3
loaders: [sun.misc.Launcher$AppClassLoader@12f6684]; thread's context
class loader: sun.misc.Launcher$AppClassLoader@12f6684;validate=true:
com.solarmetric.kodo.meta.ClassMetaData@64ab4d[;type=class
reachability.AttributeType;loader=sun.misc.Launcher$AppClassLoader@12f6684;f
inished=true;enhanced=true]
>>>
DEBUG [main] (ClassMetaData.java:344) - created metadata:
type=reachability.AttributeType@110003;loader=com.solarmetric.kodo.util.Mult
iLoaderClassResolver@12f66a3
loaders: [sun.misc.Launcher$AppClassLoader@12f6684]; thread's context
class loader: sun.misc.Launcher$AppClassLoader@12f6684;validate=true:
com.solarmetric.kodo.meta.ClassMetaData@64ab4d[;type=class
reachability.AttributeType;loader=sun.misc.Launcher$AppClassLoader@12f6684;f
inished=true;enhanced=true]
>>>
DEBUG [main] (DataSourceImpl.java:323) - [ C:5896993; T:24537094;
D:10973446 ] open: jdbc:oracle:thin:@SUNFIRE:1521:CCLDEV (CCLJDO)
DEBUG [main] (DataSourceImpl.java:323) - [ C:5896993; T:24537094;
D:10973446 ] open: jdbc:oracle:thin:@SUNFIRE:1521:CCLDEV (CCLJDO)
DEBUG [main] (DataSourceImpl.java:323) - [ C:5896993; T:24537094;
D:10973446 ] close:
com.solarmetric.datasource.PoolConnection@59fb21[identityHashCode:8499707,wr
apped:com.solarmetric.datasource.PreparedStatementCache$CacheAwareConnection
@59fb21[identityHashCode:13359904,wrapped:oracle.jdbc.driver.OracleConnectio
n@59fb21]:
>>>
[requests=0;size=0;max=70;hits=0;created=0;redundant=0;overflow=0;new=0;leak
ed=0;unavailable=0]]
>>>
DEBUG [main] (DataSourceImpl.java:323) - [ C:5896993; T:24537094;
D:10973446 ] close:
com.solarmetric.datasource.PoolConnection@59fb21[identityHashCode:8499707,wr
apped:com.solarmetric.datasource.PreparedStatementCache$CacheAwareConnection
@59fb21[identityHashCode:13359904,wrapped:oracle.jdbc.driver.OracleConnectio
n@59fb21]:
>>>
[requests=0;size=0;max=70;hits=0;created=0;redundant=0;overflow=0;new=0;leak
ed=0;unavailable=0]]
>>>
DEBUG [main] (DataSourceImpl.java:323) - [ C:5896993; T:24537094;
D:10973446 ] close connection
DEBUG [main] (DataSourceImpl.java:323) - [ C:5896993; T:24537094;
D:10973446 ] close connection
INFO [main] (DBDictionaryFactory.java:402) - Using dictionary class
"com.solarmetric.kodo.impl.jdbc.schema.dict.OracleDictionary" to
connect to "Oracle" (version "Oracle8i Enterprise Edition Release
8.1.7.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.0.0 - 64bit Production") with JDBC driver
"Oracle JDBC driver" (version "9.2.0.1.0")
INFO [main] (DBDictionaryFactory.java:402) - Using dictionary class
"com.solarmetric.kodo.impl.jdbc.schema.dict.OracleDictionary" to
connect to "Oracle" (version "Oracle8i Enterprise Edition Release
8.1.7.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.0.0 - 64bit Production") with JDBC driver
"Oracle JDBC driver" (version "9.2.0.1.0")
DEBUG [main] (JDBCPersistenceManagerFactory.java:345) -
[email protected]b9:
registerClass: reachability.AttributeType@110003=>true
DEBUG [main] (JDBCPersistenceManagerFactory.java:345) -
[email protected]b9:
registerClass: reachability.AttributeType@110003=>true
DEBUG [main] (JDBCPersistenceManagerFactory.java:444) -
[email protected]b9:
registering 2 classes: [class reachability.AttributeType, class
reachability.Attribute]
DEBUG [main] (JDBCPersistenceManagerFactory.java:444) -
[email protected]b9:
registering 2 classes: [class reachability.AttributeType, class
reachability.Attribute]
DEBUG [main] (JDBCPersistenceManagerFactory.java:345) -
[email protected]b9:
registerClass: reachability.Attribute@49d67c=>true
DEBUG [main] (JDBCPersistenceManagerFactory.java:345) -
[email protected]b9:
registerClass: reachability.Attribute@49d67c=>true
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] open: jdbc:oracle:thin:@SUNFIRE:1521:CCLDEV (CCLJDO)
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] open: jdbc:oracle:thin:@SUNFIRE:1521:CCLDEV (CCLJDO)
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] preparing statement <11544872>: SELECT SYSDATE FROM DUAL
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] preparing statement <11544872>: SELECT SYSDATE FROM DUAL
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] executing statement <11544872>: (SELECT SYSDATE FROM
DUAL): [reused=1;params={}]
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] executing statement <11544872>: (SELECT SYSDATE FROM
DUAL): [reused=1;params={}]
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] preparing statement <24880015>: INSERT INTO
ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?, ?, ?)
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] preparing statement <24880015>: INSERT INTO
ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?, ?, ?)
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] executing statement <24880015>: (INSERT INTO
ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?, ?, ?)):
[reused=1;params={(int)10,(int)10,(String)KODO}]
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] executing statement <24880015>: (INSERT INTO
ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?, ?, ?)):
[reused=1;params={(int)10,(int)10,(String)KODO}]
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] begin rollback
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] begin rollback
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] end rollback 0ms
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] end rollback 0ms
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] close:
com.solarmetric.datasource.PoolConnection@69d02b[identityHashCode:6151022,wr
apped:com.solarmetric.datasource.PreparedStatementCache$CacheAwareConnection
@69d02b[identityHashCode:32580443,wrapped:oracle.jdbc.driver.OracleConnectio
n@69d02b]:
>>>
[requests=2;size=2;max=70;hits=0;created=2;redundant=0;overflow=0;new=2;leak
ed=0;unavailable=0]]
>>>
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] close:
com.solarmetric.datasource.PoolConnection@69d02b[identityHashCode:6151022,wr
apped:com.solarmetric.datasource.PreparedStatementCache$CacheAwareConnection
@69d02b[identityHashCode:32580443,wrapped:oracle.jdbc.driver.OracleConnectio
n@69d02b]:
>>>
[requests=2;size=2;max=70;hits=0;created=2;redundant=0;overflow=0;new=2;leak
ed=0;unavailable=0]]
>>>
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] close connection
DEBUG [main] (DataSourceImpl.java:323) - [ C:6934571; T:24537094;
D:10973446 ] close connection
DEBUG [main] (PersistenceManagerImpl.java:481) - An exception occurred
while ending a transaction. This exception will be thrown. It is being
logged here for informational purposes only.
com.solarmetric.kodo.runtime.FatalDataStoreException:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=INSERT
INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (10, 10, 'KODO')]
[PRE=INSERT INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?, ?, ?)]
ORA-02291: integrity constraint (CCLJDO.ATTRIBUTE_FK) violated -
parent key not found
[code=2291;state=23000]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=INSERT
INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (10, 10, 'KODO')]
[PRE=INSERT INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?, ?, ?)]
ORA-02291: integrity constraint (CCLJDO.ATTRIBUTE_FK) violated -
parent key not found
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLException
s.java:58)
>>>
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManag
er.java:559)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flushInternal(Persistenc
eManagerImpl.java:697)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManage
rImpl.java:422)
>>>
at
reachabilicom.solarmetric.kodo.runtime.FatalDataStoreException:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=INSERT
INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (10, 10, 'KODO')]
[PRE=INSERT INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?,
ty.Main.main(Main.java:26)
NestedThrowablesStackTrace:
java.sql.SQLException: ORA-02291: integrity constraint
(CCLJDO.ATTRIBUTE_FK) violated - parent key not found
at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
atoracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)> >> at> >> oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)> >> at> >>oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)> >>> >> at> >>oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)> >>> >> at> >>oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)> >>> >> at> >>oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(OraclePreparedStatement.java:3975)> >>> >> at> >>oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:623)> >>> >> at> >>com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)> >>> >> at> >>com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:454)> >>> >> at> >>com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutio?,> >> ?)
ORA-02291: integrity constraint (CCLJDO.ATTRIBUTE_FK) violated -
parent key not found
[code=2291;state=23000]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=INSERT
INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (nManagerImpl.java:423)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLEx
ecutionManagerImpl.java:381)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionMan
agerImpl.java:255)
>>>
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManag
er.java:554)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flushInternal(Persistenc
eManagerImpl.java:697)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManage
rImpl.java:422)
>>>
at reachability.Main.main(Main.java:26)
DEBUG [main] (PersistenceManagerImpl.java:481) - An exception occurred
while ending a transaction. This exception will be thrown. It is being
logged here for informational purposes only.
com.solar10, 10, 'KODO')] [PRE=INSERT INTO ATTRIBUTE(CLASS_ID,
TYPE_ID, VALUE) VALUES (?, ?, ?)]
ORA-02291: integrity constraint (CCLJDO.ATTRIBUTE_FK) violated -
parent key not found
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLExceptmet
ric.kodo.runtime.FatalDataStoreException:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=INSERT
INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (10, 10, 'KODO')]
[PRE=INSERT INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?, ?, ?)]
ORA-02291: integrity constraint (CCLJDO.ATTRIBUTE_FK) violated -
parent key not found
[code=2291;state=23000]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=INSERT
INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (10, 10, 'KODO')]
[PRE=INSERT INTO ATTRIBUTE(CLASS_ID, TYPE_ID, VALUE) VALUES (?, ?, ?)]
ORA-02291: integrity constraint (CCLJDO.ATTRIBUTE_FK) violated -
parent key not found
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLException
s.java:58)
>>>
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManag
er.java:559)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flushInternal(Persistenc
eManagerImpl.java:697)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManage
rImpl.java:422)
>>>
at reachability.Main.main(Main.java:26)
NestedThrowablesStackTrace:
java.sql.SQLException: ORA-02291: integrity constraint
(CCLJDO.ATTRIBUTE_FK) violated - parent key not found
at oracle.jdbc.dbaccess.DBErions.java:58)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManag
er.java:559)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flushInternal(Persistenc
eManagerImpl.java:697)
>>>
at
com.solarmetric.kodo.runtime.Persistencror.throwSqlException(DBError.java:13
4)
>>>
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
atoracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047
>>>
at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
>>>
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
:2709)
>>>
at
oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(Oracle
PreparedStatement.java:3975)
>>>
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
ment.java:623)
>>>
at
com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedSt
atementWrapper.java:111)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatem
entNonBatch(SQLExecutionManagerImpl.java:454)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatem
ent(SQLExecutionManagerImpl.java:423)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLEx
ecutionManagerImpl.java:381)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionMan
agerImpl.java:255)
>>>
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManag
er.java:554)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flushInternal(Persistenc
eManagerImpl.java:697)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManage
rImpl.java:422)
>>>
at reachability.Main.main(Main.java:26)
eManagerImpl.commit(PersistenceManagerImpl.java:422)
at reachability.Main.main(Main.java:26)
NestedThrowablesStackTrace:
java.sql.SQLException: ORA-02291: integrity constraint
(CCLJDO.ATTRIBUTE_FK) violated - parent key not found
at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
atoracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047
>>>
at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
>>>
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
:2709)
>>>
at
oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(Oracle
PreparedStatement.java:3975)
>>>
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
ment.java:623)
>>>
at
com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedSt
atementWrapper.java:111)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatem
entNonBatch(SQLExecutionManagerImpl.java:454)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatem
ent(SQLExecutionManagerImpl.java:423)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLEx
ecutionManagerImpl.java:381)
>>>
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionMan
agerImpl.java:255)
>>>
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManag
er.java:554)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flushInternal(Persistenc
eManagerImpl.java:697)
>>>
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManage
rImpl.java:422)
>>>
at reachability.Main.main(Main.java:26)
Exception in thread "main" _ -
Kodo 2.5.3 reversetutorial issue
Hi,
Using the finder I got more or less the same exception posted in my
preceding post on tutorial
D:\kodo-jdo-2.5.3\reversetutorial>java reversetutorial.Finder "true"
0 INFO [main] kodo.Runtime - Starting Kodo JDO version 2.5.3
(kodojdo-2.5.3-20030827-0055) with capabilities: [Enterprise Edition
Features
Evaluation License, Query Extensions, Performance Pack, Statement
Batching, Global Transactions, Developer Tools, Custom Database
Dictionaries,
ResultObjectProviders, Datacache Plug-in]
60 WARN [main] kodo.Runtime - WARNING: Kodo JDO Evaluation expires in
20 days. Please contact [email protected] for information on exte
Exception in thread "main" java.lang.NoClassDefFoundError: Article (wrong
name: reversetutorial/Article)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at serp.util.Strings.toClass(Strings.java:149)
at com.solarmetric.kodo.query.QueryImpl.toClass(QueryImpl.java:905)
at
com.solarmetric.kodo.query.QueryImpl.classForName(QueryImpl.java:854)
at
com.solarmetric.kodo.query.QueryImpl.bindClasses(QueryImpl.java:1032)
at
com.solarmetric.kodo.query.QueryImpl.bindVariableClasses(QueryImpl.java:1007)
at
com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:471)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:682)
at
com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:545)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:495)
at reversetutorial.Finder.main(Finder.java:32)
Thanks for a solution.
Best Regards
BrunoHave you tried declaring the full class when declaring parameters or
variables?
i.e. instead of pm.declareParameter ("Animal food"), put in
pm.declareParameter ("reversetutorial.Animal food"))? Sorry if the code
doesn't line up. I don't have the tutorial handy.
Seznec wrote:
Hi,
Using the finder I got more or less the same exception posted in my
preceding post on tutorial
D:\kodo-jdo-2.5.3\reversetutorial>java reversetutorial.Finder "true"
0 INFO [main] kodo.Runtime - Starting Kodo JDO version 2.5.3
(kodojdo-2.5.3-20030827-0055) with capabilities: [Enterprise Edition
Features
Evaluation License, Query Extensions, Performance Pack, Statement
Batching, Global Transactions, Developer Tools, Custom Database
Dictionaries,
ResultObjectProviders, Datacache Plug-in]
60 WARN [main] kodo.Runtime - WARNING: Kodo JDO Evaluation expires in
20 days. Please contact [email protected] for information on exte
Exception in thread "main" java.lang.NoClassDefFoundError: Article (wrong
name: reversetutorial/Article)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at serp.util.Strings.toClass(Strings.java:149)
at com.solarmetric.kodo.query.QueryImpl.toClass(QueryImpl.java:905)
at
com.solarmetric.kodo.query.QueryImpl.classForName(QueryImpl.java:854)
at
com.solarmetric.kodo.query.QueryImpl.bindClasses(QueryImpl.java:1032)
at
com.solarmetric.kodo.query.QueryImpl.bindVariableClasses(QueryImpl.java:1007)
at
com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:471)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:682)
at
com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:545)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:495)
at reversetutorial.Finder.main(Finder.java:32)
Thanks for a solution.
Best Regards
Bruno
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com -
I have been assigned DB analysis for performance/problem detection. What things i should look in statspack report , & what other things i should check for over all analysis.
From statsPack you can look for
Top 5 wait events
wait event section
Redo log activity
db file scattered read (I/O)
sql parse, execution times.
huge number of execution of same sql in a short duration
On a Broader Level look for
Application transaction volumes, response times
database statistics
Operating system statistics
I/O
Network
Excessive CPU usage
Physical I/O
Non-Oracle Processes
Oracle Processes
Oracle CPU Statistics
Resource bottlenecks on the client process
usage of dblinks for network bottleneck
Use OS tools like -- sar, top, prstat, vmstat, etc...
Use Oracle tools like -- TK Prof, SQL Trace, EM Diagnostic Pack, Stats Pack. -
Reinstall from copied disk?
Hellow to All, newbie here. My father purchased a Tiger family pack--I'm a student. After doing an erase and install, I burned a DVD copy of Tiger and sent the original to my father. Recently I have had some problems with an application that won't open and thus I decided to do a new reinstall. However everytime I click on the 'Install Mac OS X" and it restarts it won't boot from the installed DVD. Even tried the Startup Disk selecting the DVD and it restarts but it still boots from my current OS. Any advise, help?
Thanks,
Kevin
PowerMac G4 Mac OS X (10.4.3) 733mhz, 1 GB RAM, 9.5GB Hard Disk, 180GB Ext. Hard Disk
PowerMac G4 Mac OS X (10.4.3) 733mhz, 1 GB RAM, 9.5GB Hard Disk, 180GB Ext. Hard DiskMalestrom,
"Apple assumes that families live
together, and thus includes only one disc for
multiple users."
This is exactly the idea. The license agreement for
the family pack states:
"Family Pack Software License
Agreement allows you to install and use one copy of
the Apple Software on up to a maximum of five (5)
Apple-labeled computers at a time as long as those
computers are located in the same household and
used by persons who occupy that same household.
By “household” we mean a person or persons sharing
the same housing unit such as a home, apartment,
mobile home or condominium. This license does not
extend to students who reside at a separate on-campus
location or to business or commercial
users."
Oops. -
Equium L10: Issue with main battery and RTC battery
Hi
I have the Toshiba Equium L10 and it is around 14 months old and I am having problems with the battery pack and how long it lasts after a full charge. I am also having problems with the RTC battery and an ERROR 0271: Check date and time settings message when I turn on the notebook.
With regard to the battery pack, I can fully charge it up in around 3 hours but when I start to use it, it only seems to last around one and a half hours or so and it then needs to be charged again. I may have it on for around 40 minutes or so and then turn it off and come back to it later or in a day(s) or so. How long should I expect from a fully charged battery?
Regarding the RTC batttery, this is really becoming a pain and I have only started getting the ERROR 0271 message at boot time, over the last few weeks or so. I can fully charge the battery pack up and then leave it for a couple of days, but when I turn it on, I get the ERROR 0271 message about the date and time settings being incorrect. Surely after a full charge, the RTC battery should last longer than a couple of days?
The user manual states that if the RTC battery is exhausted or getting low, you should charge the RTC battery for 24 hours, but in another part of the manual it states between 24 and 48 hours, but how can you charge it for that long when the sections regarding the charging of the battery pack state that after charging the battery pack you should disconnect the AC adaptor because leaving it connected will shorten the life of the battery pack. So how can we charge the RTC battery for 24 to 48 hours if we are not supposed to leave the AC adaptor connected after the battery pack is charged - which is around three hours. Any suggestions regarding these problems, would be appreciated.
By the way we all know it's easy to change the RTC/CMOS battery in your desktop base unit, but how easy is it to change it in a Toshiba L10 Equium?
Regards
Brave0Hi Brave0,
The normal recommendation for the CMOS (RTC) battery is to leave the notebook connected to the AC adapter for at leat 12 hours once the main battery is fully charged. The charging circuitry will divert the charge current to the RTC battery automatically and no current will be passed to your main battery.
The recommendation for not leaving the AC adapter plugged in when the main battery is fully charged is really only applicable to older notebooks which did not use Li-Ion batteries and consequently they had to be fully discharged before recharging so as to avoid any 'memory' effects in the battery.
With modern Li-Ion batteries it is quite safe to leave the battery in place when fully charged and still power the notebook from the AC adapter. The charging circuitry will not pass any charge to the battery if it is fully charged.
regards,
Maybe you are looking for
-
I changed my password when i was half asleep, now i dont remember it, and it said i have to connect to itunes. BUUTT the only device i synced/back-up/started the iphone on was my brother's laptop, but it's sadly gone. NOW im trying to restore it on a
-
Work repository on different database configuration
Hello there, I am trying to set my work repository to be a schema on differing database to the source dataserver. Currently when I edit the source data server and try to set the work repository I only have the option to select schemas from the source
-
Link between PAUFA and ROT?
Hi All, I'm trying to ascertain if there is a link between entries in PAUFA and the posting detail in ROT. I am looking to determine the mileage detail (from PAUFA entries) and the relevant wage type for posting (done by table t706b4). This works fin
-
Really new to Weblogic - trying to install WAR
Hi, I am really new to Weblogic, and I am trying to get a web application that I've been given to work with Weblogic 8.1 on Windows 2000 Server. I just installed Weblogic 8.1 today, then I've configured a Weblogic configuration. I then copied the WAR
-
Dictation not working with contacts & reminders.
The dictation icon on the keyboard is grayed out with contacts & reminders. It works with calendar, and email. Why?