Multithreaded sqlj problem
i have a java class with some sqlj code. the application is multithreaded and several calls to an object of this class are performed. the problem is that the queriesDone-function does not work. the establishConnection-function works perfectly. why?
thanks.
code:
import sqlj.runtime.*;
import sqlj.runtime.ref.*;
import java.sql.*;
class PipeManager {
String mess = "";
int sendstat,status;
public PipeManager() {
ConnectionManager.initContext();
public String establishConnection() {
try {
#sql {
begin
:OUT status := dbms_pipe.receive_message('ALIVE');
dbms_pipe.unpack_message(:OUT mess);
end;
System.out.println("Mess: "+mess);
#sql {
begin
dbms_pipe.pack_message('hej jag lever!');
:OUT sendstat := dbms_pipe.send_message(:IN mess);
end;
System.out.println("Sendstat: "+sendstat);
#sql {
begin
:OUT status := dbms_pipe.receive_message('MEDIATOR');
dbms_pipe.unpack_message(:OUT mess);
end;
} catch (SQLException e) { e.printStackTrace(); }
return mess;
public void queriesDone(String pipe) {
try {
#sql {
begin
dbms_pipe.pack_message('KLAR!');
:OUT sendstat := dbms_pipe.send_message(:IN pipe);
end;
} catch (SQLException e) { e.printStackTrace(); }
}
In your code you are using the static default connection context. For a mutithreaded program each thread should have either its own ExecutionContext or its own ConnectionContext (the latter corresponds to a database connection).
Please see the SQLJ documentation at:
http://technet.oracle.com/doc/oracle8i_816/java.816/a81360/alangfe3.htm#1004410
There also is a demo MultiThreadDemo.sqlj.
null
Similar Messages
-
Newbie to the forum but i have a problem while trying to implement RMI client server. I have the client and server setup fine and i have read that RMI is already multithreaded to handle different clients. Again i have this running fine but i was wondering if anyone could give me some advice as to manually serve each client with a separate server thread, allowing me to control the threads when trying to access shared resources such as database etc. at the moment i think something to do with instatianting / constructing new classes that extend thread or implement runnable ?!?!
any help is appreciated and even directing
Message was edited by:
onlynew4nowSorry if this is
confusing what im trying to get at is how can i
manage separate clients on different service threads.You don't have to worry about 'service threads'. RMI does that for you. As for managing different clients, consider this:
interface Login implements Remote
// Singleton login
Session login(String userid, String password) throws RemoteException;
interface Session implements Remote
// per-client methods
// your RMI methods here
class LoginImpl extends UnicastRemoteObject implements Login
// ctor &c omitted
public Session login(String userid, String password) throws RemoteException
// validate userid/password, not show, throw some exception if
// invalid
return new SessionImpl(userid);
public class SessionImpl extends UnicastRemoteObject implements Session
// your per-client remote method implementations in here
also if i try to manage threads in a remote methodYou don't have to do that. Just use synchronized blocks where you need to, or java.util.concurrent data structures.
how can i return values back out of the remote method
if a thread create there starts from the public void
run() as its return type must be void ?!The question makes no sense but as you don't create threads in remote methods anyway it has no application. -
Hi,
I am facing a problem regarding usage SQLJ.
The SQLJ files are getting added to DTR, but the problem is the Central Build is complaining that the associated Custom Calsses are missing.
For example, I have CustomerDetails.sqlj from which CustomerDetails.java, the local build is okay but when I do a Central Build, I am getting compilation error "unable to resolve symbol (class name: CustomerdETAILS")
Really appreciate your help.
Thanks and Regards,
Prasanna Krishnamurthyhi,
For development components, you need to declare a new Java library component that wraps the jar files.
go thru the following thread, this will surely help u.
Re: Addition of new external jar to Webdynpro
let me know whether ur prob is solved -
When try to Update record with sqlj I've got no result !!! Data remains unchanged ??
Does anybody have same problem ???
(I use default context).Good point! You issue a commit in SQLJ with:
#sql { COMMIT };
Remember that:
- JDBC creates connections with autocommit on (except for the JServer session connection)
- the Oracle.connect() calls create connections with autocommit off
Some additional tips:
(1) You can use an ExecutionContext to see how many rows got updated.
import sqlj.runtime.ExecutionContext;
ExecutionContext ec=new ExecutionContext();
#sql [ec] { UPDATE table SET ... WHERE ... };
System.out.println("Updated "+ec.getUpdateCount()+" rows.");
(2) Remember that if the WHERE clause selects no rows, then 0 rows get updated and you will also NOT see a SQLException.
(3) If your WHERE clause compares any CHAR columns to Java strings, it very likely will not work: you have to blank-pad the Java strings if you want the comparison to succeed. Or you can declare the column as VARCHAR2. Or you could use a LIKE comparison and append a "%" to the Java string.
-- Ekkehard -
hi
I am writing Java Stored Procedures and facing following problem.
I want to return array of strings from my java stored procedure. Can anybody tell me how to do this or can redirect me to some resource?
Thanks in advance.
AshishYour question doesn't make sense (nor does your title.)
A java stored procedure is typically an Oracle (or some database) stored procedure that is written in java.
SQLJ, so far as I know, is a database interface which is a replacement for JDBC. In of itself it has nothing to do with a java stored procedure (although you could use it in the procedure.)
In Oracle a java stored procedure has to be hoisted (published) into the SQL name space by using the "create...as language java.." syntax. -
Multithreading lock problem - AppClassLoader
Hi all,
I'm tuning a complex multithread java application.
Performing various thread-dumps during application execution, I can see a great number of threads waiting for monitor entry: the locked resource is a Launcher$AppClassLoader class... one thread holds that resource, while all the others are waiting for it.
Have you ever seen such a lock on the class loader? Is that a correct behaviour? Why the other threads cannot run concurrently instead of waiting for that particular thread?
In the stack trace I can see that the thread that holds the lock is performing an operation on the filesystem ( java.io.File.exists() ) , but I/O subsystem is always idle...
Any idea?
Thanks guys!!!What's the output of the utlockt.sql? Let's see that to confirm that there is some lock contention going on?
HTH
Aman.... -
SQLJ compile failure in derived class
I have successfully comiled and run the "SimpleExample" defined
in the Help Topics "Developing Applications Using SQLJ" page.
However, if I make a simple modification to make the class
derived from another class (DoNothing class shown below is the
simplest case I've tried) I get compilation errors:
Error (52) Illegal INTO ... bind variables list: illegal
expression..
Error (0) SQLJ translation aborted.
Error (0) sqlj.framework.TranslationException. Error occured in
SQLJ translation.
Modified SimpleExample looks like:
public class SimpleExample extends DoNothing {
......as before
where DoNothing is defined as:
package RDBInterface; // My SimpleExample is in same package
public class DoNothing {
public DoNothing() {
Any ideas about this?
nullAndy,
I got the answer to that in another thread,
cheers Jon
Re: SQLJ-Problem with JDeveloper 2.0
From: Chris Stead (guest)
Email: [email protected]
Date: Tue Feb 02 13:07 CST 1999
Markus Rosenkranz (guest) wrote:
: Hi,
: I tried to rebuild an SQLJ-file with the new JDev. 2.0.
Whenever
: there is an iterator definition in a derived class compilation
: failed. By removing the extends clause in the class definition
: the compilation error could be avoided. It seems that the
: iterator definition is ignored. With JDev. 1.1 everthing
worked
: fine. How can this problem be solved.
: TIA Markus
Hi Markus,
Your question seems similar to the one that was just resolved.
Here are the specifics:
I'm using the production SQLJ and getting a frustrating error
of:
-- "Left hand side of assignment does not have a Java type."
I've reduced my testcase down to the absolute
minimum, but maybe I'm missing something obvious...
package oracle.xml.website;
import java.sql.SQLException;
import javax.servlet.http.*;
#sql iterator empiter ( String empname );
public class WebXSL extends HttpServlet {
public void foo() throws SQLException {
empiter myEmps = null;
#sql myEmps = {SELECT ename empname from EMP order by sal
desc };
Hi,
Could you please check whether the class HttpServlet is
available
in your CLASSPATH? The type resolver could be failing to find
this class in the process of looking for the definition of
'empiter', which is the type of your iterator variable myEmps.
The error message is somewhat obscure, we will be working on
improving it..
The SQLJ translator does a full type resolution of Java
variables
and expressions used in #sql statements, following JLS rules of
scoping and precedence for class and interface hierarchies. It
looks for classes in the CLASSPATH, as well as in the .sqlj and
.java source files specified on the sqlj command-line. So, if
you have .sqlj and .java files that are mutually dependent, you
could do:
sqlj Foo.sqlj Bar.java
Please let us know if your problem persists.. and see also bug
801780 for a related discussion.
- Julie
Julie,
Your suggestion helped! Thanks.
With 20/20 hindsight now, it would have been much more
helpful if the SQLJ translator reported an error message like:
-> Left hand side of assignment is not a Java type.
-> Unable to resolve class "HttpServlet". Check CLASSPATH
That would have keyed me into the problem many hours ago :-)
You suggestion lead me to test sqlj-ing my testcase
both outside and inside the JDeveloper environment.
Outside the environment, if I make sure J:\lib\jsdk.jar is
in my classpath, then all is well.
Inside the environment, I had included the named
library for "JavaWebServer" in my project libraries
and its classpath info was properly set to J:\lib\jsdk.jar,
but it appears that somehow JDev is not properly passing
this project-level classpath info to the SQLJ translator.
I was able to solve my problem (a hack!) by adding
J:\lib\jsdk.jar
to the:
IDEClasspath=
setting in the J:\bin\jdeveloper.ini file which I shouldn't
have to do. I filed Bug 813116 for the JDev team.
null -
Limitations LabVIEW in Multi Core Processing.....
What are the limitations of LabVIEW when running on a dual or quad processor system?
Recent literature shows that LabVIEW has a distinct advantage in running on a multicore system. That is, assuming that the VI is written such that the threads can run concurrently. So, what if two VIs share a functional global or a standard global? And how about shared variables? Do these have any effect on the ability of LabVIEW to run the threads on separate processors?
Any other limitations?
Thanks.The main limitation (that has bitten me the most often) is that functions that use the ui thread (property nodes and many call library nodes being to two most common), can block each other slowing down the system (but since LabVIEW is multithreaded this problem exists in a single core system but is less pronounced since it can't lead a to a core not doing work). But if you avoid property nodes where possible (especially in daq loops) and use defer panel updates if your changing a large amount you should be fine. You can set call library nodes to be reentrant to avoid running them in the ui thread (but be extremely careful to either add your own locking mechanism, or be absolutely sure that the call is really reentrant, very bad things can happen if your not careful with reentrant dll calls).
Note: I don't think DAQmx property nodes are run in the UI Thread but I'm not certain of that.
The one other "limitation" that comes to mind is that some race conditions (that are from improper code), may show up (or have an increased chance of showing up) in a multicore system.
A functional global can only be used by one thread at a time. So if two threads try to use the same functional global at the same time, the first to try will run and the second will wait (perhaps running other sections of code while waiting, note: this is what makes function globals safe) until the first is finished. Global variable reads will only see completely written variables (if that's you concern). But if you have more than one writer you could likely have race conditions (this will probably affect a single core system as well, and you should try to replace them with a functional global in that case). Shared variables are about the same as global but with some extra logic (and overhead) that can be used for handling various race conditions (guaranteeing one writer or adding buffering for readers), and they support communication between separate systems (the main reason to use them). Remember (in general) if things don't share a data dependency than they can run con currently.
Note: If you have have a lot of cores (4+) you may want to adjust the the system in threadconfig.vi
Matt W -
Problem with SQLJ ? NoSuchMethodError
Hi,
I wrote an application which makes use of sqlj and jdbc; it works fine on my local machine. But after deploying to the application server 9.0.2 the following error message occurs as soon as a jsp tries to invoke a method in a class file:
java.lang.NoSuchMethodError at packagePCDAT.PCDATDB.getUserLocation(PCDATDB.sqlj:69) at packagePCDAT.PCDATTools.getParamToType(PCDATTools.sqlj:65) at pcdat_select__suchparam._jspService(_pcdat__select__suchparam.java:68) [SRC:pcdat_select_suchparam.jsp:34] at com.orionserver[Oracle9iAS (9.0.2.3) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:508) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:255) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:66) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:284) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:539) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:285) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:231) at packagePCDAT.CommandPCDAT.performTask(CommandPCDAT.java:625) at packagePCDAT.CommandPCDAT.doGet(CommandPCDAT.java:648) at javax.servlet.http.HttpServlet.service(HttpServlet.java:244) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:66) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:284) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:539) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:285) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:771) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:170) at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:72) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:802) at java.lang.Thread.run(Thread.java:484)
For example the "getUserLocation" method looks like this:
public String[] getUserLocation(javax.servlet.http.HttpServletRequest request)
String user = request.getUserPrincipal().getName();
String location = "";
String[] userArray = new String[2];
if(request.isUserInRole("kunde") || request.isUserInRole("users")) {
if(user!=null)
user = user.substring(user.indexOf("/")+1);
try
getConnection();
#sql { SELECT USER_LOCATION INTO :location FROM USERS WHERE USER_ID = :user };
userArray[0] = user;
userArray[1] = location;
catch (Exception e)
e.printStackTrace();
userArray[0] = user;
userArray[1] = location;
return userArray;
It would be great if someone could help me out.
GreetingsHi
Can you please specify following
a) Your Oracle database version. According to the required software, it should be Oracle9i or above.
b) Your Oracle Client version. This is needed if your database is installed on a different machine and you are trying to access the database from a different machine.
Kindly specify your client version. Oracle client version must be compatible with database version.
I tried to run and install the sample in my configuration and everything goes through fine. Here is my environment
Database version : Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Client : Oracle 9.0.1
Please let us know the above settings so that we can identify the exact place of the problem.
Regards
OTN Team@IDC -
Problems in running SQLJ programs!
Dear SQLJ Support,
I am not able to run SQLJ programs. I am able to compile a .sqlj file.
I tried to compile the demo programs, for example, TestInstallCreateTable.java. I get
"Class oracle.sqlj.runtime.Oracle not found in import" error.
"Class sqlj.runtime.ref.DefaultContext not found in import" error.
When I try to run the other Demo programs also, I am getting errors at places where I import classes from translator.zip. Is there a problem with the JDBC Drivers?
I have set the classpath set to
ORACLE_HOME/sqlj/lib/translator.zip, where the classes are found
ORACLE_HOME/jdbc/lib/classes111.zip, where the JDBC classes are found
JAVA_HOME/lib/classes.zip, where the core java classes are found
I am using Oracle 8.1.6, SQLJ 8.1.6, JDK 1.1.8 on Windows NT 4.0.
Am I missing something else? Kindly advice. Thanks in advance.
Regards,
Radha.You might wanna try changing the Look and Feel of the swing application. Test it on default, Windows, Mac and Motif interface.... and do post if it works on changing the look and feel.
cheerz -
Trying to create multithreading problems when opening file dialog
Warning: Newbie to Labview...
I have a problem in a rather complicated VI where bringing up the open file dialog halts some background operations.
I would really like to reproduce this behaviour for various reasons, but am unable to. I've created a simple VI with a for-loop where the index feeds a sine converter which in turn feeds a tank indicator. This produces an oscillating behaviour. To this VI I've added a file dialog control.
Regardless of the multithreading setup, I'm unable to get the oscillating of the tank indicator to stop when the dialog is open. Is there something I can do to get this behaviour? I realize it's unusual to try to break things, but it is rather important for me.
Tha
nk you,
NigelHi,
The for loop (all loops by the way) is halted until everything in it is
finished.
Try this:
+ Make a while loop
+ wire TRUE to the stop criterium.
+ Put an indicator on the 'I'.
+ Put a MS Wait in it (e.g. 80 ms), to prevent 100% processor time.
Run it, and the indicator will increase fast.
Now put any dialog in the while loop. E.g. a message box.
The indicator will increase everytime you press 'OK'.
Note: stop by pressing CTRL+. and clicking 'OK' several times.
Regards,
Wiebe.
"N Cook" wrote in message
news:[email protected]..
> Warning: Newbie to Labview...
>
> I have a problem in a rather complicated VI where bringing up the open
> file dialog halts some background operations.
>
> I would real
ly like to reproduce this behaviour for various reasons,
> but am unable to. I've created a simple VI with a for-loop where the
> index feeds a sine converter which in turn feeds a tank indicator.
> This produces an oscillating behaviour. To this VI I've added a file
> dialog control.
>
> Regardless of the multithreading setup, I'm unable to get the
> oscillating of the tank indicator to stop when the dialog is open. Is
> there something I can do to get this behaviour? I realize it's unusual
> to try to break things, but it is rather important for me.
>
> Thank you,
> Nigel -
5.2.0-Defining C projects - problem with MULTITHREADED FALSE
Hi,
I am having a problem importing a UDS5.0.9 PEX file into a UDS5.2.0 environment that defines a "C" project.
I have stripped down our PEX file to a level that highlights the problem (see below). The original PEX file links to a number of "externalstaticlibs" and "externalobjectfiles", it provides access via Forte to our "C" routines that are not guaranteed to be multi-thread safe. A number of our similar routines may attempt to access these external libraries/objects at the same time via the "LibProb" library similar to that below.
When "fcompile" is run on the "LibProb" project the compile fails due to a number of defines missing in UDS5.2.0 include files. When the PEX file MultiThreaded property is changed from FALSE to TRUE , "fcompile" works....changing the MultiThreaded property would concern me -especially as a number of our routines maybe attempting to access the same libraries at the same time.
The problem also seems to exist with UDS5.1.3.
The platform we use is IBM AIX5.1 with Visual Age C++ 5.0.2.1.
1. Has anybody came across this problem before??
2. Do you know any way round the problem??
Specific details follow.
Can anybody help - thanks,
-Ray.
=====Library Problem - PEX File==========
begin C LibProb from library;
includes Framework;
class MyFunction inherits from Framework.Object
has public method MyInit(input anyInt : Framework.int): Framework.int HAS PROPERTY id = 1 ;
has property
distributed=(allow=off, override=on);
id = 1; proxyId = 0;
end class;
HAS PROPERTY
CompatibilityLevel = 0;
Restricted = FALSE;
MultiThreaded = FALSE;
extended = (ExternalObjectFiles = 'anyfunc');
end LibProb;
====end of PEX File======When "fcompile"ing the code generated by "makedistrib" the following name lookup problems occur (property "Multithreaded" is "FALSE")...
Compiling.
/usr/vacpp/bin/xlC_r -c -+ -qlanglvl=compat366 -qflag=I:E -qchars=signed -q32 -DNeedFunctionPrototypes -qthreaded
-I/usr/apps/forte/mydir/UDS5.2.0/install/inc/os -I/usr/apps/forte/mydir/UDS5.2.0/install/inc/cmn
-I/usr/apps/forte/mydir/UDS5.2.0/install/inc/ds -I/usr/apps/forte/mydir/UDS5.2.0/install/inc/handles
-I/usr/apps/forte/mydir/UDS5.2.0/install/inc/ds -I/usr/include/Motif2.1
-I/usr/apps/forte/mydir/UDS5.2.0 libprob.cc
"libprob.cc", line 45.49: 1540-0274 (S) The name lookup for "qqSH_TSK_MPROP_ENABLE_SWITCH" did not find a declaration.
"libprob.cc", line 46.9: 1540-0274 (S) The name lookup for "qqOS_CLIBLOCK" did not find a declaration.
"libprob.cc", line 56.9: 1540-0274 (S) The name lookup for "qqOS_CLIBULOCK" did not find a declaration.
Error during compilation, abortingThe UDS5.1.x/UDS5.2.0 header files seem to have changed, namely UDS5.2.0/install/inc/cmn tskmprop.h and opsys.cdf
However when I change the property Multithreaded to TRUE in the PEX file, the "fcompile" works....
Compiling.
/usr/vacpp/bin/xlC_r -c -+ -qlanglvl=compat366 -qflag=I:E -qchars=signed -q32 -DNeedFunctionPrototypes -qthreaded
-I/usr/apps/forte/mydir/UDS5.2.0/install/inc/os
-I/usr/apps/forte/mydir/UDS5.2.0/install/inc/cmn
-I/usr/apps/forte/mydir/UDS5.2.0/install/inc/ds
-I/usr/apps/forte/mydir/UDS5.2.0/install/inc/handles
-I/usr/apps/forte/mydir/UDS5.2.0/install/inc/ds
-I/usr/include/Motif2.1
-I/usr/apps/forte/mydir/UDS5.2.0 libprob2.cc
Linking.
/usr/vacpp/bin/makeC++SharedLib_r -p 1026 -o liblibprob2.a -lld -L/usr/vacpp/lib -lC_r -lC
-L/usr/lib/threads -lpthreads -lc_r
-L/usr/apps/forte/mydir/UDS5.2.0/install/lib -lqqknpthrd -L/usr/apps/forte/mydir/UDS5.2.0/install/lib
-lqqcm -L/usr/apps/forte/mydir/UDS5.2.0/install/lib -lqqdo -L/usr/apps/forte/mydir/UDS5.2.0/install/lib
-lqqfo -L/usr/apps/forte/mydir/UDS5.2.0/install/lib -lqqsm
-L/usr/apps/forte/mydir/UDS5.2.0/userlib libprob2.o
/usr/apps/forte/mydir/UDS5.2.0/abc_test/compile_dir/LibProb2/anyfunc.oI do remember a while back they decided to start using only POSIX threading library going forward and not support the old threading library. A work around may be to put mutex lock around your entry point to the library which will make sure only one person access the library at a time.
ka -
WebLogic 10.3, SQLJ, Cache problems
Plz help.
How disable caching statement by SQLJ on WebLogic server?
what the actual problem:
1. create or replace view vtest as select object_name from dba_objects where rownum<200
2. test.sqlj
#sql [dx] testIterator = {
select object_name from vtest
int cnt=0;
while( testIterator.next() ){
cnt++;
System.out.println("Count: "+cnt);
3. Restart WebLogic and deploy project
4. Run test on server, in log file
"Count: *199*"
5. create or replace view vtest as select object_name from dba_objects where rownum<10
6. Run test on server, in log file
"Count: *199*"
7. Restart WebLogic
8. Run test on server, in log file
"Count: *9*"No.
I tried it to make some tests with the driver, but then i get:
"java.sql.SQLException: [BEA][SQLServer JDBC Driver]This driver is locked for use with embedded applications." -
Hello everyone,
I have to integrate (link) my routines to commercial software which was compiled with Sun One Studio 9. I have a reference version compiled several months ago working just fine. After recent updates on our Sun Fire 15K StarCat (Solaris 9) managed by our administrators I tried to recompile my version and multithreading stopped working � it runs with one thread whatever I do. During compilation I used the same script, the same functions, compiler etc. When I checked the library dependency through ldd command I found out that my newly created build depends on /usr/lib/64/libpthread.so.1 and lib/sparcv9/libmtsk.so.1 while my older, perfectly working, does not (both builds depend on libthread.so.1). That was the only discrepancy. Our administrators were not able to track the source of the problem. Could anyone explain me what might have happened and how I can get this fixed. I will very appreciate any feedback!
Kind regards,
ArtemThank you, Stephen,
These are the options supplied to the linker (in two pieces). As you might see �mt option is enabled and �lthreads only is set. I used these options already to create a successfully working program run nicely in parallel.
flink3d="CC -V -v -mt -native -dalign -ftrap=%none \
-libmil -fsimple=0 -xO3 -xtarget=ultra -xarch=v9b \
-xopenmp -xcheck=stkovf \
-L/usr/lib/lwp/sparcv9 -R/usr/lib/lwp/sparcv9 \
-L$Cpath/$SYSDIR \
-L$OPENWINHOME/lib/sparcv9 -L/usr/lib/sparcv9 \
-L/usr/ucblib/sparcv9 -L/usr/dt/lib/sparcv9 \
-L$path/$SYSDIR -L/opt/SUNWspro/lib/v9 \
-L/opt/SUNWspro/lib/v9b"
lopns3d=" -lGL -lGLU -lXm -lXt -lX11 -lnsl -lsocket \
-L/opt/SUNWspro/lib/v9b -xlic_lib=sunperf \
-lintl -lrt -ldl -lmtsk -lsunmath -lfsu -lfai2 -lfui -lthread"
I wonder why the newly created build depends on pthreads although I do not explicitly state this and my old working build created with the very same settings is pthreads independent.
Additional info: the program I link to is provided with a set of precompiled libraries written in Fortran, C and Cpp. Pthreads are not used on Sun US-III according to developers but only on HP servers.
Between creating working and non-working build we installed Sun One Studio 11 and got through unsuccessful attempt to install Solaris 10 (we rolled back to Solaris 9).
printenv PATH:
/usr/local/app/forte9/SUNWspro/bin:/usr/ccs/bin:/usr/local/teTeX/bin/sparc-sun-solaris2.9:/usr/local/xmgr/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/dt/bin:/usr/ucb:/opt/SUNWhpc/HPC6.0/bin:/usr/openwin/bin:/usr/local/app/tma/bin:/usr/local/app/Acrobat4/bin:/opt/CTEact/bin:/usr/local/staroffice7:/opt/SUNWut/bin:/opt/SUNWut/sbin:/usr/sfw/bin:/usr/sfw/sbin:/usr/dapp/aplac/bin:/usr/local/app/forte9/SUNWspro/bin:/stripe1/artkul/ansys10/v100/ansys/bin/usIII:/stripe1/artkul/ansys10/v100/ansys/bin/
printenv LD_LIBRARY_PATH
/usr/local/app/forte9/SUNWspro/lib:/usr/ccs/lib:/usr/j2se/lib:/usr/lib:/lib:/usr/local/ssl/lib:/usr/dt/lib:/opt/SUNWhpc/HPC6.0/lib:/usr/openwin/lib:/usr/local/app/tma/lib:/usr/sfw/lib:/usr/dapp/aplac/lib:/usr/local/lib/sparcv9:/stripe1/artkul/ansys10/v100/ansys/syslib/usIII/:/stripe1/artkul/ansys10/v100/ansys/lib/usIII/:/stripe1/artkul/ansys10/v100/commonfiles/Tcl/lib/usIII
output from ddl:
libansys.so => /stripe1/artkul/ansys10/v100/ansys/lib/usIII//libansys.so
libansysb.so => /stripe1/artkul/ansys10/v100/ansys/lib/usIII//libansysb.so
libansysx.so => /stripe1/artkul/ansys10/v100/ansys/lib/usIII//libansysx.so
libmnf.so => /stripe1/artkul/ansys10/v100/ansys/lib/usIII//libmnf.so
libcadoe_core.so => /stripe1/artkul/ansys10/v100/ansys/lib/usIII//libcadoe_core.so
libcif.so => /stripe1/artkul/ansys10/v100/ansys/lib/usIII//libcif.so
libz.so => /stripe1/artkul/ansys10/v100/commonfiles/Tcl/lib/usIII/libz.so
libpng.so => /stripe1/artkul/ansys10/v100/commonfiles/Tcl/lib/usIII/libpng.so
libtiff.so => /stripe1/artkul/ansys10/v100/commonfiles/Tcl/lib/usIII/libtiff.so
libjpeg.so => /stripe1/artkul/ansys10/v100/commonfiles/Tcl/lib/usIII/libjpeg.so
libGL.so.1 => /lib/sparcv9/libGL.so.1
libGLU.so.1 => /lib/sparcv9/libGLU.so.1
libXm.so.4 => /lib/sparcv9/libXm.so.4
libXt.so.4 => /lib/sparcv9/libXt.so.4
libX11.so.4 => /lib/sparcv9/libX11.so.4
libnsl.so.1 => /lib/sparcv9/libnsl.so.1
libsocket.so.1 => /lib/sparcv9/libsocket.so.1
libsunperf.so.5 => /stripe1/artkul/ansys10/v100/ansys/syslib/usIII//libsunperf.so.5
libfui.so.1 => /stripe1/artkul/ansys10/v100/ansys/syslib/usIII//libfui.so.1
libfai.so.2 => /stripe1/artkul/ansys10/v100/ansys/syslib/usIII//libfai.so.2
libfsu.so.1 => /stripe1/artkul/ansys10/v100/ansys/syslib/usIII//libfsu.so.1
libmtsk.so.1 => /lib/sparcv9/libmtsk.so.1 (*)
libsunmath.so.1 => /stripe1/artkul/ansys10/v100/ansys/syslib/usIII//libsunmath.so.1
libintl.so.1 => /lib/sparcv9/libintl.so.1
librt.so.1 => /lib/sparcv9/librt.so.1
libdl.so.1 => /lib/sparcv9/libdl.so.1
libfai2.so.2 => /stripe1/artkul/ansys10/v100/ansys/syslib/usIII//libfai2.so.2
libthread.so.1 => /usr/lib/lwp/sparcv9/libthread.so.1
libCstd.so.1 => /lib/sparcv9/libCstd.so.1
libCrun.so.1 => /lib/sparcv9/libCrun.so.1
libm.so.1 => /lib/sparcv9/libm.so.1
libc.so.1 => /lib/sparcv9/libc.so.1
libw.so.1 => /lib/sparcv9/libw.so.1
libf77compat.so.1 => /stripe1/artkul/ansys10/v100/ansys/syslib/usIII//libf77compat.so.1
libXmu.so.4 => /usr/openwin/lib/sparcv9/libXmu.so.4
libXext.so.0 => /usr/openwin/lib/sparcv9/libXext.so.0
libdga.so.1 => /usr/openwin/lib/sparcv9/libdga.so.1
libSM.so.6 => /usr/openwin/lib/sparcv9/libSM.so.6
libICE.so.6 => /usr/openwin/lib/sparcv9/libICE.so.6
libmp.so.2 => /usr/lib/64/libmp.so.2
libpthread.so.1 => /usr/lib/64/libpthread.so.1 (*)
libaio.so.1 => /usr/lib/64/libaio.so.1
libmd5.so.1 => /usr/lib/64/libmd5.so.1
/usr/platform/SUNW,Sun-Fire-15000/lib/sparcv9/libc_psr.so.1
/usr/platform/SUNW,Sun-Fire-15000/lib/sparcv9/libmd5_psr.so.1
(*) - does not present in the old working version
Thank you again!
Kind regards,
Artem -
Problems Compiling a SQLJ Class.
Hi,
Just getting started and I'm trying to compile an SQLJ file into a class to use as a stored procedure in Oracle Lite.
I'm Using JDEV 9.0.3.
I created a project and set the SQLJ compiler options.
Then I created an SQLJ file with the contents:
import java.sql.*;
import javax.*;
import oracle.*;
public class TestSQLJ
public static void Test()
throws SQLException
#sql {INSERT INTO TEST VALUES(1)};
#sql {COMMIT};
But whenever I complie I get the error:
Error(10,15): cannot access class oracle.jdbc.OraclePreparedStatement; file oracle\jdbc\OraclePreparedStatement.class not found
Can anyone please explain what could be wrong or provide a sample skeleton for a stored procedure. (it seems in JDEV 9i I can't create a SQLJ file (when I add a new SQLJ file to the project no file appears...)
BR
TimThe problem with your code is that first you need to connect to a database before executing any queries
Look at basic SQLJ sample at http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/basic/basicsqlj.html
In JDev 9.0.3 you can create SQLJ file by using menu File->New and selecting Database tier category and selecting SQLJ class. You should also be able to open existing SQLJ files.
Maybe you are looking for
-
Important note: The symptoms and solutions described below address only a small subset of the possible causes for blue screen errors, aka BSOD. This information can help address blue screen errors specifically related to Turbo Memory, but may not sol
-
Problems in creating a chart..
Hi, I have Problems in creating the following chart.. I dont know where the problem of the Publisher is, because the same structers already shows me a Table full of Data... I ve tested something and realized when i m deleting the SUM() Part everythin
-
What's that mean??
Hello, I'm trying to start a process from bpm workspace but getting this error. Does anyone knows what's that mean and how to resolve it?? <bpelFault><faultType>0</faultType><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="su
-
Hi, Is it possible to use the EJB 3.0 features of OracleAS 10.1.3.3 but EclipseLink as the persistence provider? Is it supported? I think I have a choice of: Spring JPA with the JPA implementation being EclipseLink OR OracleAS using EJB 3.0 changing
-
Preventing duplicates from camera to organizer
How can I set Organizer not to import duplicates from my camera/card reader in PSE7?