cancel
Showing results for 
Search instead for 
Did you mean: 

How to access an XMII Applet?

Former Member
0 Kudos

Hello, there!

I am starting using xMII 12.0 and I have just created an iGrid that uses a Query Template.

On our xMII server, when I right click the iGrid and choose 'Test', I can access it on my web browser normally and it works as expected.

So, on my local machine, I create a web page that uses that iGrid applet, as follows:

<HTML DIR=ltr>

<HEAD>

<TITLE>

Auto-Generated Page

</TITLE>

</HEAD>

<BODY>

<APPLET NAME="Untitled" CODEBASE="http://myServer:myPort/XMII/Classes" CODE="iGrid" ARCHIVE="illum8.zip" WIDTH="640" HEIGHT="400" MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="Default/Tests/TestQuery">

<PARAM NAME="DisplayTemplate" VALUE="Default/Tests/TestGrid">

<PARAM NAME="Content-Type" VALUE="image/png">

</APPLET>

</BODY>

</HTML>

, but the applet initialization fails.

Lookin on IE's Java Console, I see the following stack trace:

ERROR - Error loading properties, java.net.UnknownServiceException: protocol doesn't support output

ERROR - Error loading properties, java.net.UnknownServiceException: protocol doesn't support output

ERROR - Error loading properties, java.net.UnknownServiceException: protocol doesn't support output

ERROR - Error loading properties, java.net.UnknownServiceException: protocol doesn't support output

java.lang.NullPointerException

* at com.sap.xmii.Illuminator.query.TagQuery.getColumnNames(TagQuery.java:200)*

* at com.sap.xmii.Illuminator.gui.grid.iGridComponent.getQueryColumnNames(iGridComponent.java:552)*

* at com.sap.xmii.Illuminator.gui.grid.iGridComponent.resolveColumnNames(iGridComponent.java:1530)*

* at com.sap.xmii.Illuminator.gui.grid.iGridComponent.<init>(iGridComponent.java:400)*

* at com.sap.xmii.Illuminator.gui.grid.iGridApplet.setDisplayTemplate(iGridApplet.java:484)*

* at com.sap.xmii.Illuminator.gui.grid.iGridApplet.init(iGridApplet.java:133)*

* at sun.applet.AppletPanel.run(Unknown Source)*

* at java.lang.Thread.run(Unknown Source)*

ConsoleLogger::Creating NEW instance...

ERROR - Error Loading Resource File for Applet_: protocol doesn't support output

ERROR - Authenticator::Unable to determine authenticatd user, java.security.AccessControlException: access denied (java.io.FilePermission \XMII\AppletAuthenticator read)

Exception in thread "AWT-EventQueue-70" java.lang.NullPointerException

* at sun.font.FontDesignMetrics.stringWidth(Unknown Source)*

* at com.sap.xmii.Illuminator.gui.common.BaseApplet.displayAuthError(BaseApplet.java:569)*

* at com.sap.xmii.Illuminator.gui.common.BaseApplet.paint(BaseApplet.java:550)*

* at com.sap.xmii.Illuminator.gui.grid.iGridApplet.paint(iGridApplet.java:176)*

* at sun.awt.RepaintArea.paintComponent(Unknown Source)*

* at sun.awt.RepaintArea.paint(Unknown Source)*

* at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)*

* at java.awt.Component.dispatchEventImpl(Unknown Source)*

* at java.awt.Container.dispatchEventImpl(Unknown Source)*

* at java.awt.Component.dispatchEvent(Unknown Source)*

* at java.awt.EventQueue.dispatchEvent(Unknown Source)*

* at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)*

* at java.awt.EventDispatchThread.pumpEventsForFilter(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)*

Does anyone know what might be wrong?

What is the recommended way to access an xMII-generated applet on my web pages?

I have already tried to use Content Generation Wizard but it didn't seen to work...

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor
0 Kudos

Get rid of the PARAM for content-type and retry it. I don't think that applies to this type of object. You should also create a name for the applet. Usual convention is 'a+SomeDescriptiveName'. Try this in place of your CODEBASE="/XMII/Classes".

Hope this helps,

Mike

Edited by: Michael Appleby on Jul 1, 2008 10:14 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

First remove the <PARAM NAME="Content-Type" VALUE="image/png"> and check are you getting error or not.

If you are still getting error then instead of using CODEBASE="http://myServer:myPort/XMII/Classes" use CODEBASE="/Illuminator/Classes".

Hope this will help you.

Thanks,

Manisha

Former Member
0 Kudos

Michael and Manisha, thanks a lot for your answsers.

I cut off the "Content-Type" tag, but I still get the same errors and the applet doesn't load.

Regarding to your suggestion of replacing CODEBASE="http://10.10.15.54:56100/XMII/Classes" for CODEBASE="/XMII/Classes", how will the browser find my applet if I don't indicate the server somehow?

Is there another way to do it?

Thanks again!

agentry_src
Active Contributor
0 Kudos

Hi Eduardo,

