Exception in using JTable

Hi All
i am using JTable . while updating the values in JTable i am getting the following exception. even though i am getting the exception. i am able to modify the the values.
can any body tell why this exeption is raising.
in the exception ProcessID, process Name etc are the table headings.
Exception occurred during event dispatching:
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
at java.util.Vector.elementAt(Unknown Source)
at javax.swing.table.DefaultTableColumnModel.getColumn(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
ProcessID
ProcessName at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintWithBuffer(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unkno
n Source)
can anybody help me please
Thanks
Narendra

I am sorry it my mistake only . i passed a wrong index value in array
thanks for your reply

Similar Messages

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • Exception while using unit of work commit

    Hi,
    I have using this code to create a object
    KbAdAlerts alert = new KbAdAlerts();
    alert.setAlertId(kmData.getAlertId());
    alert.setAlertDesc(kmData.getOutcome());
    alert.setAlertLastRevisionDate(KmUtils.convertReviewDate(kmData.getReviewDate()));
    alert.setAlertType(kmData.getAlertType());
    System.out.println("Alert Object :" + alert);
    KbAdAlerts alertClone = (KbAdAlerts) uow.registerObject(alert);
    System.out.println("Clone Alert:" + alertClone);
    uow.printRegisteredObjects();
    uow.commit();
    I am getting exception while using uow.commit(). I have gone into alert object and everything seems to be fine.
    Could you help me in this issue.
    Thanks,
    Ashish
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-01400: cannot insert NULL into ("AD_OWNER"."KB_AD_ALERTS"."ALERT_ID")
    Error Code: 1400
    Call:insert into kb_ad_alerts(alert_id, alert_desc, alert_type, alert_last_revision_date)
    values
    (NULL, NULL, NULL, NULL)
    Query:InsertObjectQuery(oracle.ccr.admin.model.KbAdAlerts@6108)
         at oracle.toplink.exceptions.TopLinkException.<init>(TopLinkException.java:46)
         at oracle.toplink.exceptions.DatabaseException.<init>(DatabaseException.java:50)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:658)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:707)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:496)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
         at oracle.toplink.publicinterface.UnitOfWork.executeCall(UnitOfWork.java:1603)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:238)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObject(DatabaseQueryMechanism.java:355)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:433)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:60)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:622)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:586)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:479)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:110)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:259)
         at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:603)
         at oracle.toplink.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:519)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:100)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:72)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2532)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:981)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:938)
         at oracle.toplink.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:240)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:161)
         at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3123)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1242)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1330)
         at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOfWork.java:1097)
         at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:865)
         at oracle.ccr.admin.model.FeedbackServices.writeFeedback(FeedbackServices.java:116)
         at oracle.ccr.admin.view.AlertDetails.updateTables(AlertDetails.java:834)
         at oracle.ccr.admin.view.AlertDetails.commandButton1_action(AlertDetails.java:822)
         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.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
         at oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
         at oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

    Hi,
    I am having a similar problem that results in this stack trace. The funny thing is that it occurs after a session.logout/login and re-read of the object I'm trying to update. The other thing is that if I remove objects from the transaction it just happens somewhere else - on a different object/descriptor. I am attempting to upgrade from 9.03 runtime to the 10.0.3.1 builder/runtime. I am connecting to a Sybase 12.5 db.
    Any ideas on this one?
    Thanks,
    Bret
    This is the sql that is found in the DatasourceCallQueryMechanism. We are not using any custom SQL.
    SQLCall(INSERT INTO Invoice (id, description, billingAddress, customerNote, invoiceNumber, startDate, stopDate, sentDate, commitDate, customerId, dueDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))
    java.lang.NullPointerException
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:213)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:156)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:170)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:426)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:65)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:75)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:251)
         at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
         at oracle.toplink.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:542)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:100)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:72)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2578)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:988)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:945)
         at oracle.toplink.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:243)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:218)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:174)
         at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3177)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1282)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1370)
         at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOfWork.java:1137)
         at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:905)
         at com.tbs.database.DBBroker.mergeSingleObject(DBBroker.java:288)
         at com.tbs.database.DBBroker.merge(DBBroker.java:235)
         at com.tbs.database.DBBrokerSetInvoker.merge(DBBrokerSetInvoker.java:73)
         at com.tbs.database.TbsDataSource.merge(TbsDataSource.java:353)
    /////////////////////////////////

  • Oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters

    Dear Guru's,
    I am not able to solve the above issue for last couple of days.
    I am newbie to the webservice
    My Issue...
    I am using Jdeveloper 11.1.2.4.0 Release 2
    1. Using Jdev I built one small Web Service with two methods.
            While testing the Webservice...
                   I passed User Id as Parameter and it successfully return the values (user id, user name and description) from fnd_user table
    2. I created another application to consume the web service i created.
                   1. I added the webservice SOAP and added the method.
                   2. Created a jsf page and drag and drop the parameter and return values to the jsf page.
    3. While executing the created jsf page I received the error message as below
    "oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters are {0=Attribute, 1=UserName, 2=UserName}"
    Even I know that this issue is repeated one in our forum, I was not able to solve this issue.
    Can anybody help to solve this issue.
    Thanks and Regards,
    Durai S E

    Dear Guru's,
    I am not able to solve the above issue for last couple of days.
    I am newbie to the webservice
    My Issue...
    I am using Jdeveloper 11.1.2.4.0 Release 2
    1. Using Jdev I built one small Web Service with two methods.
            While testing the Webservice...
                   I passed User Id as Parameter and it successfully return the values (user id, user name and description) from fnd_user table
    2. I created another application to consume the web service i created.
                   1. I added the webservice SOAP and added the method.
                   2. Created a jsf page and drag and drop the parameter and return values to the jsf page.
    3. While executing the created jsf page I received the error message as below
    "oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25058. Error message parameters are {0=Attribute, 1=UserName, 2=UserName}"
    Even I know that this issue is repeated one in our forum, I was not able to solve this issue.
    Can anybody help to solve this issue.
    Thanks and Regards,
    Durai S E

  • Invalid_path exception while using UTL_FILE.FOPEN

    Hi
    I am getting invalid_path exception while using the UTL_FILE.fopen subprogram. I tried finding out the reason but could not solve it. Please help.
    Below is my piece of code.
    create directory utldr as 'e:\utldir';
    declare
    f utl_file.file_type;
    s varchar2(200);
    begin
    dbms_output.put_line('1');
    f := utl_file.fopen('UTLDR','utlfil.txt','r');
    dbms_output.put_line('2');
    utl_file.get_line(f,s);
    dbms_output.put_line('3');
    utl_file.fclose(f);
    dbms_output.put_line('4');
    dbms_output.put_line(s);
    exception
    when utl_file.invalid_path then
    dbms_output.put_line('invalid_path');
    end;
    the result is:
    1
    invalid_path

    I am executing it from sys. The same user who created the directory.
    The output is as below:
    SELECT * FROM dba_directories
    OWNER     DIRECTORY_NAME     DIRECTORY_PATH
    SYS     MEDIA_DIR      d:\avale\rel4\demo\schema\product_media\
    SYS     LOG_FILE_DIR     d:\avale\rel4\assistants\dbca\logs\
    SYS     DATA_FILE_DIR     d:\avale\rel4\demo\schema\sales_history\
    SYS     EMP_DIR     E:\Oracle Directory
    SYS     REMOTED     \\10.1.1.12\oracle directory
    SYS     UTLDR     e:\utldir
    SELECT * FROM dba_tab_privs WHERE table_name='UTLDR'
    GRANTEE     OWNER     TABLE_NAME     GRANTOR     PRIVILEGE     GRANTABLE     HIERARCHY
    PUBLIC     SYS     UTLDR     SYS     READ     NO     NO

  • HT2188 I can hear caller but they can not hear me except when using speaker phone

    I can hear caller but they can not hear me except when using speaker phone

    First of all,  make sure that your iPhone as the most recent iOS available. Check in "Settings>General>Software Update".
    One other problem could be your microphone. Does it work for anything else other than a call?
    Good-Luck!
    kpower28
    Please mark this as "solved my problem" or "helped me"!

  • Exception in using rssutils.tld in jsp

    hi,I met an exception in using rssutils.tld
    My code is:
    <rss:feed url="http://rss.xinhuanet.com/rss/food.xml" feedId="food"/>
    <rss:forEachItem feedId="food" startIndex="0" endIndex="5">
    <rss:itemTitle feedId="food"/>
    </rss:forEachItem>
    and it worded well,but when I changed it to
    <c:set var="url" value="http://rss.xinhuanet.com/rss/food.xml"/>
    <rss:feed url="${url}" feedId="food"/>
    <rss:forEachItem feedId="food" startIndex="0" endIndex="5">
    <rss:itemTitle feedId="food"/>
    </rss:forEachItem>
    it had a exception:java.lang.NullPointerException .
    I have a questtion,why couldn't I use the parameter url to replace the string "http://rss.xinhuanet.com/rss/food.xml"
    anyone knows!help!Thank you!

    hi,I met an exception in using rssutils.tld
    My code is:
    <rss:feed url="http://rss.xinhuanet.com/rss/food.xml" feedId="food"/>
    <rss:forEachItem feedId="food" startIndex="0" endIndex="5">
    <rss:itemTitle feedId="food"/>
    </rss:forEachItem>
    and it worded well,but when I changed it to
    <c:set var="url" value="http://rss.xinhuanet.com/rss/food.xml"/>
    <rss:feed url="${url}" feedId="food"/>
    <rss:forEachItem feedId="food" startIndex="0" endIndex="5">
    <rss:itemTitle feedId="food"/>
    </rss:forEachItem>
    it had a exception:java.lang.NullPointerException .
    I have a questtion,why couldn't I use the parameter url to replace the string "http://rss.xinhuanet.com/rss/food.xml"
    anyone knows!help!Thank you!

  • Wrong number of parameters exception when using PreparedStatement

    Hi,
    I'm getting Wrong number of parameters exception when using a prepared statement. It's very weird. The code is:
    sqlstmt="update blah1 set blah2=? where blah3=?";
    myps = Conn.prepareStatement(sqlstmt);
    myps.setString(1, p1);
    myps.setInt(2, p2);
    myps.executeUpdate(sqlstmt);
    The error is:
    SQLException: [IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001:07001
    Could someone please help? Thanks
    Mahdad

    Hi and thanks for the reply.
    Actually this is the try block...
    The variable's defintions are correct.
    PreparedStatement myps;
    try {
    sqlstmt="update blah1 set blah2=? where blah3=?";
    myps = Conn.prepareStatement(sqlstmt);
    myps.setString(1, blah4);
    myps.setInt(2, blah5);
    myps.executeUpdate(sqlstmt);
    catch (SQLException e) {
    System.out.println("SQLException: " + e.getMessage() + ":" + e.getSQLState());
    blah6++;

  • How i use jtable

    hi master
    sir how i use jtable
    please send me any detail sample with swing interfas and code
    thank's
    aamir

    Did you read the JTable API???
    You will find a link titled "How to Use Tables" that takes you to the Swing tutorial.

  • ADF application on cluster throw exception when using chrome

    I deploy my ADF application to cluster with one proxy server (myip:7003) and two application server(myip:7004 myip:7005) ( http://docs.oracle.com/cd/E15051_01/wls/docs103/cluster/setup.html )
    It works fine when using firefox and IE8, but throw exception when using chrome
    ####<Mar 1, 2013 3:18:30 PM CST> <Notice> <Diagnostics> <XXX.XXX.com> <server02> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1362122310439> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'server02' has triggered at Mar 1, 2013 3:18:30 PM CST. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = Mar 1, 2013 3:18:30 PM CST SERVER = server02 MESSAGE = [ServletContext@710669610[app:Project1 module:XXX path:/XXX spec-version:2.5]] Servlet failed with Exception
    java.lang.NullPointerException
    at org.apache.myfaces.trinidad.model.BaseMenuModel.setRowKey(BaseMenuModel.java:120)
    at org.apache.myfaces.trinidad.component.UIXTree.createCollectionModel(UIXTree.java:274)
    at org.apache.myfaces.trinidad.component.UIXCollection.getCollectionModel(UIXCollection.java:1513)
    at org.apache.myfaces.trinidad.component.UIXCollection.getCollectionModel(UIXCollection.java:1115)
    at org.apache.myfaces.trinidad.component.UIXTree$RowKeyFacesBeanWrapper.getProperty(UIXTree.java:423)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.getProperty(UIXComponentBase.java:1485)
    at org.apache.myfaces.trinidad.component.UIXTree.getDisclosedRowKeys(UIXTree.java:626)
    at org.apache.myfaces.trinidad.component.UIXTree.__init(UIXTree.java:325)
    at org.apache.myfaces.trinidad.component.UIXCollection._init(UIXCollection.java:1778)
    at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:589)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeFacet(DecorativeBoxRenderer.java:440)
    at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer._encodeCenterPane(DecorativeBoxRenderer.java:704)
    at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeAll(DecorativeBoxRenderer.java:380)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1593)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:263)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1593)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:263)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1593)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:279)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
    at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
    at oracle.adfinternal.view.faces.renderkit.rich.PageTemplateRenderer.encodeAll(PageTemplateRenderer.java:68)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
    at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
    at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1277)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
    at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
    at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:431)
    at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:233)
    at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = XXX.XXX.com TXID = CONTEXTID = TIMESTAMP = 1362122310438
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000 Jdeveloper 11.1.2.1.0
    webloigc 10.3
    Please help me , thank you
    Edited by: Rocky.c.Xu on 2013-3-1 上午2:52

    Solved it on my own.
    The sso from Java->ABAP was OK
    I reconfigured the sso from ABAP->JAVA by creating new ABAP certificate and import it to the J2EE.
    Omri

  • Problem in displaying Column Heading using JTable

    I am using JTable component in my applet. I am trying to retrieve records from a database and want to display the same in the table using JTable component. In that procees my data is shown in the table but I am not able to display the column heading.
    Please suggest.

    you could user JScrollPane to show the column's head.
    if you don't want to use JScrollPane ,you should use the getTableHeader() method and add the header into the pane

  • What exception to use for incorrect file format?

    I parse a file and find out that it contains unsupported elemnet.

    You are applying a general case to specificinstance
    without knowing any of the details.Indeed I am. However, generally speaking, a method
    that throws Exception is less-than-optimal design in
    an API. I will try to illustrate my point.
    Throwing an Exception does not provide any clues to
    the user of your API about what might go wrong in the
    method call, while throwing an
    UnsupportedElementException certainly does. An
    UnsupportedElementException is much more informative
    to the user, while a plain Exception is not. A custom
    exception in this case is implicitly clear, even
    without consulting the Javadocs.Which is all true if I am writing a library. But most people do not write libraries, they write applications. In applications either exceptions are part of the process flow (explicitly caught) or they are not. The vast majority are not part of the process flow.
    >
    The only time you should create a custom exceptionis
    when you believe it will be possible for someone todo
    something intelligent with it.Are you always able to tell in advance whether the
    user of you API can do something intelligent with an
    exception? Can you make the supposition that the user
    can never do anything meaningful with the exceptions
    you throw? I am not convinced that you can, at least
    not in most of the cases.One should never ever design or code solely based on the "hope" that sometime in the future someone "might" need it. Doing that leads to code bloat, code that is hard to understand and worst of all code that is never tested.
    So unless there is a known need a special exception should not be created.
    >
    If I am creating an application that automatically
    moves data via a socket and that must move thedata,
    then I don't care why the socket failed to connect.I
    am simply going to keep retrying until it does
    connect. In this case an Exception is perfectly
    acceptable.
    On the other hand the same application might wantto
    resolve the DNS name first and simply give up if it
    can't resolve it. But still continue if the
    connection timed out. In this case at least one
    custom Exception is needed to differentiate between
    the two failure paths.Agreed. And to make the API nice and neat, write two
    meaningful custom exceptions to differentiate the
    failures. :)Nope. Again that is fine for a library. It is not needed for an application. An application has a purpose which is defined by the requirements. Adding stuff when there is neither a current requirement or when there is no expected future requirement is a bad idea.
    I have yet to meet a developer who can accurately predict the future. I have however met many who thought there code could be generalized for many possible imaginary cases that they conceived in their mind.
    And all that extra code is never tested by QA (because there are no requirements) and causes maintenance problems down the road because it is not part of the documented infrastructure.
    also it forces the user of
    you API to catch all Exceptions.That is obviously non-sensical. Regardless of the
    checked exception being used, you still have tocatch
    it.I did not mean that you force the user of your API to
    write a try-catch -block, I meant that you force the
    user of your API to catch each and every exception
    that inherits from java.lang.Exception. Even
    RuntimeExceptions; and that can be a problem.
    I have no idea what you are trying to express there.
    A checked exception must be caught regardless of what type of checked exception it is. The user might break it out but only if the user expects to do something with a specific type of exception.

  • Exception raised using JComboBox with JUComboBoxBinding in a JTable

    Hello,
    I am using JDeveloper 9.0.3.1035.
    I have a JTable bound to a bc4j view object. Now I want to use a JComboBox to select the value for a foreign key column in that Table. For this I have followed the HOWTO posted by Arno van der Kolk in Thread JClient - JTable and JComboBox which extends the OTN example "How to Add a JComboBox to a Cell in a JTable". This almost works fine except for one thing:
    In the the ComboBox I display a String value but the view attribute is of type Number. Now when I edit the column using the ComboBox and the value of the selected entry cannot be converted to Number I get an exception like the following:
    oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:oracle.jbo.domain.Number with value:030522 001
    Even after this exception is raised the database record is updated with the correct number value corresponding to the selected entry when the changes are commited. The only w/a I have found so far is to display the foreign key attribute as the first column of the JComboBox but this is not what I want. This behaviour also occurs using the aforementioned OTN example with my JDev version but the sample works with JDev 9.0.2.
    How can I get this to work using JDev 9.0.3?
    Any help is greatly appreciated.
    Regards,
    Christof Breker

    The Thread I was really referring to is:
    [JClient] HOWTO: Using databound comboboxes (for foreign keys) in a JTable
    The OTN sample can be found under:
    http://otn.oracle.com/sample_code/products/jdev/jclient/jclient_table_combo_sample.html

  • Saves the word Null - Using jTable!!

    Hi..
    I am using a jTable to show data to the final user, and also i added a button which save changed made on the jTable is the user modifies it!! But, if i save it with in the ms access saves the word null when it finds an empty space.. why this happens? here is the code.. and sometimes it didn't work well on somefields, that why i use vectors, and now it is working.. but i am still wondering why if a field was empty, when i click on the save button it saved the word null.
    Thanks for your attention,
    Xavier Arroyo
    * Main.java
    * Created on March 29, 2007, 7:31 AM
    package empesec;
    import java.io.IOException;
    import javax.swing.*;
    import java.sql.*;
    import java.util.Vector;
    import javax.swing.JOptionPane;// Para el MessageDialog
    import javax.swing.event.*;
    import javax.swing.DefaultCellEditor;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableColumn;
    * @author  Xavier Arroyo
    public class Main extends JFrame {
         * Creates new form Main
         int numCol;
        public Main() {
            initComponents();
         tResultado.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            setUpCategoryColumn(tResultado, tResultado.getColumnModel().getColumn(2));
            setUpSituationColumn(tResultado, tResultado.getColumnModel().getColumn(3));
            setUpDepartmentColumn(tResultado, tResultado.getColumnModel().getColumn(4));
            if (ALLOW_COLUMN_SELECTION) { // true by default
                if (ALLOW_ROW_SELECTION) {
                    //We allow both row and column selection, which
                    //implies that we *really* want to allow individual
                    //cell selection.
                    tResultado.setCellSelectionEnabled(true);
                tResultado.setColumnSelectionAllowed(true);
                ListSelectionModel colSM =
                    tResultado.getColumnModel().getSelectionModel();
                colSM.addListSelectionListener(new ListSelectionListener() {
                    public void valueChanged(ListSelectionEvent e) {
                        //Ignore extra messages.
                        if (e.getValueIsAdjusting()) return;
                        ListSelectionModel lsm = (ListSelectionModel)e.getSource();
                        if (lsm.isSelectionEmpty()) {
                            return;
                        } else {
                            int selectedCol = lsm.getMinSelectionIndex();
                            //numCol = selectedCol;
                            /*System.out.println("Column " + selectedCol
                                               + " is now selected.");*/
                                if (ALLOW_ROW_SELECTION) { // true by default
                                    ListSelectionModel rowSM = tResultado.getSelectionModel();
                                    rowSM.addListSelectionListener(new ListSelectionListener() {
                                        public void valueChanged(ListSelectionEvent e) {
                                            //Ignore extra messages.
                                            if (e.getValueIsAdjusting()) return;
                                            ListSelectionModel lsm = (ListSelectionModel)e.getSource();
                                            if (lsm.isSelectionEmpty()) {
                                                System.out.println("");
                                            } else {
                                                int selectedRow = lsm.getMinSelectionIndex();
                                                tIdCompu.setText("ping wna-gye-" + modeloDef.getValueAt(selectedRow,0));
                                }else {
                                tResultado.setRowSelectionAllowed(false);
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            rbGroup = new javax.swing.ButtonGroup();
            jLabel1 = new javax.swing.JLabel();
            jSeparator1 = new javax.swing.JSeparator();
            textIdE = new javax.swing.JTextField();
            jLabel2 = new javax.swing.JLabel();
            bOk = new javax.swing.JButton();
            bExit = new javax.swing.JButton();
            tJSPt = new javax.swing.JScrollPane();
            tResultado = new javax.swing.JTable();
            tIdCompu = new javax.swing.JTextField();
            jLabel3 = new javax.swing.JLabel();
            bConnect = new javax.swing.JButton();
            rButton1 = new javax.swing.JRadioButton();
            rButton2 = new javax.swing.JRadioButton();
            bSave = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Consulta Activos Por Empleado");
            jLabel1.setText("Consulta de Activos por Empleados");
            jLabel2.setText("Id de Empleado :");
            bOk.setText("Aceptar");
            bOk.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    bOkMouseClicked(evt);
            bExit.setText("Borrar");
            bExit.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    bExitMouseClicked(evt);
         modeloDef = new javax.swing.table.DefaultTableModel(
              new Object [][] {
                new String [] {
                    "Codigo Barra", "Descripci?n", "Categor?a", "Situaci?n", "Departamento", "Nro. Modelo", "Nro. Serie", "Empresa", "Comentarios", "AR Number", "Sistema Operativo", "Version Office"
                boolean[] canEdit = new boolean [] {
                    false, true, true, true, true, true, true, true, true, true, true, true
         public boolean isCellEditable(int rowIndex, int columnIndex){
              return canEdit [columnIndex];
            tResultado.setModel(modeloDef);
            tJSPt.setViewportView(tResultado);
            jLabel3.setText("Command");
            bConnect.setText("Conectar");
            bConnect.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    bConnectMouseClicked(evt);
            rbGroup.add(rButton1);
            rButton1.setText("Por Apellido");
            rButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            rButton1.setMargin(new java.awt.Insets(0, 0, 0, 0));
            rbGroup.add(rButton2);
            rButton2.setText("Por Nombre & Apellido");
            rButton2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            rButton2.setMargin(new java.awt.Insets(0, 0, 0, 0));
            bSave.setText("Guardar Cambios");
            bSave.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    bSaveMouseClicked(evt);
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(tJSPt, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 668, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.TRAILING, jSeparator1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 668, Short.MAX_VALUE)
                        .add(layout.createSequentialGroup()
                            .add(253, 253, 253)
                            .add(jLabel1)))
                    .addContainerGap())
                .add(layout.createSequentialGroup()
                    .add(20, 20, 20)
                    .add(jLabel2)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                        .add(layout.createSequentialGroup()
                            .add(bOk)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(bExit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 73, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(textIdE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(layout.createSequentialGroup()
                            .add(rButton1)
                            .add(53, 53, 53)
                            .add(jLabel3))
                        .add(rButton2))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(tIdCompu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 151, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(bConnect))
                    .add(87, 87, 87))
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(553, Short.MAX_VALUE)
                    .add(bSave)
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jLabel1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabel2)
                        .add(textIdE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(rButton1)
                        .add(tIdCompu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jLabel3))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(bOk)
                            .add(bExit))
                        .add(bConnect)
                        .add(rButton2))
                    .add(23, 23, 23)
                    .add(tJSPt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 151, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(bSave)
                    .addContainerGap(27, Short.MAX_VALUE))
            pack();
        }// </editor-fold>                       
        private void bSaveMouseClicked(java.awt.event.MouseEvent evt) {                                  
    // TODO add your handling code here:
            tempDep.removeAllElements();
            tempCat.removeAllElements();
            tempSit.removeAllElements();
            actualizarDatos();
        private void bConnectMouseClicked(java.awt.event.MouseEvent evt) {                                     
            try {
    // TODO add your handling code here:
                //this.obtnerValue();
                int n = cmdPing();
                //new windowCmd(tIdCompu.getText()).setVisible(true);
                /*windowCmd ventanaPing = new windowCmd();
                ventanaPing.setTemp(tIdCompu.getText());
                ventanaPing.setearAreaTexto();
                ventanaPing.setVisible(true);*/
            } catch (Exception ex) {
                ex.printStackTrace();
        private void bExitMouseClicked(java.awt.event.MouseEvent evt) {                                  
    // TODO add your handling code here:
            limpiarTabla();
        private void bOkMouseClicked(java.awt.event.MouseEvent evt) {                                
    // TODO add your handling code here:
            if(bOk.isEnabled())
                this.bOk.setEnabled(false);
                obtenerEmpleado();
                mostrarDatos();
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
        public void setUpCategoryColumn(JTable table, TableColumn categoryColumn) {
            JComboBox comboBox = new JComboBox();
            Connection conn = null;
            Conexion ejSQL = new Conexion();
            String consulta="";
            ResultSet rs=null;
            Vector vCombo = new Vector();
            if(ejSQL.conectar())
                try
                    conn = ejSQL.getConexion();//obtiene la conexion
                    consulta = "SELECT CategoriaActivo FROM Categorias_de_activo";
                    rs = ejSQL.ejecutarConsulta(consulta);
                    while(rs.next())
                        vCombo.addElement(rs.getString(1));
                    for(int i=0;i<vCombo.size();i++)
                        comboBox.addItem(vCombo.get(i));
                    categoryColumn.setCellEditor(new DefaultCellEditor(comboBox));
                    //Set up tool tips for the sport cells.
                    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
                    renderer.setToolTipText("Click for combo box");
                    categoryColumn.setCellRenderer(renderer);
                    ejSQL.cerrarConexion();
                catch(SQLException e)
                        System.out.println("SQLException: " + e.getMessage());
                        while((e = e.getNextException()) != null)
                            System.out.println(e.getMessage());
         else
                System.out.println("Ha ocurrido un error con la base de datos");
        public void setUpSituationColumn(JTable table, TableColumn situationColumn) {
            JComboBox comboBox = new JComboBox();
            Connection conn = null;
            Conexion ejSQL = new Conexion();
            String consulta="";
            ResultSet rs=null;
            Vector vCombo = new Vector();
            if(ejSQL.conectar())
                try
                    conn = ejSQL.getConexion();//obtiene la conexion
                    consulta = "SELECT Situacion FROM Situacion";
                    rs = ejSQL.ejecutarConsulta(consulta);
                    while(rs.next())
                        vCombo.addElement(rs.getString(1));
                    for(int i=0;i<vCombo.size();i++)
                        comboBox.addItem(vCombo.get(i));
                    situationColumn.setCellEditor(new DefaultCellEditor(comboBox));
                    //Set up tool tips for the sport cells.
                    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
                    renderer.setToolTipText("Click for combo box");
                    situationColumn.setCellRenderer(renderer);
                    ejSQL.cerrarConexion();
                catch(SQLException e)
                        System.out.println("SQLException: " + e.getMessage());
                        while((e = e.getNextException()) != null)
                            System.out.println(e.getMessage());
         else
                System.out.println("Ha ocurrido un error con la base de datos");
        public void setUpDepartmentColumn(JTable table, TableColumn departmentColumn) {
            JComboBox comboBox = new JComboBox();
            Connection conn = null;
            Conexion ejSQL = new Conexion();
            String consulta="";
            ResultSet rs=null;
            Vector vCombo = new Vector();
            if(ejSQL.conectar())
                try
                    conn = ejSQL.getConexion();//obtiene la conexion
                    consulta = "SELECT NombreDepartamento FROM Departamentos";
                    rs = ejSQL.ejecutarConsulta(consulta);
                    while(rs.next())
                        vCombo.addElement(rs.getString(1));
                    for(int i=0;i<vCombo.size();i++)
                        comboBox.addItem(vCombo.get(i));
                    departmentColumn.setCellEditor(new DefaultCellEditor(comboBox));
                    //Set up tool tips for the sport cells.
                    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
                    renderer.setToolTipText("Click for combo box");
                    departmentColumn.setCellRenderer(renderer);
                    ejSQL.cerrarConexion();
                catch(SQLException e)
                        System.out.println("SQLException: " + e.getMessage());
                        while((e = e.getNextException()) != null)
                            System.out.println(e.getMessage());
         else
                System.out.println("Ha ocurrido un error con la base de datos");
        public void limpiarTabla(){
            this.bOk.setEnabled(true);
         this.textIdE.setText("");
            this.tIdCompu.setText("");
            int numFilas = this.tResultado.getRowCount();
            int numColumnas = this.tResultado.getColumnCount();
            vDepa.removeAllElements();
            vDescrip.removeAllElements();
            vSitua.removeAllElements();
            for(int i=0;i<numColumnas;i++)
                for(int j=0;j<numFilas;j++)
                    //modeloDef.setValueAt("",j,i);
                    modeloDef.removeRow(i);
            //System.out.println(numFilas + "+" + numColumnas);
            /*for(int i=0;i<numFilas;i++)
                System.out.println("borro " + i);
                modeloDef.removeRow(i);
                modeloDef.fireTableRowsDeleted(1,numFilas+1);
        public void obtenerEmpleado(){
            String nomEmpleado;
            nomEmpleado = textIdE.getText();
            if(rButton2.isSelected())
                obEmpleado.separarNombre(nomEmpleado);
                if (!obEmpleado.obtenerCodEmpleado()){
                    JOptionPane.showMessageDialog(null,"Usuario Incorrecto o No Existe!", "Mensaje!",JOptionPane.ERROR_MESSAGE);
                    textIdE.setText(null);
                    bOk.setEnabled(true);
            if(rButton1.isSelected())
        public int cmdPing() throws Exception
        Process p;
        int intResult;
        String strExec = new String(tIdCompu.getText());
        //p=Runtime.getRuntime().exec(strExec); // start the process
        p=Runtime.getRuntime().exec(strExec); // Modificar
        // now set something up that scans for output (independently)
        MGStreamGobbler mgSGErrors = new MGStreamGobbler(p.getErrorStream(),"error ");
        MGStreamGobbler mgSGOutput = new MGStreamGobbler(p.getInputStream(),"output ");
        // start the somethings
        mgSGErrors.start();
        mgSGOutput.start();
        // now wait for the actual process to end, wait for it's result
        intResult=p.waitFor();
        //String pruebaIP = mgSGOutput.extractIp();
        //tIdCompu.setText(pruebaIP);
        return(intResult);
       /**obtiene y ejecuta el CMD de Windows para poder obtener IP
        * de una computadora atraves del nombre de dicha maquina
        public void obtnerValue(){
                //tIdCompu.setText("ping -t wna-gye-"+obActivo.getIpCod());
            /*    Runtime r=Runtime.getRuntime (  ) ;
            try {
                Process P=r.exec(tIdCompu.getText());
            } catch (IOException ex) {
                ex.printStackTrace();
        public void mostrarDatos(){
        Connection conn = null;
        Conexion ejSQL = new Conexion();
        String consulta;
        int i=0, idEmpleado, cont = 0;
        ResultSet rs=null;
        idEmpleado = obEmpleado.getIdEmpleado();
            if(ejSQL.conectar())
                try
                    conn = ejSQL.getConexion();//obtiene la conexion
                    consulta = "SELECT act.Descripci?nActivo, cat.CategoriaActivo, sit.Situacion, dep.NombreDepartamento, act.N?mModelo, act.N?mSerie, act.C?digoDeBarras, act.Empresa, act.Comentarios_, act.Capital_Apropiation, act.Wd, act.Offi FROM Activos act, Categorias_de_Activo cat, Situacion sit, Departamentos dep WHERE act.IdEmpleado = "+idEmpleado+" And act.IdCategoriaActivo=cat.IdCategoriaActivo And act.IdSituacion = sit.IdSituacion And act.IdDepartamento=dep.IdDepartamento ORDER BY act.IdSituacion, act.IdCategoriaActivo";
                    //consulta = "SELECT DescripcionActivo FROM Activos";
                    rs = ejSQL.ejecutarConsulta(consulta);
                    while(rs.next())
                        vDescrip.addElement(rs.getString(1));
                        obActivo.setIdCategoria(rs.getString(2));
                        vSitua.addElement(rs.getString(3));
                        vDepa.addElement(rs.getString(4));
                        obActivo.setNumModelo(rs.getString(5));
                        obActivo.setNumSerie(rs.getString(6));
                        obActivo.setIdCodBarra(rs.getString(7));
                        obActivo.setEmpresa(rs.getString(8));
                        obActivo.setComentario(rs.getString(9));
                        obActivo.setArSerie(rs.getString(10));
                        obActivo.setOperativo(rs.getString(11));
                        obActivo.setOffice(rs.getString(12));
                        Object[] newRow={obActivo.getIdCodBarra(), vDescrip.get(i), obActivo.getIdCategoria(),
                        vSitua.get(i), vDepa.get(i), obActivo.getNumModelo(), obActivo.getNumSerie(),
                        obActivo.getEmpresa(), obActivo.getComentario(), obActivo.getArSerie(),
                        obActivo.getOperativo(), obActivo.getOffice()};
                        modeloDef.addRow(newRow);
                        i++;
                        cont++;
                    tResultado.updateUI();
                    ejSQL.cerrarConexion();
                catch(SQLException e)
                        System.out.println("SQLException: " + e.getMessage());
                        while((e = e.getNextException()) != null)
                            System.out.println(e.getMessage());
         else
                System.out.println("Ha ocurrido un error con la base de datos");
        public void actualizarDatos(){
            Connection conn = null;
            Conexion ejSQL = new Conexion();
            String consulta;
            //int i=0, idEmpleado, cont = 0;////////////
            ResultSet rs=null;
            //idEmpleado = obEmpleado.getIdEmpleado();//////////
            Vector tempCod = new Vector();
            Vector tempDes = new Vector();
            Vector tempMod = new Vector();
            Vector tempSer = new Vector();
            Vector tempEmp = new Vector();
            Vector tempCom = new Vector();
            Vector tempAR = new Vector();
            Vector tempOpe = new Vector();
            Vector tempOff = new Vector();
            int numFilas = this.tResultado.getRowCount();
            int numColumnas = this.tResultado.getColumnCount();
            for(int j=0;j<numFilas;j++)
                //System.out.println(numFilas +"+"+numColumnas);
                for(int k=0;k<numColumnas;k++)
                    //modeloDef.removeRow(j);
                    //System.out.println(modeloDef.getValueAt(j,k));
                    if(modeloDef.getValueAt(j,k)==null)
                        modeloDef.setValueAt("  ",j,k);
                    switch(k)
                        case 0:
                            tempCod.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempCod.lastElement());
                            break;
                        case 1:
                            tempDes.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempDes.lastElement());
                            break;
                        case 2:
                            tempCat.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempCat.lastElement());
                            break;
                        case 3:
                            tempSit.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempSit.lastElement());
                            break;
                        case 4:
                            tempDep.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempDep.lastElement());
                            break;
                        case 5:
                            tempMod.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempMod.lastElement());
                            break;
                        case 6:
                            tempSer.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempSer.lastElement());
                            break;
                        case 7:
                            tempEmp.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempEmp.lastElement());
                            break;
                        case 8:
                            tempCom.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempCom.lastElement());
                            break;
                        case 9:
                            tempAR.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempAR.lastElement());
                            break;
                        case 10:
                            tempOpe.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempOpe.lastElement());
                            break;
                        case 11:
                            tempOff.addElement(modeloDef.getValueAt(j,k));
                            //System.out.println(tempOff.lastElement());
                            break;
            actualizarDepartamento();
            actualizarCategoria();
            actualizarSituacion();
            if(ejSQL.conectar())
                try
                    conn = ejSQL.getConexion();//obtiene la conexion
                    for(int i=0;i<tempDep.size();i++ )
                        System.out.println(tempOff.get(i));
                        consulta = "UPDATE Activos SET Descripci?nActivo='"+tempDes.get(i)+"'  WHERE C?digoDeBarras = '"+tempCod.get(i)+"'";
                        rs = ejSQL.ejecutarConsulta(consulta);
                    for(int i=0;i<tempMod.size();i++ )
                        consulta = "UPDATE Activos SET N?mModelo='"+tempMod.get(i)+"' WHERE C?digoDeBarras = '"+tempCod.get(i)+"'";                  
                        rs = ejSQL.ejecutarConsulta(consulta);
                    for(int i=0;i<tempSer.size();i++ )
                        consulta = "UPDATE Activos SET N?mSerie='"+tempSer.get(i)+"' WHERE C?digoDeBarras = '"+tempCod.get(i)+"'";                  
                        rs = ejSQL.ejecutarConsulta(consulta);
                    for(int i=0;i<tempEmp.size();i++ )
                        consulta = "UPDATE Activos SET Empresa='"+tempEmp.get(i)+"' WHERE C?digoDeBarras = '"+tempCod.get(i)+"'";                  
                        rs = ejSQL.ejecutarConsulta(consulta);
                    for(int i=0;i<tempCom.size();i++ )
                        consulta = "UPDATE Activos SET Comentarios_='"+tempCom.get(i)+"' WHERE C?digoDeBarras = '"+tempCod.get(i)+"'";                  
                        rs = ejSQL.ejecutarConsulta(consulta);
                    for(int i=0;i<tempAR.size();i++ )
                        consulta = "UPDATE Activos SET Capital_Apropiation='"+tempAR.get(i)+"' WHERE C?digoDeBarras = '"+tempCod.get(i)+"'";                  
                        rs = ejSQL.ejecutarConsulta(consulta);
                    for(int i=0;i<tempOpe.size();i++ )
                        consulta = "UPDATE Activos SET Wd='"+tempOpe.get(i)+"' WHERE C?digoDeBarras = '"+tempCod.get(i)+"'";                  
                        rs = ejSQL.ejecutarConsulta(consulta);
                    for(int i=0;i<tempOff.size();i++ )
                        consulta = "UPDATE Activos SET Offi='"+tempOff.get(i)+"' WHERE C?digoDeBarras = '"+tempCod.get(i)+"'";                  
                        rs = ejSQL.ejecutarConsulta(consulta);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

    Hi
    Not sure what the use case is here but what I would do is to make sure when you create the employee or whatever the salary gets initialised to 0, db trigger, default etc.
    instead of null (null values can be a PITA when you have to search on them)
    Then all you have to do is to force a numeric input, the user can type 0 for all unassigned salaries.
    This removes the problem you have of leaving the box blank and having to accept the word NULL as an input value.
    HTH
    Paul

Maybe you are looking for

  • I need to move my old hard drive files to our new computer, how?

    Hey I need to move my old hard drive files to our new computer. It is a SATA 3.5. Is it as simple as putting it in an enclosure and plugging it to new computer. Can I do this at the start with the IMAC? I don't have the old computer, just the drive.

  • Autoconfig -patch error

    Hai frnds , iam getting the eroor when i run autoconfig =========================[AutoConfig Error Report] The following report lists errors AutoConfig encountered during each phase of its execution. Errors are grouped by directory and phase. The rep

  • How to capitalize the first letter

    Yesterday, I upgraded my operating system and pages on my Mac.  However, I can't capitalize the first letter after every sentence.  Can you please help me with this problem of mine?  Thank you, Vic.   

  • Export a subtitle track

    Hi I made the subtitle track (In Russian Language) into DVD Studio Pro, now I need to pass the text to a translator to create the other two language planned for this work (English and Italian). My problem is now that I do not know how to export the r

  • Two Student Lifecycle Management Training Offerings: France

    All, we want to make you aware of the following training opportunities in SAP Student Lifecycle Management (EhP 3). These 5 days trainings will be offered in English language at the SAP office France in Paris: - IHE 102: Managing a Student Lifecycle