Add & use custom jars in "Java embedding" component

I need to generate pdf file in process.
So I included "Java embedding" component, and write my code. For clarity example:
com.itextpdf.text.Document document = new com.itextpdf.text.Document( 
                    com.itextpdf.text.PageSize.A4, 50, 50, 50, 50); 
          try { 
               com.itextpdf.text.pdf.PdfWriter pdf = com.itextpdf.text.pdf.PdfWriter 
                         .getInstance(document, new java.io.FileOutputStream("c:\\text.pdf")); 
               document.open(); 
               document.add(new com.itextpdf.text.Paragraph("This is test message")); 
               catch (com.itextpdf.text.DocumentException de) { System.err.println(de.getMessage());  }
               catch (Exception de) { System.err.println(de.getMessage());}
          document.close();Im using external jar file, of course I add it to classpath (right click soa project -> properties -> libraries and classpath ->add jar).
But I get folowing error (no during compilation, but during deploying):
Failed to compile bpel generated classes.
failure to compile the generated BPEL classes for BPEL process "SimpleProcess" of composite "default/SOAProject!1.0*soa_9f8e80a4-346d-424e-9e12-1b69e2024e58"
The class path setting is incorrect.
Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
[04:35:23 PM] Check server log for more details.
[04:35:23 PM] Error deploying archive sca_SOAProject_rev1.0.jar to soa_server1 [[fe80:0:0:0:5968:cb45:2001:f6ce]:8001] 
[04:35:23 PM] ####  Deployment incomplete.  ####
[04:35:23 PM] Error deploying archive file:/C:/Projects/SOAProject/deploy/sca_SOAProject_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)where ist the problem???
Edited by: user1175491 on Nov 2, 2010 4:39 PM

