O'Reilly Building oracle XML applications example
When I try to submit xml-tree from example 12-22 via insert-request I get this message:
Cannot insert NULL into ("SCOTT","EMP","EMPNO")
Does anyone know why?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
Have you created the object view and the INSTEAD OF trigger on the view?<HR></BLOCKQUOTE>
The problem is solved. I trimed all whitespaces and tabs from xml.
Thanks anyway
null
Similar Messages
-
Building Oracle XML Application Book....
Has anyone purchased the 'Building Oracle XML Applications' book and do they have any opinions on it? Useful?
It it currently orderable, and is planned to ship by September 31st/October 1st, just in time for the Oracle OpenWorld conference.
The full table of contents (which eventually should be put also up on the O'Reilly Site) is:
Preface
Audience for This Book
Which Platform and Version?
Structure of This Book
Chapter Summaries
About the Examples
About the CD-ROM
Conventions Used in this Book
Comments and Questions
Acknowledgements
Part 1: XML Basics
Chapter 1: Introduction to XML
What Is XML?
What Can I Do With XML?
Why Should I Use It?
What XML Technology Does Oracle Provide?
Chapter 2: Working with XML
Creating and Validating XML
Modularizing XML
Searching XML with XPath
Part 2: Oracle XML Fundamentals
Chapter 3: Combining XML and Oracle
Hosting the XML FAQ System on Oracle
Serving XML in Any Format
Acquiring Web-Based XML Content
Chapter 4: Using JDeveloper for XML Development
Working with XML, XSQL, and JSP Files
Working with Database Objects
Using JDeveloper with Oracle XDK Components
Chapter 5: Processing XML with PL/SQL
Loading External XML Files
Parsing XML
Searching XML Documents with XPath
Working with XML Messages
Producing and Transforming XML Query Results
Chapter 6: Processing XML with Java
Introduction to Oracle8i JServer
Parsing and Programmatically Constructing XML
Searching XML Documents in Memory Using XPath
Working with XML Messages
Producing and Transforming XML Query Results
Chapter 7: Transforming XML with XSLT
XSLT Processing Mechanics
Single-Template Stylesheets
Understanding Input and Output Options
Improving Flexibility with Multiple Templates
Chapter 8: Publishing Data with XSQL Pages
Introduction to XSQL Pages
Transforming XSQL Page Results with XSLT
Troubleshooting Your XSQL Pages
Chapter 9: XSLT Beyond the Basics
Using XSLT Variables
The Talented Identity Transformation
Grouping Repeating Data Using SQL
Sorting and Grouping Repeating Data with XSLT
Chapter 10: Generating Datagrams with PL/SQL
Programmatically Generating XML Using PL/SQL
Automatic XML Generation with DBXML
Chapter 11: Generating Datagrams With Java
Generating XML Using Java
Serving XML Datagrams Over the Web
Automatic XML from SQL Queries
Chapter 12: Storing XML Datagrams
Overview of XML Storage Approaches
Loading Datagrams with the XML SQL Utility
Storing Posted XML Using XSQL Servlet
Inserting Datagrams Using Java
Chapter 13: Searching XML with interMedia
Why Use interMedia Text?
What is interMedia Text?
The interMedia Text Query Language
Handling Heterogeneous Doctypes
Handling Doctype Evolution
Advanced interMedia Text
Chapter 14: Advanced XML Loading Techniques
Storing Datagrams in Multiple Tables
Building an XMLLoader Utility
Creating Insert Transformations Automatically
Part 3: Oracle XML Applications
Chapter 15: Using XSQL as a Publishing Framework
Overview of All XSQL Pages Facilities
Additional XML Delivery Options
Chapter 16: Extending XSQL and XSLT with Java
Developing Custom XSQL Actions
Integrating Custom XML Sources
XSLT Extension Functions
Chapter 17: XSLT-Powered Portals and Applications
XSLT-Powered Web Store
Personalized News Portal
Online Discussion Forum
Part 4: Appendices
Appendix 1: XML Helper Packages
Installing the XML Helper Packages
Source Code for the XML Helper Packages
Appendix 2: Installing Oracle XSQL Servlet
Installing
Appendix 3: Conceptual Map to XML Family
Appendix 4: Quick References -
Having trouble with xml package in "Building Oracle Xml Applications"
I have modified the xml package found in Building Oracle XML Applications chapter 5 to exclude everything but the CLOB function, see Package below. When compiling the package body I am getting the following error.
SQL> @xml_body
35 /
Warning: Package Body created with compilation errors.
SQL> show errors
Errors for PACKAGE BODY XML:
LINE/COL ERROR
19/5 PL/SQL: Statement ignored
19/15 PLS-00382: expression is of wrong type
SQL>
The error occurs at this line in the xml_body package.
retDoc := xmlparser.getDocument(parser);
I am new to Oracle and any help would be appreciated.
CREATE OR REPLACE PACKAGE xml AS
-- Parse and return an XML document
FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument;
-- Free the memory used by an XML document
PROCEDURE freeDocument(doc xmldom.DOMDocument);
END;
CREATE OR REPLACE PACKAGE BODY xml AS
parse_error EXCEPTION;
PRAGMA EXCEPTION_INIT(parse_error,-20100);
-- Parse functions parse an XML document and return a handle to
-- the in-memory DOM Document representation of the parsed XML.
-- Call freeDocument() when you're done using the document returned
-- by the function.
FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument IS
retDoc xmldom.DOMDocument;
parser xmlparser.Parser;
BEGIN
IF xml IS NULL THEN RETURN NULL; END IF;
parser := xmlparser.newParser;
xmlparser.parseCLOB(parser,xml);
retDoc := xmlparser.getDocument(parser);
xmlparser.freeParser(parser);
RETURN retDoc;
EXCEPTION
WHEN parse_error THEN
xmlparser.freeParser(parser);
RETURN retDoc;
END;
-- Free the Java objects associated with an in-memory DOM tree
PROCEDURE freeDocument(doc xmldom.DOMDocument) IS
BEGIN
xmldom.freeDocument(doc);
END;
END;
nullI have modified the xml package found in Building Oracle XML Applications chapter 5 to exclude everything but the CLOB function, see Package below. When compiling the package body I am getting the following error.
SQL> @xml_body
35 /
Warning: Package Body created with compilation errors.
SQL> show errors
Errors for PACKAGE BODY XML:
LINE/COL ERROR
19/5 PL/SQL: Statement ignored
19/15 PLS-00382: expression is of wrong type
SQL>
The error occurs at this line in the xml_body package.
retDoc := xmlparser.getDocument(parser);
I am new to Oracle and any help would be appreciated.
CREATE OR REPLACE PACKAGE xml AS
-- Parse and return an XML document
FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument;
-- Free the memory used by an XML document
PROCEDURE freeDocument(doc xmldom.DOMDocument);
END;
CREATE OR REPLACE PACKAGE BODY xml AS
parse_error EXCEPTION;
PRAGMA EXCEPTION_INIT(parse_error,-20100);
-- Parse functions parse an XML document and return a handle to
-- the in-memory DOM Document representation of the parsed XML.
-- Call freeDocument() when you're done using the document returned
-- by the function.
FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument IS
retDoc xmldom.DOMDocument;
parser xmlparser.Parser;
BEGIN
IF xml IS NULL THEN RETURN NULL; END IF;
parser := xmlparser.newParser;
xmlparser.parseCLOB(parser,xml);
retDoc := xmlparser.getDocument(parser);
xmlparser.freeParser(parser);
RETURN retDoc;
EXCEPTION
WHEN parse_error THEN
xmlparser.freeParser(parser);
RETURN retDoc;
END;
-- Free the Java objects associated with an in-memory DOM tree
PROCEDURE freeDocument(doc xmldom.DOMDocument) IS
BEGIN
xmldom.freeDocument(doc);
END;
END;
null -
Building Oracle XML Applications - 2nd Edition
Steve,
Do you have plans to release a second edition of your book... I'm specifically wondering, if it is on the cards, will it incorporate the new features of Oracle9i and the latest XDK?I have plans to update the book (or produce a smaller, focused companion book) covering all the new XML database features in the Oracle9i Release 2, but at the moment I'm working on a BC4J Developer's Guide for inclusion with the Oracle JDeveloper product, so I cannot guess at a timeframe yet...
-
Building Oracle ADF Applications Workshop
I have finished going through the "Building Oracle ADF Applications: Workshop"
from the following link:
http://www.oracle.com/technology/obe/obe9051jdev/ide1012/adfworkshop/buildingadfapplicationsworkshop.htm
Hopefully that is sufficient for the doc writer to locate the context of my
comments. If not, let me know and I'll provide additional information.
I grouped all of these together as one big comment. If you want it in a
different format, again, let me know.
Prior starting the workshop I printed out the entire document which resulted in
51 pages of output. In each comment, except for the first general comment, I
list the section name, step number and my page number which should be enough to
uniquely identify the area that the comment relates to. My suggestions start
out with "It would be nice...". I numbered the comments so I could have
comments refer to each other.
(1) One of the things I really liked was the "If you want to see a
demonstration of these steps, click here" links. Sometimes the discussion
was not precise so being able to see the actual usage worked well. It would
be nice if there were more of these in the workshop.
(2) "Building the Basic Page Flow", step 2, page 13.
I had some trouble with this because it wasn't clear how one changes the
DataPage's name. I used the property sheet and did it wrong, resulting in
an error. I had to consult the "If you what to see..." link to determine
how to do this correctly.
It would be nice if there were a paragraph before "When you are done"
saying something like:
To change the name of a DataPage just click on the icon's label and
enter the new value, starting with the leading slash.
(3) "Connecting the Pages", step 9, page 21.
This step has one switch to the Source editor view to make a change. This
change can also be made in the Design view.
It would be nice to stay in the Design view. The suggested wording for this
is:
In the Design view you can change the Edit button link by clicking on
the Edit button and pressing the left arrow (<--) key once on the
keyboard. The Property Inspector will be in an <A> element. Edit the
href property by appending the following:
&event=Edit
(4) "Connecting the Pages", step 10, page 22.
The first time I had trouble drawing the links. A bit more discussion on
how to draw the links with corners would be nice. One of the troubles was
that I would edit one link and another (or all of them) would suddenly
change to simple vertical links (no corners). The link lines were
separated, but the link names were displayed making it more difficult than
necessary to tell which link line went with which link name.
(5) "Adding a Create Function", step 4, page 24.
I have the same comment on this step as I did in comment (3).
(6) "Creating Session Variables with onEvent() methods", step 2, page 27.
The last paragraph describes how JDeveloper will prompt you to enter an
import statement. The comment I wrote on that page was:
Cool!
It's nice that JDeveloper handles this booking task.
(7) "Building a Message Stack with a findForward() method", step 1, page 28.
In the second paragraph it's not clear what the context is. It would be
nice if the second paragraph would start out with:
In struts-config.xml, right-click ...
(8) "Building a Message Stack with a findForward() method", step 6, page 30.
This code fragment at the end of this step has all lines starting in column
1. It would be nice if this was indented so it could be followed with less
effort. The same is true for the other code fragments in this section.
(9) "Building a Message Stack with a findForward() method", step 12, page 32.
I wrote a simple Java program that compared a String variable to a string
literal. In all cases using == to compare returned false, while .equals()
worked correctly. I was using Java 1.4.2_06_b03. Even if Java 1.5 supports
converting the == between strings to equals(), it would be nice if the
comparisons to the "type" variable used the .equals() method instead of ==,
so that those of us still using Java 1.4 would have properly working code.
Note that == in 1.4 compares the hash values while equals() looks at the
contents.
(10) "Enabling the Delete Confirmation Page", step 5, page 36.
The last sentence of the first paragraph contains the phrase:
if there are errors, build the ActionMessage object.
It would be nice if this contained an extra word as in:
if there are no errors, build the ActionMessage object.
(11) "Enabling the Delete Confirmation Page", step 6, page 36.
Line 12 (or 13 if you count blank lines) is storing a value in the request
object. It would be nice to have a discussion in this step instead of
having to wait until section "Intercepting the Middle-Tier Message", step
8, page 42 before we know what this is all about.
(12) "Overriding the findForward() Method", step 1, page 44.
It appears that the call to the super.findForward method is missing. It
would be nice if the following were inserted before the closing curly
brace:
super.findForward(actionContext);
(13) "Overriding the findForward() Method", step 9, page 46.
Near the end of this step it mentions the imports that are added. It
appears that there is a missing import statement. If this is correct, it
would be nice to also include the following import:
import oracle.adf.controller.struts.actions.DataActionContext;
(14) "Overriding the findForward() Method", step 10, page 46.
My diagram doesn't look like this. The "Edit" link between /browseCustomers
and /editCustomers should be "Commit". The "Cancel" link from
/editCustomers back to itself shouldn't be there. The "Commit" link from
/sure to /browseCustomers should be "Cancel". Compare this with the diagram
in section "Creating a Delete Confirmation Page and a Forward", step 5,
page 25.
(15) "Internationalizing Field Labels", step 3, page 48.
This is another case where the context is not clear. It would be nice if
the following was added to the first paragraph:
In the browseCustomers page,
(16) "Internationalizing Field Labels", step 10+, page 49.
Everything is internationalized except for the buttons. How does one
internationalize them?
(17) "Conditionally Displaying a Field", step 1, page 49.
The last sentence says "The result should look like the following:". If one
were following this workshop from front to back then what should be shown
is the internationalized version of this page.
(18) "Conditionally Displaying a Field", step 5, page 50. Bug?
When I look at the Source view of editCustomers.jsp the <INPUT> element has
a property setting of disabled="true". When I run the application and look
at the HTML source used by the browser, that same <INPUT> element has a
property setting of disabled="disabled". It works, but isn't that somewhat
redundant? I recommend that the source code should have the disabled
property setting as it appears in the Source view.Hi Jean,
Can you please provide the document part number and book title where you have seen this errors? This way I can forward this to the doc writer.
If this is not a document issue, please try the Members Feedback Forum. Community Feedback (No Product Questions)
Thanks -
Workshop Building Oracle ADF Applications
Hi all
i tried the Building Oracle ADF Applications: Workshop and still have a problem:
If i navigate from BrowserCustomers.do to eg. EditCustomers this works fine. In the EditCustomers i have my Cancel Button that implements the event_rollback. If i run the application in the IE navigate to EditCustomers an click on Cancel button a go back to the BroseCustomers view. But although i see the context of the BrowseCusomers view the url-adresslist gives me /CustomerMaintenace-ViewController-context-root/EditCustomers.do.
So if i click on Button NextSet in BrowseCustomers view i am again in the EditCustomers.
I checked several times the code with the one in the workshop but didnot find anything wrong.
Any ideas ??I got the same problem.
I think its related to the Edit link, wich is :
a href="index.jsp.do?event=setCurrentRowWithKey&Arg0=<c:out value='${Row.rowKeyStr}' />&event=Edit"
The probleme come from the fact that there's two parameter name event.
Anyone knows a right way to select a row and forward to the edit page in the same link ??
thx for your help
Jeff
Message was edited by:
user536516 -
Example 5-11 in Steve Muench's Oracle-XML book
Hi,
Anyone who studied the book Building Oracle XML Applications by Steve Muench (O'Reilly), could clarify this query. When I tried to execute Example 5-11:Test,Extract and Retrieve an XPath Expression Value (page 132) I get the following error:
PLS-00307: too many declarations of 'SELECTNODES' match this call (complete source code given at the end of this message).
Could you please explain why this error is occurring.
Best wishes,
Balu
Code
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 doc xmldom.DOMDocument;
3 approvers xmldom.DOMNodeList;
4 PROCEDURE p(msg VARCHAR2, nl BOOLEAN := TRUE) IS BEGIN
5 dbms_output.put_line(msg);IF nl THEN dbms_output.put(CHR(10)); END IF;
6 END;
7 FUNCTION yn(b BOOLEAN ) RETURN VARCHAR2 IS
8 BEGIN IF b THEN RETURN 'Yes'; ELSE RETURN 'No'; END IF; END;
9 BEGIN
10 doc := xml.parse(BFileName('XMLFILES','claim77804.xml'));
11
12 p('What is the value of the Policy number for this claim?');
13 p( xpath.valueOf(doc,'/Claim/Policy') );
14
15 p('Does this claim have any settlement payments over $500 approved by JCOX?');
16 p(yn(xpath.test(doc,'//Settlements/Payment[. > 500 and @Approver="JCOX"]')));
17
18 -- Demonstrate Saving and Re-getting the XML document
19 xmldoc.save('claim77804',doc);
20 doc := xmldoc.get('claim77804');
21
22 p('What is XML document fragment contained by the <DamageReport> element?');
23 p(xpath.extract(doc,'/Claim/DamageReport'));
24
25 p('Who approved settlement payments for this claim?');
26 approvers := xpath.selectNodes(doc,'/Claim/Settlements/Payment');
27 FOR j IN 1..xmldom.getLength(approvers) LOOP
28 p(xpath.valueOf(xmldom.item(approvers,j-1),'@Approver'),nl=>FALSE);
29 END LOOP;
30 xml.freeDocument(doc);
31 END;
32
33 /
DECLARE
ERROR at line 1:
ORA-06550: line 26, column 16:
PLS-00307: too many declarations of 'SELECTNODES' match this call
ORA-06550: line 26, column 3:
PL/SQL: Statement ignoredI tried the wayback machine, but unfortunately, it doesn't cache the SWF files either :( I do have a copy of some (ok one) of Steve's old videos (the one that shows how to do a dropdown list in an editable table, back before it was easy to do), but unfortunately, none of the search ones.
John -
Recommend Oracle XML Book?
Can anyone recommend an good Oracle XML book. I've checked out "Oracle XML Applications" by O'Reily and have heard good things about it. But it's 3 1/2 years old and doesn't discuss Oracle 9i features and no mention of XML Schema (didn't exist at that point I guess).
Thanks for any advice!!!Hi,
Some of the books which provide good information about Oracle and XML (with a small description) are present at the following links:
1.http://www.xml-book.com/xml-and-oracle-books.html
'Building Oracle XML Applications' by Steve Muench is a good one
Huge documentation is present free on OTN at the following link:
1. http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/nav/docindex.htm#index-XML
Have a look at them. Various basic to advance samples are also present on OTN on XML at
1. http://otn.oracle.com/sample_code/tech/xml/xmldb/content.html
2. http://otn.oracle.com/sample_code/tech/xml/content.html
Check them.
Regards,
Anupama -
The following code works fine with JDeveloper 10.1.2 with the xmlparserv2.jar file provided with JDeveloper.
=====
XSDBuilder schemaBuilder = new XSDBuilder();
URL xsdURL = new URL(schemaUrl);
XMLSchema xmlschema = (XMLSchema) schemaBuilder.build(xsdURL);
========
However when I try to put this in Oracle Application Server 10.1.2.0.2, I get the following error:
====
java.lang.NoSuchMethodError: oracle.xml.parser.schema.XSDBuilder.build
====
It seems like the oracle version is different in app server 10.1.2.0.2 that that of JDeveloper 10.1.2.
When we rename the parser, the application works BUT the Oracle Enterprise Manager does not work properly as it depends on the latest version of the parser.
Please help.
Thanks,
MadhavI am able to reproduce this problem. I have a jar file MyLib.jar which contains a class MyXmlUtils with a method called validate. This JAR file was created in JDeveloper 9.0.5.2.
Now I create a Test class in JDeveloper 10.1.2 and use the method in the JAR file and it crashes in build method. The error says "NoSuchMethod".
However if I import MyXmlUtils class in to the Test project, everything works fine.
What is going on here?
// MyLib.jar (Created in JDeveloper 9.0.5.2)
public class MyXmlUtils
public static void validate(String xml, String schemaUrl) throws Exception
XSDBuilder schemaBuilder = new XSDBuilder();
URL xsdURL = new URL(schemaUrl);
XMLSchema xmlschema = (XMLSchema) schemaBuilder.build(xsdURL);
dp.setValidationMode(XMLParser.SCHEMA_VALIDATION);
dp.setXMLSchema(xmlschema);
====
// Test project created in JDeveloper 10.1.2
import MyXmlUtils;
public class Test
public static void main(String[] args)
Test t = new Test();
try
String xml = "<Person><Name>John</Name></Person>";
String xsd = "file:\\c:\\Person.xsd";
MyXmlUtils.validate(xml, xsd);
catch (Exception e)
System.out.println(e.getMessage());
System.exit(1);
Thanks,
Madhav -
Oracle XML Publisher Template Builder 5.5
I have seen references to this word plug-in in various XML Publisher demos and presentations, but cannot find where to download the plug-in. Could anyone please provide some insight?
Thanks,
BrettBrett,
The patch number given in your reply doesn't seems to exist. Here is the patch number I found in Metalink.
Patch 4239263
Description XDO/ORACLE XML PUBLISHER TEMPLATE BUILDER PATCH 1.0.0
Product XML Publisher
Release Applications 11i
Platform or Language -------- Platforms --------Microsoft Windows (32-bit)
Last Updated 14-MAR-2005
Size 31M (32764293 bytes)
Thanks, Anbu Kuppusamy -
Oracle Fusion Application RCU error for fusionapps_Storage.xml
I am installing Fusion Application
While running RCU I have received a error for selecting Fusion Application component.
The error is
2013-01-19 23:53:43.746 ERROR rcu: oracle.sysman.assistants.rcu.backend.xmldata.handlers.RCUValidator::error: RCUValidator caught a SAXParseException.
org.xml.sax.SAXParseException: file:/C:/ptc-dn-fusion/appbase/database/rcuHome/rcu/integration/fusionapps/fusionapps_Storage.xml<Line 112, Column 17>: XML-20147: (Error) Invalid element 'DatafilesList' in content of 'TablespaceAttributes', expected closing tag.
RCU Log as follows.
2013-01-19 23:52:49.446 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: Log dir does not exist. Creating logdir:C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/log\logdir.2013-01-19_23-52
2013-01-19 23:52:49.481 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: Log file does not exist. Creating log file:C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/log\logdir.2013-01-19_23-52\rcu.log
2013-01-19 23:52:49.481 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: LOG_LEVEL_IS - NOTIFICATION:1
2013-01-19 23:52:49.482 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: HOSTNAME: PTC-DN-FUSION
2013-01-19 23:52:49.482 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: OSINFO: x86 6.0 Windows Server 2008
2013-01-19 23:52:49.482 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: JREINFO: 1.6.0_29 C:\ptc-dn-fusion\appbase\database\rcuHome\jdk\jre
2013-01-19 23:52:49.482 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: USERNAME: Administrator
2013-01-19 23:52:49.482 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: USERDIR: C:\ptc-dn-fusion\appbase\database\rcuHome\BIN
2013-01-19 23:52:49.482 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: User country: US
2013-01-19 23:52:49.482 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: User language: en
2013-01-19 23:52:49.483 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: Java class path: C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\rcu.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\share.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\help-share.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\ohj.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\orai18n-mapping.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\lib\xmlparserv2.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jdbc\lib\ojdbc6.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jdbc\lib\ojdbc5.jar;OH\jdbc\lib\ojdbc6dms.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\jewt4.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\ojdl.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\modules\oracle.odl_11.1.1\ojdl.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\SchemaVersion.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\wldb2.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\wlsqlserver.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\wlbase.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\wlutil.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\fmwgenerictoken.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\mysql-connector-java-commercial-5.1.17-bin.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\modules\mysql-connector-java-commercial-5.1.17\mysql-connector-java-commercial-5.1.17-bin.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\..\oracle_common\modules\mysql-connector-java-commercial-5.1.17\mysql-connector-java-commercial-5.1.17-bin.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\mysql-connector-java-commercial-5.1.16-bin.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\modules\mysql-connector-java-commercial-5.1.16\mysql-connector-java-commercial-5.1.16-bin.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\..\oracle_common\modules\mysql-connector-java-commercial-5.1.16\mysql-connector-java-commercial-5.1.16-bin.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\modules\oracle.dms_11.1.1\dms.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\oracle_ice.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\rcuhelppages.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\assistants\opca\jlib\opca.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\portal\jlib\ptlshare.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\ldapjclnt11.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\commons-collections-3.1.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\commons-dbcp-1.2.1.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\commons-logging.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\commons-pool-1.2.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\quartz-1.6.0.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\xml.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\jta.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\iam-platform-utils.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\iam-platform-authz-service.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\iam-features-identity.zip;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\iam-features-configservice.zip;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\jps-api.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\jps-common.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\jps-ee.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\jps-internal.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\jps-manifest.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\MicroSM.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\javax.persistence_1.0.0.0_1-0-2.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\org.eclipse.persistence_1.0.0.0_1-1-0.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\identitystore.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\jps-unsupported-api.jar;C:\ptc-dn-fusion\appbase\database\rcuHome\\jlib\pd-internal.jar
2013-01-19 23:52:49.485 NOTIFICATION rcu: oracle.sysman.assistants.common.util.LoggingManager::initialize: Java library path: C:\ptc-dn-fusion\appbase\database\rcuHome\jdk\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ptc-dn-fusion\appbase\database\rcuHome\\bin;C:\ptc-dn-fusion\appbase\oracle\product\11.2.0\dbhome_1\bin;C:\ptc-dn-fusion\appbase\database\product\11.2.0\dbhome_1\bin;E:\jdk6\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\idmu\common;C:\ptc-dn-fusion\appbase\database\product\11.2.0\dbhome_1;C:\Middleware\Oracle_IDM1\bin;C:\Middleware\Oracle_IDM1\opmn\bin;C:\Middleware\Oracle_IDM1\opmn\lib;C:\Middleware\Oracle_IDM1\perl\bin;.
2013-01-19 23:52:49.486 NOTIFICATION rcu: oracle.sysman.assistants.rcu.Rcu::initLoggingManager: RCU version:11.1.1.6.0
2013-01-19 23:52:49.486 NOTIFICATION rcu: oracle.sysman.assistants.rcu.Rcu::execute: Launching RCU.
2013-01-19 23:52:49.489 NOTIFICATION rcu: oracle.sysman.assistants.rcu.Rcu::execute: Creating InteractiveRCUModel
2013-01-19 23:52:50.019 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::<init>: DTD location : C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/config/
2013-01-19 23:52:50.019 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::<init>: ComponentInfo xml location : C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/config/ComponentInfo.xml
2013-01-19 23:52:50.019 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::<init>: Storage xml location : C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/config/Storage.xml
2013-01-19 23:52:50.019 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::<init>: DTD Validation : true
2013-01-19 23:52:50.027 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.RCUCommandLineParser::process: Processing command line ....
2013-01-19 23:52:50.137 NOTIFICATION rcu: oracle.sysman.assistants.rcu.Rcu::main: Execution Complete.
2013-01-19 23:53:42.649 NOTIFICATION rcu: oracle.sysman.assistants.common.dbutil.jdbc.JDBCEngine::connect: Connecting to database: user:sys, role:SYSDBA, connectString:(description=(address=(host=ptc-dn-fusion.ptcdnfusion.com)(protocol=tcp)(port=1521))(connect_data=(service_name=FUS1110)(server=dedicated)))
2013-01-19 23:53:43.210 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: Executing Task: Initializing repository configuration metadata
2013-01-19 23:53:43.210 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.validation.PrereqEvaluator::executePrereqTask: Prereq taskId = INIT_META_DATA.....
2013-01-19 23:53:43.345 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.handlers.ComponentInfoHandler::startElement: Curently Parsing Component : FUSION_ACTIVITIES
2013-01-19 23:53:43.346 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.handlers.ComponentInfoHandler::startElement: Curently Parsing Component : FUSION_DISCUSSIONS
2013-01-19 23:53:43.359 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::parseXmlData: XML Document: C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/config/ComponentInfo.xml is valid
2013-01-19 23:53:43.706 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.handlers.RepositoryConfigHandler::startElement: Curently Parsing Repository Config data for Component : PORTLET
2013-01-19 23:53:43.708 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::parseRepositoryConfigData: XML Document: C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/integration//portlet/portlet.xml is valid
2013-01-19 23:53:43.710 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.handlers.RepositoryConfigHandler::startElement: Curently Parsing Repository Config data for Component : ACTIVITIES
2013-01-19 23:53:43.712 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::parseRepositoryConfigData: XML Document: C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/integration//activities/activities.xml is valid
2013-01-19 23:53:43.713 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.handlers.RepositoryConfigHandler::startElement: Curently Parsing Repository Config data for Component : DISCUSSIONS
2013-01-19 23:53:43.718 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::parseRepositoryConfigData: XML Document: C:\ptc-dn-fusion\appbase\database\rcuHome\/rcu/integration//jive/jive.xml is valid
*2013-01-19 23:53:43.746 ERROR rcu: oracle.sysman.assistants.rcu.backend.xmldata.handlers.RCUValidator::error: RCUValidator caught a SAXParseException.*
org.xml.sax.SAXParseException: file:/C:/ptc-dn-fusion/appbase/database/rcuHome/rcu/integration/fusionapps/fusionapps_Storage.xml<Line 112, Column 17>: XML-20147: (Error) Invalid element 'DatafilesList' in content of 'TablespaceAttributes', expected closing tag.
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:316)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:326)
at oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager.parseStorageData(RepositoryConfigManager.java:357)
at oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager.parseXmlData(RepositoryConfigManager.java:282)
at oracle.sysman.assistants.rcu.backend.models.OptionsModel.initializeXMLAndSelectionModels(OptionsModel.java:92)
at oracle.sysman.assistants.rcu.backend.validation.StepValidator.initMetaData(StepValidator.java:1212)
at oracle.sysman.assistants.rcu.backend.validation.PrereqEvaluator.executePrereqTask(PrereqEvaluator.java:516)
at oracle.sysman.assistants.rcu.backend.task.PrereqTask.execute(PrereqTask.java:68)
at oracle.sysman.assistants.rcu.backend.task.ActualTask.run(TaskRunner.java:306)
at java.lang.Thread.run(Thread.java:662)
2013-01-19 23:53:43.747 ERROR rcu: oracle.sysman.assistants.rcu.backend.xmldata.RepositoryConfigManager::parseStorageData: XML Document has Error:true file:/C:/ptc-dn-fusion/appbase/database/rcuHome/rcu/integration/fusionapps/fusionapps_Storage.xml<Line 112, Column 17>: XML-20147: (Error) Invalid element 'DatafilesList' in content of 'TablespaceAttributes', expected closing tag.
2013-01-19 23:53:43.824 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: Execution time for Initializing repository configuration metadata : 614 milliseconds
2013-01-19 23:53:44.054 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: Executing Task: Obtain properties of the specified database
2013-01-19 23:53:44.054 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.validation.PrereqEvaluator::executePrereqTask: Prereq taskId = PREREQ_QUERY_DATABASE
2013-01-19 23:53:44.089 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: Execution time for Obtain properties of the specified database : 35 milliseconds
2013-01-19 23:53:44.279 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: Executing Task: Check requirement for specified database
2013-01-19 23:53:44.279 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.validation.PrereqEvaluator::executePrereqTask: Prereq taskId = PREREQ_GLOBAL_CHECK
2013-01-19 23:53:44.300 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: Execution time for Check requirement for specified database : 21 milliseconds
2013-01-19 23:53:44.322 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: Executing Task: Execute pre create operations
2013-01-19 23:53:44.322 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.CustomCompManager::getActionList: CustomCompManager.getActionList: CUSTOM_COMP_PRELOAD_SETUP
2013-01-19 23:53:44.329 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.AbstractCompTask::execute: ValidIf result was false. Skipping Action: oracle.ias.version.SchemaVersionUtil:utilCreateRegistryAndCopyData
2013-01-19 23:53:44.331 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.AbstractCompTask::execute: ValidIf result was false. Skipping Action: oracle.ias.version.SchemaVersionUtil:utilCreateRegistryTable
2013-01-19 23:53:44.331 NOTIFICATION rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: Execution time for Execute pre create operations : 9 milliseconds
Edited by: user13316715 on Jan 20, 2013 12:11 AMHi Subramanian,
Thanks for the response.
No i am able to create repository for the Fusion Application.
But now i am running through different problem while creating response file.
The provisional wizard automatically get exit withe Internal Error after entering Install location and setting admin password.
Can you please help me on this.
Thanks,
Dhanraj -
Upgrading Oracle XML Parser for Java v9.0.4 with Oracle Applications 11i
Guys, I applied ATG.PF.H.RUP4. In postinstall steps it is mentioned,Upgrading Oracle XML Parser for Java v9.0.4 with Oracle Applications 11i(doc-271148.1)
which says after applying patch 4038964 do the following--
AUTOCONFIG ENABLED APPLICATIONS ENVIRONMENT
If the Oracle E-Business Suite configuration files are maintained using the AutoConfig infrastructure, proceed with the following:
1. Run the AutoConfig utility.
2. Go to [JAVA_TOP].
3. Run the unzip -l appsborg2.zip | grep 9.0.4 command. If there is a file named as .xdkjava_version_9.0.4.0.0_production, which indicates that XML Parser for Java v9.0.4 is installed correctly as part of appsborg2.zip. Otherwise, run ADAdmin to regenerate the appsborg2.zip file.
4. Restart the application tier server processes such that the new version of Oracle XML Parser for Java will take effect.
but actually the patch is already applied- 4038964. How do i verify if i need to do these steps or not.
The xmlparserv2-904.zip file is already there in wrapper.classpath. of jserv.properties, forms.properties. So i think i dont need to do these steps.unzip -l appsborg2.zip | grep 9.0.4
0 04-18-03 20:10 .xdkjava_version_9.0.4.0.0_production
do i still need to do that step?No, you do not have to since "XML Parser for Java v9.0.4" is already installed as part of appsborg2.zip -
Building JAX-WS Clients for Oracle Cloud Applications
Hello,
We are looking for a tutorial on how to build JAX-WS clients for Oracle Cloud Applications using Eclipse and OEPE.
Do you know if there is any document about this, or any document that can help us on this task.
Thanks and regards,
Gustavo.A JAX-WS web service client with OEPE would be the same for a cloud service.
https://docs.oracle.com/cd/E15315_09/help/oracle.eclipse.tools.weblogic.doc/html/webservices/start.html
For developing for Oracle Cloud refer
https://apex.oracle.com/pls/apex/f?p=44785:24:100395514147349::NO::P24_CONTENT_ID%2CP24_PREV_PAGE:7026%2C2 -
Hi,
I am migrating my ejb application from weblogic to oracle 9i application server.What changes are needed to be made in code and what configuration changes are required.
In my application i use a couple of session beans wherin a session bean calls the method of the other session bean which acceses the database.I am using a jdbc thin driver for the database connection. is it possible for a session bean to call a method of another session bean which access the database??This concept works well in weblogic where the current application is running.
The problem is that while migrating the application to the orion server, it gives an OrionCMTException ...
memory leak..etc.
Could any one clarify.
Thanks in advance!!!Hi Avi and Harrison,
Cease Fire avi!!!!.First of all let me clear the issue of posting the same problem twice.Well, when i mentioned the problem the first time , i found the title session bean deployment was not right and few people would look into it as it was a common problem so i thought it would be appropriate if i mentioned the title correctly , so i posted the query again with the change in title.
Now coming to the answer for ur questions.
The platform used is MS Windows NT.
The (OC4J) version is 1.0.2.2.1.
I am not using JDeveloper.
The database is oracle 8i and i am using the thin driver.
The beans to be deployed are stateless session beans.
The client involved is a web client i.e a jsp application.
The first session bean is as follows.
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.sql.Timestamp;
import java.rmi.RemoteException;
import java.util.Date;
import javax.ejb.*;
import javax.naming.*;
import initcontext;
import PrintMessage;
import JB_B2B_ERROR_PARSER;
* @stereotype SessionBean
* @homeInterface DB_UTILITYHome
* @remoteInterface DB_UTILITYRemote
public class DB_UTILITY implements SessionBean
private SessionContext context;
private ResultSet rs = null;
private Statement stmt = null;
private Connection con = null;
private PrintMessage print = null;
public DB_UTILITY()
rs = null;
stmt = null;
con = null;
print = new PrintMessage();
public Connection getConnection()throws RemoteException
InitialContext initctx = null;
Connection con = null;
try
initctx = initcontext.getContext();
javax.sql.DataSource ds =
(javax.sql.DataSource)initctx.lookup("java:comp/env/jdbc/ePool");
con = ds.getConnection();
//(javax.sql.DataSource)initctx.lookup("java:comp/env/jdbc/ePool");
catch(NamingException namingexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", namingexception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("AppError",
"Epool-10001", "DB_UTILITY.getConnection"));
catch(SQLException sqlexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", sqlexception);
throw new
epoolException(JB_B2B_ERROR_PARSER.getErrorMessage("DBError",
JB_B2B_ERROR_PARSER.getSQLCode(sqlexception),
"DB_UTILITY.getConnection"));
catch(Exception exception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", exception);
throw new
epoolException(JB_B2B_ERROR_PARSER.getErrorMessage("EpoolError",
"Epool10005", "DB_UTILITY.getConnection"));
return con;
public String getDate()throws RemoteException
String Date=null;
try
con=getConnection();
stmt=con.createStatement();
rs=stmt.executeQuery("SELECT
TO_CHAR(SYSDATE,'YYYY-MM-DD HH:MI:SS') FROM DUAL");
while(rs.next())
Date=rs.getString(1);
stmt.close();
con.close();
catch(SQLException sqlexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", sqlexception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("DBError",
JB_B2B_ERROR_PARSER.getSQLCode(sqlexception), "DB_UTILITY.getDate"));
catch(Exception exception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", exception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("epoolError",
"Epool10005", "DB_UTILITY.getDate"));
finally
try
if(con != null && !con.isClosed())
con.close();
catch(Exception exception2)
stmt = null;
con = null;
return Date;
public void setSessionContext(SessionContext context)
this.context = context;
public void ejbActivate()
public void ejbPassivate()
public void ejbCreate()
public void ejbRemove()
Also the xml files are as follows.
web.xml
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<!-- A friendly name for this web application, this name can be used in visual development environments, for instance -->
<display-name>AddressBook Web Application</display-name>
<!-- A human-readable description of this web application -->
<description>Web module that contains an HTML welcome page, and 4 JSP's.</description>
<!-- The file(s) to show when no file is specified, i.e. only the directory is specified. -->
<welcome-file-list>
<welcome-file>B2B_COUNTRY_CODE.jsp</welcome-file>
</welcome-file-list>
<ejb-ref>
<ejb-ref-name>SB_B2B_COUNTRY_CODEHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>SB_B2B_COUNTRY_CODEHome</home
<remote>SB_B2B_COUNTRY_CODERemote</remote>
</ejb-ref></web-app>
Application.xml
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
<display-name>Country Code</display-name>
<module>
<ejb>epool_CountryCode-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>epool_CountryCode-web.war</web-uri>
<context-root>/epool_CountryCode-web</context-root>
</web>
</module>
</application>
ejb-jar.xml:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<description>epool_CountryCode</description>
<enterprise-beans>
<session>
<display-name>CountryCode Session
Bean</display-name>
<ejb-name>SB_B2B_COUNTRY_CODERemote</ejb-name>
<home>SB_B2B_COUNTRY_CODEHome</home>
<remote>SB_B2B_COUNTRY_CODERemote</remote>
<ejb-class>SB_B2B_COUNTRY_CODE</ejb-class>
<session-type>Stateless</session-type>
<ejb-ref>
<description>EJB Epool DButility</description>
<ejb-ref-name>DB_UTILITYRemote</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>DB_UTILITYHome</home>
<remote>DB_UTILITYRemote</remote>
</ejb-ref>
<ejb-ref>
<description>EJB Entity Bean</description>
<ejb-ref-name>EB_B2B_COUNTRY_CODERemote</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>EB_B2B_COUNTRY_CODEHome</home>
<remote>EB_B2B_COUNTRY_CODERemote</remote>
</ejb-ref>
</session>
<session>
<display-name>DbUtility Session Bean</display-name>
<ejb-name>DB_UTILITYRemote</ejb-name>
<home>DB_UTILITYHome</home>
<remote>DB_UTILITYRemote</remote>
<ejb-class>DB_UTILITY</ejb-class>
<session-type>Stateless</session-type>
</session>
<entity>
<ejb-name>EB_B2B_COUNTRY_CODERemote</ejb-name>
<home>EB_B2B_COUNTRY_CODEHome</home>
<remote>EB_B2B_COUNTRY_CODERemote</remote>
<ejb-class>EB_B2B_COUNTRY_CODE</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>EB_B2B_COUNTRY_CODEPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-field>
<field-name>country_code_desc</field-name>
</cmp-field>
<cmp-field>
<field-name>phone_format_flag</field-name>
</cmp-field>
<cmp-field>
<field-name>country_code</field-name>
</cmp-field>
<cmp-field>
<field-name>active_date</field-name>
</cmp-field>
<cmp-field>
<field-name>date_created</field-name>
</cmp-field>
<cmp-field>
<field-name>active_flag</field-name>
</cmp-field>
<cmp-field>
<field-name>country_phone_code</field-name>
</cmp-field>
<cmp-field>
<field-name>country_tax_percent</field-name>
</cmp-field>
<cmp-field>
<field-name>sort_order</field-name>
</cmp-field>
<cmp-field>
<field-name>date_modified</field-name>
</cmp-field>
<cmp-field>
<field-name>user_created</field-name>
</cmp-field>
<cmp-field>
<field-name>user_modified</field-name>
</cmp-field>
<resource-ref>
<description></description>
<res-ref-name>jdbc/ePool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>EB_B2B_COUNTRY_CODERemote</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<security-role>
<description>Users</description>
<role-name>users</role-name>
</security-role>
</assembly-descriptor>
</ejb-jar>
The session bean which uses the above session bean is as follows.
import javax.ejb.SessionContext;
import javax.ejb.SessionBean;
import java.sql.*;
import javax.naming.Context;
import java.sql.Timestamp;
import java.util.Vector;
import initcontext;
import DB_UTILITYHome;
import DB_UTILITYRemote;
import EB_B2B_COUNTRY_CODEHome;
import EB_B2B_COUNTRY_CODERemote;
import EB_B2B_COUNTRY_CODEPK;
* @stereotype SessionBean
* @homeInterface SB_B2B_COUNTRY_CODEHome
* @remoteInterface SB_B2B_COUNTRY_CODERemote
public class SB_B2B_COUNTRY_CODE implements SessionBean
private SessionContext context;
* Sets the context of the bean
* @param context The Bean's Context
public Vector selectCountryCode(String query,String
countquery, String pagenos) throws Exception
Context ctx = initcontext.getContext();
Connection con=null;
Vector records=new Vector();
int pageno=Integer.parseInt(pagenos);
int min=(pageno-1)*10;
int max=pageno*10;
int counter=0;
boolean recordsfound=false;
try
DB_UTILITYHome home =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote remote =
(DB_UTILITYRemote)home.create();
con=remote.getConnection();
Statement stmt = con.createStatement();
ResultSet rscount =
stmt.executeQuery(countquery);
while(rscount.next())
int temp=rscount.getInt(1);
int pagecount=temp;
pagecount=pagecount/10;
if((temp%10)>0)
pagecount=pagecount+1;
records.addElement(""+pagecount);
ResultSet rs = stmt.executeQuery(query);
while(rs.next())
counter++;
if(counter>min && counter<=max)
String row[]=new String[8];
recordsfound=true;
row[0]=rs.getString(1);
row[1]=rs.getString(2);
row[2]=rs.getString(3);
row[3]=rs.getString(4);
row[4]=rs.getString(5);
row[5]=rs.getString(6);
row[6]=rs.getString(7);
row[7]=rs.getString(8);
records.addElement(row);
con.close();
catch(Exception e)
System.out.println("Error in selecting Country
Code "+e);
throw new Exception("Error in selecting Country
Code "+e);
return(records);
public void insertCountryCode(String country_code, String
country_code_desc, String country_phone_code, String
phone_format_flag,String active_flag, String sort_order,String
country_tax_percent)throws Exception
Context ctx = initcontext.getContext();
Double Sort_Order=null;
Double cntry_tax_prct=null;
if(sort_order!=null && sort_order.length()>0)
Sort_Order=new Double(sort_order);
if(country_tax_percent!=null &&
country_tax_percent.length()>0)
cntry_tax_prct=new Double(country_tax_percent);
String user_created=null;
Timestamp date_created=null;
Timestamp active_date=null;
String user_modified=null;
Timestamp date_modified=null;
try
DB_UTILITYHome dbhome =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote dbremote =
(DB_UTILITYRemote)dbhome.create();
user_created=dbremote.getUser();
date_created=Timestamp.valueOf(dbremote.getDate());
active_date=date_created;
EB_B2B_COUNTRY_CODEHome home =
(EB_B2B_COUNTRY_CODEHome)ctx.lookup("java:comp/env/EB_B2B_COUNTRY_CODER
emote");
EB_B2B_COUNTRY_CODERemote remote =
(EB_B2B_COUNTRY_CODERemote)home.create(country_code, country_code_desc,
country_phone_code,active_flag, phone_format_flag,user_created,
date_created, active_date, Sort_Order, user_modified,
date_modified,cntry_tax_prct);
catch(Exception e)
System.out.println("Error in Creating COUNTRY
Code "+e);
throw new Exception("Error in Creating COUNTRY
Code "+e);
public void setSessionContext(SessionContext context)
this.context = context;
public void ejbActivate()
public void ejbPassivate()
public void ejbCreate()
public void ejbRemove()
The jsp client which acces the beans is as follows.
<BODY >
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<%@ page import="initcontext" %>
<%@ page import = "java.util.*" %>
<%@ page import="DB_UTILITYHome"%>
<%@ page import="DB_UTILITYRemote"%>
<%@ page import="javax.naming.*"%>
<%Connection con=null; %>
<script src="search_getvalues.js">
</script>
<form name=frm1>
<%! int intCount,intI,intRowCount,intJ;
String strtname=new String();
String strhidden=new String("txthdn");
Statement st;
ResultSet rs;
ResultSetMetaData rmeta;
....%>
<%
try
Context ctx = initcontext.getContext();
DB_UTILITYHome dbhome =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote dbremote = (DB_UTILITYRemote)dbhome.create();
con=dbremote.getConnection();
st=con.createStatement();
rs=st.executeQuery(strsqlquery);
rmeta=rs.getMetaData();
intCount=rmeta.getColumnCount();
....... %>
</form>
</BODY>
</HTML>
The resulting exception generated is as follows:
D:\oc4j\j2ee\home>java -jar orion.jar
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e.ear... done.
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e\epool_CountryCode-web.war... done.
Auto-deploying epool_CountryCode (New server version detected)...
Auto-deploying epool_CountryCode-ejb.jar (No previous deployment
found)... done.
Error deploying
file:/D:/oc4j/j2ee/home/demo/messagelogger/messagelogger-ejb.jar homes:
No javax.jms.Destination found a
t the specified destination-location (jms/theTopic) for
MessageDrivenBean com.evermind.logger.MessageLogger
Oracle9iAS (1.0.2.2.1) Containers for J2EE initialized
Auto-deploying epool countryCode example (New server version
detected)...
************************1
************************2
COUNT QUERY :SELECT COUNT(COUNTRY_CODE) FROM BAP_COUNTRY_CODE
QUERY :SELECT
COUNTRY_CODE,COUNTRY_CODE_DESC,COUNTRY_PHONE_CODE,PHONE_FORMAT_FLAG,COU
NTRY_TAX_PERCENT ,SORT_ORDER,ACTIVE
FLAG,ACTIVEDATE FROM BAP_COUNTRY_CODE order by COUNTRY_CODE
Error in selecting Country Code java.rmi.RemoteException: Error
(de-)serializing object: com.evermind.sql.OrionCMTConnec
tion; nested exception is:
java.io.NotSerializableException:
com.evermind.sql.OrionCMTConnection
JB:Error in selecting country cd java.lang.Exception: Error in
selecting Country Code java.rmi.RemoteException: Error (d
e-)serializing object: com.evermind.sql.OrionCMTConnection; nested
exception is:
java.io.NotSerializableException:
com.evermind.sql.OrionCMTConnection
Error in Selecting Records
OrionCMTConnection not closed, check your code!
LogicalDriverManagerXAConnection not closed, check your code!
(Use -Djdbc.connection.debug=true to find out where the leaked
connection was created)
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e.ear... Error unpacking: IO Error:
The system cannot find the path specified
Error updating application epool_CountryCode: Unable to find/read
assembly info for D:\oc4j\j2ee\home\applications\epool_C
ountryCode\build\epool_CountryCode (META-INF/application.xml)
But if the DBUTILITY session bean is changed to a simple bean and accessed the code works fine and i am able to retrieve the data.Is the problem there because u one session bean cannot access a database connection method from another one or could it be because of the driver???
I hope i am clear.Please revert back in case any more references are needed.
Thanks in advance!!!!!! -
Use JDBC to Access XML Documents in Oracle XML DB
Hi folks,
From the Oracle XML DB Developer's Guide 10g Release 1 (10.1) Chapter 12 Java API for XMLType, it show several examples for how java application use JDBC to access xml in XMLDB:
1. use getOPAQUE() on XMLTYPE table/column and then call XMLTYPE.createXML();
2. use getCLOBVal()/getStringVal()/getBLOBVal() in SQL statement;
3.use getObject on the result and cast directly to XMLType;
Among these 3 options, which is supposed to be the fastest way? Any difference between thin and oci?
I have run some tests about that and the result is the second option (with thin driver) is the fastest. It surprises me because I think oci should be faster than thin. Does the result make sense?
Thanks.Have you tried to trace your sessions to see how much work is happening? Traces should give you quantifiable information on exact times and access paths to the data.
Below is a link to an O'Reilly book excerpt on Java programming with JDBC. Slightly data, but may be of assistance.
http://www.onjava.com/lpt/a//onjava/excerpt/oraclejdbc_19/index.html
Maybe you are looking for
-
I updated my Iphone5S to IOS 7.1.2 and some contacts disappeared from my phone. I use over the air sync wtih Exchange Server account, and any change in the contacts list from outlook isn't being reflected on my phone.Why is this happening and what ca
-
Dear all, I would like to know how to debug the form tracking. I am just evaluating the software and prepared a sincle form under LC Designer. After adding a single calculation script I can't send the form to users anaymore: The only message is "fail
-
How can i add a library on an ipa file ?
the solution from www.mocana.com allows for maximum user flexibility and native experience, while not risking corporate intellectual property. * Increase productivity by fully supporting bring your own device (BYOD) * Embrace Bring Your Own Device (
-
Problem with Progress DB at sender side
Hello, We are facing some problem when we are trying to connect to Progress DB using JDBC adapter at sender side. The error is, " Accessing database connection 'jdbc:jdbcprogress:T:156.5.31.65:2545:/mfgprodev/devbadb/devsche/i_apoext' failed: com.sa
-
Slideshow images not focusing properly
I am finding that if I review images in Bridge slideshow (hitting space bar) they all seem to not be focused. When I click and go the 100% view, it takes about 10 seconds to load and then it is properly in focus. I thought I could use slideshow to ra