Running a Thread in Oracle
I have a java stored procedure that has a Thread in it. The Thread is bog standard (extends Thread) and all is does is sleep for 20 seconds:
MyThread myThread = new MyThread();
first.start();
first.sleep(20000);
first.finished = true; Obviously setting the 'finished' boolean to true breaks out of the run method.
The problem is that when i run this on my desktop it sleeps for 20 seconds then exits. When I load this class into Oracle it never seems to wake up!
Am I missing something here? Can you run new Threads in a Java Stored Procedure?
thanks
m
>
Can you run new Threads
in a Java Stored Procedure?Probably.
Sounds like a really bad idea to me though.
Similar Messages
-
Stuck thread in Oracle Weblogic server
Dear All,
We have a stuck thread in Oracle WLS 10.3.3. We have deployed 7 ear files in 5th managed server(psMS5). We have stuck thread in one of the application (psinsurance). We have allocated 1GB heap space for the psMS5 managed server. We are using this in Development environment. Please check the below message from psMS5 managed server log file. Kindly provide reason for stuck thread and solution.
WatchTime: Sep 23, 2011 10:28:29 AM IST
WatchDomainName: dev_domain
WatchServerName: psMS5
WatchSeverityLevel: Warning
WatchName: MS5-Watch
WatchRuleType: Log
WatchRule: ((MESSAGE LIKE '%has been busy for "%') AND (MSGID = 'BEA-000337') AND (SERVER = 'psMS5'))
WatchData: DATE = Sep 23, 2011 10:28:28 AM IST SERVER = psMS5 MESSAGE = [STUCK] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "629" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@1cac6525[
POST */psinsurance/app/lending/insurance/PS00738D.jspx*?_adf.ctrl-state=24f0li74e_4 HTTP/1.1
Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
Referer: http://sis-prosun11/psinsurance/faces/PS00003?jsessionid=r2BrT8TpqZBsnLhCw2Y8KDpTV7hMpgnLDFW54P87ZpHwn8JMy88s%21168932459%211316753022074&_afrWindowMode=0&_afrLoop=244724092027000&_adf.ctrl-state=24f0li74e_4
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Content-Length: 554
Cache-Control: no-cache
Cookie: JSESSIONID=LkJcT8TfMT64SyQJT4Ls4sXhfDl0pTS7CXJVQ9KcryHGWJ1dhyfz!1373322659
Connection: Keep-Alive
Proxy-Client-IP: 192.168.9.179
X-Forwarded-For: 192.168.9.179
X-WebLogic-KeepAliveSecs: 30
X-WebLogic-Force-JVMID: 1373322659
]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
Thread-237 "[STUCK] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, suspended, priority=1, DAEMON> {
java.io.UnixFileSystem.getBooleanAttributes0(UnixFileSystem.java:???)
java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
java.io.File.exists(File.java:729)
weblogic.utils.classloaders.ClasspathClassFinder.getFileSource(ClasspathClassFinder.java:383)
weblogic.utils.classloaders.ClasspathClassFinder.getSourcesInternal(ClasspathClassFinder.java:333)
weblogic.utils.classloaders.ClasspathClassFinder.getSource(ClasspathClassFinder.java:316)
weblogic.utils.classloaders.JarClassFinder.getSource(JarClassFinder.java:58)
weblogic.utils.classloaders.AbstractClassFinder.getClassSource(AbstractClassFinder.java:22)
weblogic.utils.classloaders.MultiClassFinder.getClassSource(MultiClassFinder.java:56)
weblogic.utils.classloaders.CodeGenClassFinder.getClassSource(CodeGenClassFinder.java:26)
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:268)
*^-- Holding lock: weblogic.utils.classloaders.GenericClassLoader@1e3295a1[thin lock]*
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:237)
java.lang.ClassLoader.loadClass(ClassLoader.java:292)
*^-- Holding lock: weblogic.utils.classloaders.GenericClassLoader@1e3295a1[thin lock]*
java.lang.ClassLoader.loadClass(ClassLoader.java:292)
java.lang.ClassLoader.loadClass(ClassLoader.java:248)
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:37)
*^-- Holding lock: weblogic.utils.classloaders.ChangeAwareClassLoader@1e553474[thin lock]*
java.lang.Class.getDeclaredConstructors0(Class.java:???)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2370)
java.lang.Class.getConstructor0(Class.java:2699)
java.lang.Class.newInstance0(Class.java:318)
java.lang.Class.newInstance(Class.java:305)
org.apache.myfaces.trinidadinternal.renderkit.ClassRendererInstantiator.instantiate(ClassRendererInstantiator.java:48)
org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase.findRenderer(RenderKitBase.java:146)
org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.findRenderer(RenderKitDecorator.java:84)
oracle.adfinternal.view.faces.unified.renderkit.UnifiedRenderKit._getRenderer(UnifiedRenderKit.java:218)
oracle.adfinternal.view.faces.unified.renderkit.UnifiedRenderKit.findRenderer(UnifiedRenderKit.java:156)
org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase.getRenderer(RenderKitBase.java:129)
org.apache.myfaces.trinidad.component.UIXComponentBase._getRendererImpl(UIXComponentBase.java:1143)
org.apache.myfaces.trinidad.component.UIXComponentBase.getRenderer(UIXComponentBase.java:1173)
org.apache.myfaces.trinidad.component.UIXComponentBase.getClientId(UIXComponentBase.java:316)
javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1095)
org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:70)
oracle.adfinternal.view.faces.unified.taglib.input.UnifiedSelectBooleanCheckboxTag.doStartTag(UnifiedSelectBooleanCheckboxTag.java:45)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:41)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:41)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:83)
oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:42)
oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:243)
oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:73)
oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:57)
oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:650)
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:330)
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:680)
oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:653)
javax.servlet.http.HttpServlet.service(HttpServlet.java:815)
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:224)
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:108)
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:206)
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:147)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:520)
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:112)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:402)
org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:261)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:428)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:132)
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:155)
oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:706)
oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:244)
oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:199)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:246)
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:224)
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:108)
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:206)
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:134)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:411)
oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:44)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:411)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:210)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:126)
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:91)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:299)
oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:406)
oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:82)
oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:147)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:114)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:25)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3656)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:308)
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:117)
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2204)
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2126)
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1412)
weblogic.work.ExecuteThread.execute(ExecuteThread.java:198)
weblogic.work.ExecuteThread.run(ExecuteThread.java:165)
SUBSYSTEM = WebLogicServer USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-000337 MACHINE = sis-prosun11.sis.ad TXID = CONTEXTID = 11d1def534ea1be0:3bbe257e:13286031cbf:-7ffd-0000000000002fe7 TIMESTAMP = 1316753908672
WatchAlarmType: AutomaticReset
WatchAlarmResetPeriod: 60000
SMTPNotificationName: MS5-Health-NotificationI found something interesting to the question I posted from the below link:
http://www.mail-archive.com/[email protected]/msg03217.html -
Exception in thread "main" oracle.wsdl.toolkit.WSDLGenerationException:
Hi,
I am creating the PLSQL webservice to support refcursors. but when i am running the command java -jar WebServicesAssembler.jar -config config.xml i am getting this error.
Exception in thread "main" oracle.wsdl.toolkit.WSDLGenerationException: java.lan
g.Exception java.sql.Connection is an abstract class: cannot be instanciated
at oracle.wsdl.toolkit.JavaXSDTypeMapper.getXSDType(JavaXSDTypeMapper.ja
va:146)
at oracle.wsdl.toolkit.WSDLGenerator.addOperationToWSDL(WSDLGenerator.ja
va:466)
at oracle.wsdl.toolkit.WSDLGenerator.generateWSDL(WSDLGenerator.java:259
at oracle.wsdl.toolkit.WSDLGenerator.generateWSDL(WSDLGenerator.java:197
at oracle.wsdl.toolkit.WSDLGenerator.generateWSDL(WSDLGenerator.java:185
at oracle.j2ee.ws.tools.WsAssmWSDLGenerator.generateWSDL(WsAssmWSDLGener
ator.java:343)
at oracle.j2ee.ws.tools.WsAssmWSDLGenerator.generate(WsAssmWSDLGenerator
.java:171)
at oracle.j2ee.ws.tools.WsAssembler.assemble(WsAssembler.java:99)
at oracle.j2ee.ws.tools.WsAssembler.main(WsAssembler.java:71)
my config.xml file is like this
<web-service>
<display-name>Web Service using AASC_Ship_Console</display-name>
<description>Exposing the PL/SQL package AascShipConsole as a Web Service under the endpoint: /PLSQL/aasc_ship_console
</description>
<destination-path>./aasc_ship_console.ear</destination-path>
<temporary-directory>./tmp</temporary-directory>
<context>/PLSQL</context>
<!-- A stateless service based on a PL/SQL package. -->
<stateless-stored-procedure-java-service>
<!-- The URL under the context /PLSQL for the service -->
<uri>/aasc_ship_console</uri>
<!-- Info needed at publishing time -->
<class-name>aasc_ship_console.aascImpl</class-name>
<interface-name>aasc_ship_console.aasc_ship_console</interface-name>
<java-resource>aasc_ship_console.jar</java-resource>
<!-- Info needed at runtime - the JNDI DB connection -->
<database-JNDI-name>jdbc/AppsDataSource</database-JNDI-name>
</stateless-stored-procedure-java-service>
<wsdl-gen>
<wsdl-dir>wsdl</wsdl-dir>
<!-- over-write a pregenerated wsdl , turn it 'false'
to use the pregenerated wsdl-->
<option name="force">true</option>
<option name="httpServerURL">http://localhost:8888</option>
</wsdl-gen>
</web-service>
if anybody knows the solution, please reply as soon as possible. Its very urgent.
Thanks in advance.Hi,
I am creating the PLSQL webservice to support refcursors. but when i am running the command java -jar WebServicesAssembler.jar -config config.xml i am getting this error.
Exception in thread "main" oracle.wsdl.toolkit.WSDLGenerationException: java.lan
g.Exception java.sql.Connection is an abstract class: cannot be instanciated
at oracle.wsdl.toolkit.JavaXSDTypeMapper.getXSDType(JavaXSDTypeMapper.ja
va:146)
at oracle.wsdl.toolkit.WSDLGenerator.addOperationToWSDL(WSDLGenerator.ja
va:466)
at oracle.wsdl.toolkit.WSDLGenerator.generateWSDL(WSDLGenerator.java:259
at oracle.wsdl.toolkit.WSDLGenerator.generateWSDL(WSDLGenerator.java:197
at oracle.wsdl.toolkit.WSDLGenerator.generateWSDL(WSDLGenerator.java:185
at oracle.j2ee.ws.tools.WsAssmWSDLGenerator.generateWSDL(WsAssmWSDLGener
ator.java:343)
at oracle.j2ee.ws.tools.WsAssmWSDLGenerator.generate(WsAssmWSDLGenerator
.java:171)
at oracle.j2ee.ws.tools.WsAssembler.assemble(WsAssembler.java:99)
at oracle.j2ee.ws.tools.WsAssembler.main(WsAssembler.java:71)
my config.xml file is like this
<web-service>
<display-name>Web Service using AASC_Ship_Console</display-name>
<description>Exposing the PL/SQL package AascShipConsole as a Web Service under the endpoint: /PLSQL/aasc_ship_console
</description>
<destination-path>./aasc_ship_console.ear</destination-path>
<temporary-directory>./tmp</temporary-directory>
<context>/PLSQL</context>
<!-- A stateless service based on a PL/SQL package. -->
<stateless-stored-procedure-java-service>
<!-- The URL under the context /PLSQL for the service -->
<uri>/aasc_ship_console</uri>
<!-- Info needed at publishing time -->
<class-name>aasc_ship_console.aascImpl</class-name>
<interface-name>aasc_ship_console.aasc_ship_console</interface-name>
<java-resource>aasc_ship_console.jar</java-resource>
<!-- Info needed at runtime - the JNDI DB connection -->
<database-JNDI-name>jdbc/AppsDataSource</database-JNDI-name>
</stateless-stored-procedure-java-service>
<wsdl-gen>
<wsdl-dir>wsdl</wsdl-dir>
<!-- over-write a pregenerated wsdl , turn it 'false'
to use the pregenerated wsdl-->
<option name="force">true</option>
<option name="httpServerURL">http://localhost:8888</option>
</wsdl-gen>
</web-service>
if anybody knows the solution, please reply as soon as possible. Its very urgent.
Thanks in advance. -
Problem in running Perl script through oracle
Hi,
I am facing one problem in perl script.
" I have one perl script which is interact with sybase database.We have migrated the sybase database to oracle successfully.Now i wanna to change the perl script to interact with oracle database.
I am using the code like that for interacting the oracle database
Old Code with sybase database : use DBI::Sybase::GFAS;
New code with oracle database : Use DBI::oracle::GFAS;
When i am running the perl script,Its showing the below mentioned error:
Can't locate DBI/oracle.pm in @INC (@INC contains: C:\oracle\product\10.2.0\db_1
\perl\5.8.3\lib\MSWin32-x86 C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32
-x86-multi-thread C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib C:\oracle\product
\10.2.0\db_1\perl\5.8.3\lib\MSWin32-x86 C:\oracle\product\10.2.0\db_1\perl\site\
5.8.3 C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib/MSWin32-x86-multi-thread
C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib C:\oracle\product\10.2.0\db_1
\sysman\admin\scripts C:/Perl/lib C:/Perl/site/lib .) at hello.pl line 4.
BEGIN failed--compilation aborted at hello.pl line 4.
Anyone have any idea about this error.
Thx in advance.If you look in the oracle home in the perl\site\5.8.3\lib\MSWin32-x86-multi-thread directory you will see two directories. Once is DBI and one is DBD.
All you need in your perl program is a line 'use DBI'. It will use DBD automatically as and when required. You can specify the necessary connection information when you issue the DBI->connect statement.
I have successfully managed to connect to Oracle databases and perform DML using the software installed by default. You don't need to download and install anything else.
I'm no perl expert so maybe some functionality is missing using the interfaces provided by Oracle but for my needs it has sufficed.
Hope this helps. -
Is it possible to execute an application using threads in oracle db 11g?
Hi all, I would like to know if it is possible to execute an application using threads in oracle database 11g. Actualy, I would like to know if is is possible to execute a pl/sql program in a similar way as I run threads in a java application.
Thanks in advance.
Edited by: user4073561 on 24/11/2010 05:19In oracle there is parallel execution/servers,and this is analogy java threads.Refer
http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/manproc006.htm -
Error running java program (testing oracle-character-set-31 against ab?c )
Hi
When i run my java program from eclipse , i get these errors : how to correct these errors and run the program
testing oracle-character-set-31 against <ab?c>
PASSED LOSSY
testing oracle-character-set-31 against <XYZ>
PASSED LOSSY
testing oracle-character-set-31 against <longlonglonglong...>
PASSED LOSSY
testing oracle-character-set-870 against <abc>
PASSED
testing oracle-character-set-870 against <ab?c>
PASSED
testing oracle-character-set-870 against <XYZ>
PASSED
testing oracle-character-set-870 against <longlonglonglong...>
PASSED
testing oracle-character-set-871 against <abc>
PASSED
testing oracle-character-set-871 against <ab?c>
PASSED
testing oracle-character-set-871 against <XYZ>
PASSED
testing oracle-character-set-871 against <longlonglonglong...>
PASSEDrxg wrote:
Hi
When i run my java program from eclipse , i get these errors : how to correct these errors and run the program
...Sun's not Oracle (yet). You will have better luck on a forum relating to whatever is producing that "oracle-character-set..." output.
Edit:
Although a Google search for "testing oracle-character-set" yields only this thread. Are you sure that output isn't part of your program?
Edited by: endasil on 7-Oct-2009 3:40 PM -
How to run a report from oracle 10g form in .csv format
dear all,
how to run a report from oracle 10g form in .csv format? i've already run in pdf & excel format.
i'm using
SET_REPORT_OBJECT_PROPERTY (ro_report_id, report_desformat, 'PDF'); --for pdf
SET_REPORT_OBJECT_PROPERTY (ro_report_id, report_desformat, 'SPREADSHEET'); ---for excel
Please Help..i have already tried.
but the report show in htm or html format. that file will not save into csv. please help. -
How to run a thread for second time ?
I have a written a ThreadPool, but I found that basically a thread is not running for the second time. i.e First i call run() method and call stop(). If i call again run() method for the same thread, it is not running. What should I do, If i want to run the thread for the second time ?
class NewThread implements Runnable {
String name;
NewThread(String a) {
name=a;
public void run() {
try{
for(int i=0;i<5;i++) {
System.out.println("Thread :" + name + " #" +i);
Thread.sleep(5);
catch (Exception e) {
e.printStackTrace();
class threadRunnableTest {
public static void main (String args[]) {
Runnable runnable=new NewThread("BaSkAr");
Thread thread = new Thread(runnable);
try{
System.out.println("First Thread is starting !!!");
thread.start();
Thread.sleep(2000);
System.out.println("First Thread it to be stopped!!");
thread.stop();
System.out.println("Second Thread is starting !!!");
thread.start();
Thread.sleep(2000);
System.out.println("Second Thread it to be stopped!!");
thread.stop();
catch (Exception e) {
e.printStackTrace();baskark wrote:
I have a written a ThreadPool, but I found that basically a thread is not running for the second time. i.e First i call run() method and call stop(). If i call again run() method for the same thread, it is not running. What should I do, If i want to run the thread for the second time ?
class NewThread implements Runnable {
String name;
NewThread(String a) {
name=a;
public void run() {
try{
for(int i=0;i<5;i++) {
System.out.println("Thread :" + name + " #" +i);
Thread.sleep(5);
catch (Exception e) {
e.printStackTrace();
class threadRunnableTest {
public static void main (String args[]) {
Runnable runnable=new NewThread("BaSkAr");
Thread thread = new Thread(runnable);
try{
System.out.println("First Thread is starting !!!");
thread.start();
Thread.sleep(2000);
System.out.println("First Thread it to be stopped!!");
thread.stop();
System.out.println("Second Thread is starting !!!");
thread.start();
Thread.sleep(2000);
System.out.println("Second Thread it to be stopped!!");
thread.stop();
catch (Exception e) {
e.printStackTrace();
It's usually helpful to check the documentation:
[http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#start()|http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#start()]
start
public void start()Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).
It is never legal to start a thread more than once. In particular, a thread may not be restarted once it has completed execution.
So, make a new java.lang.Thread -
How to run simple query on oracle 11.2.0 ?
hi
i installed oracle 11.2.0 64bit on my Windows-7 64bit
how i can connect and run any query on oracle ?
what are the default tools that came with the installation and how to use it ?
i sow in the forum that people write
sql> select * from myTable ........
how to get to this ?
thanks in advanceuser1036207 wrote:
hi
i installed oracle 11.2.0 64bit on my Windows-7 64bit
how i can connect and run any query on oracle ?
what are the default tools that came with the installation and how to use it ?
i sow in the forum that people write
sql> select * from myTable ........
how to get to this ?
Open a command prompt and type
sqlplus sys/syspwd@instance as sysdbaand you'll have yourself a sqlprompt.
HTH
//Johan -
How do I run a thread without its panel.
I have created a vi in my application that I run as a thread. I run the thread by using an invoke node.
When I am testing under LabView everything is fine but when I create the executable I have found problems.
As I am starting the thread with an invoke node, the vi does not show in the application builder unless I add it as a top level vi. When I add it as a top level vi, the panel is shown when I run the application.
I don't want to show the panel because firstly theres nothing on it anyway and secondly it looks untidy.
Dave.Brian
I tried that already with no effect. I have attached an example of my problem. This shows a meter on the front panel. A vi running as a thread writes a value to a global every 20ms and this is then read by the front panel and written to the meter.
Dave.
Attachments:
Thread_test.zip 18 KB -
How do i run two threads with different sleep times?
How do i run two threads with different sleep times?
Ive got thread A and thread B, they both update a jpanel.
They both start when i press the start button.
However thread A updates every 250ms and thread B updates every 1000ms. i cant just run them both at 250ms becuase this will mess it up.
So for every four runs of thread A i want thread b to only be run once
Does anyone know how to do this?
Thanks, Ant...ok, ive done it but now i cant stop it!
ive added buttons to start and stop, the start button works but the stop button doesnt. why doesnt "t.stop();" work?
public void run() {
while(t == Thread.currentThread()) {
System.out.println("No " + t.getName());
if (t.getName().equals("1")){
try {
t.sleep(1000); // in milliseconds
} catch (InterruptedException e) {}
} else{
try {
t.sleep(250); // in milliseconds
} catch (InterruptedException e) {}
} -
How to run multiple Thread using Scheduler's in 1.5
Hi,
I have a scenario, in which I have to run a Thread at every 15 minutes, If the first Thread is not Finished in 15 min then new Thread has to start.
Currently I implemeted with java 1.5 schedulers, but the problem is if my first Thread is taking more than 15 min, then no new Thread is starting.
Following is my Code:
TestAccountingThread accountingThread = new TestAccountingThread();
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(10);
scheduler.scheduleAtFixedRate( accountingThread, 0, 60, SECONDS );
Can any one help on this, This is really urgent.
Regards,
Sumanif my first Thread is taking more than 15 min, then no new Thread is startingIf it takes more than 15 min, manually run a new scheduler with initial-delay=0 and shutdown the current one when the current execution is finished --- and repeat this logic in a conditional loop.
Could this be what you want? -
How to run others application in Oracle Forms on the web version?
How to run others application in Oracle Forms on the web version?
Pang,
guess that you want to start client side programs from Forms on the Web. There is a sample on OTN (host bean) that allow you to acces sthe client and start executables.
Frank -
Running Stacked Queries in Oracle SQL Developer
Is it possible to run stacked queries in Oracle SQL Developer???
Something like this...
SELECT *
FROM TABLE_1
SELECT *
FROM TABLE_2
SELECT *
FROM TABLE_3
And give my 3 different result sets in my Query Result window
I tried "BEGIN" and "END" and Oracle SQL Developer did not seem to like it.
Can someone let me know if this is possible and what the syntax might be???
Thanks in advance for your review and am hopeful for a reply.
PSULionRPWrong forum!
Please post this in the sql developer forum.
SQL Developer
You can run multiple queries exactly the way you posted them but you need to use F5 - the run script toolbar button. -
Where to run SQL statements in Oracle Database 11gR1 ?
Folks,
Hello. I have just installed Oracle Database 11gR1 and login to Database Control page. There are 4 tabs on the top: Database, Setup, Preference, Help and Logout.
I just create a table "table1" in "Database" tap. But I don't see anywhere to run SQL statement such as Select, Insert, Update.
Can any folk tell me where to run SQL statements in Oracle Database 11gR1 ?
Or
Can any folk provide a User Manual for Oracle DB 11gR1 ?You can run from a terminal or install an SQL client and connect from there.
http://www.articlesbase.com/databases-articles/how-to-install-oracle-11g-client-1793770.html
Best Regards
mseberg
Assuming you have an oracle OS user on Linux you can try typing sqlplus at you OS command prompt. Generally you will have a .bash_profile with setting like this:
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0
#export DISPLAY=localhost:0.0
export TZ=CST6CDT
export ORACLE_SID=ORCL
export ORACLE_TERM=xterm
#export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN;
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
# Set shell search paths
PATH=/usr/sbin:$PATH; export PATH
export PATH=$PATH:$ORACLE_HOME/bin
# CLASSPATH:
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export EDITOR=vi
set -o vi
PS1='$PWD:$ORACLE_SID >'Edited by: mseberg on Jul 11, 2011 3:18 PM
Maybe you are looking for
-
"Loading iTunes Match" showing each time I start Music
Hi, I've recently had some trouble with iTunes match, where it wasn't downloading songs, although I could stream them fine. I spoke to someone from Apple who suggested turning off iTunes Match, then do a 'Reset All Settings', then re-enable iTunes Ma
-
Help with uploading an excel file to a table using an application
Hello, Can anyone please help me out with this issue. I have apex application where in the end users upload an excel file to a table. For this I have followed the solution provided in this link http://avdeo.com/2008/05/21/uploading-excel-sheet-using-
-
Exported Interlaced MP4 Unplayable
I'm using the DV NTSC High Quality preset in Adobe Media Encoder CS4. The export appears to go fine, but I have trouble playing the video. The video looks very blocky and corrupt. I've tried playing it in Media Player Classic and Windows Media Pla
-
Different Audio Levels in Edit View vs. Multitrack View
Here's what happens... I begin a new session. I then import a .wav file and it appears in the left column. I double-click the .wav so I'm in Edit View. When I play the clip, it ranges from about -9 to -6 dB. Now I go back to Multitrack View without h
-
Fresh install of windows 7. Flash continues to stall.
After a good 30+ hours, I'd like to jump out of a window. Please, just let me jump. Oh, yeah...the problem. Had xp 32-bit, upgraded to windows 7 64-bit. loaded all drivers recommended by MS. Flash choppy/stalled every few seconds on both IE8 and