Connection properties in weblogic
Hi,
I am using Weblogic connection pooling.
I am getting a connection from this pool and set the autoCommit to false. Now
I release this connection and the same connection is allocated to a different
servlet, what will be the autoCommit state? Will it still be false or the pool
resets the autoCommit state to default(true)?
Thanks,
Mallya
I think it depends on whether or not you are using the pool driver (or DataSource)
or the JTS/XA driver (or TxDataSource). I believe that any connections from a
transactional pool (the second set of options mentioned previously) will always
have autoCommit set to false...
mike reiche wrote:
> I believe that connection will be autoCommit=true. You may wish to repost this
> in the jdbc newsgroup
>
> Mike
>
> "Mallya" <[email protected]> wrote:
> >
> >Hi,
> >I am using Weblogic connection pooling.
> >I am getting a connection from this pool and set the autoCommit to false.
> >Now
> >I release this connection and the same connection is allocated to a different
> >servlet, what will be the autoCommit state? Will it still be false or
> >the pool
> >resets the autoCommit state to default(true)?
> >Thanks,
> >Mallya
Similar Messages
-
JCA adapter outbound connection properties values are not populating ..
Hi ,
I am struggling to find a solution for this problem.
My managed connection factory impl has all the properties as per the java bean spec. I have also implemented hashcode and equals but i still don't see the custom outbound custom properties information populated into my ManagedConnectionFactoryImpl properties. I checked property names in both weblogic-ra.xml and ra.xml. The names are consistent.
As per this discussion (BINDING.JCA-12510 JCA Resource Adapter location error in SOA 11g Suite i saved the properties using Keyboard entered. I restarted my server and also i can see the saved values
I also verified the Plan.xml that gets created when the values are updated. Please find the provided the code snippets. Any help appreciated.
Please let me know if i need to post this in a different forum. We use weblogic 10.3.5 application server. Let me know for any more details.
Thanks,
Sri
For more information:
Following is the managed connection factory Impl
package com.cgi.cml.common.sample.connector.ra.outbound;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.PrintWriter;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Set;
import javax.resource.ResourceException;
import javax.resource.spi.ConnectionManager;
import javax.resource.spi.ConnectionRequestInfo;
import javax.resource.spi.ManagedConnection;
import javax.resource.spi.ManagedConnectionFactory;
import javax.security.auth.Subject;
public class SampleManagedConnectionFactoryImpl
implements ManagedConnectionFactory, Serializable {
private transient PropertyChangeSupport changes =new PropertyChangeSupport(this);
private String databaseFileName = "";
private String database = "";
private String user = "";
private String password = "";
private String dtdPath = "";
private String protocol = "";
private String serverAddress = "";
private Boolean debugMode = false;
private PrintWriter writer;
* Constructor for SampleManagedConnectionFactoryImpl
public SampleManagedConnectionFactoryImpl() {
* @see ManagedConnectionFactory#createConnectionFactory(ConnectionManager)
@Override
public Object createConnectionFactory(ConnectionManager cm)
throws ResourceException {
return new MomapiConnectionFactoryImpl(this, cm);
* @see ManagedConnectionFactory#createConnectionFactory()
@Override
public Object createConnectionFactory() throws ResourceException {
return new MomapiConnectionFactoryImpl(this, null);
* @see ManagedConnectionFactory#createManagedConnection(Subject, ConnectionRequestInfo)
@Override
public ManagedConnection createManagedConnection(
Subject subject,
ConnectionRequestInfo cxRequestInfo)
throws ResourceException {
System.out.println("createdManaged Connection called");
return new SampleManagedConnectionImpl(subject,cxRequestInfo);
* @see ManagedConnectionFactory#matchManagedConnections(Set, Subject, ConnectionRequestInfo)
@Override
public ManagedConnection matchManagedConnections(
Set connectionSet,
Subject subject,
ConnectionRequestInfo cxRequestInfo)
throws ResourceException {
System.out.println("match managed Connections called---->"+getDatabaseFileName());
ManagedConnection match = null;
Iterator iterator = connectionSet.iterator();
if (iterator.hasNext()) {
match = (ManagedConnection) iterator.next();
return match;
* @see ManagedConnectionFactory#setLogWriter(PrintWriter)
@Override
public void setLogWriter(PrintWriter writer) throws ResourceException {
this.writer = writer;
* @see ManagedConnectionFactory#getLogWriter()
@Override
public PrintWriter getLogWriter() throws ResourceException {
return writer;
* Checks whether this instance is equal to another.
* @param obj other object
* @return true if the two instances are equal, false otherwise
@Override
public boolean equals(Object obj)
System.out.println("equals method called");
boolean equal = false;
if (obj != null)
if (obj instanceof MomapiManagedConnectionFactoryImpl)
SampleManagedConnectionFactoryImpl other = (SampleManagedConnectionFactoryImpl) obj;
equal = (this.databaseFileName).equals(other.databaseFileName) &&
(this.database).equals(other.database) &&
(this.user).equals(other.user) &&
(this.password).equals(other.password) &&
(this.dtdPath).equals(other.dtdPath) &&
(this.protocol).equals(other.protocol) &&
(this.serverAddress).equals(other.serverAddress) &&
(this.debugMode==other.debugMode);
System.out.println("equals method returning -->"+ equal);
return equal;
* Returns the hashCode of the ConnectionRequestInfoImpl.
* @return the hash code of this instance
public int hashCode()
//The rule here is that if two objects have the same Id
//i.e. they are equal and the .equals method returns true
// then the .hashCode method must return the same
// hash code for those two objects
int hashcode = new String("").hashCode();
if (databaseFileName != null)
hashcode += databaseFileName.hashCode();
if (database != null)
hashcode += database.hashCode();
if (user != null)
hashcode += user.hashCode();
if (password != null)
hashcode += password.hashCode();
if (dtdPath != null)
hashcode += dtdPath.hashCode();
if (protocol != null)
hashcode += protocol.hashCode();
if (serverAddress != null)
hashcode += serverAddress.hashCode();
System.out.println("hascode method called and the value is -->"+hashcode);
return hashcode;
* Associate PropertyChangeListener with the ManagedConnectionFactory,
* in order to notify about properties changes.
* @param lis the PropertyChangeListener to be associated with the
* ManagedConnectionFactory
public void addPropertyChangeListener(PropertyChangeListener lis)
System.out.println("addPropertyChangeListener called");
changes.addPropertyChangeListener(lis);
* Delete association of PropertyChangeListener with the
* ManagedConnectionFactory.
* @param lis the PropertyChangeListener to be removed
public void removePropertyChangeListener(PropertyChangeListener lis)
System.out.println("removePropertyChangeListener called");
changes.removePropertyChangeListener(lis);
public String getDatabaseFileName() {
return databaseFileName;
public void setDatabaseFileName(String databaseFileName) {
this.databaseFileName = databaseFileName;
public String getDatabase() {
return database;
public void setDatabase(String database) {
System.out.println("hellloooooooooooo---->"+database);
this.database = database;
public String getUser() {
return user;
public void setUser(String user) {
this.user = user;
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
public String getDtdPath() {
return dtdPath;
public void setDtdPath(String dtdPath) {
this.dtdPath = dtdPath;
public String getProtocol() {
return protocol;
public void setProtocol(String protocol) {
this.protocol = protocol;
public String getServerAddress() {
return serverAddress;
public void setServerAddress(String serverAddress) {
this.serverAddress = serverAddress;
public Boolean isDebugMode() {
return debugMode;
public void setDebugMode(Boolean debugMode) {
this.debugMode = debugMode;
public PrintWriter getWriter() {
return writer;
public void setWriter(PrintWriter writer) {
this.writer = writer;
weblogic-ra.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-connector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:javaee="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-connector/1.0/weblogic-connector.xsd"
xmlns="http://xmlns.oracle.com/weblogic/weblogic-connector">
<jndi-name>jca/sampleRA</jndi-name>
<enable-access-outside-app>true</enable-access-outside-app>
<outbound-resource-adapter>
<connection-definition-group>
<connection-factory-interface>javax.resource.cci.ConnectionFactory</connection-factory-interface>
<connection-instance>
<jndi-name>jca/sampleCon</jndi-name>
<connection-properties>
<properties>
<property>
<name>databaseFileName</name>
</property>
<property>
<name>database</name>
</property>
<property>
<name>user</name>
</property>
<property>
<name>password</name>
</property>
<property>
<name>dtdPath</name>
</property>
<property>
<name>protocol</name>
</property>
<property>
<name>serverAddress</name>
</property>
<property>
<name>debugMode</name>
</property>
</properties>
</connection-properties>
</connection-instance>
</connection-definition-group>
</outbound-resource-adapter>
</weblogic-connector>
ra.xml
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java/sun.com/xml/ns/j2ee/connector_1_5.xsd" version="1.5">
<display-name>MomapiConnector</display-name>
<vendor-name>CGI</vendor-name>
<eis-type>SAMPLE</eis-type>
<resourceadapter-version>1.0</resourceadapter-version>
<license>
<license-required>false</license-required>
</license>
<resourceadapter>
<resourceadapter-class>com.cgi.cml.common.sample.connector.ra.SampleResourceAdapterImpl</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>com.cgi.cml.common.sample.connector.ra.outbound.SampleManagedConnectionFactoryImpl</managedconnectionfactory-class>
<config-property>
<config-property-name>databaseFileName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>database</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>user</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>dtdPath</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>protocol</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>serverAddress</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<config-property-name>debugMode</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
</config-property>
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>com.cgi.cml.common.my.connector.ra.outbound.SampleConnectionFactoryImpl</connectionfactory-impl-class>
<connection-interface>javax.resource.cci.Connection</connection-interface>
<connection-impl-class>com.cgi.cml.common.sample.connector.ra.outbound.SampleConnectionImpl</connection-impl-class>
</connection-definition>
<transaction-support>NoTransaction</transaction-support>
<reauthentication-support>false</reauthentication-support>
</outbound-resourceadapter>
</resourceadapter>
</connector>
Edited by: 931395 on May 2, 2012 7:43 AM
Edited by: 931395 on May 2, 2012 8:15 AMArun,
I tried, no luck and it is giving me the following error. Once the Plan.xml is created I am usinng "update" button on the console to redeploy the application using Plan.xml. When I take this route it gives me 2 options (1. update this application in place with new deployment plan 2. redploy this application using the following deployment files).
When I use the second option eventhough there is a change in the Plan.xml nothing happens. If I use the first option then I am getting the following exception. If I put the module-override for application then only the ear is getting deployed.
Thanks,
Sridhar
[BaseFlow] : No UpdateListener found or none of the found UpdateListeners accepts URI
<May 9, 2012 9:37:47 AM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1336570667598' for task '10'. Error is: 'weblogic.management.DeploymentException:
The application SampleApp cannot have the resource META-INF/weblogic-ra.xml updated dynamically. Either:
1.) The resource does not exist.
or
2) The resource cannot be changed dynamically.
Please ensure the resource uri is correct, and redeploy the entire application for this change to take effect.'
weblogic.management.DeploymentException:
The application SampleApp cannot have the resource META-INF/weblogic-ra.xml updated dynamically. Either:
1.) The resource does not exist.
or
2) The resource cannot be changed dynamically.
Please ensure the resource uri is correct, and redeploy the entire application for this change to take effect.
at weblogic.application.internal.flow.DeploymentCallbackFlow.addPendingUpdates(DeploymentCallbackFlow.java:375)
at weblogic.application.internal.flow.DeploymentCallbackFlow.makePendingUpdates(DeploymentCallbackFlow.java:394)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepareUpdate(DeploymentCallbackFlow.java:407)
at weblogic.application.internal.BaseDeployment$PrepareUpdateStateChange.next(BaseDeployment.java:685)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
Truncated. see log file for complete stacktrace
>
<May 9, 2012 9:37:47 AM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating update task for application 'SampleApp'.>
<May 9, 2012 9:37:47 AM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException:
The application SampleApp cannot have the resource META-INF/weblogic-ra.xml updated dynamically. Either:
1.) The resource does not exist.
or
2) The resource cannot be changed dynamically.
Please ensure the resource uri is correct, and redeploy the entire application for this change to take effect.
at weblogic.application.internal.flow.DeploymentCallbackFlow.addPendingUpdates(DeploymentCallbackFlow.java:375)
at weblogic.application.internal.flow.DeploymentCallbackFlow.makePendingUpdates(DeploymentCallbackFlow.java:394)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepareUpdate(DeploymentCallbackFlow.java:407)
at weblogic.application.internal.BaseDeployment$PrepareUpdateStateChange.next(BaseDeployment.java:685)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
Truncated. see log file for complete stacktrace
>
<May 9, 2012 9:37:47 AM EDT> <Error> <Console> <BEA-240003> <Console encountered the following error weblogic.management.DeploymentException:
The application SampleApp cannot have the resource META-INF/weblogic-ra.xml updated dynamically. Either:
1.) The resource does not exist.
or
2) The resource cannot be changed dynamically.
Please ensure the resource uri is correct, and redeploy the entire application for this change to take effect.
at weblogic.application.internal.flow.DeploymentCallbackFlow.addPendingUpdates(DeploymentCallbackFlow.java:375)
at weblogic.application.internal.flow.DeploymentCallbackFlow.makePendingUpdates(DeploymentCallbackFlow.java:394)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepareUpdate(DeploymentCallbackFlow.java:407)
at weblogic.application.internal.BaseDeployment$PrepareUpdateStateChange.next(BaseDeployment.java:685)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.prepareUpdate(BaseDeployment.java:439)
at weblogic.application.internal.EarDeployment.prepareUpdate(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.prepareUpdate(DeploymentStateChecker.java:220)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepareUpdate(AppContainerInvoker.java:149)
at weblogic.deploy.internal.targetserver.operations.DynamicUpdateOperation.doPrepare(DynamicUpdateOperation.java:130)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
> -
Problem when getting resultset when using connection pooling in weblogic
Hello,
I am new to database connection pooling. I am using weblogic server, Java 1.6, MySql database. I have done connection pooling in weblogic server. The problem arise when I try to run select query I cannot fetch data in ResultSet. For insert it works fine...
import java.io.Serializable;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
public class DatabaseToText implements Serializable {
public DatabaseToText() {
super();
// TODO Auto-generated constructor stub
public static void main(String[] args) {
Connection conn;
Statement stmt;
ResultSet rs;
String str1, str2;
List l1 = new ArrayList();
try {
System.out.println("in try block");
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
prop.put(Context.PROVIDER_URL, "t3://localhost:7001");
System.out.println("properties are set ");
Context ctx = new InitialContext(prop);
System.out.println("b4 lookup(mysqljndi)");
Object obj = ctx.lookup("mysqljndi"); // java:comp/env/CPDS
System.out.println("afta lookup(mysqljndi)");
DataSource ds = (DataSource) obj;
conn = ds.getConnection();
stmt = conn.createStatement();
String query = "select * from logindb.userregister";
System.out.println("query is = " + query);
rs = stmt.executeQuery(query);
System.out.println("size of rs is :: " + rs.getFetchSize());
if (rs != null) {
while (rs.next()) {
str1 = rs.getString(0);
str2 = rs.getString(1);
System.out.println("username is :: " + str1 + "password is : " + str2);
} else {
System.out.println("no values get fetched");
ctx.close();
} catch (Exception e) {
e.printStackTrace();
OUTPUT IN CONSOLE
in try block
properties are set
b4 lookup(mysqljndi)
afta lookup(mysqljndi)
query is = select * from logindb.userregister
size of rs is :: 0
java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception:
[java.rmi.MarshalException: error marshalling return; nested exception is:
java.io.NotSerializableException: com.mysql.jdbc.ResultSet]
at weblogic.jdbc.rmi.SerialResultSet.next(SerialResultSet.java:89)
at DatabaseToText.main(DatabaseToText.java:69)
Record is getting inserted but when i use select query i cannot get the output...
Regards,This problem is solved in JDBC section of this forum
-
Connection pooling in Weblogic using DB2
i am trying to configure the connection pooling in Weblogic console using DB2 and i put the ff informations:
Name: myConnectionPool
URL: jdbc db2://localhost:5000
Driver Class Name: COM.ibm.db2.jdbc.DB2Driver
properties: user=db2admin
for some reason, i got this error:
Cannot startup connection pool "myConnectionPool" weblogic.common
Resource Exception: Cannot load driver class: COM.ibm.db2.jdbc.DB2Driver
i appreciate if someone can help me with this. thx.Include zip file, db2jdbc.zip, containing driver class file, COM.ibm.db2.jdbc.DB2Driver,
to Classpath. -
Cannot create connection pool with weblogic jDriver XA for oracle
Hi everybody,
we have serious problems configuring the weblogic jDriver for Oracle with support
for distributed transactions.
Everything works fine with the non-XA driver.
We tried the suggestions given here before like setting the environment variable
ORACLE_SID. However, this does not change the errors we get. We use Weblgic Server
6.1 SP2 with oracle 8.1.7 (client and server) under Windows NT.
When attempting to create the connection pool, we get the following exception:
Starting Loading jDriver/Oracle .....
<14.05.2002 15:48:30 CEST> <Error> <JDBC> <Cannot startup connection pool "DiplPool"
weblogic.common.ResourceException: java.sql.SQLException: open failed for XAResource
'DiplPool' with error XAER_RMERR : A resource manager error has occured in the transaction
branch. Check Oracle XA trace file(s) (if any) for database errors. The Oracle XA
trace file(s) are located at the directory where you start the Weblogic Server, and
have names like xa_<pool_name><MMDDYYYY>.trc.
at weblogic.jdbc.oci.xa.XAConnection.<init>(XAConnection.java:58)
at weblogic.jdbc.oci.xa.XADataSource.getXAConnection(XADataSource.java:601)
at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:200)
at weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnectionEnvFactory.java:57)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
The trace file looks like this:
ORACLE XA: Version 8.1.5.0.0. RM name = 'Oracle_XA'.
113105.161:160.160.-1344514975:
xaoopen: xa_info=Oracle_XA+Acc=P/schamper/schamper+SesTm=100+DB=DiplPool+Threads=true+LogDir=.+DbgFl=0x15,rmid=-1344514975,flags=0x0
113105.161:160.160.-1344514975:
ORA-12560: TNS: Fehler bei Protokolladapter
113105.161:160.160.-1344514975:
xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12560.
113105.161:160.160.-1344514975:
xaoopen: return -3
We suspect that we do not set the properties of the connection pool correctly. The
declaration of the pool in config.xml looks something like the following:
<JDBCConnectionPool CapacityIncrement="1" DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="10" MaxCapacity="15" Name="DiplPool"
Properties="user=scott;password=tiger;url=jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de;dataSourceName=DiplPool"
Targets="Marvin" TestTableName="privcust" URL="jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de"/>
Are there any known issues with the XA driver and the versions of oracle and Weblogic
we use? Can someone tell us how exactly we have to define the connection pool or
provide an example?
Any help would be greatly appreciated.
Best regards,
MichaelHi Michael
Here is an example connection pool tag,
<JDBCConnectionPool
Name="oraXAPool"
Targets="myserver"
DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="1"
MaxCapacity="10"
CapacityIncrement="2"
Properties="user=scott;password=tiger;server=ORCL"
/>
Ensure that the server=ORCL is replaced by server=<what ever the Alias is
defined in TNSNAMES.ORA file>
You dont have to specify the URL for this.
hth
sree
"Michael Wufka" <[email protected]> wrote in message
news:[email protected]...
>
Hi everybody,
we have serious problems configuring the weblogic jDriver for Oracle withsupport
for distributed transactions.
Everything works fine with the non-XA driver.
We tried the suggestions given here before like setting the environmentvariable
ORACLE_SID. However, this does not change the errors we get. We useWeblgic Server
6.1 SP2 with oracle 8.1.7 (client and server) under Windows NT.
When attempting to create the connection pool, we get the followingexception:
Starting Loading jDriver/Oracle .....
<14.05.2002 15:48:30 CEST> <Error> <JDBC> <Cannot startup connection pool"DiplPool"
weblogic.common.ResourceException: java.sql.SQLException: open failed forXAResource
'DiplPool' with error XAER_RMERR : A resource manager error has occured inthe transaction
branch. Check Oracle XA trace file(s) (if any) for database errors. TheOracle XA
trace file(s) are located at the directory where you start the WeblogicServer, and
have names like xa_<pool_name><MMDDYYYY>.trc.
at weblogic.jdbc.oci.xa.XAConnection.<init>(XAConnection.java:58)
atweblogic.jdbc.oci.xa.XADataSource.getXAConnection(XADataSource.java:601)
atweblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnec
tionEnvFactory.java:200)
atweblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnec
tionEnvFactory.java:57)
atweblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.j
ava:698)
atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282
atweblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:329)
The trace file looks like this:
ORACLE XA: Version 8.1.5.0.0. RM name = 'Oracle_XA'.
113105.161:160.160.-1344514975:
xaoopen:xa_info=Oracle_XA+Acc=P/schamper/schamper+SesTm=100+DB=DiplPool+Threads=true
LogDir=.DbgFl=0x15,rmid=-1344514975,flags=0x0
113105.161:160.160.-1344514975:
ORA-12560: TNS: Fehler bei Protokolladapter
113105.161:160.160.-1344514975:
xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12560.
113105.161:160.160.-1344514975:
xaoopen: return -3
We suspect that we do not set the properties of the connection poolcorrectly. The
declaration of the pool in config.xml looks something like the following:
<JDBCConnectionPool CapacityIncrement="1"DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="10" MaxCapacity="15" Name="DiplPool"
Properties="user=scott;password=tiger;url=jdbc:weblogic:oracle:srlaptop_aide
nbach.muc.sdm-research.de;dataSourceName=DiplPool"
Targets="Marvin" TestTableName="privcust"URL="jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de"/>
>
Are there any known issues with the XA driver and the versions of oracleand Weblogic
we use? Can someone tell us how exactly we have to define the connectionpool or
provide an example?
Any help would be greatly appreciated.
Best regards,
Michael -
Connect SQL2000 using weblogic 6.1
Hi,
I am a new to java.
Does anyone can tell me how to connect sql2000 using weblogic 6.1 ?
WilsonThanks !!
"Slava Imeshev" <[email protected]> wrote in message
news:[email protected]..
Hi Wilson,
You need to take path containing spaces into quotes i.e
"C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\msbase.jar";
Slava
"Wilson" <[email protected]> wrote in message
news:[email protected]..
I want to setup a connection pool using ms JDBC driver and what i done
are
I have set the class path in startWebLogic.cmd
set CLASSPATH=C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\msbase.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\mssqlserver.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\msutil.jar;
.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar
and
<JDBCConnectionPool
Name="MyJDBC Connection Pool"
Targets="jdbctest"
URL="jdbc:microsoft:sqlserver://sqlsvr01:1433"
DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
InitialCapacity="1"
MaxCapacity="1"
CapacityIncrement="1"
Password=""
Properties="user=sa;server=qa75"
/>
but I get these error :
<2002/12/10 ??10?17?31?> <Error> <JDBC> <Cannot startup connection pool"My
JDBC Connection Pool" Cannot load driver class:
com.microsoft.jdbc.sqlserver.SQL
ServerDriver>
Thanks in advance.
Wilson
"Joseph Weinstein" <[email protected]> wrote in message
news:[email protected]..
Wilson wrote:
Hi,
I am a new to java.
Does anyone can tell me how to connect sql2000 using weblogic 6.1 ?
WilsonFrom what sort of code you you want to connect? Do read our onlinedocumentation
on connection pools. You can tell our pool system what JDBC driver youwant to use,
and the arguments it needs, and then we'll make a pool of connections
for
you. You should
start out with the simple JDBC driver examples.
Joe -
See Java System properties using WebLogic Server console
hi
If I deploy "systempropertiesweb.war" [1] on WebLogic Server I can see all or individual Java System properties,
e.g. http://localhost:7101/systempropertiesweb/systemproperties?property=java.version results in "java.version = 1.6.0_24"
Is it possible to see the same Java System properties using WebLogic Server Administration Console? If so, how?
( via http://localhost:7101/console )
- [1] at SystemPropertiesApp/SystemPropertiesWeb/deploy/systempropertiesweb.war
in http://www.consideringred.com/files/oracle/2013/SystemPropertiesApp-v0.01.zip
many thanks
Jan VerveckenThanks for your reply Timo.
Timo Hahn wrote:
I don't think that there is an option to see this in the admin console. ...Thanks for the confirmation.
... There my be a mbean but I did not find it.Well, if I start JConsole (e.g. at C:\oracle\jdevstudio111240-mw\jdk160_24\bin\jconsole.exe ) and connect to e.g. Local Process "weblogic.Server", on the MBeans tab I can navigate to java.lang:type=Runtime which has an SystemProperties attribute.
But, I don't know how to get to this same MBean using the WebLogic Server Administration Console (if possible).
regards
Jan Vervecken -
WL7.0 ignores connection properties
I'm trying to use the Sybase XA driver with WL7.0 and can't seem to get all
of the connection properties passed on to the driver. Specifically, I need
to have the CHARSET=iso_1 set in order to connect to the server. The
properties string looks like this:
DriverName="com.sybase.jdbc2.jdbc.SybXADataSource"
Properties="url=jdbc:sybase:Tds:sfohp7:5055;
NetworkProtocol=Tds;
DatabaseName=theDatabaseName;
dataSourceName=jtaXAPool;
user=theuser;
CHARSET=iso_1;
PortNumber=5055;
password=welcome;
ServerName=ipaddress"
I have a test program which uses the XA driver and can successfully connect
when given the CHARSET property, and which fails without. This would seem to
verify that the XA driver will respect this property. However, specifying
this property in the above connect string for WL7.0 has no effect, causing
the following exception:
<Jun 10, 2002 12:52:33 PM EDT> <Error> <JDBC> <001060> <Cannot startup
connection pool "jtaXAPool" weblogic.common.ResourceException:
weblogic.common.ResourceException: java.sql.SQLException: JZ006: Caught
IOException: java.io.IOException: JZ0I6: An error occured converting UNICODE
to the charset used by the server. Error message:
java.io.CharConversionException: java.io.UnsupportedEncodingException:
hp-roman8
The same CHARSET property passed to the non-XA sybase driver DOES remedy
this problem. I can't figure out why Weblogic would pick and choose which
properties to send to the driver, but I can't explain why my sample program
can connect fine using the same connection string. Any suggestions would be
greatly appreciated.
-AaronFei,
Attached is my test program (hopefully, it will attach correctly...if not
here is the snippet of connection code). This came from a Sybase rep while
we were trying to validate the DTM/XA configuration was correct on the
server. The relevant connection code reads:
<-------snip------------>
com.sybase.jdbcx.SybDataSource sds = new
com.sybase.jdbc2.jdbc.SybXADataSource();
sds.setServerName(SERVERHOST);
sds.setPortNumber(SERVERPORT);
Properties props = new Properties();
props.put("user", USER);
props.put("password", PASSWORD);
props.put("CHARSET", "iso_1");
sds.setConnectionProperties(props);
//... etc... and connection properties also go here.
// -- this is equivalent to getting the
// XADataSource back from JNDI, a la
// XADataSource sds = (XADataSource) ctx.lookup(...);
// downcast to expose the getXAConnection method
// let's use a couple different xa connections to make things
// more complicated
xaconn1 = ((XADataSource)sds).getXAConnection();
<------snip-------------->
If I remove the props.put("CHARSET", "iso_1") from my test program, it fails
with the UnsupportedEncodingException as expected. However, adding this
CHARSET to the Properties in the connection pool does not seem to fix the
same issue within Weblogic.
Thanks for taking a look..
-Aaron
"Fei Luo" <[email protected]> wrote in message
news:[email protected]...
>
Aaron,
Could you please attach your test program that works? Thanks.
"Aaron" <[email protected]> wrote:
I'm trying to use the Sybase XA driver with WL7.0 and can't seem to get
all
of the connection properties passed on to the driver. Specifically, I
need
to have the CHARSET=iso_1 set in order to connect to the server. The
properties string looks like this:
DriverName="com.sybase.jdbc2.jdbc.SybXADataSource"
Properties="url=jdbc:sybase:Tds:sfohp7:5055;
NetworkProtocol=Tds;
DatabaseName=theDatabaseName;
dataSourceName=jtaXAPool;
user=theuser;
CHARSET=iso_1;
PortNumber=5055;
password=welcome;
ServerName=ipaddress"
I have a test program which uses the XA driver and can successfullyconnect
when given the CHARSET property, and which fails without. This would seem
to
verify that the XA driver will respect this property. However, specifying
this property in the above connect string for WL7.0 has no effect,causing
the following exception:
<Jun 10, 2002 12:52:33 PM EDT> <Error> <JDBC> <001060> <Cannot startup
connection pool "jtaXAPool" weblogic.common.ResourceException:
weblogic.common.ResourceException: java.sql.SQLException: JZ006: Caught
IOException: java.io.IOException: JZ0I6: An error occured convertingUNICODE
to the charset used by the server. Error message:
java.io.CharConversionException: java.io.UnsupportedEncodingException:
hp-roman8
The same CHARSET property passed to the non-XA sybase driver DOES remedy
this problem. I can't figure out why Weblogic would pick and choose which
properties to send to the driver, but I can't explain why my sampleprogram
can connect fine using the same connection string. Any suggestions would
be
greatly appreciated.
-Aaron
[SimpleDtmTest.java] -
CR4E - JDBC Connection Properties - How do I set GenericJDBCDriver to Yes
Hi,
I need to setup my JDBC connection in CR4E like I would in my CRConfig.xml
For example, I need to add this to my connection properties:
<GenericJDBCDriver>
<Option>Yes</Option>
<DatabaseStructure>catalogs,schemas,tables</DatabaseStructure>
<StoredProcType>Standard</StoredProcType>
<LogonStyle>SQLServer</LogonStyle>
</GenericJDBCDriver>
Without setting these properties for my JDBC connection things do not work. I guess I need to use the Optional properites, but I do not know what the syntax would be for what I want.
Please help.
Thanks,
NickPlease find below an example of setting the JDBC tags for Ms Sql 2000 (sp4)
<JDBC>
<CacheRowSetSize>100</CacheRowSetSize>
<JDBCURL>jdbc:microsoft:sqlserver://vm-5akouassiwk2:1433</JDBCURL>
<JDBCClassName>com.microsoft.jdbc.sqlserver.SQLServerDriver</JDBCClassName>
<JDBCUserName>sa</JDBCUserName>
<JNDIURL></JNDIURL>
<JNDIConnectionFactory></JNDIConnectionFactory>
<JNDIInitContext>/</JNDIInitContext>
<JNDIUserName>weblogic</JNDIUserName>
<GenericJDBCDriver>
<Option>No</Option>
<DatabaseStructure>catalogs,tables</DatabaseStructure>
<StoredProcType>Standard</StoredProcType>
<LogonStyle>SQLServer</LogonStyle>
</GenericJDBCDriver>
</JDBC> -
Can I determine what clients are connected to my weblogic server?
Hi, is there anyway of determining what clients are connected to my Weblogic 8.1 server - I want this information to be generated for me, not by maintaining a list when clients login initially to the server.
Also is there any thing that gets fired when a client terminates prematurely - for example being killed by the task manager. I need to know this, so the server knows what users are currently logged in, to prevent a user logging in twice (via the same username login).
Cheers,
Ants.Hi,
Cousld u send me a simple example to check my Weblogic server for EJB with client.
Iam struggling from last todays.
and also tell what software i should use for deployment of EJB of weblogic 8.1.
ur help highly appriciate by me
My mail ID: [email protected]
thanks,
AHOY -
Issue while creating connection pool in weblogic using SERVICE NAME
Found two issues while creating connection pool in weblogic using SERVICE NAME
1. While running apps from jdeveloper using xxx-jdbc.xml
weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Io exception: The Network Adapter could not establish the connection
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:253)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1109)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1033)
at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:214)
at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1051)
2. Configuriing the jndi in Weblogic server
weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:SERVICENAME
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:253)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1109)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1033)
Problem
database url is generated based on SID
eg: jdbc:oracle:thin:@localhost:1521:SID
Solution
(generate seperate url for SERVICE NAME)
jdbc:oracle:thin:@localhost:1521/SERVICENAME
------------------------It is so clear: host not found error for network connection and the other SID servcie name not found means your oracle instance name is not up. check with srvctl status for given servcie name or node, else check CRS_Stat -t if you are using RAC.
-
How do I get a new value for the service name field and update it in Connection Properties?
I am running Windows Vista. I just upgraded to Firefox 4. When I try to log on to the internet, it tells me the proxy server is refusing connections. A diagnostic reported Error 815 and said the remote server is not responding because there is an invalid value for the "Service Name" field. It said to get a new value and update it in Connection Properties. How do I do this?
When you create a new film script, the first page you see is a title page.
The page after this title page is the one where you generally type in your scenes.
It looks like you are facing some issue and not able to delete any text.
Can you please send me this script so that I can have a better look at your issue?
You can save this script to disk by using option 'File -> Save to disk'. This will create a '.stdoc' file on your system.
Just mail this '.stdoc' file to me at 'roverma <at> adobe <dot> com'
Thanks -
How can i decide the position of "connection.properties"
hello
i am a beginner of sqlj,and download a sample code from the oracle website,i find that the sqlj file need to read a "connection.properties" file,that define the database connection information,this file is put in the same directory as the sqlj file (i mean that they are within the same subpackage),i debug it by using the jdeveloper,it works well,but if i move the "connection.properties" file to the parent package,it don't work.and i can't find any config file that is used to define the position of the "connection.properties" file.i wonder whether i must put the "connection.properties" file and the sqlj file within the same package?if yes,consider following scenario:
if i have several sqlj files,and they are within the different package,all of them connect to the same database,must i copy the same "connection.properties" to every package that the sqlj file reside on?
thank you!with HTML of course!
if you want it in the center... do <center> appletcode </center>
if you want it in the bottom right corner use tables to move it there. -
Jdbc URL & connections properties
Hello all,
i would know if it is possible to add connection properties in a jdbc URL ( something like jdbc:oracle:oci8:user/pass@instance_machine:ResultSetMetaDataOptions=1&anotherProp=itsValue ...).
Thank you in advance
LoïcLoic,
FAQ that Douglas mentioned is here:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq_0.htm
Good Luck,
Avi. -
WLST connect(): NoClassDefFoundError in Weblogic 10.3
I have been using WLST to start Node Manager, start Admin Server, but I cannot connect to the Admin Server to start managed servers. The connect() command throws the following exception:
wls:/nm/apps> connect('aaa','bbb','t3://borg:8001')
Connecting to t3://borg:8001 with userid aaa ...
Traceback (innermost last):
File "<console>", line 1, in ?
File "<iostream>", line 22, in connect
WLSTException: Error occured while performing connect : Error connecting to the serverCould not initialize class weblogic.rjvm.t3.ProtocolHandlerT3$ChannelInitializer Use dumpStack() to view the full stacktrace
wls:/nm/apps> dumpStack()
This Exception occurred at Thu Apr 23 14:45:49 EDT 2009.
java.lang.NoClassDefFoundError: Could not initialize class weblogic.rjvm.t3.ProtocolHandlerT3$ChannelInitializer
at weblogic.rjvm.t3.ProtocolHandlerT3.getDefaultServerChannel(ProtocolHandlerT3.java:42)
at weblogic.rjvm.JVMID$1.getOutboundServerChannel(JVMID.java:180)
at weblogic.protocol.ServerChannelManager.findOutboundServerChannel(ServerChannelManager.java:243)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:230)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:194)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:225)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:188)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:344)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:339)
at weblogic.jndi.Environment.getContext(Environment.java:315)
at weblogic.jndi.Environment.getContext(Environment.java:285)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at weblogic.management.scripting.WLSTHelper.populateInitialContext(WLSTHelper.java:512)
at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLSTHelper.java:565)
at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:305)
at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:203)
at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:60)
at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
at org.python.core.PyMethod.__call__(PyMethod.java:96)
at org.python.core.PyObject.__call__(PyObject.java:248)
at org.python.core.PyObject.invoke(PyObject.java:2016)
at org.python.pycode._pyx176.connect$1(<iostream>:16)
at org.python.pycode._pyx176.call_function(<iostream>)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyTableCode.call(PyTableCode.java:404)
at org.python.core.PyTableCode.call(PyTableCode.java:287)
at org.python.core.PyFunction.__call__(PyFunction.java:179)
at org.python.pycode._pyx181.f$0(<console>:1)
at org.python.pycode._pyx181.call_function(<console>)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1135)
at org.python.core.Py.exec(Py.java:1157)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:148)
at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:89)
at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:70)
at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:44)
at weblogic.management.scripting.WLST.main(WLST.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.WLST.main(WLST.java:29)
java.lang.NoClassDefFoundError: Could not initialize class weblogic.rjvm.t3.ProtocolHandlerT3$ChannelInitializer
The host environment is Weblogic 10.3, Java 6 on HP-UX 11.23.
Insights appreciated. Thanks!
~Christhis can be occurred by wrong binding of host name to your network ip address, if you are trying to connect to remote weblogic. check your host name and ip address binding
Maybe you are looking for
-
How can I keep my winform application running after logout
Dear developers, I have an application that insert or update Data to an SQL server every 2, 3 hours. I can't use the SQL server itself (creating a new job). Instead I defined a timer which executes the code every 3 hours. The application runs in the
-
You've been signed out (28-04-2014)
Hey. I keep getting this message from Creative cloud app "you've been signed out" when I try to log in. (Desktop app, I can fine log on through a browser) Running Windows 8.1 and the problem happened after I updated photoshop and indesign (2 weeks ag
-
Thumbnail in browser doesnot match the pic in the view for many of my photo
I have noticed today after having loaded my library and several project with photo's 2500 or so that several thumbnails when high lighted actual bring up a differnet image. ( i.e. the thumbnail image does not match the image in the work screen area.)
-
Hi Gurus! I have a problem. I need to transport a role from Test to Prod, but the role exists in Prod and the user create workbooks in this role. How can I transport the role without afect the user workbooks?? - It Is a generated profile and i can't
-
"Epson Scan cannot be started" *sigh* PLEASE HELP!
Hi there- I've been scouring these forums over and have found plenty of problems over scanning with an Epson scanner, however; nearly all are related to an OS update and mine is not. I am a seasoned Mac user, but a scanner newbie. I have seen several