Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems initializing ORB (applet, jdk1.3 plugin, java/idl)

0 views
Skip to first unread message

Papick Garcia Taboada

unread,
May 26, 2001, 11:35:52 AM5/26/01
to
Hi everybody!

I read lots of postings here (most of them unanswered) regarding
initializing the ORB in an applet.

I am writing a little chat system (another one, I know).
My intention is to learn a little more on the java pluging.
Since I know java (I thought I did...), I took a chat system
as project to play a little bit with...

My application client is working properly and the code for
the applet client and for the application client is basically the
same,
despite of this "orb.init(...)" think...

Here is my problem:

I alway get a NULLPOINTER EXCEPTION when calling orb.init(this,null)
where
this is the applet.
The orb is initialized in the init() method of the applet (did I
mention
it is an JApplet?).

Here is the Exception (output console from the plugin)

java.lang.NullPointerException
at java.applet.Applet.getParameter(Unknown Source)
at org.omg.CORBA.ORB.init(Unknown Source)
at de.lemniscus.chat.applet.Chat.<init>(Chat.java:36)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Here is my HTML code converted by the html plugin:

<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.3 -->
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH =
600 HEIGHT = 600 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<PARAM NAME = CODE VALUE = "de/lemniscus/chat/applet/Chat.class" >
<PARAM NAME = ARCHIVE VALUE = chatApplet.jar >

<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="false">
<PARAM NAME = "org.omg.CORBA.ORBClass" VALUE
="com.sun.corba.se.internal.iiop.ORB">
<PARAM NAME = "org.omg.CORBA.ORBSingletonClass" VALUE
="com.sun.corba.se.internal.corba.ORBSingleton">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.3" CODE =
"de/lemniscus/chat/applet/Chat.class" ARCHIVE = chatApplet.jar WIDTH =
600 HEIGHT = 600 org.omg.CORBA.ORBClass =
"com.sun.corba.se.internal.iiop.ORB" org.omg.CORBA.ORBSingletonClass =
"com.sun.corba.se.internal.corba.ORBSingleton" scriptable=false
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>

</NOEMBED></EMBED>
</OBJECT>

<!--
<APPLET CODE = "de/lemniscus/chat/applet/Chat.class" ARCHIVE =
chatApplet.jar WIDTH = 600 HEIGHT = 600>
<PARAM NAME = "org.omg.CORBA.ORBClass" VALUE
="com.sun.corba.se.internal.iiop.ORB">
<PARAM NAME = "org.omg.CORBA.ORBSingletonClass" VALUE
="com.sun.corba.se.internal.corba.ORBSingleton">


</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->


and here is my apple init code:

try {
java.util.Properties p = new java.util.Properties();
p.put("org.omg.CORBA.ORBClass",
"com.sun.corba.se.internal.iiop.ORB");
ORB orb = ORB.init( this, p );
orb.connect( tie );

(...)

thanks,

papick

0 new messages