EJBs accessing protected classes from java classloader

Hello,
We are facing a problem with classes isolation. I read from this newsgroup that
to access a package level class from the base classloader from a bean, the supporting
classes has to be from the same classloader as the bean. Well I think the only
way we could do that is to have the *Bean.class in the base classloader, which
is not what's recommended or move the support classes into the bean's classloader,
which we cannot do.
The purpose of this mail is to ask: is it a bug from weblogic server? Will it
be fixed one day? If not, does it mean that it is impossible to isolate classes
for local access from public classes?
Thank you, Khiet.

Thank you for your reply.
Hope that one day we will not be obliged to have anything in the main classpath.
:) Khiet.
Rob Woollen <[email protected]> wrote:
Tran T. Khiet wrote:
Hello,
We are facing a problem with classes isolation. I read from this newsgroupthat
to access a package level class from the base classloader from a bean,the supporting
classes has to be from the same classloader as the bean. Well I thinkthe only
way we could do that is to have the *Bean.class in the base classloader,which
is not what's recommended or move the support classes into the bean'sclassloader,
which we cannot do.All correct.
The purpose of this mail is to ask: is it a bug from weblogic server?No, it's how java classloaders work.
Will it
be fixed one day? If not, does it mean that it is impossible to isolateclasses
for local access from public classes?You can expect that future versions of WLS will allow the user more
control over classloaders, but for now you'll need public or protected
access to cross classloaders.
-- Rob
Thank you, Khiet.

