Facing Unusual problem in ListBox

To err is to be human, to help each other is joy. Tell your Compiere needs in your own words. Let's figure out together.

Moderator: azaharizaman

Facing Unusual problem in ListBox

Postby gaurav » Mon Aug 14, 2006 5:00 pm

Hi All

I am facing a very unusual problem.I created a window with one tab named 'Book Request' against which i created 'MBookRequest.java' file and a table named 'C_BookRequest'.I also created a Reference named 'Book Type' of Validation type 'List Validation'.And executed GenerateModel.java as well. Now when i save data from this window, the vaue in the listbox turns blank..though it gets saved in backend but does not show in listbox and also the 'Save' button in toolbar remains active.
It throws the following error.....



===========> DB.executeUpdate: INSERT INTO AD_Issue

(AD_Client_ID,AD_Issue_ID,AD_Org_ID,Created,CreatedBy,DBAddress,DatabaseInfo,ErrorTrace,IsAc

tive,IssueSummary,JavaInfo,LineNo,Local_Host,LoggerName,Name,OperatingSystemInfo,Processed,P

rocessing,ProfileInfo,Record_ID,ReleaseNo,ReleaseTag,SourceClassName,SourceMethodName,StackT

race,StatisticsInfo,SystemStatus,Updated,UpdatedBy,UserName,Version) VALUES

(1000000,1000976,1000006,TO_DATE('2006-08-14 11:50:02','YYYY-MM-DD

HH24:MI:SS'),1000001,'jdbc:oracle:thin:@//oracle10g:1521/compiere','Oracle Database 10g

Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining

options;10.1.0.2.0;DS','org.compiere.model.PO.load(PO.java:1062)
org.compiere.model.PO.load(PO.java:1008)
org.compiere.model.PO.<init>(PO.java:112)
org.compiere.model.PO.<init>(PO.java:63)
compiere.model.X_C_BookRequest.<init>(X_C_BookRequest.java:16)
org.compiere.model.MBookRequest.<init>(MBookRequest.java:12)
','Y','Exception NO Data found for C_BookRequest_ID=1000013','Java HotSpot(TM) Client VM

1.5.0_05-b05',1062,'GauravBhatia/192.168.0.24','org.compiere.model.MBookRequest','?','Window

s 2000 5.0 Service Pack 4','N','N','KC Social Welfare

Trust|GardenWorld|SYSTEM|',1,'253b','unknown','org.compiere.model.PO.load','load','Exception
at org.compiere.model.PO.load(PO.java:1062)
at org.compiere.model.PO.load(PO.java:1008)
at org.compiere.model.PO.<init>(PO.java:112)
at org.compiere.model.PO.<init>(PO.java:63)
at compiere.model.X_C_BookRequest.<init>(X_C_BookRequest.java:16)
at org.compiere.model.MBookRequest.<init>(MBookRequest.java:12)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at reflect.Constructor.newInstance(Unknown Source)
at org.compiere.model.M_Table.getPO(M_Table.java:378)
at org.compiere.model.MTable.dataSavePO(MTable.java:1709)
at org.compiere.model.MTable.dataSave(MTable.java:1135)
at org.compiere.model.MTab.dataSave(MTab.java:728)
at org.compiere.apps.APanel.cmd_save(APanel.java:1276)
at org.compiere.apps.APanel.actionPerformed(APanel.java:1135)
at org.compiere.apps.AppsAction.actionPerformed(AppsAction.java:260)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.L','C3U15B18P41I22M128','E',TO_DATE('2006-08-14 11:50:02','YYYY-MM-DD

HH24:MI:SS'),1000001,'?','2006-01-20') [null] [11]
java.sql.SQLException: ORA-01401: inserted value too large for column
; State=23000; ErrorCode=1401
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at

oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at

oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
at

oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:3753)
at

oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(OraclePreparedStatemen

t.java:8829)
at

oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2886

)
at

oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960)
at org.compiere.util.CPreparedStatement.executeUpdate(CPreparedStatement.java:165)
at org.compiere.util.DB.executeUpdate(DB.java:820)
at org.compiere.util.DB.executeUpdate(DB.java:730)
at org.compiere.model.PO.saveNew(PO.java:2175)
at org.compiere.model.PO.save(PO.java:1714)
at org.compiere.model.MIssue.create(MIssue.java:48)
at org.compiere.util.CLogErrorBuffer.publish(CLogErrorBuffer.java:197)
at java.util.logging.Logger.log(Unknown Source)
at java.util.logging.Logger.doLog(Unknown Source)
at java.util.logging.Logger.log(Unknown Source)
at org.compiere.model.PO.load(PO.java:1062)
at org.compiere.model.PO.load(PO.java:1008)
at org.compiere.model.PO.<init>(PO.java:112)
at org.compiere.model.PO.<init>(PO.java:63)

