Why do I get an error while trying to retrieve the
text for ORA-12705?
This error occurs when you have not set the
ORACLE_home
environment variable properly — a common mistake. In
order to use WebLogic jDriver for Oracle, the Oracle
client software needs to be installed and ORACLE_home
must be set.
You may also see this error message if you try to use
WebLogic jDriver for Oracle's internationalization
capabilities with a language/codeset combination that is
not installed on your system. If you get the ORA-12705
error with the correct error text, then either you have
set NLS_LANG improperly, or you do not have the right
codesets installed on your system.
Why do I run out of resources during updates with
Oracle's database link?
When you use Oracle's database link to update your
database, you may get error "maximum number of temporary
table locks exceeded" even if you close your result sets
and statements when you finish.
The database link is an object in the local database
that allows you to access tables, views, and such in a
remote database. The database link is controlled by the
Oracle server, so the driver has no control over its use
of resources. The link appears to perform the commit
(since other processes could see the records that were
being created), but it doesn't free any resources until
the connection is closed. The solution is to remove the
database link and use the JDBC driver to do your
selects, inserts, and updates.
How do I prevent errors when running t3dbping?
When you are testing your Oracle database connections
under UNIX, you can run SQL*PLUS and can successfully
ping the database using utils.dbping. However, when you
use the multitier utils.t3dbping utility, you receive an
ORA-12154 error message.
First, make sure that your ORACLE_home environment
variable is correctly set to point to your Oracle
installation. This variable must be set in the
environment where the WebLogic server is running.
In the C-shell issue the following command:
$ setenv ORACLE_home path
where path is the path to your Oracle installation.
In the Bourne shell, issue the following commands:
$ ORACLE_home=path
$ export ORACLE_home
Where path is the path to your Oracle installation. When
you ping your database using the two-tier utils.dbping
utility, the JDBC driver loads the database client
library and establishes the connection to the database.
When you use the multitier utils.t3dbping utility, the
WebLogic Server loads a two-tier driver and uses it to
establish a database connection. In both cases, the same
method is used to connect to the database. SQL*PLUS
works because it doesn't require ORACLE_home to find the
client libraries.
If you are still experiencing problems, try this:
1. Open a command shell.
2. Run the two-tier version of utils.dbping in this
shell.
3. Start WebLogic in this shell from the command line:
$ java -ms32m -mx32m weblogic.server
4. Open a second command shell.
5. Run the utils.t3dbping in the second shell against
the server running in the first command shell.
If this procedure doesn't work, please send the output
from these commands to WebLogic technical support.
Why does executing the PreparedStatement class cause a "TRUNC
fails: ORA-00932: inconsistent datatypes" error?
According to Oracle Metalink Bug Database Doc ID:
144784.1, in the absence of explicit data typecasting,
OCI assumes that a bind variable is a CHAR data type. If
the SQL statement intends to use the bind variable as a
DATE data type, but OCI thought it was a CHAR, the SQL
parser will have a conflict in data types. The fix is to
explicitly use data conversion functions to convert the
bind variables in the problem queries. For example, a
select string of
String st = "select count(*) from simple_table where
TRUNC(mydate) = TRUNC(?)";
should be changed to:
String st = "select count(*) from simple_table where
TRUNC(mydate) = TRUNC(TO_DATE(?))";
Why am I getting an "ORA-01000: maximum open cursors
exceeded" error, even though I closed all ResultSet,
Statement, and Connection objects?
This is an Oracle issue. According to Oracle's
documentation, dynamic cursors can remain open from run
to run in a session and are not closeable when a
procedure closes. To work around this issue, you can
increase the number of open cursors allowed in the
database or you can reset the connection pool (close and
reopen database connections in the connection pool).
To reset the connection pool, you can untarget and
retarget the connection pool using the Administration
Console. You can also use the reset() method through the
JMX API or the RESET_POOL command on the WebLogic Server
command line interface.
An instance of stateful session EJB when accessed
simultaneously from more than one clients on same VM
results in RemoteException or EJBException. In case the
client is a Servlet thread, which of the following
techniques can be used to avoid RemoteException/EJBException?
a. Not possible.
b. Store the reference to the EJB instance as an
instance variable of Servlet class.
c. Store the reference to the EJB instance as a local
variable of Servlet class.
d. Make the Servlet client to be remote instead of
internal to WebLogic server.
Choice C is the correct choice. An instance of a
stateful session EJB can be accessed from only one
client virtual machine at a time. Multiple client
threads from the same virtual machine can access the
same instance of a stateful session EJB, but they must
do so in a serial fashion. If a client-invoked business
method is in progress on an instance when another
client-invoked call, from the same or different client,
arrives at the same instance of a stateful session bean
class, the container may throw the
java.rmi.RemoteException to the second client , if the
client is a remote client, or the javax.ejb.EJBException,
if the client is a local client. Thus choice D is
incorrect.
To avoid any exception, each Servlet should store a
reference to a particular EJB instance in a local
variable of the Servlet's service() method. Please note
that variables local to methods like service(), doGet(),
doPost() are not shared between different requests and
are automatically thread safe. Thus choice C is correct.
An instance variable unlike local variable is shared.
Thus Choice B is incorrect.
An implication of this rule is that an application
cannot make loop back calls to a session bean instance.
This restriction does not apply to a stateless session
bean because the container routes each request to a
different instance of the session bean class.
Are there C/C++ interfaces to WLS JMS?
No, this is not supported.
* Write your own interfaces using JNI.
* Setup a Servlet that your C/C++ client calls to
generate a JMS message. You should spawn multiple
threads in C++ and use multiple posts to pass messages
via http.
How do I start WLS and configure JMS?
On Windows, start WLS 6.X by selecting Start -< Programs
-< BEA WebLogic E-Business Platform -< WebLogic Server
6.X -< Start Default Server and enter the administrator
password.
On Windows, to configure JMS, start the console by
selecting Start -< Programs -< BEA WebLogic E-Business
Platform -< WebLogic Server 6.X -< Start Default
Console.
1. In the console tree view on the left, select JMS.
2. If you want persistent messages, first create a Store
- Select Stores. In the window on the right, Select
Create a new JMSFile Store for a file store, give it a
name, give it a directory, select create. If you want a
JDBCStore, you first need to create a JDBC connection
pool by selecting JDBC in the tree view, Connection
Pools, create a new JDBC Connection Pool. Select
Targets, select a Target server, select the arrow that
points to the right and select Apply. Then go back to
Stores, Create a new JMSJDBCStore.
3. If you want to use a template, first create a
Template - Select Templates. You need a template to
create temporary queues. Select Create a new JMS
Template, give it a name, select create, then you can
move to the Thresholds &Quotas tab or the Override tab.
Select Apply when done with your changes.
4. Select Servers. Select Create a new JMSServer, give
it a name, select a Store if you created one, select a
template if you created one, Select Create. Now you can
move to the other tabs, make changes, select Apply. In
particular, you must select Targets, select a Target
server, select the arrow that points to the right, and
select Apply. This is the server on which JMS will boot.
5. Create Destinations - from the tree view in the left
panel, select the + in front of JMS, select the + in
front of Servers, select the + in front of your server,
select Destinations, Select Create a new JMSQueue or
Create a new JMSTopic, fill in the first page and Select
Create, then you can select, fill in, and Apply other
tabs.
6. Create Connection Factories - on left tree view, open
JMS. Select Connection Factory. Select Create a new JMS
Connection Factory on the right panel. Type in the name
and JNDI name. Select Create (lower right hand corner).
Select the Targets tab. Select the name of the server on
which you want to deploy the connection factory. Select
the arrow pointing to the right - the server moves to
chosen. Then select Apply (lower right hand corner).
How do I configure JMS security?
The correct way to set up security for JMS is to go to
the console, select ACLs in the tree view, then create
some access control lists.
1. Set the ACL name which should be
weblogic.jms.queue.QUEUENAME or
weblogic.jms.topic.TOPICNAME.
2. Select Create.
3. Enter the New Permission of send or receive.
4. Select Create.
5. Enter a comma separated list of users or groups.
6. Select Grant Permission.
7. Select "saved to the realm implementation" to save
your changes.
8. Select Yes.
This will update the fileRealm.properties file with
lines that look like the following:
acl.send.weblogic.jms.queue.TestQueue1=user1
acl.receive.weblogic.jms.queue.TestQueue1=user1
If you don't have an ACL for a queue or topic, security
is wide open.
There are also ACL's for accessing the JNDI context; the
JNDI context is a requirement for initially accessing
JMS. See the JNDI documentation.
Page Numbers :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18