Similar Messages

  • Using ExecutorService class from java.util.concurrent package

    Dear java programmers,
    I have a question regarding the ExecutorService class from java.util.concurrent package.
    I want to parse hundreds of files and for this purpose I'm implementing a thread pool. The way I use the ExecutorService class is summarized below:
    ExecutorService executor = Executors.newFixedThreadPool(10);
            for (int i = 0; i < 1000; i++){
                System.out.println("Parsing file No "+i);
                executor.submit(new Dock(i));
            executor.shutdown();
            try {
                executor.awaitTermination(30, TimeUnit.SECONDS);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            executor.shutdownNow();However, the code snippet above creates all the 1000 threads (Dock objects) at once and loads them to the executor, and thus I'm worrying about memory leak. I haven't tested it on 1000 files yet but just on 50 small ones, and even if the program prints out "Parsing file No "+i 50 times at once, it executes normally the threads in the background.
    I guess the write way would be to keep the number of active/idle threads in the executor constant (lets say 20 if the thread pool's size is 10) and submit a new one whenever a thread has been finished or terminated. But for this to happen the program should be notified someway whenever a thread is done. Can anybody help me do that?
    thanks in advance,
    Tom

    Ok I found a feasible solution myself although I'm not sure if this is the optimum.
    Here's what I did:
            ExecutorService executor = Executors.newFixedThreadPool(10);
            Future<String> future0, future1, future2, future3, future4, future5, future6, future7, future8, future9;
            Future[] futureArray = {future0 = null, future1 = null, future2 = null, future3 = null, future4 = null, future5 = null,
            future6 = null, future7 = null, future8 = null, future9 = null};
            for (int i = 0; i < 10; i++){
                futureArray[i] = executor.submit(new Dock(i));
            }I created the ExecutorService object which encapsulates the thread pool and then created 10 Future objects (java.util.concurrent.Future) and added them into an Array.
    For java.util.concurrent.Future and Callable Interface usage refer to:
    [http://www.swingwiki.org/best:use_worker_thread_for_long_operations]
    [http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter10/concurrencyTools.html]
    I used a Future[] Array to make the code neater. So after that I submitted -and in this way filled up- the first 10 threads to the thread pool.
            int i = 9;
            while (i < 1000){
                for (int j = 0; j < 10; j++){
                    if (futureArray[j].isDone() && i < 999){
                        try{
                            i++;
                            futureArray[j] = executor.submit(new Dock(i));
                        } catch (ExecutionException ex) {
                            ex.printStackTrace();
                        } catch (InterruptedException ex) {
                            ex.printStackTrace();
                try {
                    Thread.sleep(100); // wait a while
                } catch(InterruptedException iex) { /* ignore */ }
            executor.shutdown();
            try {
                executor.awaitTermination(60, TimeUnit.SECONDS);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            executor.shutdownNow();
        }Each of the future[0-9] objects represents a thread in the thread pool. So essentially I'm check which of these 10 threads has been finished (using the java.util.concurrent.Future.isDone() method) and if yes I replenish that empty future[0-9] object with a new one.

  • How to call EJB deployed on OC4J from java stored procedure?

    Hello,
    I'd like to call EJB from java stored procedure. My example works fine from command line, but the problem seems to be with deployment of this code into database. Especialy I'm wondering how to reference jars like oc4jclient.jar, ejb.jar, ... from java stored procedure.
    Is there some example how to do that ?
    Can You help me please ?
    Many thanks,
    Radim Kolek,
    Eurotel Prague.

    Hi,
    You may want to check up this thread
    Calling JBoss EJBs from Java stored procedure
    Hope this helps,
    Sujatha.
    OTN Group.

  • Calling an EJB deployed in OC4J from Java Stored Proc in Oracle

    Hello!
    Trying to make a call to an EJB deployed in OCJ4 from a oracle java stored proc. After loaded orion.jar and crimson.jar lib into SCOTT schema, I can't get the JNDI Context working because of this error:
    ============================================
    javax.naming.NoInitialContextException: Cannot instantiate class:
    com.evermind.server.ApplicationClientInitialContextFactory. Root exception is
    java.lang.ClassNotFoundException:
    com/evermind/server/ApplicationClientInitialContextFactory
    at java.lang.Class.forName0(Class.java)
    at java.lang.Class.forName(Class.java)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:45)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java)
    at javax.naming.InitialContext.init(InitialContext.java)
    at javax.naming.InitialContext.<init>(InitialContext.java)
    ===============================
    I did load the java with "loadjava" with on time with the "resolve" option and time time no option and still no working.
    Here is the EJB client code:
    =======================================
    import java.sql.*;
    import java.util.*;
    import javax.naming.*;
    import com.evermind.server.ApplicationClientInitialContextFactory;
    class EmpRemoteCall {
    public static void main(String[] args) {
    System.out.println(getEmpName());
    public static String getEmpName() {
    String ejbUrl = "java:comp/env/ejb/Emp";
    String username = "admin";
    String password = "admin";
    Hashtable environment = new Hashtable();
    environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationClientInitialContextFactory");
    environment.put(Context.PROVIDER_URL, "ormi://127.0.0.1/testemp");
    environment.put(Context.SECURITY_PRINCIPAL, username);
    environment.put(Context.SECURITY_CREDENTIALS, password);
    //environment.put(Context.SECURITY_AUTHENTICATION, ServiceCtx.NON_SSL_LOGIN);
    //environment.put(javax.naming.Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    com.kboum.sertir.essais.EmpHome homeInterface = null;
    try {
    Class.forName("com.evermind.server.ApplicationClientInitialContextFactory", true, ClassLoader.getSystemClassLoader());
    System.out.println("Creating an initial context");
    Context ic = new InitialContext(environment);
    System.out.println("Looking for the EJB published as 'java:comp/env/ejb/Emp'");
    homeInterface = (com.kboum.sertir.essais.EmpHome) ic.lookup(ejbUrl);
    catch (CommunicationException e) {
    System.out.println("Unable to connect: " + ejbUrl);
    e.printStackTrace();
    //System.exit(1);
    catch (NamingException e) {
    System.out.println("Exception occurred!");
    System.out.println("Cause: This may be an unknown URL, or some" +
    " classes required by the EJB are missing from your classpath.");
    System.out.println("Suggestion: Check the components of the URL," +
    " and make sure your project includes a library containing the" +
    " EJB .jar files generated by the deployment utility.");
    e.printStackTrace();
    //System.exit(1);
    catch (ClassNotFoundException e) {
    System.out.println("Unable to connect: " + ejbUrl);
    e.printStackTrace();
    //System.exit(1);
    try {
    System.out.println("Creating a new EJB instance");
    com.kboum.sertir.essais.Emp remoteInterface = homeInterface.findByPrimaryKey(Integer.valueOf("7369"));
    System.out.println(remoteInterface.getENAME());
    System.out.println(remoteInterface.getSAL());
    remoteInterface.setSAL(2);
    System.out.println(remoteInterface.getSAL());
    return remoteInterface.getENAME();
    catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    return "error";
    null

    What I did to solve this problem was to
    create a simple RMI remote object that
    resides outside the database JVM and that
    serves as a proxy EJB client for your java
    stored procedure. The stored procedure can
    invoke a method on the remote RMI object
    which then looks up the EJBean's home
    interface and invokes the relevant method on
    the bean's remote interface, and relays any
    return values back to the java stored
    procedure.
    Hope this helps,
    Avi.
    null

  • Access parent class from instance of nested class

    Hi,
    I have the following class hierarchy:
    public class BaseClass
    public class ParentClass
      private NestedClass    mNestedClass;
      public ParentClass()
        mNestedClass = new NestedClass();
      protected NestedClass getNestedClass()
        return mNestedClass;
      public static BaseClass createParentClass()
        parentClass = new ParentClass();
        // some code...
        return parentClass.getNestedClass();
      protected class NestedClass extends BaseClass
        NestedClass( int i )
          // some other code...
    }I cannot modify the classes above, as they are third-party and they are subject to changes...
    In my code, I may only use the static method to create an instance of ParentClass, because there is some important code (not accessible outside of the package) instead of the comments. The problem is that the static method only returns me an instance of the NestedClass, but not the ParentClass. For some reasons, I would need to access the instance of ParentClass.
    Is there a way (Java syntax, I mean) that would allow me to access from an instance of NestedClass the corresponding ParentClass instance?
    I know that inside a NestedClass method I may use ParentClass.this, but, as I wrote above, that class cannot be modified. Worse, I am not able to extend it neither, because the constructor is not public (or at least protected)...
    Please, does anybody have the correct answer?
    Thanks,
    Adrian

    There are at least 3 funny things in the code you posted:
    1) an instance of NestedClass cannot be created with "new NestedClass()", because the only constructor is NestedClass(int)
    2) I can't see why a method called "createParentClass" should return an instance of NestedClass
    3) The funniest: I really can't understand why you "may only use the static method to create an instance of ParentClass": if the ParentClass developer didn't want you to instantiate it directly, why did he made the constructor public?
    But the fact is there's no way to access the enclosing object of a nested object if the sw architect didn't want this (maybe including in the interface a method like this:
    class EnclosingClass {
      class NestedClass {
       EnclosingClass getEnclosingObject() {
        return EnclosingClass.this;
    This simply should break encapsulation and object hyerarchy security... really a bad thing I guess!!
    Bye

  • Unable to access protected function from the child object

    Hi all ,
    I have an abstract class having one protected method
    package foo;
    public abstract class A {
      protected String getName(){
                 return "ABC';
    package xyz;
    public class B extends A {
              public void print(){
                              *super.getName();//this will get called*
    package abc;
    public class Ex {
            public static void main(String [] args){
               B b = new B();
               *b.getName(); //Im not able to calll this function*
    }{code}
    My question is why I m not able to call the protected method from child instance but inside the class ???
    I have checked this link , it also didn't say about the instance access or access within class .
    [http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html]
    Thanks and regards
    Anshuman
    Edited by: techie_india on Aug 31, 2009 11:25 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    jossyvjose wrote:
    Hi Winston,
    Did you mean like this? But still same behaviour.
    package abc;
    public class Ex extends A {
    public static void main(String [] args){
    B b = new B();
    b.getName(); //still i am not able to calll this function
    }No. Class 'Ex' would have to extend B in order to call b.GetName(). And I would definitely not make Ex part of your hierarchy (it's the sort of thing you see in SCJP questions, but definitely a bad idea).
    What you can do though is to override the method; and Java allows you to change the visibility of overriden methods, provided they are more open. Thus, the following would be allowed:
    package foo;
    public abstract class A {
       protected String getName(){
          return "ABC';
    package xyz;
    public class B extends A {
       public void print(){
          System.out.println(super.getName()); // your previous code does nothing...
       public String getName() { // Note the "public" accessor
          return super.getName();
    package abc;
    public class Ex {
       public static void main(String [] args){
          B b = new B();
          b.getName(); // And NOW it'll work...
    {code}Note that this is just example code. I wouldn't suggest it as general practise.
    Also, when you write *public* methods, you should generally make them *final* as well (there are exceptions, but it's a good habit to get into; like making instance variables *private* - just do it).
    HIH
    Winston                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Accessing custom classes from JSP

    Hi Guys,
    I am having some problems accessing my custom classes from my JSP.
    1) I've created a very simple class, SimpleCountingBean that just has accessors for an int. The class is in the package "SimpleCountingBean". I compiled this class locally on my laptop and uploaded the *.class file to my ISP.
    2) I've checked my classpath and yes, the file "SimpleCountingBean/SimpleCountingBean.class" is located off of one of the directories listed in the classpath.
    3) When I attempt to use this class in my JSP, via the following import statement:
    import "SimpleCountingBean.*"
    I get the following compile error
    java.lang.NoClassDefFoundError: SimpleCountingBean/SimpleCountingBean
    I'm pretty sure that my classpath is properly setup because when I purposely garble the import statement, I get the "package not found" compile error.
    Do I need to upload some other files in addition to the class file? Any suggestions would of course be appreciated.
    Sonny.

    Trying to get some clearer view.. so don't mind..
    So you uploaded all your .jsp files into your account which is:
    home/sonny
    and it compiles and work. But custom classes doesn't seems to be working, where did you place your classes?
    From my knowledge of tomcat, classes are normally placed in, in this case:
    home/sonny/web-inf/classes
    Maybe it differs from windows enviroment to *nix enviroment.. well, I'm just saying out so if its not the case.. don't mind me.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • "access denied" error from Java Web Start

    I can successfully download the jar file, but always have error message "access denied" when the java application tries to open a local file in C:\temp\poc1.xml.
    I can successfully execute the java application from DOS,but failed when using Java Web Start. The error message is as follows:
    Java Web Start Console, started Wed Nov 28 16:30:31 PST 2001Java 2 Runtime Environment: Version
    1.3.1 by Sun Microsystems Inc.java.security.AccessControlException: access denied
    (java.io.FilePermission C:\temp\poc1.xml read)     at
    org.apache.xerces.framework.XMLParser.parse(Unknown Source)     at
    org.apache.xerces.framework.XMLParser.parse(Unknown Source)     at
    com.hotlocker.client.HLSessionParser.parse(Unknown Source)     at
    com.hotlocker.client.UploadDownloadClient.uploadFiles(Unknown Source)     at
    com.hotlocker.client.UploadDownload.main(Unknown Source)     at
    java.lang.reflect.Method.invoke(Native Method)     at
    com.sun.javaws.Launcher.executeApplication(Unknown Source)     at
    com.sun.javaws.Launcher.executeMainClass(Unknown Source)     at
    com.sun.javaws.Launcher.continueLaunch(Unknown Source)     at
    com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)     at
    com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)     at
    com.sun.javaws.Launcher.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)

    Hi,
    you can't get a file like in a "normal" app
    because a JWS-app runs in the restricted
    sandbox environment by default.
    So you either sign your app with a digital certificate
    or you use a special FileOpenService (JNLP-API).
    You could also put the file into the app-jar and
    load it by a classloader.
    Regards,
    Mathias

  • Accessing utility classes from ebj

    I have a session bean trying to access a utility class in the lib directory (same
    directory as weblogic.jar). I have packaged it into a jar file and set the classpath
    pointing to the file in the startWeblogic.cmd file. I compiled and depolyed the session
    bean and it runs fine until it starts to access the class. I got NoClassFoundException.
    I have tried to shut down and restart the server without any success. Anyone can
    help me this this?
    I know I can package the utility into the same jar as my ejb. But I don't want to
    do it because it is going to be everywhere. What is the right way of doing it?
    Thanks in advance.
    L.W.Xu

    Rob,
    You are right.
    Thanks a lot.
    L.W.X.
    Rob Woollen <[email protected]> wrote:
    >
    >
    If it's in the server classpath, the ejb will have no problem finding it.
    Either you have a typo and the class is not in the classpath. You can prove
    this by running
    javap on the class using the same classpath as your startWebLogic script.
    Or, as I suggested in the last response, it's not really standalone. The
    jar probably has a
    dependence on some classes in the ejb.jar.
    -- Rob
    "L. W. Xu" wrote:
    Rob,
    It is a standalone generic jar which has some classes in it. The ejb justcan't find
    it.
    I have a simple java program which uses it and it runs fine.
    Thanks.
    L. W. Xu
    Rob Woollen <[email protected]> wrote:
    If your utility.jar is standalone, then your approach is fine. However,
    it sounds like it
    is referencing a class that's only
    available in your ejb.jar. That won't work.
    -- Rob
    "L. W. Xu" wrote:
    I have a session bean trying to access a utility class in the lib directory(same
    directory as weblogic.jar). I have packaged it into a jar file and
    set
    the classpath
    pointing to the file in the startWeblogic.cmd file. I compiled and
    depolyed
    the session
    bean and it runs fine until it starts to access the class. I got NoClassFoundException.
    I have tried to shut down and restart the server without any success.Anyone can
    help me this this?
    I know I can package the utility into the same jar as my ejb. But I
    don't
    want to
    do it because it is going to be everywhere. What is the right way of
    doing
    it?
    Thanks in advance.
    L.W.Xu--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    If your utility.jar is standalone, then your approach is fine. However,
    it sounds like it is referencing a class that's only
    <br>available in your ejb.jar. That won't work.
    <p>-- Rob
    <p>"L. W. Xu" wrote:
    <blockquote TYPE=CITE>I have a session bean trying to access a utility
    class in the lib directory (same
    <br>directory as weblogic.jar). I have packaged it into a jar file and
    set the classpath
    <br>pointing to the file in the startWeblogic.cmd file. I compiled and
    depolyed the session
    <br>bean and it runs fine until it starts to access the class. I gotNoClassFoundException.
    <br>I have tried to shut down and restart the server without any success.
    Anyone can
    <br>help me this this?
    <p>I know I can package the utility into the same jar as my ejb. ButI
    don't want to
    <br>do it because it is going to be everywhere. What is the right wayof
    doing it?
    <p>Thanks in advance.
    <p>L.W.Xu</blockquote>
    <pre>--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com</pre>
    </html>
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    If it's in the server classpath, the ejb will have no problem finding it.
    <p>Either you have a typo and the class is not in the classpath. 
    You can prove this by running javap on the class using the same classpath
    as your startWebLogic script.
    <p>Or, as I suggested in the last response, it's not really standalone.  
    The jar probably has a dependence on some classes in the ejb.jar.
    <p>-- Rob
    <br> 
    <p>"L. W. Xu" wrote:
    <blockquote TYPE=CITE>Rob,
    <p>It is a standalone generic jar which has some classes in it. The ejb
    just can't find
    <br>it.
    <p>I have a simple java program which uses it and it runs fine.
    <p>Thanks.
    <p>L. W. Xu
    <p>Rob Woollen <[email protected]> wrote:
    <br>>
    <br>>
    <br>>If your utility.jar is standalone, then your approach is fine. 
    However,
    <br>>it sounds like it
    <br>>is referencing a class that's only
    <br>>available in your ejb.jar.  That won't work.
    <br>>
    <br>>-- Rob
    <br>>
    <br>>"L. W. Xu" wrote:
    <br>>
    <br>>> I have a session bean trying to access a utility class in the lib
    directory
    <br>>(same
    <br>>> directory as weblogic.jar). I have packaged it into a jar file and
    set
    <br>>the classpath
    <br>>> pointing to the file in the startWeblogic.cmd file. I compiled and
    depolyed
    <br>>the session
    <br>>> bean and it runs fine until it starts to access the class. I got
    NoClassFoundException.
    <br>>> I have tried to shut down and restart the server without any success.
    <br>>Anyone can
    <br>>> help me this this?
    <br>>>
    <br>>> I know I can package the utility into the same jar as my ejb. But
    I don't
    <br>>want to
    <br>>> do it because it is going to be everywhere. What is the right way
    of doing
    <br>>it?
    <br>>>
    <br>>> Thanks in advance.
    <br>>>
    <br>>> L.W.Xu
    <br>>
    <br>>--
    <br>>
    <br>>----------------------------------------------------------------------
    <br>>
    <br>>AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    <br>>
    <br>>by Michael Girdley, Rob Woollen, and Sandra Emerson
    <br>>
    <br>>http://learnWebLogic.com
    <br>>
    <br>>
    <br>>
    <br>>
    <br>><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <br>><html>
    <br>>If your utility.jar is standalone, then your approach is fine. 
    However,
    <br>>it sounds like it is referencing a class that's only
    <br>><br>available in your ejb.jar.  That won't work.
    <br>><p>-- Rob
    <br>><p>"L. W. Xu" wrote:
    <br>><blockquote TYPE=CITE>I have a session bean trying to access a
    utility
    <br>>class in the lib directory (same
    <br>><br>directory as weblogic.jar). I have packaged it into a jar file
    and
    <br>>set the classpath
    <br>><br>pointing to the file in the startWeblogic.cmd file. I compiled
    and
    <br>>depolyed the session
    <br>><br>bean and it runs fine until it starts to access the class.
    I got NoClassFoundException.
    <br>><br>I have tried to shut down and restart the server without any
    success.
    <br>>Anyone can
    <br>><br>help me this this?
    <br>><p>I know I can package the utility into the same jar as my ejb.
    But I
    <br>>don't want to
    <br>><br>do it because it is going to be everywhere. What is the right
    way of
    <br>>doing it?
    <br>><p>Thanks in advance.
    <br>><p>L.W.Xu</blockquote>
    <br>>
    <br>><pre>--
    <br>>
    <br>>----------------------------------------------------------------------
    <br>>
    <br>>AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    <br>>
    <br>>by Michael Girdley, Rob Woollen, and Sandra Emerson
    <br>>
    <br>>http://learnWebLogic.com"><a
    href="http://learnWebLogic.com">http://learnWebLogic.com</a></A></pre>
    <br>> </html>
    <br>>
    <br>></blockquote>
    <pre>-- 
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    <A HREF="http://learnWebLogic.com">http://learnWebLogic.com</A></pre>
     </html>

  • Accessing IFS classes from Weblogic

    Can I access the classes of IFS from within Weblogic by adding the IFS jars to the Classpath of Weblogic?
    Also how does EJBs work with IFS?
    Kaustuva Mukherjee

    I'm doing exactly the same thing that you are asking. first install ifs client on weblogic server, so that all ifs jar files are on weblogic. then do this in the weblogic class path file:
    REM ------------------ IFS CLASSPATH ------------------------
    SET IFS_CLASSPATH=d:\Oracle\Ora81\ifs1.1\lib\adk.jar;d:\Oracle\Ora81\ifs1.1\lib\clientlib.jar;d:\Oracle\Ora81\ifs1.1\lib\cmdlineutils.jar;d:\Oracle\Ora81\ifs1.1\lib\cup.jar;d:\Oracle\O ra81\ifs1.1\lib\http.jar;d:\Oracle\Ora81\ifs1.1\lib\oemadmin.jar;d:\Oracle\Ora81\ifs1.1\lib\release.jar;d:\Oracle\Ora81\ifs1.1\lib\repos.jar;d:\Oracle\Ora81\ifs1.1\lib\utils.jar;d: \Oracle\Ora81\ifs1.1\lib\webui.jar;d:\Oracle\Ora81\ifs1.1\settings
    and include IFS_CLASSPATH in your weblogic path.
    restart weblogic and u'll have all ifs classes for your use.
    null

  • Accessing  table type from JAVA

    Hi Experts,
    We are making a custom copy of the std FM COM_BPUS_ORG_CONTPERS_REGISTER .
    It is observed that Tables are obsolete and we should not use them in custom function modules.
    I can pass a table type in import parameter and export parameter.
    Can we access a table type from java layer.
    Also, note that this STANDARD function module has parameter IT_BUSINESSPARTNERROLE_ORG which has table type BU_ROLE_T.
    Is it possible to access this?
    Note:- This Function module is not getting called in standard web shops.
    Please let me now how i can access this table type for hava while calling FM so as to input or retrieve valus from it.
    Regards
    Antony

    The issue with you is more than accessing a table type.
    You said:
    This Function module is not getting called in standard web shops.
    For function modules that are not called as a part of the standard flow, you have to develop your own simple BOM, BO, BEI, BE classes and methods to call the custom RFC - the whole nine yards. See the extension guide and see the Extension Demos 2 and 3 for reference.
    See the sample JCO calls from Java to understand how to access the table types.

  • How to access physical files from java platform

    Hello All,
    We have one JDE Word Writer program, which export the order master data in the DB2/400 Physical files.
    We want to access this data from our java program (reside on windows platform). I am wondering how we can do that. I got one hint that can be accessed by ODBC connection. But I am unable to get the correct ODBC driver. I am looking for correct driver to access the data.
    If some one has done this already, please help me. Or suggest me any alternate way.
    Dinesh

    Can use File class to write code to examine and manipulate file.
    Tutorial: http://java.sun.com/docs/books/tutorial/essential/io/file.html

  • XMLAnalysis Error while trying to execute a MDX query on MS SSAS - Accessing the cube from Java through Olap4j driver

     Am trying to access MS SSAS data cube from Java through olap4j driver(through msmdpump.dll). I am able to connect , but when I try to execute a query, i am getting the below error: Please help
    me out . (I tested the http://XXXX/OLAP/msmdpump.dll in MS Excel , and it is working fine)
    org.olap4j.OlapException: XMLA provider gave exception: <soap:Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>
    XMLAnalysisError.0xc10a0004
    </faultcode>
    <faultstring>
    The CRASHDWHSRG cube either does not exist or has not been processed.
    </faultstring>
    <detail>
    <Error Description="The CRASHDWHSRG cube either does not exist or has not been processed." ErrorCode="3238658052" HelpFile="" Source="Microsoft SQL Server 2012 Analysis Services">
    </Error>
    </detail>
    </soap:Fault>

    See my other answer where you asked this same question on another thread
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/22dfc400-668d-4bd4-b76d-7c6b9ddda47a/msmdpumpdll-not-getting-registered?forum=sqlanalysisservices
    http://darren.gosbell.com - please mark correct answers

  • Class not Found when accessing Proxy class from backing bean in VC.

    Hi All,
    I'm attempting to access a class of a webservice(generated as a proxy) within my ADF application and invoke the method within a backing bean of the View Controller(bean scope : backing bean). The proxy has generated an ObjectFactory class among other classes. When I access this Object factory class from within the backing bean, the application throws a Class not found error.
    I don't know where the error lies since I've declared the View Controller of the ADF application dependent on the Proxy and I've imported the class and accessing it within a backing bean. How would you suggest I approach resolveing this.
    JDev : 1.1.1.4
    Thank you.
    Regards
    PP.

    Hello Arun,
    Thank you for suggesting a Data control, but my requirement isn't to drag and drop the method as a button. It's more of a behind the scnes updating data via a database adapter requirement.
    I've resolved the issue. turns out, my deployment archive didn't include the proxy.jpr. Once included it works likea charm.
    Thanks
    PP.

  • Accessing DLL files from Java

    I have a problem with Java, and the problem is that I'm trying to call a DLL file declared by C++ only but without a support for Java programs, is what I'm aiming for going to be available by using the rundll32.exe file.
    Note: I'm trying to use the (skydll.dll) file for controling skystar2 DVB card.
    Message was edited by:
    JZoro

    You cannot directly call a DLL from Java unless the DLL exposes entry points that are compatible with the JNI calling conventions.
    For example a Java class calling a native function like below:
    class Arguments
       private native void setArgs (String[] javaArgs);
       public static void main (String args[])
          Arguments A = new Arguments();
          newArgs[] = A.setArgs(args);
       static
          System.loadLibrary("MyArgs");
    }Needs a DLL entry point with the following signature:
    JNIEXPORT void JNICALL
    Java_Arguments_setArgs (JNIEnv *jenv, jobject job, jobjectArray oarr) {Notice that the first parameter of the method is of type JNIEnv and the second can be either a reference to a class or Java object instance.
    Jacques Gonzalez
    J4SOFT

Maybe you are looking for