IBM Support

PK53207: New SQLJ wizard only accepts SQL Select Statment but gives not e rror

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Using IBM Rational Software Architect(RSA) V7.0.0.3
    It is not possible to add SQLJ file containing Insert statement
    into Java project within RSA using its built-in Wizard.
    Steps to reproduce:
    1. Create a connection to new cloudscape Database
    2. Call the Database MyDB.
    3. Create the table and colum with:
    4. CREATE TABLE 'MyTest'.'HelloWorld' ( 'Title' CHAR(50));
    5. Create a new Java project
    6.Add support for SQLJ to the project
    7.Add a new SQLJ file
    a. In the Wizard select Manually type an SQL statement
    b. Choose the connection created in step 1
    c. Add the following SQL statement
    d. INSERT INTO 'MyTest'.'HelloWorld' ('Title') VALUES ('TEST');
    e. Parse the content
    f. Run and click the ?Finish? button
    Result:
    The wizard stays as-is. No error or other messages.
    Only option is to cancel it.
    If we look in the .log of the workspace we see the following sta
    ck trace:
    
    Error..com.ibm.datatools.sqlj.wizard.NewSQLJFileOperation.getIni
    tialContentsFromTemplate()
    java.lang.ClassCastException: com.ibm.db.models.sql.query.impl.Q
    ueryInsertStatementImpl incompatible with com.ibm.db.models.sql.
    query.QuerySelectStatement
     at com.ibm.datatools.sqlj.template.BeanData.getColumnInfo(Unkno
    wn Source)
     at com.ibm.datatools.sqlj.template.instances.SQLJCachedTemplate
    .generate(Unknown Source)
     at com.ibm.datatools.sqlj.template.SourceFromTemplate.getFileCo
    ntents(Unknown Source)
     at com.ibm.datatools.sqlj.wizard.NewSQLJFileOperation.getInitia
    lContentsFromTemplate(Unknown Source)
     at com.ibm.datatools.sqlj.wizard.NewSQLJFileOperation.execute(U
    nknown Source)
     at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Unknow
    n Source)
     at org.eclipse.core.internal.resources.Workspace.run(Unknown So
    urce)
     at org.eclipse.ui.actions.WorkspaceModifyOperation.run(Unknown
    Source)
     at org.eclipse.jface.operation.ModalContext.runInCurrentThread(
    Unknown Source)
     at org.eclipse.jface.operation.ModalContext.run(Unknown Source)
     at org.eclipse.jface.wizard.WizardDialog.run(Unknown Source)
     at com.ibm.datatools.sqlj.wizard.NewSQLJWizardPage.finish(Unkno
    wn Source)
     at com.ibm.datatools.sqlj.wizard.NewSQLJWizard.performFinish(Un
    known Source)
     at org.eclipse.jface.wizard.WizardDialog.finishPressed(Unknown
    Source)
     at org.eclipse.jface.wizard.WizardDialog.buttonPressed(Unknown
    Source)
     at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Unknown So
    urce)
     at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown So
    urce)
     at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
     at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
     at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown So
    urce)
     at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Sour
    ce)
     at org.eclipse.jface.window.Window.runEventLoop(Unknown Source)
     at org.eclipse.jface.window.Window.open(Unknown Source)
     at org.eclipse.ui.actions.NewWizardAction.run(Unknown Source)
     at org.eclipse.jface.action.Action.runWithEvent(Unknown Source)
     at org.eclipse.jface.action.ActionContributionItem.handleWidget
    Selection(Unknown Source)
     at org.eclipse.jface.action.ActionContributionItem.access$2(Unk
    nown Source)
     at org.eclipse.jface.action.ActionContributionItem$5.handleEven
    t(Unknown Source)
     at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
     at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
     at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown So
    urce)
     at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Sour
    ce)
     at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Sourc
    e)
     at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
     at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unkn
    own Source)
     at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Sour
    ce)
     at org.eclipse.ui.internal.ide.IDEApplication.run(Unknown Sourc
    e)
     at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Un
    known Source)
     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher
    .runApplication(Unknown Source)
     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher
    .start(Unknown Source)
     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown
    Source)
     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown
    Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Sour
    ce)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at org.eclipse.core.launcher.Main.invokeFramework(Unknown Sourc
    e)
     at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
     at org.eclipse.core.launcher.Main.run(Unknown Source)
     at org.eclipse.core.launcher.Main.main(Unknown Source)
    

Local fix

Problem summary

  • If a user enters a non-SELECT statement in the SQLJ Wizard,
    no error message is displayed and the wizard cannot
    continue.
    

Problem conclusion

  • If an SQL statement is manually entered and the statement is
    not a SELECT statement, an error message is displayed after
    the statement is parsed.  FINISH will  only be enable if a
    valid SQL SELECT statement is specified.
    
    Fix delivered in Rational Software Architect V7.0.0.6
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK53207

  • Reported component name

    SW ARCHITECT WI

  • Reported component ID

    5724I7001

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-09-19

  • Closed date

    2008-03-28

  • Last modified date

    2008-03-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    SW ARCHITECT WI

  • Fixed component ID

    5724I7001

Applicable component levels

  • R700 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYKBQ","label":"Rational Software Architect Designer for WebSphere Software"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"700","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"700","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}}]

Document Information

Modified date:
28 March 2008