This discussion is archived
3 Replies Latest reply: Mar 29, 2013 9:02 AM by Joe Weinstein RSS

MS SQL Server - Stored Procedure wth NVARCHAR data type

961903 Newbie
Currently Being Moderated
We are using the standard "weblogic.jdbc.sqlserver.SQLServerDriver" we defined the data source to connect to SQL server database. When we execute the stored procedure with parameters of data type varchar its working fine. But we are getting error while using nvarchar data type.
Is nvarchar not supported by weblogic driver ?

FYI, we are on WebLogic Server 10.3.6.0
  • 1. Re: MS SQL Server - Stored Procedure wth NVARCHAR data type
    Joe Weinstein Expert
    Currently Being Moderated
    Everything should work. What's the error and show the code.
  • 2. Re: MS SQL Server - Stored Procedure wth NVARCHAR data type
    961903 Newbie
    Currently Being Moderated
    Am using the Jdeveloper 11.1.1.5 and the error came up during DB adapter creation.


    java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]The specified SQL type is not supported by this driver.
         at weblogic.jdbc.sqlserverbase.dda4.b(Unknown Source)
         at weblogic.jdbc.sqlserverbase.dda4.a(Unknown Source)
         at weblogic.jdbc.sqlserverbase.dda3.b(Unknown Source)
         at weblogic.jdbc.sqlserverbase.dda3.a(Unknown Source)
         at weblogic.jdbc.sqlserverbase.ddb9.d(Unknown Source)
         at weblogic.jdbc.sqlserverbase.ddb9.a(Unknown Source)
         at weblogic.jdbc.sqlserverbase.ddb9.setNull(Unknown Source)
         at oracle.tip.tools.ide.adapters.designtime.adapter.db.sp.sqlserver.DBAdapterRowSetPage.bindAllParameters(DBAdapterRowSetPage.java:125)
         at oracle.tip.tools.ide.adapters.designtime.adapter.db.sp.AbstractRowSetPage.introspectButton_actionPerformed(AbstractRowSetPage.java:472)
         at oracle.tip.tools.ide.adapters.designtime.adapter.db.sp.AbstractRowSetPage.access$000(AbstractRowSetPage.java:82)
         at oracle.tip.tools.ide.adapters.designtime.adapter.db.sp.AbstractRowSetPage$1.actionPerformed(AbstractRowSetPage.java:151)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
         at java.awt.Dialog$1.run(Dialog.java:1046)
         at java.awt.Dialog$3.run(Dialog.java:1098)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:1096)
         at java.awt.Component.show(Component.java:1585)
         at java.awt.Component.setVisible(Component.java:1537)
         at java.awt.Window.setVisible(Window.java:842)
         at java.awt.Dialog.setVisible(Dialog.java:986)
         at oracle.bali.ewt.wizard.WizardDialog.runDialog(WizardDialog.java:382)
         at oracle.bali.ewt.wizard.WizardDialog.runDialog(WizardDialog.java:298)
         at oracle.tip.tools.ide.adapters.designtime.adapter.techAdapterWizard.display(techAdapterWizard.java:364)
         at oracle.tip.tools.ide.adapters.designtime.adapter.DbScaEndpointImpl.displayServiceEditor(DbScaEndpointImpl.java:124)
         at oracle.tip.tools.ide.bpel.v1.plugins.plugins.adapterservice.plugin.configurators.AdapterSvcConfigurator.display(AdapterSvcConfigurator.java:74)
         at oracle.tip.tools.ide.bpel.v1.plugins.plugins.soa.partnerlink.ServiceWizardAction.actionPerformed(ServiceWizardAction.java:66)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
         at java.awt.Dialog$1.run(Dialog.java:1046)
         at java.awt.Dialog$3.run(Dialog.java:1098)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:1096)
         at java.awt.Component.show(Component.java:1585)
         at java.awt.Component.setVisible(Component.java:1537)
         at java.awt.Window.setVisible(Window.java:842)
         at java.awt.Dialog.setVisible(Dialog.java:986)
         at oracle.tip.tools.ide.common.graph.view.GraphPane.startEditing(GraphPane.java:1890)
         at oracle.tip.tools.ide.common.graph.view.GraphPane.startEditing(GraphPane.java:1821)
         at oracle.tip.tools.ide.common.graph.view.GraphPane.mousePressed(GraphPane.java:2184)
         at oracle.tip.tools.ide.bpel.v1.designer.graph.BPELGraphPane.mousePressed(BPELGraphPane.java:1739)
         at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
         at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
         at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
         at java.awt.Component.processMouseEvent(Component.java:6286)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


    Following is the SQL Server procedure

    CREATE PROCEDURE [dbo].[USP_API_GetInvoicePostingRow]
         @intMessageId int, --Id from USP_API_GetInvoiceHead
         @strAccountingRowTag nvarchar(30) = NULL
         
    AS
    BEGIN
    SET @strAccountingRowTag = ISNULL(@strAccountingRowTag,'')
    SET @strAccountingRowTag = '%' + @strAccountingRowTag + '%'


         SELECT     Message_Id AS intMessageId,--1
                   Name AS strRowName,--2
                   C01 AS strDimension1,--3
                   C02 AS strDimension2,--4
                   C03 AS strDimension3,--5
                   C04 AS strDimension4,--6
                   C05 AS strDimension5,--7
                   C06 AS strDimension6,--8
                   C07 AS strDimension7,--9
                   C08 AS strDimension8,--10
                   C12 AS strDimension9,--11
                   C13 AS strQuantity,--12
                   C26 AS strDimension10,--13
                   C36 AS strDimension11,--14
                   C37 AS strDimension12,--15
                   C09 AS strDimensionVAT,--16
                   C10 AS strAccountingRowTag,--17
                   C55 AS strComment,--18
                   C56 AS strIdentity,--19
                   C57 AS strPeriodAccount,--20
                   C58 AS strTemplateId,--21
                   N00 AS intAccountingRowNumber,--22
                   N01 AS intInvoiceLineNumber,--23
                   N03 AS numAmount,--24
                   N04 AS numLocAmount,--25
                   D00 AS datPeriodStart,--26
                   D01 AS datPeriodEnd,--27
                   I01 AS intEnabled,--28
                   ROWVERSION AS CreateDate--29
         FROM NAV_IN_MESSAGE_LINE_TAB_TRANS
         WHERE C10 like @strAccountingRowTag
         AND Message_Id = @intMessageId
         
    END
  • 3. Re: MS SQL Server - Stored Procedure wth NVARCHAR data type
    Joe Weinstein Expert
    Currently Being Moderated
    Open an official Oracle WebLogic DataSource SR and we will fix this for you.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points