Applet EJB Coomunication
Hi,
I am trying the applet ejb communication .
I am very comfortable if I do the same with applet servlet communication but the problem is with the applet calling the ejb directly, i mean to say that can applet can directly lookup the EJB ?
I had tried on the intranet but we are supposed to give the HOme and remote files to the client also the ejb.jar has to be given as the JVM of the clinet doesnot have the javax.ejb package and all relevant pacakages are to be given,
There is no meaning of making the client EJB compitable.
Also what about the security ?
So can any body help me how to do the same.
Thanks in advance.
Milind
Remove ur applet ejb communication by
applet to servlet/serverside class then from that servlet/serverside clas to ejb..
This concept is done by a pattern called 'business delegate'.
By using this approach u need not give the stub and skull to the front end side (jsp/applet/or anything like that).
just call the servlet/class from the applet by keeping that class as passover and thereby the lookup details are moved to that servlet/class that could resolve your problem..
does my answer make any sense to u..
Similar Messages
-
Applet -ejb ; weblogic.jar
Hi,
<b>I am trying to access EJB from an applet thro' ejb-client.jar. It works fine if I include weblogic.jar in the applet archive but it throws a corba exception if I use wlclient.jar and wljmsclient.jar instead of weblogic.jar in the archive. As weblogic.jar is too huge <b>I want to use thin clients</b>. Could someone help me with this exception. I am using WLS8.1_sp4; jdk 1.4.2_05 and ie6 with latest jvm. Both applet and ejb are deployed in same localhost</b>
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Client get called: host = localhost port = 7001
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Creating new connection Connection[type=IIOP_CLEAR_TEXT remo
te_host=localhost remote_port=7001 state=ESTABLISHED]
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Creating message
from stream
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Succesfully created socket for new connection
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Reading the mess
age fully, size =1204
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Handling GIOP 1.
0 LocateReply
com.sun.corba.se.internal.iiop.IIOPInputStream(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Constructing IIO
PInputStream object
com.sun.corba.se.internal.iiop.IIOPInputStream(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Setting the time
stamp
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Creating message
from stream
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Client get called: host = 172.16.65.14 port = 7001
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Creating new connection Connection[type=IIOP_CLEAR_TEXT remo
te_host=172.16.65.14 remote_port=7001 state=ESTABLISHED]
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for 172.16.65.14:7001,4,ORB ThreadGroup]): Creating mess
age from stream
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Succesfully created socket for new connection
com.sun.corba.se.internal.iiop.GIOPImpl(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,4,file:
/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): getEndpoint(IIOP_CLEAR_TEXT, 0, null)
com.sun.corba.se.internal.iiop.GIOPImpl(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,4,file:
/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): createListener( socketType = IIOP_CLEAR_TEXT port = 0 )
javax.naming.NamingException: Unhandled exception in lookup [Root exception is org.omg.CORBA.MARSHAL: vmcid: SUN minor cod
e: 217 completed: Maybe]
at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:81)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:237)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:171)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at informatics.inventory.plates.editor.EJBPlateMapDAO.<init>(Unknown Source)
at informatics.inventory.plates.editor.PlateMapEditor.init(Unknown Source)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 217 completed: Maybe
at com.sun.corba.se.internal.iiop.CDROutputStream_1_0.write_wstring(CDROutputStream_1_0.java:464)
at com.sun.corba.se.internal.iiop.CDROutputStream.write_wstring(CDROutputStream.java:189)
at weblogic.corba.cos.naming.NamingContextAnyPackage.WNameComponentHelper.write(WNameComponentHelper.java:79)
at weblogic.corba.cos.naming.NamingContextAnyPackage.WNameHelper.write(WNameHelper.java:59)
at weblogic.corba.cos.naming._NamingContextAnyStub.resolve_any(_NamingContextAnyStub.java:79)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:213)
... 6 moreHi,
<b>I am trying to access EJB from an applet thro' ejb-client.jar. It works fine if I include weblogic.jar in the applet archive but it throws a corba exception if I use wlclient.jar and wljmsclient.jar instead of weblogic.jar in the archive. As weblogic.jar is too huge <b>I want to use thin clients</b>. Could someone help me with this exception. I am using WLS8.1_sp4; jdk 1.4.2_05 and ie6 with latest jvm. Both applet and ejb are deployed in same localhost</b>
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Client get called: host = localhost port = 7001
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Creating new connection Connection[type=IIOP_CLEAR_TEXT remo
te_host=localhost remote_port=7001 state=ESTABLISHED]
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Creating message
from stream
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Succesfully created socket for new connection
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Reading the mess
age fully, size =1204
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Handling GIOP 1.
0 LocateReply
com.sun.corba.se.internal.iiop.IIOPInputStream(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Constructing IIO
PInputStream object
com.sun.corba.se.internal.iiop.IIOPInputStream(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Setting the time
stamp
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Creating message
from stream
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Client get called: host = 172.16.65.14 port = 7001
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Creating new connection Connection[type=IIOP_CLEAR_TEXT remo
te_host=172.16.65.14 remote_port=7001 state=ESTABLISHED]
com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for 172.16.65.14:7001,4,ORB ThreadGroup]): Creating mess
age from stream
com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,
4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Succesfully created socket for new connection
com.sun.corba.se.internal.iiop.GIOPImpl(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,4,file:
/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): getEndpoint(IIOP_CLEAR_TEXT, 0, null)
com.sun.corba.se.internal.iiop.GIOPImpl(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,4,file:
/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): createListener( socketType = IIOP_CLEAR_TEXT port = 0 )
javax.naming.NamingException: Unhandled exception in lookup [Root exception is org.omg.CORBA.MARSHAL: vmcid: SUN minor cod
e: 217 completed: Maybe]
at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:81)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:237)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:171)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at informatics.inventory.plates.editor.EJBPlateMapDAO.<init>(Unknown Source)
at informatics.inventory.plates.editor.PlateMapEditor.init(Unknown Source)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 217 completed: Maybe
at com.sun.corba.se.internal.iiop.CDROutputStream_1_0.write_wstring(CDROutputStream_1_0.java:464)
at com.sun.corba.se.internal.iiop.CDROutputStream.write_wstring(CDROutputStream.java:189)
at weblogic.corba.cos.naming.NamingContextAnyPackage.WNameComponentHelper.write(WNameComponentHelper.java:79)
at weblogic.corba.cos.naming.NamingContextAnyPackage.WNameHelper.write(WNameHelper.java:59)
at weblogic.corba.cos.naming._NamingContextAnyStub.resolve_any(_NamingContextAnyStub.java:79)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:213)
... 6 more -
Applet-ejb; corba exception
Hi, I am trying to access EJB from an applet thro' ejb-client.jar. It works fine if I include weblogic.jar in the applet archive but it throws a corba exception if I use wlclient.jar and wljmsclient.jar instead of weblogic.jar in the archive. As weblogic.jar is too huge I want to use thin clients. Could someone help me with this exception. I am using WLS8.1_sp4; jdk 1.4.2_05 and ie6 with latest jvm. Both applet and ejb are deployed in same localhost com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class, 4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Client get called: host = localhost port = 7001 com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class, 4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Creating new connection Connection[type=IIOP_CLEAR_TEXT remo te_host=localhost remote_port=7001 state=ESTABLISHED] com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Creating message from stream com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class, 4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Succesfully created socket for new connection com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Reading the mess age fully, size =1204 com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Handling GIOP 1. 0 LocateReply com.sun.corba.se.internal.iiop.IIOPInputStream(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Constructing IIO PInputStream object com.sun.corba.se.internal.iiop.IIOPInputStream(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Setting the time stamp com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for localhost:7001,4,ORB ThreadGroup]): Creating message from stream com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class, 4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Client get called: host = 172.16.65.14 port = 7001 com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class, 4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Creating new connection Connection[type=IIOP_CLEAR_TEXT remo te_host=172.16.65.14 remote_port=7001 state=ESTABLISHED] com.sun.corba.se.internal.iiop.MessageMediator(Thread[JavaIDL Reader for 172.16.65.14:7001,4,ORB ThreadGroup]): Creating mess age from stream com.sun.corba.se.internal.iiop.ConnectionTable(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class, 4,file:/C:/projects/perforce/java/PlateMapViewer/-threadGroup]): Succesfully created socket for new connection com.sun.corba.se.internal.iiop.GIOPImpl(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,4,file: /C:/projects/perforce/java/PlateMapViewer/-threadGroup]): getEndpoint(IIOP_CLEAR_TEXT, 0, null) com.sun.corba.se.internal.iiop.GIOPImpl(Thread[thread applet-informatics.inventory.plates.editor.PlateMapEditor.class,4,file: /C:/projects/perforce/java/PlateMapViewer/-threadGroup]): createListener( socketType = IIOP_CLEAR_TEXT port = 0 ) javax.naming.NamingException: Unhandled exception in lookup [Root exception is org.omg.CORBA.MARSHAL: vmcid: SUN minor cod e: 217 completed: Maybe] at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:81) at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:237) at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:171) at javax.naming.InitialContext.lookup(InitialContext.java:347) at informatics.inventory.plates.editor.EJBPlateMapDAO.<init>(Unknown Source) at informatics.inventory.plates.editor.PlateMapEditor.init(Unknown Source) at sun.applet.AppletPanel.run(AppletPanel.java:353) at java.lang.Thread.run(Thread.java:534) Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 217 completed: Maybe at com.sun.corba.se.internal.iiop.CDROutputStream_1_0.write_wstring(CDROutputStream_1_0.java:464) at com.sun.corba.se.internal.iiop.CDROutputStream.write_wstring(CDROutputStream.java:189) at weblogic.corba.cos.naming.NamingContextAnyPackage.WNameComponentHelper.write(WNameComponentHelper.java:79) at weblogic.corba.cos.naming.NamingContextAnyPackage.WNameHelper.write(WNameHelper.java:59) at weblogic.corba.cos.naming._NamingContextAnyStub.resolve_any(_NamingContextAnyStub.java:79) at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:213) ... 6 more
I had the same problem and finally caught a statement in one of the docs: "To facilitate the use of IIOP, always specify a valid IP address or DNS name for the Listen Address attribute in the configuration file (config.xml) to listen for connections." I edited my config.xml file and put in the ip address of the machine running my WLS and things started working. Hope this works for you.
Regards,
Ron -
URGENT regarding applet ejb communication
Following is my applet code
i get the inital context but
it get stuck up at this point
Hello home interface
Object boundObject = context.lookup("java:comp/env/ejb/HelloHome");
This is the place wher eit hangs
i have even given acces right in orion-application.xml
pl help
---Applet Code---
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Date;
import java.util.Properties;
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.rmi.PortableRemoteObject;
import hello.ejb.Hello;
import hello.ejb.HelloHome;
public class AppletClient extends JApplet {
boolean isStandalone = false;
JLabel jLabel1 = new JLabel();
BorderLayout borderLayout1 = new BorderLayout();
public void init() {
try {
jbInit();
catch (Exception e) {
e.printStackTrace();
private void jbInit() throws Exception
hello.ejb.Hello _hello;
hello.ejb.HelloHome helloHome;
// Get the initial JNDI context using our settings
this.getContentPane().setLayout(borderLayout1);
this.setSize(new Dimension(400, 400));
jLabel1.setText("Display");
this.getContentPane().add(jLabel1, BorderLayout.CENTER);
//added new code
try
System.out.println("Method call after inital before");
Context context = getInitialContext();
System.out.println("Method call after inital");
// Get a reference to the Hello home interface
Object boundObject = context.lookup("java:comp/env/ejb/HelloHome");
System.out.println("Method call after bound");
helloHome = (HelloHome) PortableRemoteObject.narrow(boundObject,hello.ejb.HelloHome.class);
System.out.println("Method call");
// Get a reference to a Hello instance
_hello = helloHome.create();
jLabel1.setText(_hello.sayHello());
catch (Throwable exception)
throw new Exception("Error " + exception.toString());
//ends
public static Context getInitialContext() throws javax.naming.NamingException
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
p.put(Context.PROVIDER_URL,"ormi://localhost/hello-planet");
p.put(Context.SECURITY_PRINCIPAL,"admin");
p.put(Context.SECURITY_CREDENTIALS,"gateway");
p.put(Context.DNS_URL,"http://localhost:8888/hello-planet");
return new javax.naming.InitialContext(p);
nullI have got a solution for that problem :
I have a WinTel/NT Client with installed JRE 1.3.1 . Go to the Conrol Panel, Java Plugin ,first tab-folder "standard" , SET runtime parameter =
-java.security.manager -Djava.security.policy=<URL>
where <URL> links to a file which must contain :
grant {
permission java.security.AllPermission;
Thats all. works for me, but i dont like this solution because you have to do these
settings on each client using your applet and it'll be a big security leak. Give it a try :-(( -
Applet + EJB (jBoss) - Error to get an EJB from Applet
Hello? All
Could anybody explain why i get an error here. There are an Applet, which should get an access to EJB which was deployed on JBOSS Server (version 4.2.2.GA). If I run this code as a Desktop Application (Make a window and put my panel here) - all OK. But if I run my Code as an Applet from HTML page I get an Exception like this:
java.lang.IllegalStateException: unread block data
I refer to my EJB this way:
public void init()
try
Properties jndiProps = new Properties();
String myServer = "michhome";
jndiProps.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory") ;
jndiProps.setProperty("java.naming.provider.url", myServer) ;
jndiProps.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces") ;
InitialContext ctx = new InitialContext(jndiProps);
// Error got here:
Object homeSource = ctx.lookup("Data1EJB");
Data1Home home = (Data1Home)PortableRemoteObject.narrow(homeSource, Data1Home.class) ;
RemoteBean1 = home.create() ;
catch (Exception e)
PrintException(e);
Fragment of my HTML page where I put an Applet:
<applet code=J2EEApplClientPKG.MainApplet codebase=classes ARCHIVE = "jbossall-client.jar" width=600 height=300>
</applet>
Thank you for time you spend on this question.Hello, my first applet is in the jar, and I want to
get it out.get it out you mean launch from an applet which would be
applet code=AppletClassName.class
archive="JarFileName.jar"
width=width height=height>
</applet>
or unjar it out which would be
jar -xvf JarFileName.jar
There is no plug-in installed here either, so I want
THE LATEST VERSION to be uploaded from sun
automatically.
My book suggested something like the code below, but
the plug-in version must be an oldie.
Please help!
<code>
<!--archive="napaku.jar"-->
<object
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="307"
height="231"
codebase="http://java.sun.com/products/plugin/1.2/jinst
ll-12-win32.cab#Version=1,2,0,0">
<param name="code" value="Lottery.class" />
<param name="type" archive="napaku.jar" />
<comment>
<embed type="application/x-java-applet;version=1.2"
code="Lottery.class"
width="307"
height="231"
pluginspace="http://java.sun.com/products/plugin/1.2/pl
gin-install.html">
<noembed>
</comment>
"Napaku applet fails to load!
</noembed>
</embed>
</object>
</code>codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
The version may not be latest but you could change that as per your req. -
APPLET - EJB bug fixed in 817? to JDEV
Deploying BC4J as an EJB to Oracle8i, and accessing that deployed app module from an applet is not supported. This is due to restrictions in the JServer implementation.
This was supposed to be fixed in rdbms 817 but i haven't tried it.
This is what I'm having touble with. Can a JDEV Guru tell me if this has not been fix it 817?Frank:
I am not trying to run anything in JHeadstart. I am only in the Model layer trying to create the re-usable Business Components that will eventually be imported into projects - some using Jheadstart, others not.
The errors I am getting are explained in this post Getting "Unable to find referenced object" at random when opening JDev When I open JDeveloper and HAVE AN ASSOCIATION OPEN IN THE EDIT PANE, then I will get a "unable to reference object" error on some associations. This appears to be caused by our use of refactor in 10g in these entities which was then migrated over to 11g. 2 other people in that thread confirmed that they have had problems with refactor. There is a lot more detail in that thread.
I am not sure what your Proof of Concept comment means. I am assuming POC means Proof of Concept. Correct me if I am wrong. Are you saying that Oracle is not aware that there has been a refactor problem and want me to check it out? I was hoping for some reassurance that Oracle was aware that there were problems with refactor in 10g, and they have been fixed in 11.1.2.
Is Oracle not aware there have been problems with refactor and has anyone used refactor A LOT in 11.1.2 and know it to work correctly?
Is starting from scratch the best idea?
Are there any ideas about shortcuts to help me use the code that has had hours and hours of time invested in it and bring it over to 11.1.2?
If you want me to check it out will I get Oracle consulting fees? :)
Thanks.
Mary
UofW -
When I try to make a jndi lookup, I get the following error. Did anybody faced similar problem? The error occurs at the line where I call the look up through the initialcontext object. I have signed my applet. It is working locally, but not from other systems (even within the LAN). I use Jboss4.0.1 and have included all the necessary client jar files.
java.lang.IllegalArgumentException: hostname can't be null
at java.net.InetSocketAddress.<init>(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1101)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1232)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:527)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
at javax.naming.InitialContext.lookup(Unknown Source)When I try to make a jndi lookup, I get the following error. Did anybody faced similar problem? The error occurs at the line where I call the look up through the initialcontext object. I have signed my applet. It is working locally, but not from other systems (even within the LAN). I use Jboss4.0.1 and have included all the necessary client jar files.
java.lang.IllegalArgumentException: hostname can't be null
at java.net.InetSocketAddress.<init>(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1101)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1232)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:527)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
at javax.naming.InitialContext.lookup(Unknown Source) -
Best way for an applet to contact EJB ?
Which is the best way for an applet to connect EJB?
1) Applet --> servlet --> EJB
2) Applet --> EJB
What is the pros and cons of both approach?
ThanksHi there,
This is a tricky question and it would be interesting to hear what others think.
Probably the key factor is what is available to you in terms of communications between the EJB and the applet. If you are on an intranet then having the applet talk directly to the EJB looks favourable as you will almost certainly be able to use RMI/IIOP for communications between the applet and the EJB. If you are forced to use HTTP as the communications protocol then you can't talk directly from the applet to the EJB but there again talking to a Servlet from an applet throws up complications of it's own. In this case you should consider not using an applet at all and instead use a JSP page or pages to handle the presentation.
There is another issue that you need to consider when the applet talks directly to the EJB. If the App server that contains the EJB is on a different system to the one that runs the Web Server you'll have to address some security issues and will have to either have local policy files for the systems running the applet or you'll have to sign the applet and have the clients trust it.
Hope this helps
Amanda
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers -
Deployment of Ejb's, Applet calls from a Browser
Hello, and thank you for taking the time to review my post....
PII Celeron 333mHz
256 Megs Ram
Windows NT 4.0 Workstation (SP3)
JDeveloper2.0(Build 343)
Oracle 8.1.5
Netscape 4.06
Everything resides on the same machine.
Problem 1: I had no trouble deploying EJB's initially. As their
size grew, they became increasingly difficult to deploy. Long
delays(10 mins.)were, and are still encountered. Is that
acceptable for a minimal sized EJB? I've also noticed when my
deployment fails, (different errors are presented on different
occassions), it becomes impossible to deploy an EJB without first
closing, and restarting Jdeveloper. Is that normal behavior.?
Other times my deployment hangs when the Oracle 8i deployment is
called. I test my IIOP connection in Jdeveloper, and it fails to
work. I can't access the "sess_sh" from a command prompt either.
Would you know the cause(s)? Which steps should be taken in order
to remedy the situation..? A shutdown, and restart of the
database?
Problem 2: EJB1 is deployed to the database. A simple applet(with
the standalone option) is created. It calls EJB1 from within
Jdeveloper without trouble. Though when i attempt to run the
applet via the provided HTML file, it fails. The HTML file brings
up the appletviewer, which stalls after the applet is started. Is
an invalid "archive" file provided in the applet tag? Which
".jar" file should be present..the *Generated.jar file?
With regards to running the applet in Netscape, it fails. When i
deploy the ejb, should i include the "java40.jar" file as a
dependancy..? Should the "applet.class" file be included in the
deployment as well.? Should the typical Jdeveloper classes be
also stored in the ..Netscape\Program\java\classes directory?
Would someone be able to provide me with a simple applet, ejb
scenario, stating which .jar files are needed, and where they
should be present etc..?
My thanks in advance :)
Robert
nullHey Mark,
Maybe you can help then, I am getting the below errors (I am
pasting in a message I wrote earlier):
Hello,
I think I got one that could stump a bunch of ya... we'll see.
I wrote an EJB in JDev. 2.0 and deployed it. Worked well, no
problems. Wrote a Client Snippet, worked well (never tested
outside JDev.). Wrote a Client Applet, works very well INSIDE
JDEV. 2.0, once I try to run it outside JDev, I get nothing but
Exceptions.
SO, I tried deploying it to a jar, made sure to add all the
propper .jar and .zip files and everything. I deploy it and run
it inside IE 5.0 (using OBJECT instead of APPLET tags with the
right java plug in etc.), that hangs. SO i use appletviewer to
pick up the error messages and I get the stuff below (exception
and stack trace at end of message).
java.naming.factory.initial (which is in the exception message)
was new to me so I spent the last two days reading about JNDI
etc, and found out that it is just an environment property for
JNDI and that ORACLE does not use it once in any of its examples
or anything.
I have been unable to locate AURORA's version of its
ContextFactory (I tried just about every class with the word
Factory in it -- took forever), and none of those worked. To be
exact I found one class that looked like it could have worked:
oracle.aurora.jndi.sess_iiop.sess_iiopURLContextFactory.class...
I tried that, but that returned a ClassCastException.
So here's my synopsis: Inside JDEV for some reason the command:
Context ic= new InitialContext(environment);
works, as long as I specify a minimal number of environment
properties: javax.naming.Context.URL_PKG_PREFIXES (which I set
to, as Oracle says to do,
oracle.aurora.jndi),Context.SECURITY_PRINCIPAL,
Context.SECURITY_CREDENTIAL, and the NO_SSL one too. That works
fine in JDEV, throws the exception (see below) outside of JDEV.
If then try to specifiy a context factory
(Context.INITIAL_CONTEXT_FACTORY
constant) of the class type above I throw the exception shown
above inside and outside of JDEV (i.e. in appletviewer). Here's
where it gets weird:
If I use the above configuration that works in JDEV (no initial
context factory environment setting) and try to print out via
the list() method the context's bindings, I get the same
exception that is seen below. SO the only time it works, is when
I don't specify the initial context factory and I ONLY run it
inside JDEV WITHOUT performing any actions on the instantiated
context variable other than a lookup. REALLY WEIRD!
So please help ASAP, thanks.
Nadim Homsany
Systems Analyst
Message: Need to specify class name in environment or system
property: java.naming.factory.initial
javax.naming.NoInitialContextException: Need to specify class
name in environment or system property:
java.naming.factory.initial
at
javax.naming.spi.NamingManager.getDefaultInitialContextFactory
(Naming Manager.java:688)
at javax.naming.spi.NamingManager.getInitialContext
(NamingManager.java:7
44)
at javax.naming.InitialContext.getDefaultInitCtx
(InitialContext.java:181
at javax.naming.InitialContext.getURLOrDefaultInitCtx
(InitialContext.jav
a:219)
at javax.naming.InitialContext.lookup
(InitialContext.java:288) at
testejb.FirstEJBClientApplet.startEJB
(FirstEJBClientApplet.java:151)
at testejb.FirstEJBClientApplet.jbInit
(FirstEJBClientApplet.java:72)
at testejb.FirstEJBClientApplet.init
(FirstEJBClientApplet.java:61)
at sun.applet.AppletPanel.run(AppletPanel.java:357)
at java.lang.Thread.run(Thread.java:479)
mark tomlinson (guest) wrote:
: You need to link the applet with the xxxxxx_generated.jar that
: comes back from the deployment tool (and that is really all you
: need to include which is specific to the EJB). Try enabling the
: java console for the browser so you can get more specifc error
: messages.
null -
Can EJB work acrros different NetWorks(subnets)...
I have deployed EJB in OAS 4.0.8.2 which works fine with LAN environment. But the same refuse to do so, when hosted with ISP.
Applet is my client to EJB.
The LOOKUP failure occurs(CORBA.COMM_FAILURE). When discussed, I got these infos.
1. EJB may be a layer 2 protocol which does not allow it to work across different subnets.
2. Applet-EJB connectivity can not by bass the socket layer.
3. Firewalls, doesnot allow the EJB connections to be performed.
This means EJB can not work in Internet scenario... Is that so....
Can any one help me???
Thanks for the efforts u will be taking...
Serin.
nullYou can actually use one linksyssmartwifi accounts to multiple routers as long as you were able to associate those routers with your account. So even if you are at your office, home or vice versa; you can still access your router remotely as long as your account and the routers have been associated.
-
DAC APPLET DEPLOYMENT(urgent)
Iam getting problem when deploying DAC APPLET
.iam getting exception of :
cannot instantiateclass JboInitialContextFactory
detail:DAC405:sessionInfo:oracle.jbo.common.jboInitialContextFactory
applicationModuleCrationfailed
pls Respond Immediately
this is urgent<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Joe Martine ([email protected]):
I have a similiar situation deploying to Visibroker. What are you trying to do? Maybe we can help each other????<HR></BLOCKQUOTE>
Type 'Deplying a Java From' in Help. Under 'Deplying an Infobus Java applet' is a paragraph (maybe the second) which says that its not possible to use DAC Applet clients for EJBs, etc. (if that is what ur trying to do). However, it says that DAC applet client deployment is possible with Visibrobroker objects. Joe, what exactly is it that ur trying to do? I'm working on the
applet --> servlet --> EJB --> Oracle
walkaround for the applet --> EJB problem. If anyone had any success on this using JDeveloper or any leads please reply here or e-mail to [email protected]
null -
How to get access Java Application in PDA?
Hi Folks,
I am handling a project which was developed in J2EE. This projetc contains Applets, EJB's developed in Struts frame work. Now client is requesting us to get access of this application in PDA.
1)To get access in PDA, is it necessary to have my application enhanced with J2ME?
2) Is there any PDA compatible JVM is required?
3) Is there any third party tool to do so?
Thanks.
Durga.Hi Folks,
I am handling a project which was developed in J2EE. This projetc contains Applets, EJB's developed in Struts frame work. Now client is requesting us to get access of this application in PDA.
1)To get access in PDA, is it necessary to have my application enhanced with J2ME?
2) Is there any PDA compatible JVM is required?
3) Is there any third party tool to do so?
Thanks.
Durga. -
NullPoniter Exception while Adding in JComboBox
Hi All, My application is a Applet - EJB based and Server is sending Serialized Objects to add in to the JCOMBOBOX object.
I have the following Exception coming up after a few iteratons ( 200 ) of opening up the screen and closing it which I am doing at a normal speed.
Code......
List lstSeverities = (List)e.getReturnValue();
if(lstSeverities!=null){
Iterator oIterator = lstSeverities.iterator();
while (oIterator.hasNext())
CaseSeverity oCaseSeverity = (CaseSeverity)oIterator.next();
if(oCaseSeverity != null && oCaseSeverity.getSeverityName() != null)
m_cbxSeverity.addItem(oCaseSeverity); /* This Statement is throwing exception.*/}
StackTrace.......
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicComboBoxUI$ListDataHandler.contentsChanged(Unknown Source)
at javax.swing.plaf.basic.BasicComboBoxUI$ListDataHandler.intervalAdded(Unknown Source)
at javax.swing.AbstractListModel.fireIntervalAdded(Unknown Source)
at javax.swing.DefaultComboBoxModel.addElement(Unknown Source)
at javax.swing.JComboBox.addItem(Unknown Source)
at sync.client.contactmgmt.activity.CaseGeneral.handleResponse(CaseGeneral.java:1382)
at sync.client.gateway.ServerProxy.handleResponse(ServerProxy.java:96)
at sync.client.gateway.UniversalGateway$1.run(UniversalGateway.java:142)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)
Note - 1. This Exception is coming only once in some 200 repetitions.
2. The issue is with only this ComboBox , I have another 10 ComboBox.
3. This ComboBox is populated with Serialized objects.
Please help to identify the cause and to resolve this.
Thanks.I have looked in Sun sources:
Regarding the stack trace u post:
from AbstractListModel source
protected void fireIntervalAdded(Object source, int index0, int index1)
Object[] listeners = listenerList.getListenerList();
ListDataEvent e = null;
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ListDataListener.class) {
if (e == null) {
e = new ListDataEvent(source, ListDataEvent.INTERVAL_ADDED, index0, index1);
((ListDataListener)listeners[i+1]).intervalAdded(e);
it fires an event that is hanled in nested class ListDataHanlder of
BasicComboBoxIUI:
public void intervalAdded( ListDataEvent e ) {
isDisplaySizeDirty = true;
contentsChanged( e );
it invokes the contentChanged mothod of the same nested class
public void contentsChanged( ListDataEvent e ) {
if ( !(e.getIndex0() == -1 && e.getIndex1() == -1) ) {
isMinimumSizeDirty = true;
comboBox.revalidate();
Now:
The 2 objects that might be null are
1) e: the event
Improbably, is the event dispatched from the JComboxBox add method
2) the comboBox Object
Most probably.
I imagine that, when the event is disptached, the JComboBox is valid
(not equals to null)
But when the events reaches contentChange method, the comboBox
pointer in BasicComboBoxUI is just null.
This pointer is setted by installUI method and is forced to null
in uninstallUI method.
So, it semmes to be not a Swing bug, but, most probably,
somothing in your code cause the call of unistallUI method or,
simply, destroys the JComboBox after that the event is shipped.
Take a look. -
Suggest me a doable project to do in my summer vacation
So ya, summer vacation is starting for me and i want to test my java skills so what java projects do you suggest me to code in my free time?
I know you aint mind readers so here is some background info:
i'm a senior computer science student graduating next year at university level. I have 3 years experience with java programming and have created several applications like a webserver with RMI, bankingsystem with EJB's and JSP frontend. Coded GUI applications with Swing and AWT (prefer swing) made a few applets (beginners level) etc
keywords: RMI, servlets, applets, EJB (2.1, 3.0 mediocore) ,cli's, spring framework, swing, awt, webservices(not very experienced with this) etc
I just want to do this for fun so any tips or suggestions are welcome :D
ps not sure if this is the right board or even the forum but i didn't knew where to post this. Oh well..You can make your own YM, so that we can chat live.I already made a simple chat program that enable users to chat with eachother with smiley, user commando's, smilies private messaging etc using JMS.
I suppose i can create another one but i want to learn something new. Thanks for the reply though ;d -
Help:java.lang.ClassNotFoundException
we have one application.We are calling ejb through applet.
We have sybase EAServer3.6.1 and jaguar 3.6.1.Java code is in jdk118 and ejb1.0.
Our architacture is: applet<->ejb<->server.
Our ejb is deployed on server.That we are calling our ejb through applet.Whole code for applet and ejb is lying on server.When we run our application through browser from different m/c we are getting two errors.
1)com.ms.security.SecurityExceptionEx.
2)powersoft.powerj.jaguar.InitialContextException: javax.naming lookup failed for component: HelloEJBPackage/HelloEJB
Exception: [Root exception is [Root exception is java.lang.ClassNotFoundException: java.rmi.Remote]javax.naming.NamingException]javax.naming.NamingException.
When I set classpath on each m/c.
i.e (c:/prog/sybase/shard/sun/jdk118/lib/classes.zip) my application is running fine it just gives warning for securiety not for lookup method failed.
Our system is in production.We can not make setting for individual clients.We need our applet should take classes from server not from client m/c.
Can anybody help me to solve this problem?If the client is created using powerj, pl cross verify the code for the lookup() in the client with component properties in the jaguar server.
check the component properties , in the installed packages of the jaguarCTS , under jaguar manager of the sybase central java edition.
kar
Maybe you are looking for
-
Hi, i am getting following error, while taking RMAN backup. ORA-01580: error creating control backup file /backup/snapcf_TST.f ORA-27054: NFS file system where the file is created or resides is not mounted with correct options DB Version:10.2.0.4.0 w
-
Can i install flash drive in mid-2009 macbook pro
I want to increase the storage on my MacBook pro - mid-2009. I use Final Cut so there are demands. Must I stay with a spinning drive or can I install a large flash drive? I big can I go? 2.26 ghz, 8 gigs ram, running latest Mountain Lion (10.8.2) Tha
-
Hi I am using RFC adapter, I am facing java.lang.outOfMemory Exception whenever payload size increases. Important point: In XI everything is successful. But in R-3 I am facing the problem. Please guide me, how to solve this issue. Pi
-
How to get the installation path or ms word using forms 6i
dear all i want to know the client side full path with exe file name of ms word or acrobat reader e.t.c. from forms 6i actually i want to run word file on button click. according to the type of file extension. if the file is related to .doc then open
-
Syncing Audio and Video but wish for the Audio not to move on timeline?
Has anyone worked out how to sync audio and video within Premiere Pro but have the Audio stay fixed on the timeline and the video move? Every way I try it Premiere Pro insists on moving the audio. Locking the track does not work as you cannot select