Ajaykumar, can u please write me what exactly append to bpel:exec part (which classes include?)? it looks now:
<bpelx:exec name="GeneratePDF" version="1.5" language="java">
<![CDATA[
              com.itextpdf.text.Document document = new com.itextpdf.text.Document(  
                    com.itextpdf.text.PageSize.A4, 50, 50, 50, 50);  
          try {  
               com.itextpdf.text.pdf.PdfWriter pdf = com.itextpdf.text.pdf.PdfWriter  
                         .getInstance(document, new java.io.FileOutputStream("c:\\text.pdf"));  
               document.open();  
               document.add(new com.itextpdf.text.Paragraph("This is test message"));  
               catch (com.itextpdf.text.DocumentException de) {System.err.println(de.getMessage());}
               catch (java.lang.Exception de) {System.err.println(de.getMessage());}  
          document.close();]]>
</bpelx:exec>Edited by: user1175491 on Nov 2, 2010 5:07 PM
Edited by: user1175491 on Nov 2, 2010 5:08 PM

Similar Messages

  • Advantage of using Spring Context over Java Embedding

    Hi ,
    Is there any advantage of using Spring Context over Java Embedding?
    --Steve                                                                                                                                                                               

    Hi All,
    Anybody can answer my question?
    --steve                                                                                                                                                                                                           

  • Problem using a jar file : java.lang.ClassNotFoundException: ApiConn

    Hi everyone.
    i am running a form that use a bean_area to call a jar.
    but i am getting this error, thanks in advnce for any tip.
    Java Plug-in 1.6.0_33
    Using JRE version 1.6.0_33-b05 Java HotSpot(TM) Client VM
    User home directory = C:\Users\user1
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    java.lang.ClassNotFoundException: ApiConn
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
         at java.awt.EventQueue.access$000(Unknown Source)
         at java.awt.EventQueue$1.run(Unknown Source)
         at java.awt.EventQueue$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue$2.run(Unknown Source)
         at java.awt.EventQueue$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Dumping class loader cache...
    Live entry: key=http://192.168.10.100:7778/forms/java/,frmall.jar,siberia_jpg.jar,ApiConn.jar,Hasher.jar,ReadCommand.jar,WriteCommand.jar,libAPI.jar, refCount=1, threadGroup=sun.plugin2.applet.Applet2ThreadGroup[name=http://192.168.10.100:7778/forms/java/-threadGroup,maxpri=4]
    Done.
    in my form i have created a bean_area and used as implementation class :ApiConn
    in my formsweb.cfg i used this configuration: archive=frmall.jar,siberia_jpg.jar,ApiConn.jar,Hasher.jar,ReadCommand.jar,WriteCommand.jar,libAPI.jar
    in my forms/java i have placed my jar files listed in the frmall.jar
    i guess i am missing something but i dont know what it is.
    here is my ApiConn.java from wich i generate my jar file:
    package libAPI;
    * This contains connection. Everything should be here,
    * should operate with this class only
    import java.io.*;
    import java.net.*;
    import java.util.concurrent.LinkedBlockingQueue;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    * @author janisk
    public class ApiConn extends Thread {
    private Socket sock = null;
    private DataOutputStream out = null;
    private DataInputStream in = null;
    private String ipAddress;
    private int ipPort;
    private boolean connected = false;
    private String message = "Not connected";
    private ReadCommand readCommand = null;
    private WriteCommand writeCommand = null;
    private Thread listener = null;
    LinkedBlockingQueue queue = new LinkedBlockingQueue(40);
    * Constructor of the connection class
    * @param ipAddress - IP address of the router you want to conenct to
    * @param ipPort - port used for connection, ROS default is 8728
    public ApiConn(String ipAddress, int ipPort) {
    this.ipAddress = ipAddress;
    this.ipPort = ipPort;
    this.setName("settings");
    * State of connection
    * @return - if connection is established to router it returns true.
    public boolean isConnected() {
    return connected;
    public void disconnect() throws IOException{
    listener.interrupt();
    sock.close();
    private void listen() {
    if (this.isConnected()) {
    if (readCommand == null) {
    readCommand = new ReadCommand(in, queue);
    listener = new Thread(readCommand);
    listener.setDaemon(true);
    listener.setName("listener");
    listener.start();
    * to get IP address of the connection. Reads data from socket created.
    * @return InetAddress
    public InetAddress getIpAddress() {
    return sock == null ? null : sock.getInetAddress();
    * returns ip address that socket is asociated with.
    * @return InetAddress
    public InetAddress getLocalIpAddress() {
    return sock == null ? null : sock.getLocalAddress();
    * Socket remote port number
    * @return
    public int getPort() {
    return sock == null ? null : sock.getPort();
    * return local prot used by socket
    * @return
    public int getLocalPort() {
    return sock == null ? null : sock.getLocalPort();
    * Returns status message set up bu class.
    * @return
    public String getMessage() {
    return message;
    * sets and exectues command (sends it to RouterOS host connected)
    * @param s - command will be sent to RouterOS for example "/ip/address/print\n=follow="
    * @return
    public String sendCommand(String s) {
    return writeCommand.setCommand(s).runCommand();
    * exeecutes already set command.
    * @return returns status of the command sent
    public String runCommand() {
    return writeCommand.runCommand();
    * Tries to fech data that is repllied to commands sent. It will wait till it can return something.
    * @return returns data sent by RouterOS
    * @throws java.lang.InterruptedException
    public String getData() throws InterruptedException {
    String s = (String) queue.take();
    return s;
    * returns command that is set at this moment. And will be exectued if runCommand is exectued.
    * @return
    public String getCommand() {
    return writeCommand.getCommand();
    * set up method that will log you in
    * @param name - username of the user on the router
    * @param password - password for the user
    * @return
    public String login(String name, char[] password) {
    this.sendCommand("/login");
    String s = "a";
    try {
    s = this.getData();
    } catch (InterruptedException ex) {
    Logger.getLogger(ApiConn.class.getName()).log(Level.SEVERE, null, ex);
    return "failed read #1";
    if (!s.contains("!trap") && s.length() > 4) {
    String[] tmp = s.trim().split("\n");
    if (tmp.length > 1) {
    tmp = tmp[1].split("=ret=");
    s = "";
    String transition = tmp[tmp.length - 1];
    String chal = "";
    chal = Hasher.hexStrToStr("00") + new String(password) + Hasher.hexStrToStr(transition);
    chal = Hasher.hashMD5(chal);
    String m = "/login\n=name=" + name + "\n=response=00" + chal;
    s = this.sendCommand(m);
    try {
    s = this.getData();
    } catch (InterruptedException ex) {
    Logger.getLogger(ApiConn.class.getName()).log(Level.SEVERE, null, ex);
    return "failed read #2";
    if (s.contains("!done")) {
    if (!s.contains("!trap")) {
    return "Login successful";
    return "Login failed";
    @Override
    public void run() {
    try {
    InetAddress ia = InetAddress.getByName(ipAddress);
    if (ia.isReachable(1000)) {
    sock = new Socket(ipAddress, ipPort);
    in = new DataInputStream(sock.getInputStream());
    out = new DataOutputStream(sock.getOutputStream());
    connected = true;
    readCommand = new ReadCommand(in, queue);
    writeCommand = new WriteCommand(out);
    this.listen();
    message = "Connected";
    } else {
    message = "Not reachable";
    } catch (UnknownHostException ex) {
    connected = false;
    message = ex.getMessage();
    ex.printStackTrace();
    } catch (IOException ex) {
    connected = false;
    message = ex.getMessage();
    ex.printStackTrace();
    }

    I need your help again, i think this is a minor thing.
    i have compiled the class file that i needed and i signed it too. but now it is giving me a new error and need your tip.
    here is the java console loyout and my java file ((i think here is the problem in java file, something must be missing)).
    thanks in advance for any help.
    Java Plug-in 10.17.2.02
    Using JRE version 1.7.0_17-b02 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Administrator
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    network: Connecting http://192.168.10.100:7778/forms/lservlet;jsessionid=c0a80a6430d6e191eded93774f2f8d1bed73056e66ef.e3mObhiMbxeKe34PahiKbx4Nbh90n6jAmljGr5XDqQLvpAe with proxy=DIRECT
    security: Validate the certificate chain using CertPath API
    security: The certificate hasnt been expired, no need to check timestamping info
    security: Cannot find jurisdiction list file
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: This OCSP End Entity validation is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    basic: updateValidationResultsForApplet update
    cache: Mark prevalidated: http://192.168.10.100:7778/forms/java/ApiConn.jar true tm=1363335797289 cert=1371107987000
    basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
    java.lang.InstantiationException: oracle.forms.siberia.ApiConn
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
         at java.awt.EventQueue.access$200(Unknown Source)
         at java.awt.EventQueue$3.run(Unknown Source)
         at java.awt.EventQueue$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue$4.run(Unknown Source)
         at java.awt.EventQueue$4.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    network: Connecting http://192.168.10.100:7778/forms/lservlet;jsessionid=c0a80a6430d6e191eded93774f2f8d1bed73056e66ef.e3mObhiMbxeKe34PahiKbx4Nbh90n6jAmljGr5XDqQLvpAe with proxy=DIRECT
    Exception in thread "Forms-DialogThread2" java.lang.NullPointerException
         at oracle.forms.handler.JavaContainer.onDestroy(Unknown Source)
         at oracle.forms.engine.Runform.destroyHandlers(Unknown Source)
         at oracle.forms.handler.DialogThread.doAlert(Unknown Source)
         at oracle.forms.handler.DialogThread.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Dumping class loader cache...
    Live entry: key=http://192.168.10.100:7778/forms/java/,frmall.jar,siberia_jpg.jar,ApiConn.jar,ConcealTextField.jar, refCount=1, threadGroup=sun.plugin2.applet.Applet2ThreadGroup[name=http://192.168.10.100:7778/forms/java/-threadGroup,maxpri=4]
    Done.
    here is my java file
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package oracle.forms.siberia;
    * This contains connection. Everything should be here,
    * should operate with this class only
    import java.io.*;
    import java.net.*;
    import java.util.concurrent.LinkedBlockingQueue;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import oracle.forms.*;
    * @author janisk
    public class ApiConn extends Thread {
    private Socket sock = null;
    private DataOutputStream out = null;
    private DataInputStream in = null;
    private String ipAddress;
    private int ipPort;
    private boolean connected = false;
    private String message = "Not connected";
    private ReadCommand readCommand = null;
    private WriteCommand writeCommand = null;
    private Thread listener = null;
    LinkedBlockingQueue queue = new LinkedBlockingQueue(40);
    * Constructor of the connection class
    * @param ipAddress - IP address of the router you want to conenct to
    * @param ipPort - port used for connection, ROS default is 8728
    public ApiConn(String ipAddress, int ipPort) {
    this.ipAddress = ipAddress;
    this.ipPort = ipPort;
    this.setName("settings");
    * State of connection
    * @return - if connection is established to router it returns true.
    public boolean isConnected() {
    return connected;
    public void disconnect() throws IOException{
    listener.interrupt();
    sock.close();
    private void listen() {
    if (this.isConnected()) {
    if (readCommand == null) {
    readCommand = new ReadCommand(in, queue);
    listener = new Thread(readCommand);
    listener.setDaemon(true);
    listener.setName("listener");
    listener.start();
    * to get IP address of the connection. Reads data from socket created.
    * @return InetAddress
    public InetAddress getIpAddress() {
    return sock == null ? null : sock.getInetAddress();
    * returns ip address that socket is asociated with.
    * @return InetAddress
    public InetAddress getLocalIpAddress() {
    return sock == null ? null : sock.getLocalAddress();
    * Socket remote port number
    * @return
    public int getPort() {
    return sock == null ? null : sock.getPort();
    * return local prot used by socket
    * @return
    public int getLocalPort() {
    return sock == null ? null : sock.getLocalPort();
    * Returns status message set up bu class.
    * @return
    public String getMessage() {
    return message;
    * sets and exectues command (sends it to RouterOS host connected)
    * @param s - command will be sent to RouterOS for example "/ip/address/print\n=follow="
    * @return
    public String sendCommand(String s) {
    return writeCommand.setCommand(s).runCommand();
    * exeecutes already set command.
    * @return returns status of the command sent
    public String runCommand() {
    return writeCommand.runCommand();
    * Tries to fech data that is repllied to commands sent. It will wait till it can return something.
    * @return returns data sent by RouterOS
    * @throws java.lang.InterruptedException
    public String getData() throws InterruptedException {
    String s = (String) queue.take();
    return s;
    * returns command that is set at this moment. And will be exectued if runCommand is exectued.
    * @return
    public String getCommand() {
    return writeCommand.getCommand();
    * set up method that will log you in
    * @param name - username of the user on the router
    * @param password - password for the user
    * @return
    public String login(String name, char[] password) {
    this.sendCommand("/login");
    String s = "a";
    try {
    s = this.getData();
    } catch (InterruptedException ex) {
    Logger.getLogger(ApiConn.class.getName()).log(Level.SEVERE, null, ex);
    return "failed read #1";
    if (!s.contains("!trap") && s.length() > 4) {
    String[] tmp = s.trim().split("\n");
    if (tmp.length > 1) {
    tmp = tmp[1].split("=ret=");
    s = "";
    String transition = tmp[tmp.length - 1];
    String chal = "";
    chal = Hasher.hexStrToStr("00") + new String(password) + Hasher.hexStrToStr(transition);
    chal = Hasher.hashMD5(chal);
    String m = "/login\n=name=" + name + "\n=response=00" + chal;
    s = this.sendCommand(m);
    try {
    s = this.getData();
    } catch (InterruptedException ex) {
    Logger.getLogger(ApiConn.class.getName()).log(Level.SEVERE, null, ex);
    return "failed read #2";
    if (s.contains("!done")) {
    if (!s.contains("!trap")) {
    return "Login successful";
    return "Login failed";
    @Override
    public void run() {
    try {
    InetAddress ia = InetAddress.getByName(ipAddress);
    if (ia.isReachable(1000)) {
    sock = new Socket(ipAddress, ipPort);
    in = new DataInputStream(sock.getInputStream());
    out = new DataOutputStream(sock.getOutputStream());
    connected = true;
    readCommand = new ReadCommand(in, queue);
    writeCommand = new WriteCommand(out);
    this.listen();
    message = "Connected";
    } else {
    message = "Not reachable";
    } catch (UnknownHostException ex) {
    connected = false;
    message = ex.getMessage();
    ex.printStackTrace();
    } catch (IOException ex) {
    connected = false;
    message = ex.getMessage();
    ex.printStackTrace();
    }

  • How to encrypt file on linux using Gnupg command in Java Embedding in BPEL.

    Hi All,
    I am trying to invoke a command script using the java embedding in BPEL Process.I am using the below code to execute the particular command to encrypt the file :-
    try {    
            Runtime rt = Runtime.getRuntime();    
    Process pr = rt.exec(new String[] {"/bin/bash", "-c", "/u01/GnuPG/bin/gpg", "-e", "-r", "Developer","/u01/oracle/ConfigFiles/Adapter_controlDir/abc.csv"});    
             int exitVal = pr.waitFor();            
            String result = "SUCCESS: Process exit with " + exitVal;         
            addAuditTrailEntry("result = "+result);      
            setVariableData("outputVariable","payload","/client:processResponse/client:result",result);    
    } catch(Exception e) {    
            e.printStackTrace();      
      String result = "FAILURE: Exception with " + e.toString();    
            addAuditTrailEntry("result = "+result);      
            setVariableData("outputVariable","payload","/client:processResponse/client:result",result);    
    The above statement does nothing. I am not sure what command i need to use to access to the command line.
    When i try this particular statement from linux machine command prompt :- /u01/GnuPG/bin/gpg -e  -r  Developer /u01/oracle/ConfigFiles/Adapter_controlDir/abc.csv
    It works absolutely fine and it creates the encrypted files also.
    Please suggest , which command i need to use from the java embedding.
    Please suggest!!
    Regards,
    Shah

    I think, you can try, writing these commands into a separate shell script and call that shell script from bpel via Java embedding. However, you might not get a return response.. but you can still give a shot.
    Hope it helps.

  • Refering to jars from Java Embedding  and Spring Context

    Hi BPEL Experts
    I have been trying to create a Agile PLM session and get data from Agile PLM using two jars AgileAPI.jar and agileclasses.jar. I have placed the jar in following location
    C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext
    then run build.xml, my MANIFEST.MF as follows
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: 20.10-b01 (Sun Microsystems Inc.)
    Implementation-Vendor: Oracle
    Implementation-Title: Oracle SOA EXT
    Implementation-Version: 11.1.1
    Product-Name: Oracle SOA EXT
    Product-Version: 11.1.1.4.0
    Specification-Version: 11.1.1
    Extension-Name: oracle.soa.ext
    Class-Path: ext/AgileAPI.jar ext/agileclasses.jar ext/log4j-1.2.17.jar
      classes/
    Then I updated BpelcClasspath From EM Console as follows
    C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\AgileAPI.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\agileclasses.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\log4j-1.2.17.jar
    Then Restarted the server, but seems the jars not loading to classpath, and the bpel is unable to refer to the jar. Please find the logs from server during the start up
    ** Setting up SOA specific environment for win...
    PATH=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\native;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\native;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\nati
    ve\win\32;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\bin;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\jre\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\
    bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Window
    s\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Application Virtualization Client;C:\Oracle\Middleware\jdk160_29\bin;C:\Program Files\Microsoft\W
    eb Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Progr
    am Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Mot\Mot Data Protection\Encryption\;C:\OracleSOA\Middleware\modules\org.apache.ant_1.7.1\bin;C:\ORAC
    LE~2\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;C:\OracleSOA\Middleware\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\bin
    USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
    JAVA_OPTIONS= -Xverify:none
    ** End SOA Specific environment setup  for win.
    ** SOA specific environment is already set. Skipping ...
    "Rijesh CLASSPATH value is =  C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\user-patch.jar;C
    :\OracleSOA\Middleware\Oracle_SOA1\soa\modules\soa-startup.jar;;C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORAC
    LE~2\MIDDLE~1\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\JDK160~1\lib\tools.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\ser
    ver\lib\weblogic_sp.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\ORACLE~
    2\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\ORACLE~2\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.ja
    r;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\OracleSOA\Midd
    leware\Oracle_SOA1\soa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;C:\OracleSOA\Middleware\Oracle_SOA1\communications\modules\usermessag
    ing-config_11.1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.xdk_11.1.0\xsu12.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules.xquery_10.3.1.0
    .jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\db2jcc4.jar;C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\soa-infra;C:\OracleSOA\Middleware\Oracle_SOA1\
    soa\modules\fabric-url-handler_11.1.1.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\quartz-all-1.6.5.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle
    .soa.fabric_11.1.1\oracle.soa.fabric.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-wls.jar;C:\OracleSOA\Middleware\
    Oracle_SOA1\soa\modules\oracle.soa.adapter_11.1.1\oracle.soa.adapter.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.b2b_11.1.1\oracle.soa.b2b.jar;C:\
    ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\
    lib\xqrl.jar"
    "Rijesh Classpath end"
    JAVA Memory arguments: -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\user-patch.jar;C:\OracleSOA\Middlewa
    re\Oracle_SOA1\soa\modules\soa-startup.jar;;C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\patch_
    ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\JDK160~1\lib\tools.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.
    jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.
    3\server\lib\webservices.jar;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\ORACLE~2\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\ORACLE~2\MIDDLE
    ~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\OracleSOA\Middleware\Oracle_SOA1\s
    oa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;C:\OracleSOA\Middleware\Oracle_SOA1\communications\modules\usermessaging-config_11.1.1.ja
    r;C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.xdk_11.1.0\xsu12.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules.xquery_10.3.1.0.jar;C:\OracleSOA\Mi
    ddleware\Oracle_SOA1\soa\modules\db2jcc4.jar;C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\soa-infra;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\fabric-u
    rl-handler_11.1.1.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\quartz-all-1.6.5.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\o
    racle.soa.fabric.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-wls.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modu
    les\oracle.soa.adapter_11.1.1\oracle.soa.adapter.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.b2b_11.1.1\oracle.soa.b2b.jar;C:\ORACLE~2\MIDDLE~1\OR
    ACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar
    PATH=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\native;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\native;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\nati
    ve\win\32;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\bin;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\jre\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\
    bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Window
    s\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Application Virtualization Client;C:\Oracle\Middleware\jdk160_29\bin;C:\Program Files\Microsoft\W
    eb Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Progr
    am Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Mot\Mot Data Protection\Encryption\;C:\OracleSOA\Middleware\modules\org.apache.ant_1.7.1\bin;C:\ORAC
    LE~2\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;C:\OracleSOA\Middleware\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\bin
    *  To start WebLogic Server, use a username and   *
    *  password assigned to an admin-level user.  For *
    *  server administration, use the WebLogic Server *
    *  console at http:\\hostname:port\console        *
    starting weblogic with Java version:
    java version "1.6.0_29"
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
    Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode)
    Starting WLS with line:
    C:\ORACLE~2\MIDDLE~1\JDK160~1\bin\java -client   -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=C:\ORAC
    LE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy  -Xverify:none  -da -Dplatform.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\se
    rver -Dweblogic.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server  -Dcommon.components.home=C:\ORACLE~2\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging
    .Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1 -Djrockit.optfile=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules
    \oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\servers\AdminServer -Doracle.domain.
    config.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1  -Digf.arisidbeans.carmlloc=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\
    carml  -Digf.arisidstack.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\ORACLE~2\MIDDLE~1\USER_P~
    1\domains\SOA_DO~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\servers\AdminServer\tmp\_WL_user -Doracle
    .deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.oamp
    rovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol"|"oracle.fabric.common.classloaderurl.handler"|"oracle.fabric.common.uddiurl.handler"|"oracle.bpm
    .io.fs.protocol  -Dweblogic.jdbc.remoteEnabled=false -Doracle.security.jps.policy.migration.validate.principal=false  -da:org.apache.xmlbeans... -Dsoa.archives.dir=C
    :\OracleSOA\Middleware\Oracle_SOA1\soa -Dsoa.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Dsoa.instance.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1 -Dtan
    gosol.coherence.clusteraddress=227.7.7.9 -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.
    MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=C:\ORACLE~2\MIDDLE~1\WLSERV~1
    .3\server\lib\DemoTrust.jks -Dem.oracle.home=C:\OracleSOA\Middleware\oracle_common -Djava.awt.headless=true -Dbam.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Du
    ms.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.e
    xt.dirs=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\sysext_manifest_classpath  w
    eblogic.Server
    <Sep 22, 2014 7:13:12 PM IST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this chec
    k, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <Sep 22, 2014 7:13:12 PM IST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this
    change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <Sep 22, 2014 7:13:12 PM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 20.4-b02 from Sun Microsystems I
    nc.>
    <Sep 22, 2014 7:13:12 PM IST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 >
    <Sep 22, 2014 7:13:13 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Sep 22, 2014 7:13:13 PM IST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Sep 22, 2014 7:13:14 PM IST> <Notice> <LoggingService> <BEA-320400> <The log file C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServer\logs\
    AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Sep 22, 2014 7:13:14 PM IST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\OracleSOA\Middleware\user_projects\domains\soa_domain\serve
    rs\AdminServer\logs\AdminServer.log00064. Log messages will continue to be logged in C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServer\log
    s\AdminServer.log.>
    <Sep 22, 2014 7:13:14 PM IST> <Notice> <Log Management> <BEA-170019> <The server log file C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServe
    r\logs\AdminServer.log is opened. All server side log events will be written to this file.>
    <Sep 22, 2014 7:13:17 PM IST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Sep 22, 2014 7:13:26 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Sep 22, 2014 7:13:26 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>

    again, another unanswered question.
    BTW I'l keep bumping these until I get an answer that works. I have been up 3 hours now trying to get this sorted and it's something that netbeans is supposed to do on its own!?!?!?!?!
    Hello, SUN, is there anyone there???
    No, didn't think so.

  • Using jxl.jar in Java Web Dynpro using NWDS 7.0.09

    Hi ,
    I have a requiremnt to read excel file and I am trying to use jxl.jar for the same but I am facing issues which using it as External Library DC.During executing,I am getting NoClassFoundException.Please help .

    Hi
    Only one thing u missed that instead of Publishing as file you have to publish it as archive.
    Further u can check
    1. Publish as archive.for both compilation and assembly.
    2. Each changes require Build of the external library dc also.Build it and then run
    Best Regards
    Satish kumar

  • Java 1.5 - Using custom .jar packages

    Hi,
    For part of our Computer Science course we have a packge called cs2.jar which has all sorts of stack, deque etc classes in it. In my source code I insert:
    import cs2.*;and my compile command is:
    javac.exe -source 1.5 -classpath . %n%ewithin Ultraedit. I have placed the cs2.jar file in "C:\Program Files\Java\jre1.5.0_01\lib\ext" as per our lecture's instructions, but my programs still can't insantiate the objects in the .jar file. Am I doing something wrong? Any assistance would be great.
    Cheers,
    Glenn

    You need to tell us the error message(s).
    /Kaj

  • Help - using custom login module with embedded jdev oc4j to access ejb 3

    Hi All (Frank ??),
    I'm just wondering if anyone has successfully been able to leverage a custom login module in combination
    with a client that connects to a local EJB 3 stateless session bean through Jdeveloper 10.1.3.2's embedded oc4j.
    I have spent 2+ days trying to get this to work - and i think I resound now to the fact im going to
    have to deploy to oc4j standalone instead.
    I got close.. but finally was trumped with the following error from the client trying to access the ejb:-
    javax.naming.NoPermissionException: Not allowed to look up XXXXXX, check the namespace-access tag
    setting in orion-application.xml for details.
    Using the various guides available, I had no problem getting the custom login module working
    with a local servlet running from JDev's embedded oc4j.. however with ejb - no such luck.
    I have a roles table (possible values Member, Admin) - that maps to sr_Member and sr_Admin
    respectively in various config files.
    I'm using EJB 3 annotations for protecting methods .. for example
    @RolesAllowed("sr_Member")
    Steps that I had to do so far :-
    In <jdevhome>\jdev\system\oracle.jwee.10.1.3.40.66\embedded-oc4j\config\system-jazn-data.xml1) Add custom login module
        <application>
          <name>current-workspace-app</name>
          <login-modules>
            <login-module>
              <class>kr.security.KnowRushLoginModule</class>
              <control-flag>required</control-flag>
              <options>
                <option>
                  <name>dataSource</name>
                  <value>jdbc/DB_XE_KNOWRUSHDS</value>
                </option>
                <option>
                  <name>user.table</name>
                  <value>users</value>
                </option>
                <option>
                  <name>user.pk.column</name>
                  <value>id</value>
                </option>
                <option>
                  <name>user.name.column</name>
                  <value>email_address</value>
                </option>
                <option>
                  <name>user.password.column</name>
                  <value>password</value>
                </option>
                <option>
                  <name>role.table</name>
                  <value>roles</value>
                </option>
                <option>
                  <name>role.to.user.fk.column</name>
                  <value>user_id</value>
                </option>
                <option>
                  <name>role.name.column</name>
                  <value>name</value>
                </option>
              </options>
            </login-module>
          </login-modules>
        </application>2) Grant login rmi permission to roles associated with custom login module (also in system-jazn-data.xml)
      <grant>
        <grantee>
          <principals>
            <principal>
              <realm-name>jazn.com</realm-name>
              <type>role</type>
              <class>kr.security.principals.KRRolePrincipal</class>
              <name>Admin</name>
            </principal>
          </principals>
        </grantee>
        <permissions>
          <permission>
            <class>com.evermind.server.rmi.RMIPermission</class>
            <name>login</name>
          </permission>
        </permissions>
      </grant>
      <grant>
        <grantee>
          <principals>
            <principal>
              <realm-name>jazn.com</realm-name>
              <type>role</type>
              <class>kr.security.principals.KRRolePrincipal</class>
              <name>Member</name>
            </principal>
          </principals>
        </grantee>
        <permissions>
          <permission>
            <class>com.evermind.server.rmi.RMIPermission</class>
            <name>login</name>
          </permission>
        </permissions>
      </grant>3) I've tried creating various oracle and j2ee deployment descriptors (even though ejb-jar.xml and orion-ejb-jar.xml get created automatically when running the session bean in jdev).
    My ejb-jar.xml contains :-
    <?xml version="1.0" encoding="utf-8"?>
    <ejb-jar xmlns ....
      <assembly-descriptor>
        <security-role>
          <role-name>sr_Admin</role-name>
        </security-role>
        <security-role>
          <role-name>sr_Member</role-name>
        </security-role>
      </assembly-descriptor>
    </ejb-jar>Note- i'm not specifying the enterprise-beans stuff, as JDev seems to populate this automatically.
    My orion-ejb-jar.xml contains ...
    <?xml version="1.0" encoding="utf-8"?>
    <orion-ejb-jar ...
      <assembly-descriptor>
        <security-role-mapping name="sr_Admin">
          <group name="Admin"></group>
        </security-role-mapping>
        <security-role-mapping name="sr_Member">
          <group name="Member"></group>
        </security-role-mapping>
        <default-method-access>
          <security-role-mapping name="sr_Member" impliesAll="true">
          </security-role-mapping>
        </default-method-access>
      </assembly-descriptor>My orion-application.xml contains ...
    <?xml version="1.0" encoding="utf-8"?>
    <orion-application xmlns ...
      <security-role-mapping name="sr_Admin">
        <group name="Admin"></group>
      </security-role-mapping>
      <security-role-mapping name="sr_Member">
        <group name="Member"></group>
      </security-role-mapping>
      <jazn provider="XML">
        <property name="role.mapping.dynamic" value="true"></property>
        <property name="custom.loginmodule.provider" value="true"></property>
      </jazn>
      <namespace-access>
        <read-access>
          <namespace-resource root="">
            <security-role-mapping name="sr_Admin">
              <group name="Admin"/>
              <group name="Member"/>
            </security-role-mapping>
          </namespace-resource>
        </read-access>
        <write-access>
          <namespace-resource root="">
            <security-role-mapping name="sr_Admin">
              <group name="Admin"/>
              <group name="Member"/>
            </security-role-mapping>
          </namespace-resource>
        </write-access>
      </namespace-access>
    </orion-application>My essentially auto-generated EJB 3 client does the following :-
          Hashtable env = new Hashtable();
          env.put(Context.SECURITY_PRINCIPAL, "matt.shannon");
          env.put(Context.SECURITY_CREDENTIALS, "welcome1");
          final Context context = new InitialContext(env);
          KRFacade kRFacade = (KRFacade)context.lookup("KRFacade");
    ...And throws the error
    20/04/2007 00:55:37 oracle.j2ee.rmi.RMIMessages
    EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    javax.naming.NoPermissionException: Not allowed to look
    up KRFacade, check the namespace-access tag setting in
    orion-application.xml for details
         at
    com.evermind.server.rmi.RMIClientConnection.handleLookupRe
    sponse(RMIClientConnection.java:819)
         at
    com.evermind.server.rmi.RMIClientConnection.handleOrmiComm
    andResponse(RMIClientConnection.java:283)
    ....I can see from the console that the user was successfully authenticated :-
    20/04/2007 00:55:37 kr.security.KnowRushLoginModule validate
    WARNING: [KnowRushLoginModule] User matt.shannon authenticated
    And that user is granted both the Admin, and Member roles.
    The test servlet using basic authentication correctly detects the user and roles perfectly...
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        LOGGER.log(Level.INFO,LOGPREFIX +"doGet called");
        response.setContentType(CONTENT_TYPE);
        PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<head><title>ExampleServlet</title></head>");
        out.println("<body>");
        out.println("<p>The servlet has received a GET. This is the reply.</p>");
        out.println("<br> getRemoteUser = " + request.getRemoteUser());
        out.println("<br> getUserPrincipal = " + request.getUserPrincipal());
        out.println("<br> isUserInRole('sr_Admin') = "+request.isUserInRole("sr_Admin"));
        out.println("<br> isUserInRole('sr_Memeber') = "+request.isUserInRole("sr_Member"));Anyone got any ideas what could be going wrong?
    cheers
    Matt.
    Message was edited by:
    mshannon

    Thanks for the response. I checked out your blog and tried your suggestions. I'm sure it works well in standalone OC4J, but i was still unable to get it to function correctly from JDeveloper embedded.
    Did you ever get the code working directly from JDeveloper?
    Your custom code essentially seems to be the equivalent of a grant within system-jazn-data.xml.
    For example, the following grant to a custom jaas role (JAAS_ADMIN) that gets added by my custom login module gives them rmi login access :-
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>kr.security.principals.KRRolePrincipal</class>
                             <name>JAAS_Admin</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>login</name>
                   </permission>
              </permissions>
         </grant>If I add the following to orion-application.xml
      <!-- Granting login permission to users accessing this EJB. -->
      <namespace-access>
        <read-access>
          <namespace-resource root="">
            <security-role-mapping>
              <group name="JAAS_Admin"></group>
            </security-role-mapping>
          </namespace-resource>
        </read-access>Running a standalone client against the embedded jdev oc4j server gives the namespace-access error.
    I tried out your code by essentially creating a static reference to a singleton class that does the role lookup/provisioning with rmi login grant :-
    From custom login module :-
      private static KRSecurityHelper singleton = new KRSecurityHelper();
      protected Principal[] m_Principals;
        Vector v = new Vector();
          v.add(singleton.getCustomRmiConnectRole());
          // set principals in LoginModule
          m_Principals=(Principal[]) v.toArray(new Principal[v.size()]);
    Singleton class :-
    package kr.security;
    import com.evermind.server.rmi.RMIPermission;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import oracle.security.jazn.JAZNConfig;
    import oracle.security.jazn.policy.Grantee;
    import oracle.security.jazn.realm.Realm;
    import oracle.security.jazn.realm.RealmManager;
    import oracle.security.jazn.realm.RealmRole;
    import oracle.security.jazn.realm.RoleManager;
    import oracle.security.jazn.policy.JAZNPolicy;
    import oracle.security.jazn.JAZNException;
    public class KRSecurityHelper
      private static final Logger LOGGER = Logger.getLogger("kr.security");
      private static final String LOGPREFIX = "[KRSecurityHelper] ";
      public static String CUSTOM_RMI_CONNECT_ROLE = "remote_connect";
      private RealmRole m_Role = null;
      public KRSecurityHelper()
        LOGGER.log(Level.FINEST,LOGPREFIX +"calling JAZNConfig.getJAZNConfig");
        JAZNConfig jc = JAZNConfig.getJAZNConfig();
        LOGGER.log(Level.FINEST,LOGPREFIX +"calling jc.getRealmManager");
        RealmManager realmMgr = jc.getRealmManager();
        try
          // Get the default realm .. e.g. jazn.com
          LOGGER.log(Level.FINEST,LOGPREFIX +"calling jc.getGetDefaultRealm");
          Realm r = realmMgr.getRealm(jc.getDefaultRealm());
          LOGGER.log(Level.INFO,LOGPREFIX +"default realm: "+r.getName());
          // Access the role manager for the remote connection role
          LOGGER.log(Level.FINEST,
            LOGPREFIX +"calling default_realm.getRoleManager");
          RoleManager roleMgr = r.getRoleManager();
          LOGGER.log(Level.INFO,LOGPREFIX +"looking up custom role '"
            CUSTOM_RMI_CONNECT_ROLE "'");
          RealmRole rmiConnectRole = roleMgr.getRole(CUSTOM_RMI_CONNECT_ROLE);
          if (rmiConnectRole == null)
            LOGGER.log(Level.INFO,LOGPREFIX +"role does not exist, create it...");
            rmiConnectRole = roleMgr.createRole(CUSTOM_RMI_CONNECT_ROLE);
            LOGGER.log(Level.FINEST,LOGPREFIX +"constructing new grantee");
            Grantee gtee = new Grantee(rmiConnectRole);
            LOGGER.log(Level.FINEST,LOGPREFIX +"constructing login rmi permission");
            RMIPermission login = new RMIPermission("login");
            LOGGER.log(Level.FINEST,
              LOGPREFIX +"constructing subject.propagation rmi permission");
            RMIPermission subjectprop = new RMIPermission("subject.propagation");
            // make policy changes
            LOGGER.log(Level.FINEST,LOGPREFIX +"calling jc.getPolicy");
            JAZNPolicy policy = jc.getPolicy();
            if (policy != null)
              LOGGER.log(Level.INFO, LOGPREFIX
                + "add to policy grant for RMI 'login' permission to "
                + CUSTOM_RMI_CONNECT_ROLE);
              policy.grant(gtee, login);
              LOGGER.log(Level.INFO, LOGPREFIX
                + "add to policy grant for RMI 'subject.propagation' permission to "
                + CUSTOM_RMI_CONNECT_ROLE);
              policy.grant(gtee, subjectprop);
              // m_Role = rmiConnectRole;
              m_Role = roleMgr.getRole(CUSTOM_RMI_CONNECT_ROLE);
              LOGGER.log(Level.INFO, LOGPREFIX
                + m_Role.getName() + ":" + m_Role.getFullName() + ":" + m_Role.getFullName());
            else
              LOGGER.log(Level.WARNING,LOGPREFIX +"Cannot find jazn policy!");
          else
            LOGGER.log(Level.INFO,LOGPREFIX +"custom role already exists");
            m_Role = rmiConnectRole;
        catch (JAZNException e)
          LOGGER.log(Level.WARNING,
            LOGPREFIX +"Cannot configure JAZN for remote connections");
      public RealmRole getCustomRmiConnectRole()
        return m_Role;
    }Using the code approach and switching application.xml across so that namespace access is for the group remote_connect, I get the following error from my bean :-
    INFO: Login permission not granted for current-workspace-app (test.user)
    Thus, the login permission that I'm adding through the custom remote_connect role does not seem to work. Even if it did, i'm pretty sure I would still get that namespace error.
    This has been such a frustrating process. All the custom login module samples using embedded JDeveloper show simple j2ee servlet protection based on settings in web.xml.
    There are no samples showing jdeveloper embedded oc4j using ejb with custom login modules.
    Hopefully the oc4j jdev gurus like Frank can write a paper that demonstrates this.
    Matt.

  • Use Custom Jar in Enterprise OBPM

    Hi,
    We are using a JXL.jar(by importing the jar as an external resource) to create excel sheet. It is working correctly in the studio, but when we deploy it into the enterprise environment we get the below error:
    Caused by: The task could not be successfully executed.
    Reason: 'java.lang.NoClassDefFoundError: jxl/Workbook'.
    Caused by: jxl/Workbook
    Can anybody let me know if there is something that needs to be done on the enterprise end to make this work?
    Thanks.

    Dan, Bitu,
    I'm working with the original poster. The "'java.lang.NoClassDefFoundError: jxl/Workbook'" error is observed (only) on our install of OBPM 10.3.1 Enterprise on WebLogic.
    I do understand we can "force" the .jar to be loaded from WebLogic (thank you to Bitu's post on this thread, and also confirmed her java.lang.NoClassDefFoundError in OBPM sever ). However, that is not the ideal situation and we would like to troubleshoot at the OBPM level (why isn't the .jar loaded?)
    Can you share with us what should normally happened when a .jar is deployed to the engine please? Should we expect an entry in the Directory (FUEGO_CATALOGJAR)? -- Because I currently don't see any JXL entry on this table.
    I also observed that the versions 2.6.12 and 2.6.11 of the JXL api (that can be found here http://sourceforge.net/projects/jexcelapi/files/) cannot be introspected in Studio (throwing an error; I can share more details if needed), so we are using an older version. Can that be related perhaps?
    Max

  • Help-using document as a java swing component

    Hi,
    can i use a document excel file or a doc file as a swing component.
    i have few templates in in excel and .doc format.
    i use them to produce bills by just entering data.
    Now i want to develop a swing application and use the same templates in jpanel or jtextpane or jeditorpane.
    its very hectic to make templates in swing using tables and all.
    is there any api which can help me out???
    thanks

    as a Swing component? No.
    There's probably libraries for reading those types of files, and maybe displaying them. POI, perhaps?

  • Where do I add my custom jar library files

    I need sone extra .jar library files, fo my application to compile. e.g
    lotusxsl.jar, xerces.jar
    what should be the location of these files, in the .ear file, and also in
    exploded directory?

    Yes, that might work but the problem is that to my understanding only the
    content of .ear-files are distributed to managed servers. Where do I put my
    jar-files inside the .ear-file?
    "Viresh Garg" <[email protected]> wrote in message
    news:[email protected]..
    best thing would be to put them in any relqative directory in archive or
    exloaded directory and then add them as classpath element in manifest filefor
    your archive/exloaded directory.
    Viresh Garg
    Manmari wrote:
    Thanks Viresh. So in 6.1 where do I put these files in the .ear ?
    My guess is, I need to put them under WEb-INF/lib directory in the .war
    file. and similarly in the exploded directory as well.
    Can you please confirm this, or otherwise?
    Thanks
    "Viresh Garg" <[email protected]> wrote in message
    news:[email protected]..
    Currently you have to put then in system classpath and not include in.ear.
    Unfortunately manifest calsspath currently doesn't work with
    enterprise
    archive. This is getting fixed in 6.1, for which beta is alreadyavailable.
    Consult J2EE Application specifications for manifest classpath and to
    know
    how it works.
    Viresh Garg
    BEA Systems
    Manmari wrote:
    I need sone extra .jar library files, fo my application to compile.
    e.g
    lotusxsl.jar, xerces.jar
    what should be the location of these files, in the .ear file, andalso
    in
    exploded directory?

  • Add custom field to af:query component?

    Anyone had any experience overriding af:query copmonent? I need to add my custom search field (to query component), which would have a search icon next to it, and on click, a popup widow would open containing my custom task flow where I could select a record with certain value and on return that custom field (in query component) would get populated with selected value. I hope I'm being clear. Please point me to any useful information. Is that even possible? I use JDeveloper 11.1.2.3.4.0 Regards, Marko

    Hi,
    af:query is a component that comes as is. Its not designed for customization in that you can add your own fields. If you have a requirement for this then
    1. expose a method on the VO Impl or AM Impl that expect arguments (your query parameters)
    2. Use the arguments to populate bind variables used by a ViewCriteria
    3. Apply the View Criteria to the View Object
    4. Execte the View Object
    5. Drag and drop the method from the DC panel as a parameter form
    6. Ensure the result table PartialTrigger property is pointing to the button ID of the parameter form
    7. Change whatever UI component you want to change in the parameter form
    This gets you going ...
    Frank

  • Restricting actions in "Java Embedding" BPEL component

    While playing around with BPEL processes in Oracle SOA Suite 11g, I found that a System.exit(1) in the Java Embedding component actually shuts down the weblogic server. Are there means to restrict similar code from executing (such as by assigning specific security policies)?
    I'd assume that if the implementation of Java Embedding forks a new JVM to execute the embedded code, this problem wouldn't have occurred. Is there some way in SOA suite to specify this behavior?
    Appreciate your response,
    ~Raman

    What is the variable type of configData? if this is simple type string then you can assign the value directly else if the variable of type xsd element or message type the syntax looks as below
    setVariableData("variablename","partname","xpath",data);
    e.g
    setVariableData("outputVariable","payload","/client:HelloJavaEmbedBPELProcessResponse/client:result",xmlData);
    Mark the posting appropriately as "helpful" or "correct answer", if your issue is solved.
    Regards
    Albin I
    [http://www.albinsblog.com/]

  • How to use external jars in NW2004

    Hello Experts,
    can i use the same approach mentioned in the below Weblog for using the external jars in NW2004.
    /people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components
    and if not then what will be the best way to achieve it in  NW2004.
    Please provide your inputs on above.
    Regards,
    Siddharth

    Hi Sidharth,
    If you are using web dynpro DC perspective then you need to follow the following points to use the external jar files in it.
    1. Create a external library project.
    2. copy the external jars in the library folder os the projects.
    3.) Select all the jars from the u201CLibrariesu201D folder, Right click and then select Development Component and click on Add to Public Part
    4.Select the first Radio Button (Provides an API)and give some nameto it.
    5. Repeat the step no 3 but now select the second radio button other than as selected in step no 4.
    6. Now build your lirary DC.
    7. Now create a j2ee DC project.
    8. ) Expand the node DC Definition and Right Click on Used DC. Select Add Used DC.
    9. Select the External Library DC with build time dependency.
    10.Right click on the J2EE DC and then select Development Component followed by Build
    11. Right click on the J2EE DC and then select Development Component followed by Deploy
    now you can use both the libary DC and the j2ee DC in your web dynpro DC as used DC.
    But if you have created a web dynpro project only(but not DC) than you can directly add the external jars in java build path
    hope this will help
    regards
    Narendra
    Edited by: Narendra Singh on Oct 27, 2009 11:22 AM

  • Problem with socket connection through Java Embedding...

    We are trying to create a simple socket connection to a socket server through BPEL PM using the Java Embedding component.
    BPEL Process : Client makes an asynchronous request. Passes an input variable. The input variable is sent to the Server Program through a socket connection through the Java embedding component.
    Server: We are running a simple Socket Server program from command prompt.
    The code below works fine as long as we do not try to receive a response from the server (Commented Code).
    If we uncomment the code and try to receive a response, it refuses to create an instance for the BPEL Process. And sometimes restarts the BPEL Server.
    Client Code:
    String msg="NONE";
    try{
    org.w3c.dom.Element input = (org.w3c.dom.Element) getVariableData("inputVariable","payload","/client:clientProcessRequest/client:input");
    msg = input.getNodeValue();
    Socket clientsoc=new Socket("ServerIP",1000);
    PrintWriter out1=new PrintWriter(clientsoc.getOutputStream());
    out1.write(msg);
    out1.flush();
    BufferedReader cin1=new BufferedReader(new InputStreamReader(clientsoc.getInputStream()));
    msg=cin1.readLine();
    setVariableData("outputVariable","payload","/client:result",new String(msg));
    clientsoc.close();
    catch(UnknownHostException e)
    System.err.println("Don't know about host: dev.");
    System.exit(1);
    catch (IOException e)
    System.err.println("Couldn't get I/O for "+ "the connection to: dev.");
    System.exit(1);
    }

    Repost

Maybe you are looking for

  • Tab Content Alignment in JTabbedPane

    I want to left-align the contents of the tabs on my JTabbedPane, so that the icons all line up. Does anyone have a procedure for doing this?

  • Running wlst command in embeded mode results in error for deleteMetadata()

    I need to use wlst command deleteMetadata() in embeded mode. I had followed instruction at http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_scripting/using_WLST.html, to import the wlst interpreter, The command I use is: deleteMetadata

  • Attempting to open a doc

    Attempting to open a document but it only shows the first page and won't scroll down to the other pages. The docs are opened via a university proxy(the blackboard network). I am thinking it has to be a plug in or missing app problem but I have no ide

  • If change in PO value, need other rel stategy made for value change only

    I have customized PO Relase strategy based on value. working correctly. In that, if there is a change in PO value after the PO release, then Release strategy is being redetermined according to new value. But user wants that if there is a change in PO

  • Repairing damaged itunes files

    Hi, not sure what happened but i went into my itunes one morninging and found my library file was damaged and a new one was in place. the new one only had a few of my songs... i lost play lists and almost all my music. any way to repair the old damag