===========> DB.saveError: DBExecuteError - ORA-01401: inserted value too large for column
[11]
-----------> MIssue.saveNew: Not inserted - AD_Issue [11]
===========> MBookRequest.load: NO Data found for C_BookRequest_ID=1000013 [11]
java.lang.Exception
at org.compiere.model.PO.load(PO.java:1062)
at org.compiere.model.PO.load(PO.java:1008)
at org.compiere.model.PO.<init>(PO.java:112)
at org.compiere.model.PO.<init>(PO.java:63)
at compiere.model.X_C_BookRequest.<init>(X_C_BookRequest.java:16)
at org.compiere.model.MBookRequest.<init>(MBookRequest.java:12)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.compiere.model.M_Table.getPO(M_Table.java:378)
at org.compiere.model.MTable.dataSavePO(MTable.java:1709)
at org.compiere.model.MTable.dataSave(MTable.java:1135)
at org.compiere.model.MTab.dataSave(MTab.java:728)
at org.compiere.apps.APanel.cmd_save(APanel.java:1276)
at org.compiere.apps.APanel.actionPerformed(APanel.java:1135)
at org.compiere.apps.AppsAction.actionPerformed(AppsAction.java:260)

-----------> MTable.dataSave: C_BookRequest - No Persistent Object [11]
===========> MTable.saveError: SaveErrorRowNotFound - [11]




Please help..i am not able it figure it out, what error is this.

Thank You

Regards,
Gaurav Bhatia
www.ViennaSolutions.com
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby red1 » Mon Aug 21, 2006 11:57 am

Did u populate the List tab with values for your Validation Type? Those are the values that u meant to see when u pull down the selection List.

If u want to know how to do that u can refer to my earlier tutorials POSred.pdf and Callout.pdf.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby gaurav » Mon Sep 04, 2006 1:23 pm

Hi Red1
Thanx for the reply..:)
Yes, I populated the List tab with values for my Validation Type and on pulling down the list i can see the list...But when i select a value from the list and save it...it just gets disappeared...
I have made list many a times in 2.5.2e and it works fine. But when i tried it on 2.5.3b, it is giving me above stated errors..
Thank You

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby red1 » Mon Sep 04, 2006 1:28 pm

How did u define your new BookRequest table? Did u declare the C_BookRequest_ID's DataType Reference in the AD as "ID"?
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby trifon » Thu Sep 07, 2006 5:38 am

Hi Gaurav,

Exception NO Data found for C_BookRequest_ID=1000013

it looks that there is not such record into table.

Please check it.

Kind regards,
Trifon
Trifon Trifonov
trifon
Senior
 
Posts: 324
Joined: Thu Dec 23, 2004 11:20 pm
Location: Bulgaria, Sofia

Postby gaurav » Sat Sep 16, 2006 4:17 pm

Hi Red1 and Trifon

Thanks for your reply. I created a table named C_Book with description given below :-

AD_CLIENT_ID NOT NULL NUMBER(10)
AD_ORG_ID NOT NULL NUMBER(10)
ISACTIVE NOT NULL CHAR(1)
CREATED NOT NULL DATE
CREATEDBY NOT NULL NUMBER(10)
UPDATED NOT NULL DATE
UPDATEDBY NOT NULL NUMBER(10)
NAME NOT NULL NVARCHAR2(60)
C_BOOK_ID NOT NULL NUMBER(10)
DESCRIPTION NVARCHAR2(255)
C_BOOKTYPE NOT NULL Char(1)

and with column C_BookType, i attached a reference named "Book Type" whose details are given below

Reference Name : Book Type
Entity Type: User Maintained
Validation Type: List Validation
Value Format:<nothing>

On List validation tab i added following lines:

Search key -- -- Name -- -- Entity Type
1. BO -- -- -- Book -- -- User Maintained
2. JO -- -- -- Journals -- -- User Maintained
3. MA -- -- -- Magazine -- -- User Maintained

-----------------------------


Then i executed GenerateModel.java and ran compiere

Now, i open the Book window and enter new data and select any value from Drop Down List named 'Book Type'. When i click on Save button, the value in List box 'Book Type' dispappears and Save button remains active. And when i fire a query in oracle, i see that the data has been saved.
And now when i close the window and reopen it, it does not show value in Drop down list in any of the record i eneterd.
I am facing this problem for very first time and unable to solve it.
Please help

Thakn You

Reagrds,
Gaurav Bhatia
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby red1 » Sat Sep 16, 2006 8:00 pm

Gaurav,
Perhaps u missed out a field called "Value". As SearchKey is associated with that field. Add field "Value" in C_Book table and u se if u can make it work.

regards
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia


Return to Ask RED1 personally

Who is online

Users browsing this forum: No registered users and 2 guests