Keyword Search using the SOUNDS_LIKE modifier, Java API
Hello guys:
Does anyone have a piece of code that shows how can I do a search, using the keyword and the SOUNDS_LIKE mod, like on the Data Manager?
I've seen the blog "Performing Free Form Searches with MDM Java API" but I'm afraid this doesn't apply (it's about free-form, as the name says)
Thanks!
Alejandro
Hi Alejandro,
maybe this piece of code helps you a bit. The most important is the static attribute SOUNDS_LIKE of the TextSearchConstraint class.
Also try to find the MDM Java Example files @ service.sap.com/installMDM . There is a complete introduction on how to search against an MDM repository which is very useful.
// assumption:
// you have connected to some repository which contains a field "Material Number"
// with a session and you have already read the MainTable properties to identify
// the MainTableID, as well as some fields yo want to read.
// set search conditions
Search search = new Search(<yourMainTableId>);
String fieldname = "Material Number";
ResultDefinition rd = new ResultDefinition(<yourMainTableId>);;
FieldId field = <someFieldFromYourRepository>;
rd.add(field);
// add some additional fields you want to select here ...
FieldSearchDimension searchDimension = new FieldSearchDimension(field);
TextSearchConstraint searchString = new TextSearchConstraint(materialNumber, TextSearchConstraint.SOUNDS_LIKE);
search.addSearchItem(searchDimension, searchString);
RetrieveLimitedRecordsCommand limitingCommand = new RetrieveLimitedRecordsCommand(<yourConnection>);
limitingCommand.setSession(<yourSession>);
limitingCommand.setResultDefinition(rd);
limitingCommand.setSearch(search);
limitingCommand.setPageSize(10);
try {
limitingCommand.execute();
RecordResultSet rs = limitingCommand.getRecords();
catch(Exception e){
e.printStackTrace();
If you need more help, let me know
Best regards,
Martin
Similar Messages
-
Using the Data Engine Java API
I try to use the Data Engine Java API to generate an XML document from database data.
So as mentioned in the documentation Business Intelligence Publisher User's Guide Release 10.1.3.2 (page 4-26 to 4-27)
a) I created a java class (using Jdev Version 11.1.1.0.0)
package oracle.apps.XMLPublisher.client;
import com.sun.java.util.collections.Hashtable;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import oracle.apps.xdo.XDOException;
import oracle.apps.xdo.dataengine.DataProcessor;
public class XMLFileGenerator {
public XMLFileGenerator() {
public static void dataEngine() throws ClassNotFoundException, Exception {
XMLFileGenerator xMLFileGenerator = new XMLFileGenerator();
try {
//Initialization instantiate the DataProcessor class//
DataProcessor dataProcessor;
dataProcessor = new DataProcessor();
//Set Data Template to be executed
dataProcessor.setDataTemplate("PERFRBS.xml");
Hashtable parameters;
parameters = new Hashtable();
parameters.put("P_LEGAL_ENTITY_ID", "3259");
parameters.put("P_TRU_ID", "3262");
parameters.put("P_YEAR", "2009");
dataProcessor.setParameters(parameters);
// Now set the jdbc connection to the database that you
// wish to execute the template against.
// This sample assumes you have already created
// the connection object 'jdbcConnection'
Class.forName("oracle.jdbc.OracleDriver");
String url =
"jdbc:oracle:thin:@ap6005sdb.us.oracle.com:1526:hremeadv";
Connection jdbcConnection;
jdbcConnection= DriverManager.getConnection(url, "apps", "*****");
dataProcessor.setConnection(jdbcConnection);
System.out.println("Here1");
// Specify the output directory and file for the data file
dataProcessor.setOutput("BilanSocial.xml");
System.out.println("Here2");
dataProcessor.processData();
System.out.println("Here3");
} catch (SQLException e) {
System.out.println("SQLException " + e.getMessage());
} catch (XDOException e) {
System.out.println("XDOException" + e.getMessage());
public static void main(String[] argv) throws ClassNotFoundException,
Exception {
XMLFileGenerator xmlPublisher = new XMLFileGenerator();
XMLFileGenerator.dataEngine();
b) to generate my xml file based on the following data template
<?xml version="1.0" encoding="ISO-8859-1" ?>
<dataTemplate name="PERFRBS" defaultPackage="" version="1.0">
<parameters>
<parameter name="P_LEGAL_ENTITY_ID" dataType = "number"></parameter>
<parameter name="P_TRU_ID" dataType = "number"></parameter>
<parameter name="P_YEAR" dataType = "number"></parameter>
</parameters>
<lexicals>
</lexicals>
<dataQuery>
<sqlStatement name="Q_INDICATORS">
<![CDATA[ SELECT pai.action_information3 YEAR,
pai.action_information17 INDICATOR_VALUE
FROM pay_action_information pai
WHERE pai.action_information_category = 'HR_FR_BS'
AND pai.action_context_type = 'PA'
AND pai.action_information1 = :P_LEGAL_ENTITY_ID
AND pai.action_information2 = :P_TRU_ID
AND pai.action_information3 = :P_YEAR
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_YEARS" dataType="varchar2" source="Q_INDICATORS">
<element name="YEAR" dataType="varchar2" value="YEAR"/>
<element name="INDICATOR_VALUE" dataType="number" value="INDICATOR_VALUE"/>
</group>
</dataStructure>
</dataTemplate>
---> But when I run it , it fails when calling the data processor with the following error
D:\Jdeveloper11g\jdk\bin\javaw.exe -client -classpath "D:\Jdeveloper11g\jdevhome\XMLPublisher\src\Client\classes;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\versioninfo.jar;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\xdocore.jar;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\collections.jar;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\xmlparserv2-904.jar;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\i18nAPI_v3.jar;D:\Jdeveloper11g\jdbc\lib\ojdbc14dms.jar;D:\Jdeveloper11g\jlib\orai18n.jar;D:\Jdeveloper11g\diagnostics\lib\ojdl.jar;D:\Jdeveloper11g\jlib\dms.jar" -Dhttp.proxyHost=emeacache.uk.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts= -Dhttps.proxyHost=emeacache.uk.oracle.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts= oracle.apps.XMLPublisher.client.XMLFileGenerator
Here1
Here2
Exception in thread "main" java.lang.IllegalAccessError: tried to access class oracle.jdbc.driver.OracleStatement from class oracle.apps.xdo.dataengine.DBConnection
at oracle.apps.xdo.dataengine.DBConnection.setRowPrefetchSize(DBConnection.java:42)
at oracle.apps.xdo.dataengine.XMLPGEN.setRowPrefetchSize(XMLPGEN.java:1224)
at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:420)
at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:281)
at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:251)
at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:192)
at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:222)
at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:334)
at oracle.apps.XMLPublisher.client.XMLFileGenerator.dataEngine(XMLFileGenerator.java:50)
at oracle.apps.XMLPublisher.client.XMLFileGenerator.main(XMLFileGenerator.java:62)
Process exited with exit code 1.
Thanks by advance for your helpMake sure you have the Oracle JDBC library setup in project parties and it's setup to export. The api's are fine. Have you looked at the BIPublisherIDE I wrote. All this code is already written for you. There is a manual on the site as well
http://bipublisher.blogspot.com/2008/03/bi-publisher-bipublisheride.html
Ike Wiggins
http://bipublisher.blogspot.com -
Unable to run the 9.3 JAVA API in "embedded" mode without APS installed
<p>Hello,</p><p> </p><p>I'm trying to run the 9.3 JAVA API in "embedded" modewithout APS installed.</p><p> </p><p>I first used build Build <b>242</b> which was supplied with 9.3beta. This worked great and exactly the way I wanted to.</p><p>Now I'm trying to do the same with the production release of 9.3JAPI which is (to my knowledge) build <b>305</b>. With build 305I'm not able to connect to Essbase without APS installed.</p><p> </p><p>The reason I do not want to install APS is because I'm runningthe Java code from with an Oracle database (the JAPI jars areloaded into the database)</p><p> </p><p>Please see below loglines (running the sampleConnect.class):</p><p> </p><p><span style=" text-decoration: underline;"><b>Build 242 (whichworks ok)</b></span></p><p>Java(TM) 2 Runtime Environment, Standard Edition (build1.4.2_06-b03)<br>Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)<br>WARN [main]: - Time: Mon Feb 12 08:53:24 CET 2007, AnalyticProvider Services - Release 9.3.0.0 Build 242<br>Copyright (c) 1991-2006 Hyperion Solutions Corporation. All rightsreserved.<br>connection mode : EMBEDDED<br>WARN [main]: - Time: Mon Feb 12 08:53:25 CET 2007, connection mode: EMBEDDED<br>essbase.properties: essbase.properties<br>WARN [main]: - Time: Mon Feb 12 08:53:25 CET 2007,essbase.properties: essbase.properties<br>domain.db location: ./domain.db<br>WARN [main]: - Time: Mon Feb 12 08:53:25 CET 2007, domain.dblocation: ./domain.db<br>WARN [main]: - Time: Mon Feb 12 08:53:25 CET 2007,cluster.monitor.interval : 30</p><p>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: sign on (from user Administrator session number 5178)<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: get my analytics mode (from user Administrator sessionnumber 5178)<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: (from user '**aps_profile is Enabled**' session numberfalse)<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: connect to olap service (from user Administrator sessionnumber 5178)<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: (from user '**aps_profile is Enabled**' session numberfalse)<br>Connection to Analyic server '10.130.60.78' was successful.<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: sign off (from user Administrator session number 5178)<br>Process exited with exit code 0.<br></p><p> </p><p><span style=" text-decoration: underline;"><b>Build 305 (whichdoes not work ok)</b></span></p><p>Java(TM) 2 Runtime Environment, Standard Edition (build1.4.2_06-b03)<br>Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007, AnalyticProvider Services - Release 9.3.0.0 Build 305<br>Copyright (c) 1991-2006 Hyperion Solutions Corporation. All rightsreserved.<br>connection mode : EMBEDDED<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007, connection mode: EMBEDDED<br>essbase.properties: essbase.properties<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007,essbase.properties: essbase.properties<br>domain.db location: ./domain.db<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007, domain.dblocation: ./domain.db<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007,cluster.monitor.interval : 30</p><p>INFO [main]: - Time: Mon Feb 12 08:54:28 CET 2007,<br>[Mon Feb 12 08:54:28 CET 2007] - Service using EMBEDDED<br>Request: sign on (from user Administrator session number 68529)<br>INFO [main]: - Time: Mon Feb 12 08:54:28 CET 2007,<br>[Mon Feb 12 08:54:28 CET 2007] - Service using EMBEDDED<br>Request: get my analytics mode (from user Administrator sessionnumber 68529)<br>INFO [main]: - Time: Mon Feb 12 08:54:28 CET 2007,<br>[Mon Feb 12 08:54:28 CET 2007] - Service using EMBEDDED<br>Request: connect to olap service (from user Administrator sessionnumber 68529)<br>Error: Cannot connect to olap service. null<br>INFO [main]: - Time: Mon Feb 12 08:54:28 CET 2007,<br>[Mon Feb 12 08:54:28 CET 2007] - Service using EMBEDDED<br>Request: sign off (from user Administrator session number68529)<br>Process exited with exit code 1.</p>
<p>Hello,</p><p> </p><p>I'm trying to run the 9.3 JAVA API in "embedded" modewithout APS installed.</p><p> </p><p>I first used build Build <b>242</b> which was supplied with 9.3beta. This worked great and exactly the way I wanted to.</p><p>Now I'm trying to do the same with the production release of 9.3JAPI which is (to my knowledge) build <b>305</b>. With build 305I'm not able to connect to Essbase without APS installed.</p><p> </p><p>The reason I do not want to install APS is because I'm runningthe Java code from with an Oracle database (the JAPI jars areloaded into the database)</p><p> </p><p>Please see below loglines (running the sampleConnect.class):</p><p> </p><p><span style=" text-decoration: underline;"><b>Build 242 (whichworks ok)</b></span></p><p>Java(TM) 2 Runtime Environment, Standard Edition (build1.4.2_06-b03)<br>Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)<br>WARN [main]: - Time: Mon Feb 12 08:53:24 CET 2007, AnalyticProvider Services - Release 9.3.0.0 Build 242<br>Copyright (c) 1991-2006 Hyperion Solutions Corporation. All rightsreserved.<br>connection mode : EMBEDDED<br>WARN [main]: - Time: Mon Feb 12 08:53:25 CET 2007, connection mode: EMBEDDED<br>essbase.properties: essbase.properties<br>WARN [main]: - Time: Mon Feb 12 08:53:25 CET 2007,essbase.properties: essbase.properties<br>domain.db location: ./domain.db<br>WARN [main]: - Time: Mon Feb 12 08:53:25 CET 2007, domain.dblocation: ./domain.db<br>WARN [main]: - Time: Mon Feb 12 08:53:25 CET 2007,cluster.monitor.interval : 30</p><p>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: sign on (from user Administrator session number 5178)<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: get my analytics mode (from user Administrator sessionnumber 5178)<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: (from user '**aps_profile is Enabled**' session numberfalse)<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: connect to olap service (from user Administrator sessionnumber 5178)<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: (from user '**aps_profile is Enabled**' session numberfalse)<br>Connection to Analyic server '10.130.60.78' was successful.<br>INFO [main]: - Time: Mon Feb 12 08:53:25 CET 2007,<br>[Mon Feb 12 08:53:25 CET 2007] - Service using EMBEDDED<br>Request: sign off (from user Administrator session number 5178)<br>Process exited with exit code 0.<br></p><p> </p><p><span style=" text-decoration: underline;"><b>Build 305 (whichdoes not work ok)</b></span></p><p>Java(TM) 2 Runtime Environment, Standard Edition (build1.4.2_06-b03)<br>Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007, AnalyticProvider Services - Release 9.3.0.0 Build 305<br>Copyright (c) 1991-2006 Hyperion Solutions Corporation. All rightsreserved.<br>connection mode : EMBEDDED<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007, connection mode: EMBEDDED<br>essbase.properties: essbase.properties<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007,essbase.properties: essbase.properties<br>domain.db location: ./domain.db<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007, domain.dblocation: ./domain.db<br>WARN [main]: - Time: Mon Feb 12 08:54:28 CET 2007,cluster.monitor.interval : 30</p><p>INFO [main]: - Time: Mon Feb 12 08:54:28 CET 2007,<br>[Mon Feb 12 08:54:28 CET 2007] - Service using EMBEDDED<br>Request: sign on (from user Administrator session number 68529)<br>INFO [main]: - Time: Mon Feb 12 08:54:28 CET 2007,<br>[Mon Feb 12 08:54:28 CET 2007] - Service using EMBEDDED<br>Request: get my analytics mode (from user Administrator sessionnumber 68529)<br>INFO [main]: - Time: Mon Feb 12 08:54:28 CET 2007,<br>[Mon Feb 12 08:54:28 CET 2007] - Service using EMBEDDED<br>Request: connect to olap service (from user Administrator sessionnumber 68529)<br>Error: Cannot connect to olap service. null<br>INFO [main]: - Time: Mon Feb 12 08:54:28 CET 2007,<br>[Mon Feb 12 08:54:28 CET 2007] - Service using EMBEDDED<br>Request: sign off (from user Administrator session number68529)<br>Process exited with exit code 1.</p>
-
How to use the user and role API's and where to use it
Hi All,
I have configured SSO for my UCM11g. Now my application authenticates through the Oracle SSO login page. Currently it is working with SQL authenticator.
Now, i have to use LDAP authenticator. when i will configure the LDAP authenticator, i have to use the user and role API's to fetch the user profile information from LDAP. i have got the API's which will be used to fetch the respected information, but i am not getting as where i will write those java programs and how this API will be used in my application. what settings i need to do on it so that application uses the API's. ?
Please can anyone help me on this.
thanks,
SaurabhHi, Mithu,
Thanks a lot for your help in advance.
I have carefully read the document: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6b66d7ea-0c01-0010-14af-b3ee523210b5.
Now, I think I have to set the processor of every actions in every process if I use the GP for processing the workflow.
I am better to hope that I can set the processor to the role for every actions in every process in the runtime through get the organizational structure in the WDA(webdynpro for java or webdynpro for java). Thus, the customer don't set the processor to the role for every action in every process when runing in the GP. I don't know how to do this.
Whether the function is not supported in the GP? If so, I have to config two organizational structure: in the R/3 and in the Portal. I don't think our customer don't receipt this solution.
Do you give me some hints? Thanks a lot. My email: [email protected]
Thanks again.
Thanks & Regards,
Tao -
How to Use the Scalable Vector Graphics API (JSR 226)
im doin an Application with Maps and locations...
i need 2 use the Scalable Vector Graphics API (JSR 226)..
can anyone plz guide me to get it and use the API.. Im using netBeans 5.0
it will be great help :)
Regards
Muhammedh aka MNMThanks Rohan :)
i did read some stuff from the URLs u gav me :)
and I manage 2 solve the prob i had :) (Thank God)
1. downloaded latest version of netBeans (5.5)
2. Java SDK 6 :D...
3. the key thing: Wireless tool kit for CLDC 2.5 Beta
now when u create a project make sure u set the above given tool kit :)
when u set it.. u get an option 2 select the APIs frm a List.. Check on SVG API :)...
Other APIs Such as,
* wireless Messaging API
* Location API
and many more...
Cheers 2 Every1 :)
regards
Muhammedh -
Could someone post some sample soap for using the WS 2.0 api?
could someone post some sample soap for using the WS 2.0 api?
I need the actionheader as well. I don't care the object or the action, just need a sample...You can throw a javax.xml.ws.soap.SOAPFaultException. https://jax-ws.dev.java.net/nonav/jax-ws-20-fcs/api/javax/xml/ws/soap/SOAPFaultException.html
-
Searching using the Library Filter
I have two questions:
1: When I did a search for "lark", I found meadow lark, horned lark, and lark sparrow images. But, it also brought up a thousand "Clarks" nutcrackers. What is the command to bring up only images that exactly match the keyword (lark)?
2: It is very apparent that LR is capable of doing some very sophisitcated searchs using the Library Filters, but where do you find detailed descriptions of this information? (lacking a manual or any sort of context sensitive help menu)
M. Jackson1. Setting the Text search rule to "Contains Words" should eliminate the finding of "Clark"
2. Please read http://help.adobe.com/en_US/Lightroom/2.0/WSAB7B303E-081D-4617-BF47-B4B8D3D49CC3.html -
Where's the Oracle Forms Java API documentation for 11g?
Hi,
Can anyone point me in the direction of the Oracle Forms Java API documentation?
The only thing I can find is this: http://www.oratransplant.nl/1012jdapiDoc/oracle/forms/jdapi/JdapiModule.html but this seems to be for 10.1.2 and it doesn’t correspond to the version I’m using (11.1.1.3).
Help appreciated,
Donal.i couldn't find the api either however if you implement the class you will simply get compiler errors explaining what you left out.
-
Keyword Search using "Or" & "Not"
Is there anyway to use the Library Filter to generate a keyword search using an "or" statement? What if I want images that have disparate keywords and want all my images of "children" or "eagles"?
What if I want "eagles" but not "Washington State"
Thanks in advance,
ChristopherHi,
in the search bar if you select more than one keywork in a colum will work as a "OR" condiiton. a sort of
Search libray where keyword = children OR Keyword = eagle.
if you put the keyword childer in one colums and keyword eagle in other column will work as a AND statemen
Search libray where keyword = children AND Keyword = eagle.
The NOT statement can be used only in the text search !eagle = NOT eagle. -
How to use the build-in Java parser
Hi All,
I want do use the build-in Java parser. Is this possible? For example I have the following code:
package ch.fhnw;
import javax.tools.*;
public class JavacExample {
* @param args
public static void main(String[] args) {
JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
String arguments = "./src/ch/fhnw/JavacExample.java";
int rc = javac.run(null , null, null, "-verbose", arguments);
System.out.println("Return value: " + rc);
}After parsing, it would be great to have an object or similar which contains the methods, arguments used by the methods, etc. The target is to extract method declarations from java files. Is there a simple way to do it without defining my own EBNF like in JavaCC? Or any other way?
Thank you for your help.
kind regards,
wolfgangYep. bootstrap your knowledge here
[http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html]
[http://forum.java.sun.com/forum.jspa?forumID=514]
Bruce -
Issue using the DBFS PL/SQL API
Hi guys,
I'm trying to use the DBFS PL/SQL APIs and create some simple functions that for example return the file size or move a file to a different path. I created a user DBFS_USER and granted DBFS_ROLE to that user. Using SQLDeveloper, when I run the following code, it works fine:
SET SERVEROUTPUT ON
DECLARE
l_props DBMS_DBFS_CONTENT_PROPERTIES_T;
l_prp dbms_dbfs_content_property_t;
l_blob BLOB;
l_item_type INTEGER;
BEGIN
DBMS_DBFS_CONTENT.getPath (
path => '/staging_area/test_dir/IAMDBFS_USER.txt',
properties => l_props,
content => l_blob,
item_type => l_item_type);
FOR x in 1..l_props.count LOOP
l_prp := l_props(x);
if (l_prp.propname = 'std:length') then
DBMS_OUTPUT.put_line(l_prp.propname || ' : ' || l_prp.propvalue);
end if;
END LOOP;
END;
However, when I try to put it in a package, I get the error message "Error(415,10): PLS-00201: identifier 'DBMS_DBFS_CONTENT_PROPERTY_T' must be declared" while trying to compile. This is what my package and its body looks like:
create or replace
PACKAGE MY_DBFS_PKG IS
Function GetFileLength
(P_FILE_PATH IN Varchar2
,P_ErrMsg OUT Varchar2)
Return Number;
END MY_DBFS_PKG
Body:
create or replace
PACKAGE BODY MY_DBFS_PKG IS
FUNCTION GetFileLength(
P_FILE_PATH IN VARCHAR2 ,
P_ErrMsg OUT VARCHAR2)
RETURN NUMBER
IS
l_return NUMBER;
l_props DBMS_DBFS_CONTENT_PROPERTIES_T;
l_prop DBMS_DBFS_CONTENT_PROPERTY_T;
l_blob BLOB;
l_item_type INTEGER;
BEGIN
l_Return := 0;
P_ErrMsg := NULL;
DBMS_DBFS_CONTENT.getPath ( path => p_file_path, properties => l_props, content => l_blob, item_type => l_item_type);
FOR x IN 1..l_props.count
LOOP
l_prop := l_props(x);
IF (l_prop.propname = 'std:length') THEN
l_Return := l_prop.propvalue;
EXIT;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
l_Return := NVL(SQLCODE, -1);
p_ErrMsg := SQLERRM;
RETURN l_return;
END GetFileLength;
END MY_DBFS_PKG;
Am I missing an extra grant somewhere? Or have I missed a declaration in the package or package body?
I am not a DB person so pardon the probably inefficient loop to find the length or wrong declaration somewhere. I'm open to suggestions/recommendations but want to use the DBFS PL/SQL API as I need other functions out of it.
Thanks very much in advance.
CappaHi guys,
I'm trying to use the DBFS PL/SQL APIs and create some simple functions that for example return the file size or move a file to a different path. I created a user DBFS_USER and granted DBFS_ROLE to that user. Using SQLDeveloper, when I run the following code, it works fine:
SET SERVEROUTPUT ON
DECLARE
l_props DBMS_DBFS_CONTENT_PROPERTIES_T;
l_prp dbms_dbfs_content_property_t;
l_blob BLOB;
l_item_type INTEGER;
BEGIN
DBMS_DBFS_CONTENT.getPath (
path => '/staging_area/test_dir/IAMDBFS_USER.txt',
properties => l_props,
content => l_blob,
item_type => l_item_type);
FOR x in 1..l_props.count LOOP
l_prp := l_props(x);
if (l_prp.propname = 'std:length') then
DBMS_OUTPUT.put_line(l_prp.propname || ' : ' || l_prp.propvalue);
end if;
END LOOP;
END;
However, when I try to put it in a package, I get the error message "Error(415,10): PLS-00201: identifier 'DBMS_DBFS_CONTENT_PROPERTY_T' must be declared" while trying to compile. This is what my package and its body looks like:
create or replace
PACKAGE MY_DBFS_PKG IS
Function GetFileLength
(P_FILE_PATH IN Varchar2
,P_ErrMsg OUT Varchar2)
Return Number;
END MY_DBFS_PKG
Body:
create or replace
PACKAGE BODY MY_DBFS_PKG IS
FUNCTION GetFileLength(
P_FILE_PATH IN VARCHAR2 ,
P_ErrMsg OUT VARCHAR2)
RETURN NUMBER
IS
l_return NUMBER;
l_props DBMS_DBFS_CONTENT_PROPERTIES_T;
l_prop DBMS_DBFS_CONTENT_PROPERTY_T;
l_blob BLOB;
l_item_type INTEGER;
BEGIN
l_Return := 0;
P_ErrMsg := NULL;
DBMS_DBFS_CONTENT.getPath ( path => p_file_path, properties => l_props, content => l_blob, item_type => l_item_type);
FOR x IN 1..l_props.count
LOOP
l_prop := l_props(x);
IF (l_prop.propname = 'std:length') THEN
l_Return := l_prop.propvalue;
EXIT;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
l_Return := NVL(SQLCODE, -1);
p_ErrMsg := SQLERRM;
RETURN l_return;
END GetFileLength;
END MY_DBFS_PKG;
Am I missing an extra grant somewhere? Or have I missed a declaration in the package or package body?
I am not a DB person so pardon the probably inefficient loop to find the length or wrong declaration somewhere. I'm open to suggestions/recommendations but want to use the DBFS PL/SQL API as I need other functions out of it.
Thanks very much in advance.
Cappa -
Extract image and Features from the Catalog via JAVA API
Hello,
I would like to Extract image from the Catalog via JAVA API, Can anybody help on that? I also tried to extract the Features field form the Catalog but results in the error "Features field not found" Any ideas what could have wrong?
Many thanks,
DharmiHello,
Can anybody tell me where i can find the latest JAVAAPI reference guide? I found the one for MDM 5.5 SP 1 but that also refers to the last parameter of the CatalogCache.Init as int and not string.
I looked up in service.sap.com/instguides -> SAP Netweaver -> Release 4 -> Installation and there only following 3 files are there for MDM 5.5 SP2
MDM 5.5 SP02 - Configuration Guide SAP MDM
MDM 5.5 SP02 - Installation Guide SAP MDM
MDM 5.5 SP02 ERP-MDM Field Mapping and Check Tables
Regards,
Dharmi
Message was edited by: Dharmi Tanna
Message was edited by: Dharmi Tanna -
We encountered a problem during use the Configtool access JAVA engine.
We encountered a problem during use the Configtool access JAVA engine.
Our environment of system as below:
HardWard: IBM i570
OS: IBM as/400 V5E3
DB: DB2/400
Application system:SAP XI 3.0
The problem we encountered as below:
Our company used XI 3.0 SR1 for exchange data between SAP R/3 and no-sap system.For now,we wanna create a backup system(for
offline recovery),so we backup the XI product system throught entiry system save in AS/400(we stopped the XI system before
save process start).And following,we restored from the tape that we save from XI product system to the new backup system(they
are whole different paratition),but the problem is coming.Describe as following item:
1. The application seem to can be started but the java node always restart circularly(We have 4 java node now),I think
because of different of hardware configure(between XI product and Backup system) and lack of hardware resource.(XI prduction
have 5 CPUs and 22G Mem,Backup system have 2 CPUs and 16G MEM ).Therefore we wanna decrease the number of java nodes for
start application in backup system(throught configtool).
2. We wanna use configtool to decrease the java nodes for start backup system.But we encountered a problem during running the
configtool ,the information of prompt dialog as following:
Error occurred while working with Configuration (Scanning).
Msg:Error while connecting to DB.
We also see the system.log that below the directory of usr\sap\PXI\DVEBMGS00\j2ee\configtool,and found some error as
following text:
#1.5#C0000A0008A8000000000000017A906E000423BFFC7246E0#1165207387826#/System/Configuration/Logging##com.sap.tc.logging.APILogg
er.LogController[addLog()]#######Thread[main,5,main]##0#0#Info##Java#TC_LOGGING_CONFIGURATION_NEW_ITEMS
[C0000A305666000000000002018FB1F70003D67C779ECE88]##The () has been added to the !#3#Log#.
system.log#/System#
#1.5#C0000A0008A8000000000001017A906E000423BFFC73A670#1165207388006#/System/Server##com.sap.engine.core.configuration#######T
hread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store
Z:
sapmnt
PXI
global
security
lib
tools
iaik_jce_export.jar#
#1.5#C0000A0008A8000000000002017A906E000423BFFC73CD80#1165207388016#/System/Server##com.sap.engine.core.configuration#######T
hread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store
Z:
sapmnt
PXI
global
security
lib
tools
iaik_jsse.jar#
#1.5#C0000A0008A8000000000003017A906E000423BFFC73CD80#1165207388016#/System/Server##com.sap.engine.core.configuration#######T
hread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store
Z:
sapmnt
PXI
global
security
lib
tools
iaik_smime.jar#
#1.5#C0000A0008A8000000000004017A906E000423BFFC73CD80#1165207388016#/System/Server##com.sap.engine.core.configuration#######T
hread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store
Z:
sapmnt
PXI
global
security
lib
tools
iaik_ssl.jar#
#1.5#C0000A0008A8000000000005017A906E000423BFFC73CD80#1165207388016#/System/Server##com.sap.engine.core.configuration#######T
hread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store
Z:
sapmnt
PXI
global
security
lib
tools
w3c_http.jar#
#1.5#C0000A0008A8000000000006017A906E000423BFFC9C25A0#1165207390660#/System/Configuration/Logging##com.sap.tc.logging.APILogg
er.LogController[setResourceBundleName(String resourceBundleName)]#######Thread[main,5,main]
##0#0#Info##Java#TC_LOGGING_CONFIGURATION_IS_CHANGED[C0000A305666000000000000018FB1F70003D67C779CD2B8]##The for the
has been changed from to )!#5#resource bundle
name#LogController#com.sap.security.core.server.secstorefs.SecStoreFS#<null>#com.sap.security.core.server.secstorefs.SecStore
FSResources#
#1.5#C0000A0008A8000000000007017A906E000423BFFC9C4CB0#1165207390670#/System/Configuration/Logging##com.sap.tc.logging.APILogg
er.LogController[setResourceBundleName(String resourceBundleName)]#######Thread[main,5,main]
##0#0#Info##Java#TC_LOGGING_CONFIGURATION_IS_CHANGED[C0000A305666000000000000018FB1F70003D67C779CD2B8]##The for the
has been changed from to )!#5#resource bundle
name#LogController#/System/Security/SecStoreFS#<null>#com.sap.security.core.server.secstorefs.SecStoreFSResources#
#1.5#C0000A0008A8000000000008017A906E000423BFFCAC7D38#1165207391731#/System/Server##com.sap.engine.core.configuration#######T
hread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###OpenSQLDataSource successfully created with secure
store.#
#1.5#C0000A0008A8000000000009017A906E000423BFFCDA3070#1165207394726#/System/Configuration/Logging##com.sap.tc.logging.APILogg
er.LogController[setResourceBundleName(String resourceBundleName)]#######Thread[main,5,main]
##0#0#Info##Java#TC_LOGGING_CONFIGURATION_IS_CHANGED[C0000A305666000000000000018FB1F70003D67C779CD2B8]##The for the
has been changed from to )!#5#resource bundle
name#LogController#/System/Database/sql/jdbc#<null>#com.sap.sql.log.OpenSQLResourceBundle#
#1.5#C0000A0008A800000000000A017A906E000423BFFCDB41E0#1165207394796#/System/Database/sql/jdbc##com.sap.sql.jdbc.NativeConnect
ionFactory#######Thread[main,5,main]
##0#0#Error#1#com.sap.sql.jdbc.NativeConnectionFactory#Java#com.sap.sql_0002#com.sap.sql.log.OpenSQLResourceBundle#SQL error
occurred on connection : code={0,number,integer}, state="", message="".#5#-99999#08001#The application requester
cannot establish the connection. (XIPRD)#jdbc:as400://XIPRD/SAPPXIDB;transaction isolation=read uncommitted;data
truncation=true;date format=jis;time format=jis;sort=hex;hold input locators=true;hold statements=true;cursor
hold=false#<null>#
The "SQL error occurred on connection" happened during start run configtool.
We don't know how to solve this problem.
ThanksI am unable to start my configtool.bat to administer JVM memory settings for my J2EE.
Wait......
Thanks -
How use the jtable in java applete
hi master
sorry i again Disturb you
sir pleae give me idea how i use the jtable in java applete
please send me code
thank's
aamirHi,
see http://www.exampledepot.com/
Frank -
Replication of Berkeley DB Xml Edition with the help of JAVA API
hi,
i am trying to replicate berkeley DB to 2 other replicas.with the help of small program which along with its documentation(of chapter 3). And i'm using java API for the same(specifically replication framework program.)
All necessary files are get created at host side like log files, dll files, db files. But at replica(client) side nothing get created. Host and clients are placed in the same network.
But unfortunately its not working. don't know the reason. And its not giving any sort of error. And i dont know how to go ahead. Or is there any other way should i proceed with.
So could you help me out to get rid of this problem.
ThanksWhat compiler are you running?
See this message and thread:
Re: Problem after update to 2.3.8
It may be necessary to apply the -fno-strict-aliasing flag to the Berkeley DB Java library as well.
Regards,
George
Maybe you are looking for
-
Remote Control doesn't launch Media Center on Pavilion dv9535nr
Hi, is not big deal, but it's kinda annoying, the remote control (image) doesn't launch Windows Media Center with the top right button (green with Windows logo), I don't know exactly when, but it stopped launching Windows Media Center, and my OS (Win
-
WLC 5508 rebooted but still showing high uptime
Hi all, I had to reboot our production WLC 5508 last night to apply a new adder license, which increased our AP count by 25. We run a DMZ mobility controller alongside the primary controller, which handles our mobile/guest WLANs using a Mobility Anch
-
First, I want to thank all of you who answered to any of my questions, I appreciate it and it helps me to progress a lot. My actual question is about reading in a loop. I read a string (Visa read) of a specified lenght of bytes from my serial port. T
-
What are the contents in technical specifications
What are the contents in technical specifications could u plz explain clearly
-
Hello im thinking of buying a Mydaq but im not sure if I can use for what I need it. In class IM not allowed to use the Ni-Elvis 2 board unless a TA is present and if i run out of time theres no way for me to make up the lab. so i have a breadboard a