Custom PWS (Java) against Oracle
We are planning on developing a custom PWS in Java against an Oracle database (Peoplesoft).
We will be deploying Websphere App Server 5.1 with EDK 5.1 (Java) on the remote (portlet/web service) server on the Windows platform.
Is there any peference/recommendation as to which JDBC driver(Data Direct driver, type etc.) , I should use to access the Oracle database from teh custom PWS? Does anyone forsee any issues with this platform and/or Oracle database access on the remote application server.
I'd appreciate any JDBC driver specification recommendation and any other insights into this.
Thanks and regards.
Vanita
Staples
Try this (refers to assignment service, but I believe classpath is the same):
32.3.2.3 How to Deploy a Custom Assignment ServiceTo deploy a custom assignment service:
1.Use one of the following methods to make an assignment service implementation class and its related classes available in the class path of Oracle BPEL Process Manager:
◦Load your classes in SCA-INF/classes directly or SCA-INF/lib as a JAR.
◦Change the Oracle BPEL Process Manager shared library to include your JAR files.
Note:
◦You cannot create different versions of the assignment service for use in different BPEL processes unless you change package names or class names.
◦Java classes and JAR files in the suitcase are not available in the class path and therefore cannot be used as a deployment model for the assignment service.
◦The steps must be repeated for each node in a cluster.
Excerpt is from:
http://docs.tpu.ru/docs/oracle/en/owl/E14571_01/integration.1111/e10224/bp_workflow.htm#BACHEFDH
Similar Messages
-
Custom RTF templates in Oracle Core Contracts ..
Hello:
We want to create custom RTF templates in Oracle Core Contracts along with custom data templates.
We do not want to use XSL-FO templates since we are finding this too complex to work with ... also the fact that the XML data is being generated by some internal OAF processes that we cannot control.
This is unnecessarily too complex for us.
Can we create our own reporting using XML -Publisher and integrate it in the system ?
Any thoughts on this would be appreciated ... YeshSrini:
I did read those pages and unless I am missing something .. it is basically saying the follwing:
Copy the seeded XSL-FO templates and make changes to them and then upload them back. I have no real access to the xml data since it is somehow pre-generated. I do not have a choice of using RTF templates along with the ease of Word based formatting.
The above process goes against the way in which we can write our own reports in XMLP:
(a) Create our own data templates (use our own SQL)
(b) Create our own layout templates (using RTF or XSl_FO)
So I am stuck into undertsanding .... OAF, Java API's ,etc that I should not have to understand to generate a report ...
yesh -
How can I use custom WLST commands for Oracle SOA Suite in Weblogic
Hi There,
I'm trying to view and search the weblogic log files using WLST on a Solaris/Unix system.
I have come across this "custom WLST commands for Oracle SOA Suite" and thought of using the custom logging commands to get my task done.
However, my WLST shell is not recognizing the commands and giving me the NameError!
wls:/devDomain1/domainRuntime> listLogs()
Traceback (innermost last):
File "<console>", line 1, in ?
NameError: listLogs
I tried the commands listLogs, displayLogs, getLogLevel & setLogLevel but in vain!
I have followed the instructions as per the oracle recommendation of using Custom WLST commands (http://docs.oracle.com/cd/E29597_01/core.1111/e10105/getstart.htm#ASADM10692) as below
- Launched the WLST shell from Oracle Home.
cd ORACLE_HOME/common/bin
./wlst.sh
- Tried to run the listLogs command from domainRuntime()
I would like to know if I need to import any additional libraries to run the custom WLST commands for Oracle SOA Suite in my WLST shell?
I have only weblogic 10.3.1 server installed on my Solaris 10 machine on which I have deployed the OSB application software.
There is no SOA Suite installed.
Or is there any other way I can browse the Server Log file and get the list of log messages? Basically I would like to use this feature in my script to customize it according to my requirement of listing specific error logs which I can work it out if I know how to make these commands work.
Please advise if this is possible and how?
Cheers.
SatishI have tried on my OSB installation (no SOA Suite here), the command listLogs() works (I was in online mode, after a connect), and the classpath is:
CLASSPATH=/opt/oracle/fmw11_1_1_5/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/oracle/fw11_1_1_5/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0.33.x6_64/lib/tools.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/oracle/fmw11_1_1_5/wlserver_10./server/lib/weblogic.jar:/opt/oracle/fmw11_1_1_5/modules/features/weblogic.server.modules_10.3.5.0.jar:/opt/oracle/fmw111_1_5/wlserver_10.3/server/lib/webservices.jar:/opt/oracle/fmw11_1_1_5/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/optoracle/fmw11_1_1_5/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/opt/oracle/fmw11_1_1_5/oracle_common/moules/oracle.jrf_11.1.1/jrf-wlstman.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lib/adfscripting.jar:/opt/oracl/fmw11_1_1_5/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lb/mdswlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/auditwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_cmmon/common/wlst/resources/igfwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jps-wlst.jar:/optoracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jrf-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/reources/oamap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/opt/oracle/fmw111_1_5/oracle_common/common/wlst/resources/ossoiap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/osoiap.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_comon/common/wlst/resources/sslconfigwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/wsm-wlst.jar:/optoracle/fmw11_1_1_5/utils/config/10.3/config-launch.jar::/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbynet.ar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbyclient.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/drby/lib/derbytools.jar::
The wlst.sh I have used is /opt/oracle/fmw11_1_1_5/osb/common/bin/wlst.sh
I hope this can help -
Error using setTimestamp and ojdbc14 against Oracle 7.3.4
I am having a problem setting a timestamp value against Oracle 7.3.4 and Oracle 8.0.6 databases.
Here's the code:
public Tester
(String passedUsername, String passedPassword, String passedHostName, String passedPort, String passedSID)
throws SQLException {
// Establish a database connection
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
} catch (ClassNotFoundException e) { throw new SQLException("Can't find class oracle.jdbc.driver.OracleDriver"); }
StringBuffer myStringBuffer = new StringBuffer(50);
myStringBuffer.append("jdbc:oracle:thin:@");
myStringBuffer.append(passedHostName);
myStringBuffer.append(":");
myStringBuffer.append(passedPort);
myStringBuffer.append(":");
myStringBuffer.append(passedSID);
Connection myConnection = DriverManager.getConnection(myStringBuffer.toString(), passedUsername, passedPassword);
myConnection.setAutoCommit(false);
// Insert the test record
PreparedStatement myPreparedStatement = null;
try {
myPreparedStatement = myConnection.prepareStatement("insert into test_table(date_field) values (?)");
myPreparedStatement.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
myPreparedStatement.execute();
} finally {
if (myPreparedStatement != null) myPreparedStatement.close();
Here's the error that occurs under Oracle 7.3.4:
java.sql.SQLException: ORA-01024: invalid datatype in OCI call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
at Tester.<init>(Tester.java:46)
at Tester.main(Tester.java:62)
Here's the error that occurs under Oracle 8.0.6:
java.sql.SQLException: ORA-03115: unsupported network datatype or representation
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
at Tester.<init>(Tester.java:46)
at Tester.main(Tester.java:62)
Note that the table in the insert statement does not have to exist. You can even replace the statement with a garbage statement.
The error is produced regardless.
The code is being compiled under JDK 1.4
I am using the latest version of the JDBC drivers (i.e. ojdbc14.jar)
The code works fine under Oracle 8.1.7 and 9.0.1
My code needs to access all four of these database version, sometimes concurrently, so I can only use a single driver class (i.e. I can't swap out ojdbc14.jar for classes12.zip).
Any feedback would be appreciated!Hi,
Only to say that we have the same problem like you:
- Error ORA-01024 when connection to Oracle 8.0.1 on Sun Solaris
- Error ORA-03115 when connection to Oracle 8.1.5 on Windows
We are thinking about upgrading Oracle. Is it the only solution?
Thank you -
Any one use java call oracle ERP stored procdure
Hi,
Any one use java call oracle ERP stored procdure?
Example I want ues java call below stored, it can work , but in Oracle ERP have error : "APP-MRP-22130: Cannot connect to database
Cause: The current routine cannot connect to the database.
Action: Contact your system administrator or customer support representative.
CREATE OR REPLACE procedure XXBOM_ITEM_IMPORT
is
x number;
begin
fnd_global.apps_initialize
(1070, /*i_user_id*/
20634, /*i_responsibility_id*/
401 /*i_application_id*/
/* import item */
x := fnd_request.submit_request(
application => 'INV',
program => 'INCOIN',
argument1 => 141,
argument2 => 1,
argument3 => 1,
argument4 => 1,
argument5 => 1
end;Note 164701.1 in metalink may be relevant.
-
Custom FaultPolicy Java Action
Hi,
I want to create a custom java action for use in fault policies. I see this implemented in AIA as the custom java action "oracle.apps.aia.core.eh.BPELJavaAction". Does Oracle have any documentation for creating custom java actions?
Thanks and Regards.
Johnyou could generate a webproxy based on the wsdl of the osb service, do your call in some static method and pack all the files in a jar file and use that one in your osb project
-
Cannot locate Java class oracle.tip.adapter.db.DBWriteInteractionSpec
I have created a BPEL process in which i have used DB Adapter when i try to deploy the soa suite coposite i am getting the following error.
[09:36:10 PM] Error deploying archive sca_TicketBooking_rev1.0.jar to partition "default" on server soa_server1 [http://utl-7c8735e613f:8001]
[09:36:10 PM] HTTP error code returned [500]
[09:36:10 PM] Error message from server:
There was an error deploying the composite on soa_server1: [JCABinding] [TicketBooking.TicketBooking/1.0]Unable to complete unload due to: Cannot locate Java class oracle.tip.adapter.db.DBWriteInteractionSpec: Cannot locate Java class oracle.tip.adapter.db.DBWriteInteractionSpec.
[09:36:10 PM] Check server log for more details.
[09:36:10 PM] Error deploying archive sca_TicketBooking_rev1.0.jar to partition "default" on server soa_server1 [http://utl-7c8735e613f:8001]
[09:36:10 PM] #### Deployment incomplete. ####
[09:36:10 PM] Error deploying archive file:/D:/Personal/OracleWork/RnDProjects/TicketBooking/TicketBooking/deploy/sca_TicketBooking_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
I already created the data source and JNDI Name in the DBAdapter but still getting the error while deploying the application.
One mistake that i think i have made after creating the data source now the DBAdapter.rar file taking the path as follows.
Source Path: C:\ Oracle\ Middleware\ Oracle_SOA1\ soa\ connectors\ was\ DbAdapter. rar
Deployment Plan: C:\ Oracle\ Middleware\ Oracle_SOA1\ soa\ connectors\ was\ Plan. xml
initially the path was as follows:
Source Path: C:\ Oracle\ Middleware\ Oracle_SOA1\ soa\ connectors\ DbAdapter. rar
Deployment Plan: C:\ Oracle\ Middleware\ Oracle_SOA1\ soa\ connectors\ Plan. xml
Please help me i have googled a lot but can't find the answer anywhere.
Thanks in advanceMate ,
Just check the health status and state of DB Adapter in the deployments of WLAdminConsole.
If its inactive , redeploy and update it ,also make sure its targeted to the right server. -
Custom OIM java client not working
Hi all,
I am trying to execute a custom OIM java client in my server. The java file just has the code to connect to the OIM server and it is failing at the line
ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
The basic content of the java file OIMTry.java is given below:
env.put("java.security.auth.login.config", "/u01/apps/resetpwd/config/auth.conf");
env.put("java.security.policy", "/u01/apps/resetpwd/config/xl.policy");
env.put("XL.HomeDir", "/u01/apps/resetpwd");
ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
env = config.getAllSettings();
I have set the OIM related jar files in classpath in .bash_profile and able to echo the classpath as well.
However, the file is executing perfectly in Eclipse tool but not from command prompt.The file is getting compiled properly at command prompt.
I have tried various options of executing the java file as shown below.
java -Djava.security.manager -DXL.HomeDir=/u01/apps/oim_server/xellerate -Djava.security.policy=/u01/apps/oim_server/xellerate/config/xl.policy -Djava.security.auth.login.config=/u01/apps/oim_server/xellerate/config/auth.conf -Djava.naming.provider.url=jnp://oim_server_host:12401/ OIMTry
java -Dclasspath=/u01/apps/resetpwd/lib/xlUtils.jar:/u01/apps/resetpwd/lib/xlAPI.jar:/u01/apps/resetpwd/lib/xlCrypto.jar OIMTry
The error we are getting is given below:
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: com.thortech.xl.util.config.ConfigurationClient
at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)
at JvResolvePoolEntry(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
at OIMTry.main(java.lang.String[]) (Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.crypto.Cipher not found in [file:/u01/apps/resetpwd/lib/activation.jar, file:/u01/apps/resetpwd/lib/ojdbc14.jar, file:/u01/apps/resetpwd/lib/XLCustomClient.ear, file:/u01/apps/resetpwd/lib/commons-beanutils.jar, file:/u01/apps/resetpwd/lib/oscache.jar, file:/u01/apps/resetpwd/lib/xlDataObjectBeans.jar, file:/u01/apps/resetpwd/lib/commons-collections.jar, file:/u01/apps/resetpwd/lib/sax.jar, file:/u01/apps/resetpwd/lib/xlDataObjects.jar, file:/u01/apps/resetpwd/lib/commons-dbcp-1.2.1.jar, file:/u01/apps/resetpwd/lib/wlXLSecurityProviders.jar, file:/u01/apps/resetpwd/lib/xlDDM.jar, file:/u01/apps/resetpwd/lib/commons-digester.jar, file:/u01/apps/resetpwd/lib/xalan.jar, file:/u01/apps/resetpwd/lib/xlGenConnector.jar, file:/u01/apps/resetpwd/lib/commons-logging.jar, file:/u01/apps/resetpwd/lib/XellerateClient.jar, file:/u01/apps/resetpwd/lib/xlGenericUtils.jar, file:/u01/apps/resetpwd/lib/commons-pool-1.2.jar, file:/u01/apps/resetpwd/lib/xercesImpl.jar, file:/u01/apps/resetpwd/lib/xliGCProviders.jar, file:/u01/apps/resetpwd/lib/commons-validator.jar, file:/u01/apps/resetpwd/lib/xerces.jar, file:/u01/apps/resetpwd/lib/xlInputPreprocessor.jar, file:/u01/apps/resetpwd/lib/crimson.jar, file:/u01/apps/resetpwd/lib/XIMDD.jar, file:/u01/apps/resetpwd/lib/xlInstaller.jar, file:/u01/apps/resetpwd/lib/csv.jar, file:/u01/apps/resetpwd/lib/XL10SecurityProviders.jar, file:/u01/apps/resetpwd/lib/xlLogger.jar, file:/u01/apps/resetpwd/lib/dom.jar, file:/u01/apps/resetpwd/lib/xlAdapterUtilities.jar, file:/u01/apps/resetpwd/lib/xlRemoteManager.jar, file:/u01/apps/resetpwd/lib/ejb.jar, file:/u01/apps/resetpwd/lib/xlAPI.jar, file:/u01/apps/resetpwd/lib/xlRequestPreview.jar, file:/u01/apps/resetpwd/lib/jakarta-oro-2.0.8.jar, file:/u01/apps/resetpwd/lib/xlAttestation.jar, file:/u01/apps/resetpwd/lib/xlSampleApp.jar, file:/u01/apps/resetpwd/lib/javagroups-all.jar, file:/u01/apps/resetpwd/lib/xlAuditor.jar, file:/u01/apps/resetpwd/lib/xlScheduler.jar, file:/u01/apps/resetpwd/lib/jaxp-api.jar, file:/u01/apps/resetpwd/lib/xlAuthentication.jar, file:/u01/apps/resetpwd/lib/xlUtils.jar, file:/u01/apps/resetpwd/lib/jhall.jar, file:/u01/apps/resetpwd/lib/xlBackOfficeBeans.jar, file:/u01/apps/resetpwd/lib/xlVO.jar, file:/u01/apps/resetpwd/lib/log4j-1.2.8.jar, file:/u01/apps/resetpwd/lib/xlBackofficeClient.jar, file:/u01/apps/resetpwd/lib/xlWebClient.jar, file:/u01/apps/resetpwd/lib/mail.jar, file:/u01/apps/resetpwd/lib/xlCache.jar, file:/u01/apps/resetpwd/lib/xlWSCustomClient.jar, file:/u01/apps/resetpwd/lib/oc4jclient.jar, file:/u01/apps/resetpwd/lib/xlCrypto.jar, file:/u01/apps/resetpwd/lib/xml-apis.jar, file:/usr/share/java/libgcj-3.4.6.jar, file:./, core:/]
at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.5.0.0)
at JvFindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at JvBytecodeVerifier.type.compatible(_Jv_BytecodeVerifier.type&, JvBytecodeVerifier) (/usr/lib/libgcj.so.5.0.0)
at JvBytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.5.0.0)
at JvVerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.5.0.0)
at JvPrepareClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
at JvWaitForState(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
...3 more
Please let me know if I have to set something else in the environment to get rid of this error.
Thanks,
Mahendra.Hi,
We were unable to create tcUtilityFactory instance when the env variables are set using the hashmap.
Instead it is working when we set using System.setProperty() as shown below:
System.setProperty("XL.HomeDir", "/u01/apps/OIMPwdReset");
System.setProperty("java.security.policy", "/u01/apps/OIMPwdReset/config/xl.policy");//server or client
System.setProperty("java.security.auth.login.config", "/u01/apps/OIMPwdReset/config/auth.conf");//server or client
Hope this helps other guys..
-Mahendra. -
How can I find out the java version Oracle has ?
How can I find out the java version Oracle has built in?
I've tried with ..
SELECT comp_id, comp_name, version
FROM dba_registry ;
But I get.."table doesn't not exist".
Thenks in advance!Pl post details of OS and database versions. Pl see this MOS Doc
What Version of Java is Compatible With The Database JVM? [ID 438294.1]
and these Oracle docs
11gR2 - http://docs.oracle.com/cd/E11882_01/appdev.112/e25518/adfns_environments.htm#ADFNS654
11gR1 - http://docs.oracle.com/cd/B28359_01/java.111/b31225/whatsnew.htm
HTH
Srini -
i have to tried to make programs using java and oracle. if i give the values in the 'insert' statement it is getting updated in the original table in oracle but how to take the values from the text fields of java and insert into the tables in oracle. do we have any methods to convert the values into sql type. pl reply.
Here is a sample of a Java program that uses JDBC and a PreparedStatement. This particular program does a select, but you can also use this for inserts. I'm not 100% this is what you are looking for, but if it isn't just let me know. I'll help if I can.
Joel
For inserts, just replace this code:
ResultSet rs = ps.executeQuery();
while (rs.next()) {
System.out.println(rs.getInt(rs.findColumn("CNT")));
}with this code (and obviously change the Select string to an Insert String):
int rowcnt = ps.executeUpdate();Here is the whole program:
import java.sql.*;
import java.util.*;
import java.text.*;
class dbtest {
public static void main(String args[]) throws SQLException {
try {
String timeString = new String("2000-11-01 23:59:59");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd H:m:s");
java.util.Date date = format.parse(timeString);
Timestamp timestamp = new Timestamp(date.getTime());
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection(
"jdbc:oracle:thin:@riker:1521:mydb",
"myusername",
"mypassword");
String sql =
"SELECT COUNT(*) CNT FROM SERVICE_ALARM "
+ "WHERE TRANS_STREAM_NODE_ID = ? "
+ "AND SERVICE_ID = ? "
+ "AND ALARM_ID = ? "
+ "AND RAISED > TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')";
PreparedStatement ps = conn.prepareStatement(sql);
ps.setString(1, "ROW1");
ps.setInt(2, 1);
ps.setString(3, "ROW1");
String myDate =
timestamp.toString().substring(0, timestamp.toString().length() - 2);
System.out.println("myDate=(" + myDate + ")");
ps.setString(4, myDate);
ResultSet rs = ps.executeQuery();
while (rs.next()) {
System.out.println(rs.getInt(rs.findColumn("CNT")));
rs.close();
ps.close();
} catch (Exception e) {
System.out.println("Java Exception caught, error message=" + e.getMessage());
} -
OLEDB 8i against Oracle 9i Database
Is it recommended to use Oracle Provider for OLE DB 8i driver against Oracle 9i Database server?
Does anyone have an official Oracle link whether this is supported or not.
Thanks
DipakAssuming you have an 8i client, this is a supported configuration. It new 9i features require some additional client coding, you may not be able to access them from the 8i client. I doubt you'd hit any of these issues since you're using OLE DB, though.
Unfortunately, I'm not aware of an official Oracle link that explains the policy. There is probably some note on Metalink that explains it.
Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC -
Problem Adding Custom JSF Components to Oracle JDeveloper 10g (10.1.3) Prev
I'm having a problem on Adding Custom JSF Components to Oracle JDeveloper 10g (10.1.3) Preview (http://www.oracle.com/technology/products/jdev/101/collateral/101/adffaces/howto_customcomponents.html)
The step 1 of 5 isn't visible for me and I don't see the "Install from local file" option to select the adf-faces-bundle.zip from my file system. The OTN check for updates don't prove the ADF Faces...
What may I do?And...
If "Check for Updates Wizard" is not launched, you can try to set LANG.
see: 10.1.3 Can't not launch Update Wizard in Japanese environment.
10.1.3 Can't not launch Update Wizard in Japanese environment.
Thanks.
Takuya Ono -
Limitations of Oracle 10G XE as against Oracle 10G Standard Edition
Can you please give the information regarding....
1. Capabilities of Oracle 10G XE (Express Edition)
2. Limitations of Oracle 10G XE as against Oracle 10G Standard EditionHave a look at the License Information:
http://download-uk.oracle.com/docs/cd/B25329_01/doc/license.102/b25456/toc.htm#BABJBGGA
There's also a feature matrix in pdf-format:
http://www.oracle.com/technology/products/database/oracle10g/pdf/twp_general_10gdb_product_family.pdf
C.
Message was edited by:
cd -
Embedded SQL against Oracle Question
Software: Forte 3.0.J.
Server Platform: HPUX 10.2
Database: Oracle
Problem Description: During the course of development, I ran into a
problem using multiple columns in an sql UPDATE/SET statement. I was trying
to update a.COLUMN_1 and a.COLUMN_2, which constitute part of the primary
key of associative TABLE_A (a). In order for me to make the update, I
needed to use the existing value of a.COLUMN_1 to lookup the new b.COLUMN_1
in TABLE_B (b). Where a.COLUMN_1 = b.RELATED_COLUMN_1, I am able to find
each b.COLUMN_2 that correspond to each a.COLUMN_2.
I was able to resolve the issue by separating the two columns so
that each had it's own select statement. Theoretically, it appears that
this shouldn't work, because the SET statement for a.COLUMN_1 would cause
the a.COLUMN_1 reference in the select statement of a.COLUMN_2 to be
overwritten.
In spite of this, I tried it, and it worked. I would like to
understand why the sql works, and how sql actually executes the statement.
Here is the sql:
UPDATE TABLE_A a
SET a.COLUMN_1 =
(SELECT DISTINCT b1.COLUMN_1
FROM TABLE_B b1
WHERE b1.RELATED_CASE_ID =
a.COLUMN_1 AND
b1.RELATED_COLUMN_TYPE_CD = 'NEPHI'),
a.COLUMN_2=
(SELECT DISTINCT b2.COLUMN_2
FROM TABLE_B b2
WHERE b2.RELATED_COLUMN_1=
a.COLUMN_1 AND
b2.RELATED_COLUMN_TYPE_CD = 'NEPHI' AND
b2.RELATED_COLUMN_2= a.COLUMN_2)
WHERE a.COLUMN_1 = 100
The table structure is as follows:
TABLE_A: (primary keys are bolded) This is an associative table.
Column_1 and Column_2 comprise the pk of one table; Column_3 and Column_4
comprise the pk of another table. Assume that the Column_1 and Column_2
values replacing the original values already exist in the parent table of
which they form the pk).
COLUMN_1
COLUMN_2
COLUMN_3
COLUMN_4
COLUMN_5
TABLE_B: (primary keys are bolded) This is a reference table.
COLUMN_1
COLUMN_2
RELATED_COLUMN_1
RELATED_COLUMN_2
RELATED_COLUMN_TYPE_CD
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>If you do an explain plan or set autotrace on against this update statement,
you'll find that the select operations are actually executed first by Oracle
- I believe because of the nature of the transaction. Thus, no problem.
Brian Wilson
U.S. Bancorp Piper Jaffray
[email protected]
Phone (612) 342-5682
From: David Pettit[SMTP:[email protected]]
Reply To: David Pettit
Sent: Friday, April 30, 1999 1:58 PM
To: '[email protected]'
Subject: Embedded SQL against Oracle Question
Software: Forte 3.0.J.
Server Platform: HPUX 10.2
Database: Oracle
Problem Description: During the course of development, I ran into a
problem using multiple columns in an sql UPDATE/SET statement. I was
trying
to update a.COLUMN_1 and a.COLUMN_2, which constitute part of the primary
key of associative TABLE_A (a). In order for me to make the update, I
needed to use the existing value of a.COLUMN_1 to lookup the new
b.COLUMN_1
in TABLE_B (b). Where a.COLUMN_1 = b.RELATED_COLUMN_1, I am able to find
each b.COLUMN_2 that correspond to each a.COLUMN_2.
I was able to resolve the issue by separating the two columns so
that each had it's own select statement. Theoretically, it appears that
this shouldn't work, because the SET statement for a.COLUMN_1 would cause
the a.COLUMN_1 reference in the select statement of a.COLUMN_2 to be
overwritten.
In spite of this, I tried it, and it worked. I would like to
understand why the sql works, and how sql actually executes the statement.
Here is the sql:
UPDATE TABLE_A a
SET a.COLUMN_1 =
(SELECT DISTINCT b1.COLUMN_1
FROM TABLE_B b1
WHERE b1.RELATED_CASE_ID =
a.COLUMN_1 AND
b1.RELATED_COLUMN_TYPE_CD = 'NEPHI'),
a.COLUMN_2=
(SELECT DISTINCT b2.COLUMN_2
FROM TABLE_B b2
WHERE b2.RELATED_COLUMN_1=
a.COLUMN_1 AND
b2.RELATED_COLUMN_TYPE_CD = 'NEPHI' AND
b2.RELATED_COLUMN_2= a.COLUMN_2)
WHERE a.COLUMN_1 = 100
The table structure is as follows:
TABLE_A: (primary keys are bolded) This is an associative table.
Column_1 and Column_2 comprise the pk of one table; Column_3 and Column_4
comprise the pk of another table. Assume that the Column_1 and Column_2
values replacing the original values already exist in the parent table of
which they form the pk).
COLUMN_1
COLUMN_2
COLUMN_3
COLUMN_4
COLUMN_5
TABLE_B: (primary keys are bolded) This is a reference table.
COLUMN_1
COLUMN_2
RELATED_COLUMN_1
RELATED_COLUMN_2
RELATED_COLUMN_TYPE_CD
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
Nondeposit investment products are not insured by the FDIC, are
not deposits or other obligations of or guaranteed by U.S. Bank
National Association or its affiliates, and involve investment
risks, including possible loss of the principal amount invested.
Past performance does not guarantee future results. We consider
our sources reliable. Accuracy and completeness are not guaranteed.
Information is subject to change. Transactional details should not
be relied on for tax purposes and do not supersede normal trade
confirmations or statements. Messaging outside U.S. jurisdictions
from U.S. Bancorp Piper Jaffray to non-institutional parties is not
intended for solicitation purposes.
Electronic mail sent through the Internet is not secure. We will
not accept time-sensitive, action-oriented messages, transaction
orders, fund transfer instructions or check stop payments
electronically.
If you are not the intended recipient, notify the Sender. This
information is intended only for the person named above and for
the purposes indicated. Do not distribute this message without
written consent of the author. Non-business opinions may not
reflect opinions of U.S. Bancorp Piper Jaffray and its affiliates.
U.S. Bancorp Piper Jaffray and its affiliates reserve the right to
monitor all e-mail.
Securities products and services are offered through
U.S. Bancorp Piper Jaffray Inc., member SIPC and NYSE, Inc.,
a subsidiary of U.S. Bancorp.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
thnx in advance..884540 wrote:
hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
thnx in advance..You can mention the classpath using the javac and java options:
javac -cp .;<path> <ClassName>.java
and
java -cp .;<path> <ClassName>
Or refer the below link to avoid mentioning classpath everytime you run/ compile the program
http://www.linuxquestions.org/questions/linux-software-2/j2sdk-install-174483/#post898715
Maybe you are looking for
-
SharePoint 2013 (O365) Name Resolving Issues
I am a global administrator for my O365 environment. I am having issues with names resolving in SharePoint I am trying to add people as term set managers in the managed metadata interface. If I just type someone's name and hit save, then it works (
-
Transaction Key for Movement Type 561
Hello, For movement type 561, I know one of the Transaction Key is BSX. I would like to ask what is the other Transaction Key as I would like to set the GL Account Determination. Thanks. Thanks.
-
Calling EJB from Java Stored Procedures
Hi, I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time). It
-
I have installed developer suite in XP.When i open Report Builder ,it will not launch at all. I receive the splash screen. I have tried uninstalling and then reinstalling with the same result. Any help would be appreciated. Thanks Vinoth
-
Leopard and Tiger on Separate Drives: questions. Many externals. Graphics
Hi, I have multiple Macs, most networked, and have installed Leopard on all but my "graphics" computer. I use this one for my photography, and am just gathering my nerve to move. I am wondering whether to wait, to install Leopard on a separate intern