求助 用weblogic.rmic编译生成idl文件失败,请高手帮助.

我写了一个Remote接口,在接口的基础上编写一个EJB类,用weblogic.rmic编译生成idl文件,出现类没找到异常。找不到出错原因。请高手帮助。
现把代码贴出.
[Java Class/Source Path Diagram]
Ejb3ToIdlApp\
|---ejbModule
| |---hello
| | |---Hello.java (*Class implents)
| | IHello.java (*Interface)
| |---META-INF
| |--- MANIFEST.MF
| weblogic-ejb-jar.xml
|---build
|---classes
|---hello
| |---Hello.class
| IHello.class
|---META-INF
|--- MANIFEST.MF
weblogic-ejb-jar.xml
[Interface]
// IHello.java
package hello;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface IHello extends Remote {
String sayHello() throws RemoteException;
[Java Class]
// Hello.java
package hello;
import java.rmi.RemoteException;
public class Hello implements IHello {
private String name;
public Hello(String s) throws RemoteException {
this.name = s;
@Override
public String sayHello() throws RemoteException {
return "Hello ! From " + name;
* @param args
public static void main(String[] args) {
int i = 0;
try {
for(i = 0; i < 10; i++) {
Hello obj = new Hello("MutiHelloServer" + i);
//Context.rebind("//sample/MutiHelloServer" + i, obj);
} catch(Exception e) {
System.out.println("Hello Error: " + e.getMessage());
e.printStackTrace();
[MANIFEST.MF]
Manifest-Version: 1.0
Class-Path:
[weblogic-ejb-jar.xml]
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.3/weblogic-ejb-jar.xsd">
<!--weblogic-version:12.1.1-->
</wls:weblogic-ejb-jar>
[EJB Jar]
ejbModule.jar (* Exported from a sample, above)
[Command Environment]
SET WEBLOGIC_SERVER=C:\Oracle\Middleware\wlserver_12.1\server
SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09
SET CLASSPATH=.;%JAVA_HOME%\jre\lib;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;%WEBLOGIC_SERVER%\lib;%WEBLOGIC_SERVER%\lib\weblogic.jar;
java weblogic.rmic -idl ejbModule.hello.Hello
[execution result]
Class not found : ejbModule.hello.Hello
ejbModule.hello.Hello

自己 回复下吧 。
又重新检查了下 , 原来 要转到的供应商在这个门店没有采购信息记录。是下午的检查这个地方的时候眼花了吧。
哎。
让我纠结了俩小时。

Similar Messages

  • Weblogic.rmic - no IDL for business remote

    Hi,
    I managed to access a Weblogic EJB via RMI/IIOP and Corba. The IDLs were created with weblogic.ejbc. But weblogic.ejbc warns that it is deprecated and weblogic.rmic should be used.
    So I tried that.
    weblogic.rmic -idl -idlVerbose MyHome MyRemote
    Unfortunately, weblogic.rmic does not generate IDLs for my business remote and home, only for spec classes like javax\ejb\RemoveEx.idl.
    I tried (the wrong, I guess) sample command line from
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/client/corba_idl.html#wp1065917
    which uses the EJB class as argument, but this does not generate anything useful.
    How should I call weblogic.rmic to get IDLs for Home and Remote Interfaces?
    Thanks,
    Juergen

    Hi Weber, I have same issue. When I run C:\projects\workspace\SimpleEJB\build>java -cp C:\Bea\wlserver_10.3\server\lib\weblogic.jar; weblogic.appc -help from cmd wondow. It shows below contents, no idl option in it:
    Usage: java weblogic.appc [options] <ear, jar, war or rar file or directory>
    where options include:
    -help Print the standard usage message.
    -version Print version information.
    -output <file> Specifies an alternate output archive or
    directory. If not set, output will be
    placed in the source archive or directory.
    -plan <file> Specifies an optional deployment plan.
    -forceGeneration Force generation of EJB and JSP classes.
    Without this flag the classes may not be
    regenerated if it is determined to be
    unnecessary.
    -quiet Turns off output except for errors
    -lineNumbers Add JSP line numbers to generated class
    files to aid in debugging.
    -library <file> Comma-separated list of libraries. Each
    library may optionally set its name and
    versions, if not already set in its
    manifest, using the following syntax: <file>
    [@name=<string>@libspecver=<version>
    @libimplver=<version|string>]
    -librarydir <dir> Registers all files in specified directory
    as libraries.
    -writeInferredDescriptors Write out the descriptors with inferred
    information including annotations.
    -manifest <file> Include manifest information from specified
    manifest file.
    -clientJarOutputDir <dir> Specifies a directory to put generated
    client jars.
    -keepgenerated Keep the generated .java files.
    -verbose Compile with verbose output.
    -classpath <path> Classpath to use.
    -source <source> Source version.
    -target <target> Target version.
    -advanced Print advanced usage options.

  • How I can compile a ejb3 class to a idl file by the weblogic.rmic command.

    Now, I want create a idl file from a ejb3 class by the weblogic.rmic command.
    I had written a sample case. but when I compile, I get a [Class not found] error, why?
    Who can guide me or provide me with a sample?
    There is a my sample code, below.
    [Java Class/Source Path Diagram]
    Ejb3ToIdlApp\
    |---ejbModule
    | |---hello
    | | |---Hello.java (*Class implents)
    | | IHello.java (*Interface)
    | |---META-INF
    | |--- MANIFEST.MF
    | weblogic-ejb-jar.xml
    |---build
    |---classes
    |---hello
    | |---Hello.class
    | IHello.class
    |---META-INF
    |--- MANIFEST.MF
    weblogic-ejb-jar.xml
    [Interface]
    // IHello.java
    package hello;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface IHello extends Remote {
    String sayHello() throws RemoteException;
    [Java Class]
    // Hello.java
    package hello;
    import java.rmi.RemoteException;
    public class Hello implements IHello {
    private String name;
    public Hello(String s) throws RemoteException {
    this.name = s;
    @Override
    public String sayHello() throws RemoteException {
    return "Hello ! From " + name;
    * @param args
    public static void main(String[] args) {
    int i = 0;
    try {
    for(i = 0; i < 10; i++) {
    Hello obj = new Hello("MutiHelloServer" + i);
    //Context.rebind("//sample/MutiHelloServer" + i, obj);
    } catch(Exception e) {
    System.out.println("Hello Error: " + e.getMessage());
    e.printStackTrace();
    [MANIFEST.MF]
    Manifest-Version: 1.0
    Class-Path:
    [weblogic-ejb-jar.xml]
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-ejb-jar xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.3/weblogic-ejb-jar.xsd">
    <!--weblogic-version:12.1.1-->
    </wls:weblogic-ejb-jar>
    [EJB Jar]
    ejbModule.jar (* Exported from a sample, above)
    [Command Environment]
    SET WEBLOGIC_SERVER=C:\Oracle\Middleware\wlserver_12.1\server
    SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09
    SET CLASSPATH=.;%JAVA_HOME%\jre\lib;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;%WEBLOGIC_SERVER%\lib;%WEBLOGIC_SERVER%\lib\weblogic.jar;
    java weblogic.rmic -idl ejbModule.hello.Hello
    [execution result]
    Class not found : ejbModule.hello.Hello
    ejbModule.hello.Hello
    Help!

    Thanks for your replay.
    Before I set the classpath, I had met the ClassNotFound problem.
    My command : java -cp %WEBLOGIC_SERVER%\lib\weblogic.jar weblogic.rmic -idl ejbModule.hello.Hello
    I was afraid to lost the class that the weblogic.rmic is required, I set the classpath(java library path/class ,weblogic library path/class).
    I think the class what is not found is like my class(hello), not the class of the weblogic or java.
    Now I don't know what is requred by weblogic.rmic. Is it a class or source of "Hello", and the package name of "Hello" is requred?
    After the idl option is cut, when I execute the Command[java weblogic.rmic *---idl--* ejbModule.hello.Hello], I got the other error, below.
    (*the Hello class is in ejbModule.jar)
    C:\CORBA\test>java weblogic.rmic ejbModule.hello.Hello
    java.lang.ClassNotFoundException: ejbModule.hello.Hello
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.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 weblogic.rmi.rmic.Remote2Java.loadClassUsingSystemClasspath(Remote2Ja
    va.java:765)
    at weblogic.rmi.rmic.Remote2Java.loadClass(Remote2Java.java:757)
    at weblogic.rmi.rmic.Remote2Java.checkIsNotInterface(Remote2Java.java:73
    6)
    at weblogic.rmi.rmic.Remote2Java.outputs(Remote2Java.java:518)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:262
    at weblogic.rmic.runBody(rmic.java:64)
    at weblogic.utils.compiler.Tool.run(Tool.java:158)
    at weblogic.utils.compiler.Tool.run(Tool.java:115)
    at weblogic.rmic.main(rmic.java:142)
    ejbModule.hello.Hello must be a remote interface implementation and should exist in the classpath
    -----------------------

  • WebLogic.ejbc vs weblogic.rmic

    [att1.html]

    Aseem Rastogi <[email protected]> writes:
    See examples/iiop/ejb/stateless/cppclient for an example of how to get
    this to work. You have to jump through hoops with VisiBroker.
       I have deployed a stateless EJB in WLS6.1sp1 / NT and I am trying to write a CPP
    Visibroker 4.5 client to acces it...
    The steps i took:
    While doing the ejbc i have given the option -idl by using
    java weblogic.ejbc -iiop -idl -idlDirectory d:\idls -idlVerbose -compiler javac
    d:\lib\my.jar -d d:\testjava\my.jar
    This file generates two IDL files xHome.idl and x.idl, x.idl contains the business method
    of my bean
    and xHome contains the ejbCreate method...
    According to documentation i can use weblogic.rmic to get these same idls however when i
    run
    java weblogic.rmic -idl -idlVerbose -idlDirectory .\idls xBean
    It creates an idl which has no business method in it but has all private variables
    defined in my bean....
    I am confused which idl file i should be using....??? as i understand if there is no
    business method in IDL my client can't call those methods on EJB..The first two are the right ones.
    I thought of going another step and try using both the idls one by one and see but
    while compiling the idl by command
    idl2cpp -I . -namespace -gen_included_files -root_dir .\corba x.idl
    i get
    idl2cpp: (warning)::CORBA::Environment declared ("orb.idl", line 28) but never defined
    idl2cpp: (warning)(references to it will be permitted, but no code will be generated for
    this definition)
    idl2cpp:IDL native type ::CORBA::AbstractBase has no known translation; generated code
    will not be valid
    ******************This is a VisiBroker bug - but I think you can safely ignore them.
    The orb.idl i am using is from VisibrokerFor C++ 4.5
    i tried compiling the orb.idl alone but got the same things..
    has anyone else seen this behaviour or i am doing smthg wrong.???andy

  • Error starting WebLogic rmic

    Hi ,
    I unable to generate the stub/skeleton in my java classes using rmic. With help of below code in build.xml file
    <taskdef name="rmic" classname="org.apache.tools.ant.taskdefs.Rmic"/>
       <rmic  base="${build.dest}" includes="**/*.class"  classpathref="compilation-classpath" compiler="weblogic" iiop="true"/>
    Below is the Error facing in cmd prompt
    Error starting WebLogic rmic
    BUILD FAILED
    C:\OPOM_CRM\CRMModule\crm\build.xml:190: Error starting WebLogic rmic:
            at org.apache.tools.ant.taskdefs.rmic.WLRmic.execute(WLRmic.java:84)
            at org.apache.tools.ant.taskdefs.Rmic.execute(Rmic.java:548)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    In advance thanks for the help..
    Regards
    Basha

    Hi.
    Try posting your question on weblogic.developer.interest.portal.
    Thanks,
    Michael
    Allen Gu wrote:
    I have installed WebLogic Portal 4.0 using wlportal400_with_sp1_win.exe
    downloaded from http://www.bea.com, but when I tried to run it from Start
    menu, I got the following error:
    Starting WebLogic Server ....
    The WebLogic Server did not start up properly.
    Exception raised:
    java.lang.IllegalAccessError: try to access method
    weblogic/management/internal/
    Helper.preloadMBeanInfos()V from class weblogic/management/Admin
    at weblogic.management.Admin.initialize(Admin.java:210)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:362)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:202)
    at weblogic.Server.main(Server.java:35)
    Reason: Fatal initialization exception
    Press any key to continue . . .
    What could have gone wrong?
    Thanks,
    Allen--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Adding weblogic.rmic to ANT Script

    Hi !
    Any examples to illustrate adding the weblogic.rmic to the Ant build ???
    All that I know is that i can use rmic which is one of the built-in tasks.
    Would i have to use exec instead.
    I'm referring to this URL.. http://jakarta.apache.org/ant/manual/
    Click on built-in tasks.
    Refer to Rmic and Exec.
    Thanks in advance,
    kulkis

    Try this:
    <target name="rmi" depends="compile">
    <echo message="========== RMI compilation of the given classes" />
    <!-- Compile the rmi stubs and skeletons -->
    <!-- rmic base="${classes}" classname ="fi.sonera.ccbs.framework.mvc.rmi.RMICommandImpl"
    sourcebase="${stubs}" /-->
    <java classname="weblogic.rmic">
         <arg value="-d"/>
         <arg value="-iiop"/>
         <arg value="${classes}"/>
         <arg value="fi.sonera.ccbs.framework.mvc.rmi.RMICommandImpl"/>
    </java>
    </target>
    Don Ferguson <[email protected]> wrote:
    Actually, I believe the examples exec a separate VM. I've written ant
    tasks to run
    rmic/ejbc within the ant vm, but unfortunately those are not yet available
    for public
    consumption.
    Andy Piper wrote:
    "kulkis" <[email protected]> writes:
    Hi ! Any examples to illustrate adding the weblogic.rmic to the Ant
    build ???
    All that I know is that i can use rmic which is one of the built-intasks. Would
    i have to use exec instead.
    I'm referring to this URL.. http://jakarta.apache.org/ant/manual/
    Click on built-in
    tasks. Refer to Rmic and Exec.The examples in WLS 6.1 do this. I don't know whether they made the
    beta - but you could pull it down and take a look.
    andy

  • Weblogic.rmic and ant integration issue

    I am trying to call weblogic.rmic compiler through a ant script and was
    sucessful in doing so and generating the stubs and skelton for my RMI
    implementation.
    But i also want to pass a system property value (in the example i am passing
    file=stdout using -D to java) to weblogic.rmi compiler and don't know how to
    do that.
    Any help will be greatly appreciated...
    Thanks
    Kunjan Jhaveri
    781-372-3965
    [email protected]
    PS: Script enclosed.
    <target name="local.genStubs" depends="local.compile">
    <java classname="weblogic.rmic" fork="yes" failonerror="yes">
    <jvmarg value="-Dfile=stdout" />
    <arg value="-classpath" />
    <arg value="${WL_HOME}${file.separator}lib${file.separator}weblogic.jar" />
    <arg value="-d" />
    <arg value="${SRCDIR}${file.separator}build${file.separator}classes" />
    <arg value="com.ehealthdirect.ee.kernel.EEMutexManagerImpl" />
    <classpath>
    <pathelement
    path="${WL_HOME}${file.separator}lib${file.separator}weblogic.jar" />
    </classpath>
    </java>
    </target>

    As far as I know, rmic doesn't know anything about a "file" system property. Is
    there some reason you expect this to do something special?
    Kunjan Jhaveri wrote:
    I am trying to call weblogic.rmic compiler through a ant script and was
    sucessful in doing so and generating the stubs and skelton for my RMI
    implementation.
    But i also want to pass a system property value (in the example i am passing
    file=stdout using -D to java) to weblogic.rmi compiler and don't know how to
    do that.
    Any help will be greatly appreciated...
    Thanks
    Kunjan Jhaveri
    781-372-3965
    [email protected]
    PS: Script enclosed.
    <target name="local.genStubs" depends="local.compile">
    <java classname="weblogic.rmic" fork="yes" failonerror="yes">
    <jvmarg value="-Dfile=stdout" />
    <arg value="-classpath" />
    <arg value="${WL_HOME}${file.separator}lib${file.separator}weblogic.jar" />
    <arg value="-d" />
    <arg value="${SRCDIR}${file.separator}build${file.separator}classes" />
    <arg value="com.ehealthdirect.ee.kernel.EEMutexManagerImpl" />
    <classpath>
    <pathelement
    path="${WL_HOME}${file.separator}lib${file.separator}weblogic.jar" />
    </classpath>
    </java>
    </target>

  • Weblogic rmic compiler

    Hello, I'm trying to use the weblogic rmic compiler to generate stub/skeleton code, but no output can be generated. I don't get any error messages either so I assume the command completed successfully. I checked the whole filesystem but could not see any generated files. I'm using weblogic 8.1 on windows 2000. The command I type in a DOS window is "java weblogic.rmic MyClassImpl".
    Could someone experienced in WebLogic please shed some light on this?
    Thanks.

    I encountered the same problem. Check out the following discussion http://newsgroups.bea.com/cgi-bin/dnewsweb?utag=&group=weblogic.developer.interest.rmi&xrelated=134&cmd_thread_next.x=22&cmd_thread_next.y=13.
    pf

  • Help!  weblogic.rmic _WLStub vs. regular _Stub

    Hello,
    I have WL6.0 sp1. I want to run weblogic.rmic on a Remote class, in
    order to get the _WLStub classes.  Am I missing lots of weblogic
    classes? What jars are these in, I don't see them anywhere in
    weblogic.jar or in ./lib --
    weblogic.rmi.extensions.server.Stub
    weblogic.rmi.internal.AbstractStub
    weblogic.rmi.extensions.server.RemoteReference
    Running normal java 1.3 rmic works okay. But running
    "java weblogic.rmic" yields hundreds of these following errors --- what
    am I doing wrong?
    \WLStub4h3k3fu254q3x295u1k5i1l6u2o2g1j.java:14: cannot resolve symbol
    symbol : class AbstractStub
    location: package internal
    public class WLStub4h3k3fu254q3x295u1k5i1l6u2o2g1j extends
    weblogic.rmi.internal.AbstractStub
    ^
    Thanks for your help!
    John Eiden
    Minneapolis, Minnesota

    Hmmm.... I see all three of these classes in my weblogic.jar file for WLS
    6.0 SP1
    John Eiden wrote:
    Hello,
    I have WL6.0 sp1. I want to run weblogic.rmic on a Remote class, in
    order to get the _WLStub classes.  Am I missing lots of weblogic
    classes? What jars are these in, I don't see them anywhere in
    weblogic.jar or in ./lib --
    weblogic.rmi.extensions.server.Stub
    weblogic.rmi.internal.AbstractStub
    weblogic.rmi.extensions.server.RemoteReference
    Running normal java 1.3 rmic works okay. But running
    "java weblogic.rmic" yields hundreds of these following errors --- what
    am I doing wrong?
    \WLStub4h3k3fu254q3x295u1k5i1l6u2o2g1j.java:14: cannot resolve symbol
    symbol : class AbstractStub
    location: package internal
    public class WLStub4h3k3fu254q3x295u1k5i1l6u2o2g1j extends
    weblogic.rmi.internal.AbstractStub
    ^
    Thanks for your help!
    John Eiden
    Minneapolis, Minnesota

  • Bug in weblogic.rmic: produces incorrect IDL in factory decls.

    My EJB when producing IDL produces incorrect IDL: One of the outputs
    is java/net/URL.idl but when I try to compile it using Inprise
    visibroker
    4.0 for C++, I get the following parse error:
    /opt/inprise/vbrokercpp/bin/idl2cpp -no_servant -idl_strict
    -I/opt/inprise/vbrokercpp/idl -tie -namespace -no_pretty_print -Iidl
    -src_suffix cpp -root_dir cpp/java/lang idl/java/lang/ClassLoader.idl
    idl/java/net/URL.idl: 76:syntax error after )
    idl/java/net/URL.idl: 76:expected a[n]: ;
    idl/java/net/URL.idl: 76:instead of raises
    idl/java/net/URL.idl: 78:syntax error after )
    idl/java/net/URL.idl: 78:expected a[n]: ;
    idl/java/net/URL.idl: 78:instead of raises
    idl/java/net/URL.idl: 82:java::net::URLStreamHandler not found (expected
    type name)
    idl/java/net/URL.idl: 83:syntax error after )
    idl/java/net/URL.idl: 83:expected a[n]: ;
    idl/java/net/URL.idl: 83:instead of raises
    idl/java/net/URL.idl: 84:java::net::URLStreamHandler not found (expected
    type name)
    idl/java/net/URL.idl: 88:syntax error after )
    idl/java/net/URL.idl: 88:expected a[n]: ;
    idl/java/net/URL.idl: 88:instead of raises
    6 errors
    This is an error in the IDL: factory methods are trying to raise
    exceptions; however this is disallowed by the OMG IDL specification
    version 2.3:
    <init_dcl> ::= "factory" <identifier>"(" [ <init_param_decls> ]
    <init_param_decls> ::= <init_param_decl> { , <init_param_decl> }
    <init_param_decl> ::= <init_param_attribute> <param_type_spec>
    <simple_declarator>
    <init_param_attribute> ::= "in"
    As you can see, when using the keyword "factory" there is no "raises"
    clause allowed by the grammar.
    This is one of a few instances of the problem (this problem only
    occurred
    in one file but for several methods):
    factory
    create__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue( in
    ::CORBA::WStringValue arg0, in ::CORBA::WStringValue arg1, in
    ::CORBA::WStringValue arg2) raises (::java::net::MalformedURLEx);
    -Kim.

    the difference here is Thread-based security vs. Object-based security. WLS opts for the Thread-based model. this model was also
    backed up by the original revisions of the JAAS spec. it's just something to take into consideration when designing applications.
    .paul
    Marcel Stremming wrote:
    I have a SessionBean Method :
    public void contextTest() throws RemoteException {
    try {
    System.out.println("Principal 1: " + ctx.getCallerPrincipal());
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, "t3://localhost:7001");
    h.put(Context.SECURITY_PRINCIPAL, "toto");
    h.put(Context.SECURITY_CREDENTIALS, "test");
    Context new_ctx = new InitialContext(h);
    System.out.println("Principal 2: " + ctx.getCallerPrincipal());
    } catch (Exception e) {e.printStackTrace(); }
    When principal "titi" invokes this Method it produces the following output:
    Principal 1: titi
    Principal 2: toto
    As You can see the Method just replaced the Caller Context's principal stored in the ctx field without even touching it. Since
    my Servlets run on the same JVM and use PassByReference calling this Method twice results in :
    Principal 1: titi
    Principal 2: toto
    Principal 1: toto
    Principal 2: toto
    I think this is a Bug because it makes it quiet difficult to open two Context's at the same time.
    I would like to read some opinions.

  • How does weblogic maintain idle JDBC connection

    I see weblogic maintaining connections even when they are idle. (unless we explicity mention to remove)
    How does weblogic maintain the socket on DB under idle condition? Does webogic do ping kind of activity to maintain/renew the socket for all idle connections in the pool.

    The test-frequency-seconds property specifies the number of seconds between tests of unused connections. WebLogic Server tests unused connection and reopens any faulty connections. You must also set the Test Table Name.
    The seconds-to-trust-an-idle-pool-connection property specifies the number of seconds within a connection use that WebLogic Server trusts that the connection is still viable and will skip the connection test during the periodic connection testing process.

  • Use rmic to generate IDL

    I have just read <Enterprise JavaBeans Components and CORBA Clients:A Developer Guide>,and it tells me to generate IDL like this
    rmic -idl -noValueMethods -classpath %J2EE_HOME%/lib/j2ee.jar:<path_to_ejbinterop_dir>
    -d <path_to_where_idl_files_shoule_be_generated> ejbinterop.Logger ejbinterop.LoggerHome
    The problem appears.Whatever I input ,it always tells me "Class not Found".
    then ,what can i do?
    thanks in advance

    the command is alright. it has to be a problem of classpath. please check ur classpath thoroughly. try setting the classpath rather than passing -classpath from the command prompt. it doesn't make any difference but this way is better for debugging. To make sure that ur classpath setting is correct, u can also try by any other means whether system can find that class file or not.
    good luck!

  • Problem compiling idl files

    I compiled several rmi-iiop examples from Weblogic 6.0 distribution (smaples\examples\rmi_iiop\ejb). Then I ran idlj on generated idl files and then javac to compile java files (both idlj and javac are part of Weblogic 6.0 distribution).In all cases compiler complained about generated javax.ejb.CreateEx, javax.ejb.RemoveEx and javax.io.IOEx that they didn't have all methods implemented (like toString(), message(), localizedMessage() and so on).Could anybody tell me if he or she managed to create working CORBA client using JDK 1.3 ORB and _EJB server object__?Thank you,Yuri

    Hello Eduardo,
    Thank you very much for your reply! This is a very good suggestion and I
    will try to use it!
    However, I would like to mention that it is possible to start with simple
    RMI model (using only primitive java types) and run weblogic.rmic on RMI
    class to generate IDL files. I tested RMI-IIOP examples that come with WLS
    5.1 and WLS 6.0 using Java 1.3 ORB and they worked in both cases.
    Thank once again for suggestion!
    Yuri
    "Eduardo Ceballos" <[email protected]> wrote in message
    news:[email protected]..
    A Java (JDK 1.3 ORB) client is not possible because the Java to IDLmapping creates conflicts with existing classes, in this case
    java.lang.Throwable. The problem is that you can not start with an RMI
    interface (the EJB in this case) and there after use the CORBA programming
    model. If you want to use the CORBA programming model, you must derive your
    java classes from the IDL to Java mapping.
    >
    Yuri Rychikhin wrote:
    I compiled several rmi-iiop examples from Weblogic 6.0 distribution
    (smaples\examples\rmi_iiop\ejb). Then I ran idlj on generated idl files and
    then javac to compile java files (both idlj and javac are part of Weblogic
    6.0 distribution).In all cases compiler complained about generated
    javax.ejb.CreateEx, javax.ejb.RemoveEx and javax.io.IOEx that they didn't
    have all methods implemented (like _toString(), message(),
    localizedMessage() and so on).Could anybody tell me if he or she managed to
    create working CORBA client using JDK 1.3 ORB and __EJB server
    object__?Thank you,Yuri
    >

  • EJB deployed in Weblogic 10.3 invoking CORBA

    Hello,
    we are running an EJB3 application deployed in WebLogic 10.3 that must communicate with CORBA.
    We're having the following exception when trying to submit an WorkOrder.
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
    org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No; nested exception is: org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    at weblogic.corba.idl.RemoteDelegateImpl.postInvoke(RemoteDelegateImpl.java:477)
    at weblogic.corba.idl.RemoteDelegateImpl.invoke(RemoteDelegateImpl.java:384)
    at weblogic.corba.idl.RemoteDelegateImpl.invoke(RemoteDelegateImpl.java:341)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
    at pt.vodafone.indev.esm.SMSProvExt._WorkOrderIntfStub.submit(_WorkOrderIntfStub.java:183)
    at pt.vodafone.in.business.WorkOrderFacade.createWorkOrder(WorkOrderFacade.java:227)
    I've searched the forum for similar problems and the solution was to include the wlfullclient.jar in client classpath.
    I've done that already however the problem persists. (maybe it's necessary to configure some IIOP parameters)
    Anyone have any clue for this problem?
    Thanks in advance.
    Regards.

    Hi,
    include wls-api.jar in your classpath and provide me an update...
    Regards.
    Kal.

  • Java JNDI Weblogic dependencies and Example

    Hello, I'd like help with this scenario:
    - Oracle Weblogic 11g (Bea 10.3) in development environment
    - JDeveloper 11g
    - Oracle Database 11g
    With Weblogic Console Administration:
    - JNDI Name: jdbc-DATABASESCHEMA1
    it connect file to Oracle Database 11g instance to schema DATABASESCHEMA1
    Required example:
    - Weblogic JAR files required to be imported in java sorcecode to connect with weblogic jdbc-DATABASESCHEMA1
    - Way to see port used in Weblogic Serve for connection
    - Java code to connect and make this simple SELECT:
    SELECT SYSDATE FROM DUAL;
    Regards.
    Edited by: 911572 on 01-feb-2012 12:11

    I appreciate your reply. I have some
              questions if we go this way:
              1. If we use JNDI and run the modified RMI service
              objects (not EJBs yet) in weblogic server, will we be
              getting the advantages the same way as for the EJBs,
              such as failover using the clustering technology for
              weblogic servers. Or failover only works for things
              running in the EJB container.
              2. If we use JNDI, does weblogic server handle service
              objects pooling? If yes, how. I would like to make
              sure the JNDI way will not perform worse than if we
              run the service objects at the RMI port.
              Thanks,
              Morris
              Adam Messinger wrote:
              > Morris,
              >
              > It is possible and it is what we recommend doing. You'll have to recompile
              > your RMI objects using weblogic.rmic.
              >
              > > If this is possible, then I have the following
              > > questions:
              >
              > > 1. Does weblogic server immediately support the use of
              > > JNDI after we install it? Or we will have to buy
              > > things like LDAP before we can use JNDI.
              >
              > It supports this sort of use right out of the box.
              >
              > > 2. Do you have any idea about the pros and cons on
              > > this approach (using JNDI to replace RMI)?
              >
              > You're still using RMI with this approach, just not the RMI registry.
              >
              > Cheers!
              >
              > Adam
              

Maybe you are looking for

  • MacBook loses wireless connection when iPod touch connects to network

    hi ever since upgrading to 10.5.5. on my MacBook i've had the "intermittent network connection" problems that have been described and discussed (without any real solution from what i can see) in another thread. PROBLEM: every couple of minutes my Mac

  • Can I use home sharing (on my mac using my other computers library) even if I'm not in a WiFi zone?

    I have used Home-Sharing on my Dell Laptop and now my Mac. My mac uses the Dell's library and I was wondering whether I would have to be using the same WiFi code or whether I could be on a different WiFi or even have none and still use it?

  • Satellite L355D - No sound after upgrade to Win 7

    I have downloaded all of the drivers from Toshiba, upgraded the BIOS, and still nothing.  I get sound from headphones, but not the speakers. Volume level shows activity, I can see the ReakTek High - Def Audio as installed and Windows says it's workin

  • Apple assistance

    Posted my first question this am about downloading a book to my iPad. No help yet.  How do I get assistance from Apple? Forgive me, I'm green and limited.

  • Column chart events

    I have a column chart and I was wondering if it is possible to add an onclick event to the columns. What I would like to do is link the columns to a details state with a datagrid that displays the records making up the column. Is this possible?