Posts

Showing posts from October, 2010

Resolution of Exception in thread "main" java.lang.NoSuchMethodError, oracle.fabric.composite.model.CompositeModel.getFolder()Ljava/lang/String;

Tools: JDeveloper11.1.1.3.0, SOA Suite Enterprise Manager 11g (11.1.1.3.0) When deploying SOA Composite from JDeveloper I was having error. Exception in thread "main" java.lang.NoSuchMethodError: oracle.fabric.composite.model.CompositeModel.getFolder()Ljava/lang/String; at oracle.soa.scac.ValidateComposite.loadComposite(ValidateComposite.java:881) at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:567) at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:156) at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:141) It is because; the ORACLE_HOME does not have the updated fabric-runtime.jar file How to fix this issue, you need to copy the folder “oracle.soa.fabric_11.1.1” from your SOA installation to your ORACLE_HOME Copy the folder “oracle.soa.fabric_11.1.1”, you will find this folder in your installation directory of SOA, in my case the folder location was C:\Oracle\Middleware1\Oracle_SOA1\soa\modules Paste this

Configuring WebLogic JDBC Resources

http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jdbc_admin/config.html

File attachment using Adf faces, EJB3 and Oracle XE database Part IV

Image
continued... Downloading file  In download button, add FileDownloadActionListener and select fileDownloadActionListener from backingBean  The binding of attachment page should looks like above. Following is the code in AttachmentBackingBean  public void downloadAction(FacesContext facesContext, OutputStream outputStream) { Attachment att = (Attachment)attachmentList.getSelectedRowData(); ExternalContext ectx = facesContext.getExternalContext(); String fileName = null; byte[] contents = null; if (att == null) { return; } else if (att.getAttachmentId() == null) { fileName = att.getFileName(); contents = att.getFileContent(); } else { OperationBinding oper = getBindings().getOperationBinding("findAttachmentById"); oper.getParamsMap().put("attachmentId", att.getAttachmentId()); Attachment attachment = (Attachment)oper.execute(); fileName = attachment.getFileName(); contents =

File attachment using Adf faces, EJB3 and Oracle XE database Part III

Image
Continued... Step III: Creating taskflow for file-uploading popup Design the list of employees like following  List of employees page  Here the “New” button will open new tab for creating “Person”, “Refresh” button simply executes the "Execute" function and “Detail” will open new table populating selected record data for editing. The edit/new person screen should be like follwing  add/edit person screen  In add/edit person screen, "Save" button updates or inserts new record into the database, close button will close the tab and "Attachment" button opens the popup for file attachment. Lets design the taskflow for fileAttachment Create the new taskflow for Attachment Click on overview and select General, uncheck “Use Page fragements” Click on Parameters and define input parameter and return parameter as follows. Create a new java file, and in Managed Beans, provide that file path and name here as Add a page and a return activity in your

File attachment using Adf faces, EJB3 and Oracle XE database Part II

Image
continued.. Step # II Create Entities from Database Tables,Session Bean & Data Controls Creating Entities from database table     Create entities from table       Create database connection and provide the information of your XE Database     Select PERSON and ATTACHMENT tables to create entities               .      Entites should be created.  You need to add Sequence annotation and define relationship of ATTACHEMTN table with PERSON table as follows.         Creating Session bean                  We Also need to add following functions into our session bean Then expose these functions to remote and local interfaces Click on Structure, right click on function, click on EJB(N) and then properties you will see the dialog Check on both checkboxes and click on OK button, the methods should be generated in remote and local interfaces. do

File attachment using Adf faces, EJB3 and Oracle XE database Part I

Image
Usecase: I want to associate files with employees (PERSON). I will have employees(PERSON) with their associated files which will hold the more information for that employees (PERSON) like (employee’s picture, list of his dependant, his Resume etc) My ERD will have PERSON and ATTACHMENT tables, and a join table between PERSON and ATTACHMENT that is PERSON_ATTACHMENT. The relation between PERSON AND ATTACHMENT is ONE TO MANY, A single employee (PERSON) can have many attachments. Step # 1 Creating tables in Oracle database XE Let’s first create the Tables in Oracle XE Database. Open your Oracle Database XE by clicking on “Startup” select “Oracle Database 10g Express Edition” and then click on “Go to Database Home page” Login to Oracle Database XE. Creating PERSON   Table   PERSON table    PERSON table also create sequence for PERSON table    PERSON table   Create Attachment table with three columns "ATTACHMENT_ID", "FILE_CONTENT" &