I suspect that you built your webpage in FrontPage outside of XMII. What I would suggest first, is to open a new file (with an irpt extensionon the Web side of the Workbench and copy/paste your entire page's code there. Then hit the test button to see if it runs in that environment. If it runs there correctly (with the changes we suggested), then the problem is not in the html coding. Once the page is working there, you can add it to your xMII Portal navigation. That will allow access from other environments. By working outside of xMII, you are also bypassing the security in the application. That is at least part of the problem with your page.

Hope this helps,

Mike

Edited by: Michael Appleby on Jul 2, 2008 2:18 PM

Edited by: Michael Appleby on Jul 2, 2008 2:21 PM

Former Member
0 Kudos

Eduardo, the xMII applets know how to find the "home server" automatically via the Java virtual machine and what is called the "applet context". Please correct the CODEBASE and that should address your problems.

Former Member
0 Kudos

Hello, Michael!

When I test the iGrid using the "Test" button of the workbench it works. So, I get the HTML source of the automatically generated page, paste it to a local file and try to run it. And it doesn't work.

What I need is to invoke this iGrid applet from inside a web page I have, which may not necessarily be running on the same application server of the applet and, actually, not necessarily on the same phisical machine of the applet.

Now I've made another test. I've tried to run this same page on the same machine where the applet runs and I got the following Java Console stack trace:

java.lang.NullPointerException

* at sun.awt.font.FontDesignMetrics.stringWidth(Unknown Source)*

* at com.sap.xmii.Illuminator.gui.common.BaseApplet.displayAuthError(BaseApplet.java:569)*

* at com.sap.xmii.Illuminator.gui.common.BaseApplet.paint(BaseApplet.java:550)*

* at com.sap.xmii.Illuminator.gui.grid.iGridApplet.paint(iGridApplet.java:176)*

* at sun.awt.RepaintArea.paint(Unknown Source)*

* at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)*

* at java.awt.Component.dispatchEventImpl(Unknown Source)*

* at java.awt.Container.dispatchEventImpl(Unknown Source)*

* at java.awt.Component.dispatchEvent(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)*

ERROR - Error Loading Resource File for Applet_: protocol doesn't support output

ERROR - Authenticator::Unable to determine authenticatd user, java.security.AccessControlException: access denied (java.io.FilePermission \XMII\AppletAuthenticator read)

java.lang.NullPointerException

* at sun.awt.font.FontDesignMetrics.stringWidth(Unknown Source)*

* at com.sap.xmii.Illuminator.gui.common.BaseApplet.displayAuthError(BaseApplet.java:569)*

* at com.sap.xmii.Illuminator.gui.common.BaseApplet.paint(BaseApplet.java:550)*

* at com.sap.xmii.Illuminator.gui.grid.iGridApplet.paint(iGridApplet.java:176)*

* at sun.awt.RepaintArea.paint(Unknown Source)*

* at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)*

* at java.awt.Component.dispatchEventImpl(Unknown Source)*

* at java.awt.Container.dispatchEventImpl(Unknown Source)*

* at java.awt.Component.dispatchEvent(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)*

Thanks a lot for your help, Michael!

Former Member
0 Kudos

Rick,

I understand that this makes sense when the page that contains the applet runs on the "xMII application server" (I don't know the right name of it), which is the same of the applet itself. In this case, that's really no need to point to the server.

But what if I want to embed the applet on another web page I have, which may be running on another server?

Is it possible?

Thanks a lot!

Former Member
0 Kudos

Ah, now I understand. The short answer is that you can't (typically) have a Java applet load in a web page and access another host server (without lots of extra work), and the xMII applets will not provide a way to do this. However, there is a workaround, though perhaps not an ideal one. You'll still need to host an HTML page containing the applet code on the MII server, but you can create an HTML page on your other server which contains a FRAME or IFRAME HTML tag, and point it to the HTML page on the MII server.

Hope this helps.

Rick

Former Member
0 Kudos

I see it, Rick.

Anyway, it seems to me I still need to study xMII a lot. I didn't even know that there was an "xMII Portal"...

Do you have any suggestions on where to read about it?

Thanks a lot for your help!

agentry_src
Active Contributor
0 Kudos

Eduardo,

You are invoking the iGrid from within the workbench, but you can also test your webpage within it as well.

In the Workbench, the default tab is Catalog which is where you built your query and display templates. Right next to it (right under the save button) is a folder tab named Web.

Click on it and you will see the same project structure you saw under Catalog. Open a project and it will have a default folder named WEB. Right click on WEB and add a New File. A blank window will appear. Paste your webpage html into that window and save it as SOMEAPPLICATION.irpt. Then press the execute button. If you have problems with your scripting or syntax, you can test it while it is in the Workbench. The editor does not have all the functionality of FrontPage or DreamWeaver, but it is handy to have it in the same place as all your xMII objects.

Good luck,

Mike

Former Member
0 Kudos

OK, Mike!

Thanks a lot again!

agentry_src
Active Contributor
0 Kudos

Eduardo,

The first place to start is the Help in the Home Page of xMII.

Click on navigation services,

Click on Configuring Navigation

The instructions are pretty basic, but cover most of the bases. Depending on how you assign roles and structure your links, you can limit access. There is a lot more to learn in that area, but if you play around with the navigation, you will probably learn some of it along the way. There are also more messages here that can help once you get the basics.

Have fun,

Mike

Former Member
0 Kudos

Hi Eduardo,

try the following code for MII 12.0

<APPLET NAME="MyApplet" CODEBASE="/XMII/Classes" CODE="iGrid" ARCHIVE="illum8.zip" WIDTH="210" HEIGHT="400" MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="A/PrdOrderDetailsSelect_Query">

<PARAM NAME="DisplayTemplate" VALUE="A/PrdOrderDetailsSelect_Grid">

</APPLET>

Why do you have http://// in CODEBASE

Thanks

Namita