Creating Stored Procedure Task - Adapter Factory, Entity Adapter
Hi All,
I am trying to create a Stored Procedure Task for an Entity Adapter within the OIM design console. I can connect to the database (Connection Status = Connection Established), but the Schema and Procedure dropdown boxes remain empty so I am unable to select the stored procedure I am wanting to run.
OIM version 11.1.2.0.7
MS SQL Server 2008 R2
sqljdbc4.jar
I can connect and execute the stored procedure locally on the SQL server as the user I am connecting as from OIM and have also tried to connect as the SA user.
Can anybody suggest anything I need to check or need to enable/modify to be able to see the stored procedure?
I found this blurb with a quick google search:
byte[] myByteArray = System.Text.Encoding.ASCII.GetBytes("a text string");
string myString = System.Text.Encoding.ASCII.GetString(myByteArray );
See if this helps to turn the byte array into a string.
-Kevin
Similar Messages
-
Error in creating a process task adapter in OIM
Hi All,
I am trying to create a process task adapter(Java Task) in OIM 11.1.1.5.
The code tries to fetch the values of a process form using a lookup and store it in a hashmap. So have done import for Thor.Api.* and com.thortech.xl.dataaccess.tcDataProvider in the code. The jar for the code is uploaded in MDS and saved in JavaTask folder.
Whlie creating the the adapter Task, after selecting the API source as my jar file, when i selecting the Application API, i am getting the following error.
SEVERE: Class/Method: tcADPClient/introspect encounter some problems: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider; nested exception is: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider
javax.ejb.EJBException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider; nested exception is: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl_1035_WLStub.introspectAPIx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
at $Proxy4.introspectAPIx(Unknown Source)
at com.thortech.xl.ejb.interfaces.tcADPDelegate.introspectAPI(Unknown Source)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.security.Security.runAs(Security.java:41)
at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
at $Proxy5.introspectAPI(Unknown Source)
at com.thortech.xl.client.dataobj.tcADPClient.introspect(tcADPClient.java:113)
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask.setJavaApiLookup(tcfrmAdapterTask.java:433)
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask.access$1200(tcfrmAdapterTask.java:40)
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask$4.actionPerformed(tcfrmAdapterTask.java:683)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:840)
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.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.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.awt.Dialog.show(Dialog.java:1096)
at com.thortech.xl.gui.base.tcDialog.show(tcDialog.java:102)
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 com.thortech.xl.gui.base.tcfrmPopup.jbInit(tcfrmPopup.java:199)
at com.thortech.xl.gui.base.tcfrmPopup.addForm(tcfrmPopup.java:166)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.loadAddForm1(tcAdapterTaskTree.java:1387)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.launchEditorForm(tcAdapterTaskTree.java:1355)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.addAdapterTask(tcAdapterTaskTree.java:555)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.actionPerformed(tcAdapterTaskTree.java:459)
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:272)
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.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.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)
Caused by: java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at com.thortech.xl.dataobj.util.tcApplicationLookup.introspect(tcApplicationLookup.java:417)
at com.thortech.xl.dataobj.tcADP.introspectAPI(tcADP.java:172)
at com.thortech.xl.ejb.databeansimpl.tcADPBean.introspectAPI(tcADPBean.java:89)
at com.thortech.xl.ejb.interfaces.tcADPEJB.introspectAPIx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor589.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy329.introspectAPIx(Unknown Source)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl.introspectAPIx(Unknown Source)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
javax.ejb.EJBException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider; nested exception is: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:124)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:96)
at $Proxy4.introspectAPIx(Unknown Source)
at com.thortech.xl.ejb.interfaces.tcADPDelegate.introspectAPI(Unknown Source)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.security.Security.runAs(Security.java:41)
at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
at $Proxy5.introspectAPI(Unknown Source)
at com.thortech.xl.client.dataobj.tcADPClient.introspect(tcADPClient.java:113)
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask.setJavaApiLookup(tcfrmAdapterTask.java:433)
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask.access$1200(tcfrmAdapterTask.java:40)
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask$4.actionPerformed(tcfrmAdapterTask.java:683)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:840)
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.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.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.awt.Dialog.show(Dialog.java:1096)
at com.thortech.xl.gui.base.tcDialog.show(tcDialog.java:102)
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 com.thortech.xl.gui.base.tcfrmPopup.jbInit(tcfrmPopup.java:199)
at com.thortech.xl.gui.base.tcfrmPopup.addForm(tcfrmPopup.java:166)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.loadAddForm1(tcAdapterTaskTree.java:1387)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.launchEditorForm(tcAdapterTaskTree.java:1355)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.addAdapterTask(tcAdapterTaskTree.java:555)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.actionPerformed(tcAdapterTaskTree.java:459)
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:272)
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.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.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)
Caused by: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl_1035_WLStub.introspectAPIx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
... 96 more
Caused by: java.lang.NoClassDefFoundError: com/thortech/xl/dataaccess/tcDataProvider
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at com.thortech.xl.dataobj.util.tcApplicationLookup.introspect(tcApplicationLookup.java:417)
at com.thortech.xl.dataobj.tcADP.introspectAPI(tcADP.java:172)
at com.thortech.xl.ejb.databeansimpl.tcADPBean.introspectAPI(tcADPBean.java:89)
at com.thortech.xl.ejb.interfaces.tcADPEJB.introspectAPIx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor589.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy329.introspectAPIx(Unknown Source)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl.introspectAPIx(Unknown Source)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
I am not able to select the Application API and so cant proceed further.
Request you all to provide some help for the sameThe other error for the same is as follows
Oct 9, 2012 6:36:21 PM com.thortech.util.logging.Logger error
SEVERE: Class/Method: tcADPClient/getConstructors encounter some problems: Bean has been deleted.
javax.ejb.NoSuchEJBException: Bean has been deleted.
at weblogic.ejb.container.swap.DiskSwap.read(DiskSwap.java:192)
at weblogic.ejb.container.manager.StatefulSessionManager.getBean(StatefulSessionManager.java:420)
at weblogic.ejb.container.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:492)
at weblogic.ejb.container.internal.BaseRemoteObject.preInvoke(BaseRemoteObject.java:229)
at weblogic.ejb.container.internal.StatefulRemoteObject.__WL_preInvoke(StatefulRemoteObject.java:57)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:24)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl.getConstructorsx(Unknown Source)
at com.thortech.xl.ejb.interfaces.tcADP_3uwi2l_tcADPRemoteImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
java.lang.NullPointerException
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask.setJavaApiLookup(tcfrmAdapterTask.java:447)
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask.access$1200(tcfrmAdapterTask.java:40)
at com.thortech.xl.adapterfactory.forms.tcfrmAdapterTask$4.actionPerformed(tcfrmAdapterTask.java:683)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:840)
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.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.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.awt.Dialog.show(Dialog.java:1096)
at com.thortech.xl.gui.base.tcDialog.show(tcDialog.java:102)
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 com.thortech.xl.gui.base.tcfrmPopup.jbInit(tcfrmPopup.java:199)
at com.thortech.xl.gui.base.tcfrmPopup.addForm(tcfrmPopup.java:166)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.loadAddForm1(tcAdapterTaskTree.java:1387)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.launchEditorForm(tcAdapterTaskTree.java:1355)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.addAdapterTask(tcAdapterTaskTree.java:555)
at com.thortech.xl.adapterfactory.guibase.tcAdapterTaskTree.actionPerformed(tcAdapterTaskTree.java:459)
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:272)
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.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.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) -
How can I create stored procedure?
I am new in this field, I was reading in this web site on how to create stored procedure,and this is what I did :
SQL> CREATE PROCEDURE test.proc1 (n IN NUMBER)
2 AS BEGIN
3 select * from districts
4 where doe = n;
5 END;
6
Please direct me. I don't know if I am wrong or right, test is the name of the database, and proc1 is the stored procedure that I want to create, why when I hit Enter after END; I got the number 6.
How can I call this stored procedure, if it works.
Thanks in advance
nullSome reading and training might prove useful. Even if you are using Linux, this forum is no place for a question like that.
-
HOW TO CREATE STORED PROCEDURE IN DATA INTEGRATOR
Hi to every one,
Can any one help in giving me a solution for creating stored procedure in Data Integrator.
I m new to this fieldHi nath,
Firstly are you using MYSQL or Oracle as the database,if its oracle database then follow this
http://obiee101.blogspot.com/2008/01/obiee-using-oracle-stored-procedure-to.html
http://oraclebizint.wordpress.com/2008/02/20/oracle-bi-ee-101332-executing-stored-proceduresfunctions-before-reports-before-report-triggers-and-global-temporary-tables/
EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME][DATABASE_NAME] --> is the database name your creating your procedure
[SCHEMA_NAME]-->is the user with which your creating
[PROCEDURE_NAME] --> the name given to procedure
You dont know how to get those run this SQL in TOAD and see select sys_context('userenv','db_name'), sys_context('userenv','session_user') from dual
(OR) open you connection pool properties window in RPD,you will get the DB name and the user name as the schema name
hope answered your question.
CHeers,
KK -
How can i create stored procedures dynamically?
I have tried to create a stored procedure building a string with the PL/SQL code needed to create the procedure. If i run the code using SQL+ works fine, but using the following code:
Public Sub CreateStoredProcedure()
Dim strSql As String
strSql = "CREATE OR REPLACE PACKAGE OPSPRUEBAS AS " & vbCrLf
strSql = strSql & vbTab & "PROCEDURE consulta (resultado OUT VARCHAR2); " & vbCrLf
strSql = strSql & "END OPSPRUEBAS; " & vbCrLf
strSql = strSql & "/ " & vbCrLf
strSql = strSql & ". " & vbCrLf
strSql = strSql & "CREATE OR REPLACE PACKAGE BODY OPSPRUEBAS AS " & vbCrLf
strSql = strSql & "PROCEDURE consulta (resultado OUT VARCHAR2) IS " & vbCrLf
strSql = strSql & "oc_ref" & vbTab & vbTab & "REF Content_Ontology; " & vbCrLf
strSql = strSql & "oc" & vbTab & vbTab & "Content_Ontology; " & vbCrLf
strSql = strSql & "ori" & vbTab & vbTab & "role_def; " & vbCrLf
strSql = strSql & "ori_ref" & vbTab & vbTab & "ref role_def; " & vbCrLf
strSql = strSql & "conce" & vbTab & vbTab & "concept; " & vbCrLf
strSql = strSql & "conce_ref" & vbTab & "REF concept; " & vbCrLf
strSql = strSql & "b" & vbTab & vbTab & "boolean; " & vbCrLf
strSql = strSql & "BEGIN " & vbCrLf
strSql = strSql & "b:=false; " & vbCrLf
strSql = strSql & "select REF(oi) into ori_ref from rol_table oi where oi.name='Playing'; " & vbCrLf
strSql = strSql & "select deref(ori_ref) into ori from dual; " & vbCrLf
strSql = strSql & "select REF(oi) into oc_ref from c_ontologies oi where oi.web_source_prop=websource('FilmContentOntology'); " & vbCrLf
strSql = strSql & "select deref(oc_ref) into oc from dual; " & vbCrLf
strSql = strSql & "if oc.if_has_co_class('Film')='TRUE' AND " & vbCrLf
strSql = strSql & "oc.if_has_co_class('theater')='TRUE' AND " & vbCrLf
strSql = strSql & "oc.if_has_co_relationship('is_scheduled')='TRUE' AND " & vbCrLf
strSql = strSql & "oc.if_has_co_attributes('Film', lista('is_scheduled', 'title', 'actor'))='TRUE' AND " & vbCrLf
strSql = strSql & "oc.if_has_co_attributes('theater', lista('theatername', 'address', 'email'))='TRUE' " & vbCrLf
strSql = strSql & "then resultado:='FilmContentOntology'; " & vbCrLf
strSql = strSql & "else resultado:='No Existe'; " & vbCrLf
strSql = strSql & "end if; " & vbCrLf
strSql = strSql & "END consulta; " & vbCrLf
strSql = strSql & "END OPSPRUEBAS; " & vbCrLf
strSql = strSql & "/ " & vbCrLf
strSql = strSql & ". " & vbCrLf
strSql = strSql & "COMMIT;" & vbCrLf
TextBox2.Text = strSql
'Dim myConnectionString As String = "User Id=system;Password=daniel;Data Source=websogo;"
'Dim oraConn As Oracle.DataAccess.Client.OracleConnection = New Oracle.DataAccess.Client.OracleConnection(myConnectionString)
Dim myCmd As New System.Data.OleDb.OleDbCommand()
Dim MyConnection As New System.Data.OleDb.OleDbConnection()
MyConnection.ConnectionString = "Provider=MSDAORA;Data Source=websogo;password=daniel;User ID=system"
MyConnection.Open()
'oraConn.Open()
myCmd.Connection = MyConnection
myCmd.CommandType = CommandType.Text
myCmd.CommandText = strSql
myCmd.ExecuteNonQuery()
'Dim e As Oracle.DataAccess.Client.OracleException
'Try
' myCmd.ExecuteNonQuery()
'Catch e
' Dim error1 As Oracle.DataAccess.Client.OracleError
' error1 = e.Errors.Item(0)
' Textbox3.Text = error1.Source & " " & error1.Message
'End Try
MyConnection.Close()
End Sub
I've tried using Microsoft ODP, OLEDB and Oracle's ODP.NET
Also tried to catch any error but there are no errors!
Has anybody achived a successful dynamically stored procedure creation using .net?
thanks in advance
DanI'm trying to create Stored Procedures via .NET and able to do so but when I look in Oracle Enterprise Manager Console, the Stored Procedures are marked as INVALID... If I edit the Stored Procedure (i.e. delete a space or something minor) and SAVE then it compiles fine.....
Any ideas ????
will be using this against 9i & 10g db -
I have created stored procedure with %rowtype as IN OUT parameter.I want to
i have created stored procedure with %rowtype as IN OUT parameter.I want to call it in java program
Hi Avi,
I have the same problem as the person asking before me, so I'll try and clarify:
I have a Java client and a PL/SQL database procedure that looks something along the lines of:
Create of Replace procedure myProc(myRow IN myTable%Rowtype)
It's very easy to pass a parameter into this procedure from another procedure within the database because creating another myTable%Rowtype is not a problem.
However, Java doesnt know what "Rowtype" is.
I was wondering how I would pass a "rowtype" from Java.
I was thinking along the lines of creating an object in the DB like that:
Create Type myObj AS myTable%Rowtype (<-- is that even allowed?)
And then create a procedure in the DB with the header:
Create of Replace procedure myProc(myRow IN myObj)
And then, in my Java,just create a STRUCT of my DB object and pass it to the DB:
myCallableStatement.setObject(1, myStruct);
Would that work?
Is there a better way?
Thanks,
Dan -
Cannot create stored procedure in Azure SQL database
When I try to create a stored procedure using Management Studio
(Snippet follows
use
PPSC_Sky_Data
go
/****** Object: StoredProcedure [dbo].[sp_RegisterProd] Script Date: 17-02-2015 17:52:50 ******/
SET
ANSI_NULLS
ON
GO
SET
QUOTED_IDENTIFIER
ON
GO
CREATE
proc [dbo].[sp_RegisterProd]
@inputMachid nvarchar(50),@inputDomainname
nvarchar(255),@inputwsid
nvarchar(255),@inputipv4
nvarchar(50),
@custno
as
nvarchar(50),@email
as
nvarchar(50),@telephone
as
nvarchar(50),@RegType
as
int
(end of snippet)
It fails with message 40508 - (not allowed to switch between databases) then tells me I am not authorized to create an SP in the Master db.
So....
How can I create a procedure in AZURE Sql?
Thanks
Murray
M WhippsHi 9gwcycn,
Creating stored procedures is not allowed in Master Database. You have to switch to Database
PPSC_Sky_Data manually, use statement is not supported. After that could you please confirm again? As Creating and altering Stored procedures work fine from my SSMS.
If you have any feedback on our support, please click
here.
Eric Zhang
TechNet Community Support -
How to create stored procedure directely in RPD
Hi Gurus,
I am trying to create stored procedure directly in physical table in rpd level in OBIEE.for this one i have gone through below website.
http://obiee101.blogspot.com/2011/01/obiee-using-mssql-stored-procedure-as.html
in that blog they mentioned to write some query which is...........
EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME]
in above query i am not getting what is DATABASE_NAME,SCHEMA_NAME,PROCEDURE_NAME
can any one elobrate this oneHi nath,
Firstly are you using MYSQL or Oracle as the database,if its oracle database then follow this
http://obiee101.blogspot.com/2008/01/obiee-using-oracle-stored-procedure-to.html
http://oraclebizint.wordpress.com/2008/02/20/oracle-bi-ee-101332-executing-stored-proceduresfunctions-before-reports-before-report-triggers-and-global-temporary-tables/
EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME][DATABASE_NAME] --> is the database name your creating your procedure
[SCHEMA_NAME]-->is the user with which your creating
[PROCEDURE_NAME] --> the name given to procedure
You dont know how to get those run this SQL in TOAD and see select sys_context('userenv','db_name'), sys_context('userenv','session_user') from dual
(OR) open you connection pool properties window in RPD,you will get the DB name and the user name as the schema name
hope answered your question.
CHeers,
KK -
Hello,
I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".
Suppose ,
Parameter value : person 1,person2,person3
table structure :
Project Name | officers 1 | officers 2
here, officers 1 or officers 2 may contain names of multiple people.
expected OUTPUT : distinct list(rows) of projects where person 1 or person 2 or person 3 is either officer1 or officer 2.
please explain or provide solution in detail
- ThanksHi Visakh,
Thanks for reply.
But the solution you provided giving me right output only if officer 1 or officer 2 contains single value , not with comma seperated value.
Your solution is working fine for following scenario :
Project
Officers 1
Officers 2
p1
of11
off21
p2
of12
off22
with parameter : of11,off22 : it will give expected output
And its not working in case of :
Project
Officers 1
Officers 2
p1
of11,of12
off21,off23
p2
of12,of13
off22,off24
with parameter : of11,off22 : it will not give any row in output
I need patten matching not exact match :)
ok
if thats the case use this modified logic
CREATE PROC GetProjectDetails
@PersonList varchar(5000)
AS
SELECT p.*
FROM ProjectTable p
INNER JOIN dbo.ParseValues(@PersonList,',')f
ON ',' + p.[officers 1] + ',' LIKE '%,' + f.val + ',%'
OR ',' + p.[officers 2] + ',' LIKE '%,' + f.val + ',%'
GO
Keep in mind that what you've done is a wrong design approach
You should not be storing multiples values like this as comma separated list in a single column. Learn about normalization . This is in violation of 1st Normal Form
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Creating Stored Procedure in Java
Hi All,
I would like to ask how to create a stored procedure in Java.
My project now is to create a program that will open a DB2 SQL File (Creating Table and Stored Procedure) and then Execute it.
Executing the CREATE TABLE command is not that difficult since I can break the execution down by statement (divide by ";" in the SQL file).
The logic I applied here are:
1. Open the SQL file and store the contents into a String object.
2. Call the executeUpdate(string_sql_fileContent) method of Statement Object.
Example: SQL File contect to be executed.
===========================================================
CREATE TABLE MDMTEST.sample
(firstname CHARACTER(40),
middlename CHARACTER(40),
lastname CHARACTER(40),
idNo SMALLINT NOT NULL
DATA CAPTURE NONE;
#SYNC 10;
ALTER TABLE MDMTEST.sample
LOCKSIZE ROW
APPEND OFF
NOT VOLATILE;
#SYNC 20;
ALTER TABLE MDMTEST.sample
ADD PRIMARY KEY
(idNo
#SYNC 30;
RUNSTATS ON TABLE MDMTEST.sample
AND INDEXES ALL
SHRLEVEL REFERENCE;
===========================================================
I can divide this by ";" and execute them by statement.
But my problem is when creating Stored Procedure... Since in stored procedure there are so many stub-statements...
Example: Content of SQL File for creating stored procedure.
===========================================================
CREATE PROCEDURE MDMTEST.DROP_ALL_OBJECTS ( )
SPECIFIC MDMTEST.SQL051109115453000
LANGUAGE SQL
NOT DETERMINISTIC
CALLED ON NULL INPUT
MODIFIES SQL DATA
INHERIT SPECIAL REGISTERS
BEGIN
Delete Statement;
Insert Statement;
Update Statement;
END;
===========================================================
Take note there are three statements inside the CREATE..BEGIN.. and END.. (namely Delete, Insert, and Update Statements).
How can I execute the command for creating the procedure in Java? I believe that creating stored procedures in other databases are almost the same...
So... anyboby who have tried creating stored procedure in Java?
Please help me in this... I wanna pass the subject hehe..I have used these files as a sample:
Java Program:
import java.io.*;
import java.sql.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.border.*;
import my.db.components.*;
public class ProcedureUploader {
private MyDBConnection dbConn=new MyDBConnection();
private Statement statement;
public ProcedureUploader() {
try{
dbConn.connectDB ("206.206.206.206","12345","DEV","mdmtest","mdmtest");
this.statement=dbConn.getStatement ();
}catch(SQLException sqle){
sqle.printStackTrace();
public String getContents(String fileName) throws IOException{
File inputFile = new File(fileName);
FileReader in = new FileReader(inputFile);
int c; String contents="";
while ((c = in.read()) != -1) contents+=(char) c;
in.close();
return contents;
public void executeSQLCommand(String file) throws IOException{
String command="";
try{
command=getContents(file);
statement.executeUpdate(command);
System.out.println("Command Execution Successful.");
}catch(Exception ex){
System.out.println("There is a problem executing the command. Please check the SQL file and re-execute again.");
ex.printStackTrace();
public static void main(String args[]) throws IOException{
ProcedureUploader uploader=new ProcedureUploader();
uploader.executeSQLCommand("C:\\I2\\Development\\ProcedureUploader\\sample.sql");
SQL File:
CREATE PROCEDURE MDMTEST.sampleProc ( )
SPECIFIC MDMTEST.sampleProc
LANGUAGE SQL
NOT DETERMINISTIC
CALLED ON NULL INPUT
MODIFIES SQL DATA
INHERIT SPECIAL REGISTERS
delete from SAMPLE;
commit;
select * from SAMPLE;;
#SYNC 10;
===========================================================
The problem is that ... there will be an error:
===========================================================
There is a problem executing the command. Please check the SQL file and re-execute again.
com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: delete from SAMPLE;;PECIAL REGISTERS
;<psm_repeat>
at com.ibm.db2.jcc.c.fg.e(fg.java:1596)
at com.ibm.db2.jcc.c.fg.b(fg.java:1160)
at com.ibm.db2.jcc.b.gb.h(gb.java:217)
at com.ibm.db2.jcc.b.gb.b(gb.java:46)
at com.ibm.db2.jcc.b.w.b(w.java:40)
at com.ibm.db2.jcc.b.vb.f(vb.java:118)
at com.ibm.db2.jcc.c.fg.m(fg.java:1155)
at com.ibm.db2.jcc.c.fg.a(fg.java:1865)
at com.ibm.db2.jcc.c.fg.c(fg.java:517)
at com.ibm.db2.jcc.c.fg.executeUpdate(fg.java:501)
at ProcedureUploader.executeSQLCommand(ProcedureUploader.java:44)
at ProcedureUploader.main(ProcedureUploader.java:54)
===========================================================
But still the procedure will be created but until the first ";" only... OR.. creates a stored procedure having the following lines only.
===========================================================
CREATE PROCEDURE MDMTEST.sampleProc ( )
SPECIFIC MDMTEST.sampleProc
LANGUAGE SQL
NOT DETERMINISTIC
CALLED ON NULL INPUT
MODIFIES SQL DATA
INHERIT SPECIAL REGISTERS
delete from SAMPLE;
=========================================================== -
I'd like to learn how to create stored procedures in Oracle 10g. I'm proficient at this with MS SQL but I can't get to first base with Oracle.
I am not using SQL *Plus and really I don't want to use it. I'd rather use a DB access program like Aqua Data Studio. When I attempt to create a procedure I get a "Compiled with errors" message. I don't know how to see the errors because I can't do a "Show Errors" message.
Is there a way to create stored procedures using standard SQL and staying away from SQL *Plus?The two best free tools I know of are:
http://sourceforge.net/projects/tora/
and
http://www.oracle.com/technology/products/database/sql_developer/
TOra is more a database system tool, and SQL Developer is more of a development tool, but see if either of those will be to your liking ;)
~Jer -
How to create stored procedures automatically when creating new company
I need to create a method in our add-on Business One application that will create stored procedures at the time we install the add-on (when the new company is created). Where would I store the SQL scripts, and what SAP Business One commands do I need to use to build the stored procedures into the new company database? Can someone give me an example of how to do this? We are coding in C#, but an example in visual basic would also be helpful if no one out there in forum land uses C#
Thanks,
Nancy Walk
[email protected]Hi Nancy!
Of course are there people here that use C#
To solve your problem, create a routine in your add-on that checks at startup if the stored procedures are present. If they are not, create them. You can use the DI-API, or just add them directly to your database.
<i>Note: SAP does not like it when you play around directly in the SAP databases, and does not supply support for databases that are changed manually. You'd better use the DI-API...</i>
Hope it helps...
Grtz, Rowdy -
Error Calling Stored Procedure Receiver adapter
Hi Guys,
I am trying to send data to a stored procedure SQL server R2 2008 from SAP PI7.11.
Transport Protocol: JDBC2.0
Message Protocol : XMLSQLFORMAT
I am able to read from same database using sender adapter.
Name of SP: InderTest
Paramters in SP : @Carrier Varchar(20), @Location Varchar(20), @Product Varchar(20), @Zone Varchar(20),
@dteStart date, @dteEnd date, @strType Varchar(1), @intRate Float
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_FreightPricing xmlns:ns0="http://na.holcim.com/pi/o2c/pricingmaster">
- <StatementName1>
- <InderTest action="EXECUTE">
<table>InderTest</table>
<Carrier isInput="true" type="VARCHAR">4000004</Carrier>
<Location isInput="true" type="VARCHAR">3600</Location>
<Product isInput="true" type="VARCHAR">3553</Product>
<Zone isInput="true" type="VARCHAR">Zone1</Zone>
<dteStart isInput="true" type="DATE">20110704</dteStart>
<dteEnd isInput="true" type="DATE">20120704</dteEnd>
<strType isInput="true" type="VARCHAR">A</strType>
<intRate isInput="true" type="FLOAT">10.00</intRate>
</InderTest>
</StatementName1>
</ns0:MT_FreightPricing>
Error in JDBC Receiver
Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'InderTest' (structure 'StatementName1'): java.lang.IllegalArgumentException
Any clue...
I was reading this help document. They have mentioned 5 configuration step, i have worked on JDBC earlier but never did anything like that.... Any idea ?
http://help.sap.com/saphelp_nw70/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
Regards
Inder<table> element is optional in the structure. In that case you can try:
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MT_FreightPricing xmlns:ns0="http://na.holcim.com/pi/o2c/pricingmaster">
<StatementName1>
<InderTest action="EXECUTE">
<Carrier isInput="true" type="VARCHAR">4000004</Carrier>
<Location isInput="true" type="VARCHAR">3600</Location>
<Product isInput="true" type="VARCHAR">3553</Product>
<Zone isInput="true" type="VARCHAR">Zone1</Zone>
<dteStart isInput="true" type="DATE">20110704</dteStart>
<dteEnd isInput="true" type="DATE">20120704</dteEnd>
<strType isInput="true" type="VARCHAR">A</strType>
<intRate isInput="true" type="FLOAT">10.00</intRate>
</InderTest>
</StatementName1>
</ns0:MT_FreightPricing>
Regards
Raj -
How to create stored procedures and use those in Crystal reports
Hi All,
Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
Thanks in advance.Hello,
There is a document explainining how to use Oracle stored proc with Crystal reports.
Check at:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1084c536-711e-2b10-e48a-924a60745253
It is for older version but it should work and you can refer to it to get general idea how to start with it. It has a sample oracle stored proc and how to connect it from Crystal Reports. -
Create stored procedure with table from another schema throws PLS-00201
Oracle 10g. I'm new to procedures, so maybe I'm missing something obvious.
Schema owner ABC has table T2001_WRITEOFF. The SYSDBAs granted SIUD to Some_Update_Role, and granted that role to developer user IJK. User IJK then created a private synonym T2001_WRITEOFF for ABC.T2001_WRITEOFF. This worked with normal SQL DML commands.
When I try to create a simple procedure as follows, it throws PLS-00201 identifier 'T2001_WRITEOFF' must be declared, and points to the 2nd line.
create or replace procedure woof1(
fooname in T2001_WRITEOFF.territory%TYPE, <=== error points here
bardesc IN T2001_WRITEOFF.ind_batch_submit%TYPE) IS
BEGIN
INSERT into T2001_WRITEOFF
VALUES ( fooname, bardesc);
END woof1;
What am I doing wrong?
Thanks
JimRHi,
The reason I've heard has to do with knowing when a procedure becomes invalid due to privileges being revoked. Any time a grant to a role is revoked, you would have to check all procedures that depended on that role to know if they were still valid. Even worse, since roles can be granted to other roles, every time a role is revoked from another role, you would have to check all procedures that depended on anything to see if they were still valid.
Oracle 11 behaves the same as earlier versions in this regard, and I don't expect this to change.
This whole thread applies only to AUTHID DEFINER stored procedures (which is the default). If you can make the procedure AUTHID CURRENT_USER, then you can run it with privileges granted through roles. Usually, however, you really want AUTHID DEFINER, and granting the necessary privileges directly to the procedure owner (or to PUBLIC) isn't too hard.
Maybe you are looking for
-
How to call Webservice in abap Program
Hi Guys, How can i call a abap webservice located in another server(CRM) in Bpc BADI.Is this web service is thing is possible??
-
Helloo- Internet Explorer ISSUes 11 and contacted all avenues,
Hello, I recently written that I am having a difficult time with my notebook 2000 H. I had to reset it becuase of malaware but that is fixed. the issue is with Internet explorer 11 which was installed when I bouht it. It seems to not work and
-
Software problems with CD downloads in 7.0.2
Before, tracks of just-downloaded CDs were automatically highlighted, so a right click to playlists got them there. But, now they are not only not highlighted so I have to hunt for them, but a, say, six track CD will have a couple on one library plac
-
Hi, I don't know whether this is the appropriate forum to ask my query? what is the difference between SAP Netweaver, SAP Business Suite and SAP ECC6.0. How are they related to each other or disimilar? By any chance SAP manufacturing and SAP ERP is r
-
I have a Panasonic HDC-TM900. After transcoding, editing in FCP 7, I am searching for the best way to have my HD movies exported and available on the TV's in my house. Being able to catalogue these so I can quickly find them would be improtant. O