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
-----------------------

Similar Messages

  • How do you compile Flex-dependent classes with ASC?

    Hi,
    I've been trying unsuccessfully for most of the evening to compile a .as file that relies on mx.collections.ListCollectionView using asc. I figured I could just import the Flex framework SWCs from the command line with asc, but asc doesn't seem to respect SWCs - it only seems to respect .abc files.
    So, I've spent most of my time trying to compile the Flex framework into a single .abc file that I can import whenever I want to compile a class that relies on Flex. I figured I could make a base .as file with include statements for all of the Flex .as files (copying the approach I saw for files like builtin.as) and compile that, but all I seem to get are compiler errors - mostly "[Compiler] Error #1181: Forward reference to base class (base class name)."
    I have a feeling I'm doing this completely the wrong way. I'd very much appreciate any assistance that anybody can offer me.
    Thanks,
    - max

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I use MXMLC to compile my .as file projects.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Maxim Porges<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 9:22 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How do you compile Flex-dependent classes with ASC?<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />Maxim Porges in <br><br /><br><br /><b>Developers</b> --<br><br />  How do you compile Flex-dependent classes with ASC?<br><br /><br><br />Hi, <br><br /><br><br />I've been trying unsuccessfully for most of the evening to compile a .as file<br />that relies on mx.collections.ListCollectionView using asc. I figured I could<br />just import the Flex framework SWCs from the command line with asc, but asc<br />doesn't seem to respect SWCs - it only seems to respect .abc files. <br><br /><br><br />So, I've spent most of my time trying to compile the Flex framework into a<br />single .abc file that I can import whenever I want to compile a class that<br />relies on Flex. I figured I could make a base .as file with include statements<br />for all of the Flex .as files (copying the approach I saw for files like<br />builtin.as) and compile that, but all I seem to get are compiler errors -<br />mostly &quot;[Compiler] Error #1181: Forward reference to base class (base<br />class name).&quot; <br><br /><br><br />I have a feeling I'm doing this completely the wrong way. I'd very much<br />appreciate any assistance that anybody can offer me. <br><br /><br><br />Thanks, <br><br /><br><br />- max <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d5d2">How do you compile<br />Flex-dependent classes with ASC?</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d5d2!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • Hello, how I can do to buy from Argentina, an Apple product in the U.S.?

    Hello, how I can do to buy from Argentina, an Apple product in the U.S.?

    Thanks for the reply. A relative of mine travels to the United States, he would bring the product. I can make my purchase online by credit card from Argentina?

  • I work in a public library and we have two ipod touch and two ipod nanos we would like to circulate for our patrons. Any advice on how we can do this? Should we allow patrons to set the device up for personal use or download static content?

    I work in a public library and we have two ipod touch and two ipod nanos we would like to circulate for our patrons. Any advice on how we can do this? Should we allow patrons to set the device up for personal use or download static content?

    With the Nanos, you should have no problem lending them loaded with audiobooks from Librivox, etc.
    As for the iPod Touches, I'm not sure the question is whether you should allow patrons to set up the device for personal accounts, but whether you can prevent them from doing so. Prepare to to a factory restore every time one is returned.

  • Any guys know how can I have a bigger thumbnail of indesign file on the bridge!

    Any guys know how can I have a bigger thumbnail of indesign file on the bridge!

    The slider works for me in Bridge CC. What version of Bridge are you using?

  • Helloo my name is jafthel i have problems with my ipod touch 4g. if you can help me how i can fix it or solution i will be very happy. the problem is: when i push some aplication my ipod is very slow i after 3 minutes it goback to the home screen.

    helloo my name is jafthel i have problems with my ipod touch 4g. if you can help me how i can fix it or solution i will be very happy. the problem is: when i push some aplication my ipod is very slow i after 3 minutes it goback to the home screen.

    Next try the remaining items of:
    Apps crashing
    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

  • HT1296 hi guys. if some1 could pls be kind enough to let me know how i can import all my contacts from htc desire (andrioid) to the iphone5. i have actually done quiet a few experiments but nothing seems to be working. thanks, Zee!

    hi guys. if some1 could pls be kind enough to let me know how i can import all my contacts from htc desire (andrioid) to the iphone5. i have actually done quiet a few experiments but nothing seems to be working. it is really important..thanks guys, Zee!

    Or just sync to google from your HTC and export to a vcf file. After that login to icloud.com and there you can import the vcf. And now you just have to setup the icloud on your iPhone.

  • I would like to know how I can transfer all my purchases to a new computer. The laptop which all the music is stored, is broken.

    I would like to know how I can transfer all my purchases to a new computer. The laptop which all the music is stored, is broken.

    You can also re-download most previous purchases (not just songs) from the iTunes Store from the Purchased screen.  So, you should be able to get the "one missing purchase" back too.  Sign in to iTunes using the Apple ID used to make the purchases.  Go to the iTunes Store.  (With the new iTunes 12, select the Music category first, then go to the iTunes Store.)  Click on Purchased (along right side under QUICK LINKS).  From the Purchased screen, you can find and download previous song purchases, at no cost.
    You can also re-download purchases from other iTunes categories, such as Movies and TV Shows.

  • How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    You can certainly use iWork, though I hesitate to recommend it to a seasoned Windows user simply because it would add another level of the unfamiliar with which you would have to gain familiarity. The iWork applications are certainly very competent and in most respects both easy to use and surprisingly powerful. They are not 100% compatible however, though that typically manifests itself in document formatting issues rather than anything more significant.
    I have never attempted to import emails from a Windows system into MacOS - other than in Outlook connected to an Exchange server, thus not really an issue at all. I doubt that the Mail app in MacOS can import directly, but of course you could always set the account(s) up on the Mac and then forward emails you want to keep from the PC. Not elegant, but it works. Virtually any Windows document or file, whichever application created it, can be opened or converted for use on a Mac, and using both systems on my desk each day I rarely see any issues switching stuff from one machine to the other. You may stumble over one or two issues, but likely not significant.
    In switching platforms there will be some inevitable issues, not so much with being able to import your stuff because there's usually a workaround or a utility that can help, but just with getting familiar with the platform and the differences between Windows and MacOS that can obscure their similarities. From time to time the support community here hears from a user who has found the migration very problematic and regrets it, but for the most part the phrase 'I should have done this years ago...' is rather more prevalent!

  • How to automatically generate a build file of the application from command-line

    Hi All
    How can we automatically generate a build file of the application from command-line (as opposed to using Jdev IDE to click to generate a build.xml) ?
    Thanks

    User, which jdev version do you use?
    I don't think you can do this. You can only create an ant build.xml from the project inside jdev.
    You can use ojdeploy to build the project.  This is the only method which will also make the necessary changes to the descriptors.
    Timo

  • How do you make a link open on a new page (typically the target="_blank" command) in MUSE?

    how do you make a link open on a new page (typically the target="_blank" command) in MUSE?

    Newer version does not have the same interface.  I'm stuck trying to understand how to add a "blank" target to a hyperlink...  See how your screenshot has a dropdown associated with the "Hyperlink" object?  Mine doesn't...

  • How do i go about deleting a large number of files at the same time?  where's the easiest place to do it?

    how do i go about deleting a large number of files at the same time?  where's the easiest place to do it?

    A bit vague as to what you intend, but the simple answer is to select all the files you want to delete then either drag to the Trash or CTRL- or RIGHT-click on the selection and choose Move to Trash from the contextual menu.

  • HT4914 Can I use iTunes Match to keep other files like the way dropbox does ?

    Can I use iTunes Match to keep other files like the way dropbox does ?

    iTunes Match is currently only for music

  • TS1846 I have some troubles recently with Final Cut Pro 7 and would like to remove my preferences. I can't find any "com.apple.finalcutpro.plist" file from the Preferences folder but I do have some preferences.  So, where could be the file ?

    I have some troubles recently with Final Cut Pro 7 and would like to remove my preferences. I can't find any "com.apple.finalcutpro.plist" file from the Preferences folder but I do have some preferences.  So, where could be the file ?

    Digital Rebellion has you covered: http://www.digitalrebellion.com/prefman/

Maybe you are looking for