Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

problem viewing local html page containing applet!

887433Sep 10 2011 — edited Sep 19 2011
I have the following requisite three files in a local directory "C:\Users\thomas\Documents\vinu\hyperdyn\src\":

*.html
*.jar
*.jnlp

When I double click the html file to launch it, the applet fails to load and the Java console prints the following error message:

Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM
User home directory = C:\Users\thomas
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


MissingFieldException[ The following required field is missing from the launch file: <jnlp><applet-desc>width]
at com.sun.javaws.jnl.XMLUtils.getRequiredIntAttribute(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.buildAppletDesc(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptorFromCache(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptorFromCache(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
at sun.plugin2.main.client.PluginMain.access$300(Unknown Source)
at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Error while initializing manager: MissingFieldException[ The following required field is missing from the launch file: <jnlp><applet-desc>width], bail out

The strange thing is that I do have the height and width parameters specified in the jnlp file:

<applet-desc
name="..."
main-class="..."
width="640"
height="355">
</applet-desc>

The stranger thing is that if I modify the path to the local directory, for example, add a dash to make it "C:\Users\thomas\Documents\vinu\hyperdyn\src-\", then the applet launches without any error! I am working on Windows 7 Home Premium, Service Pack 1. Any insights anyone may have will be greatly appreciated.

Comments

Greybird-Oracle
Hi,

We don't often get questions asking why JE is so fast. :-)

When inserting in key order, the work that is performed by JE is:

1) A Btree lookup is performed to find the proper insertion location.
2) Btree bottom level internal nodes are logged when they are split, which is typically once per 128 records.
3) Higher level Btree nodes are also split when they fill, but this is very infrequent compared to other operations.
4) The Btree leaf node records are logged.

Because of the log structured storage system, all logging is appending to a file. You are not reading, so there is no other I/O. (If the database becomes large and does not fit in cache, then reading records into cache is expensive of course.)

As the tree becomes deeper (more levels) over time, step 1, 2 and 3 become slightly more expensive, but perhaps not enough to measure in your test.

Does this answer your question?

--mark
666757
Mark,
Thanks again for input. It's always appreciated.

Unfortunately, what it seemed you were leading to was that my database isn't big enough so that it spills over the cache and makes things expensive enough to see any difference.

The test database I've created has gotten to 50 GB on 100s of millions of records and I've STILL seen the same insert times throughout the database lifetime - roughly 75 writes/ms on non transactional writing. The database should have been too large to work with in memory a long time ago. When you say it should be slightly more expensive as time goes on, I agree with you theoretically. Though even a small change should show in my results. I measure the insert times of every 10 million writes, and its been fairly constant (75 +/- 1 writes per ms).

Julian
Greybird-Oracle
I suspect that you're not seeing an increase over time because the I/O cost doesn't go up, and the I/O cost is probably the limiting factor. This is certainly not a problem, is it?
666757
In the Berkeley DB presentation, it lists 4 types of indexing schemes: btree, recno, queue, and hash. I've seen in the documentation that JE uses btrees as standard. However, due to the constant insert times, could it be possible that I'm actually using something like hashing, which has constant insert times? How can I check to verify that I am indeed using btrees? If I am not using btrees, how can I set my program to use them?

Please let me know.

Julian

Edited by: user10464001 on Oct 31, 2008 9:49 PM
Charles Lamb
JE only provides a B-Tree access methods. The other AM's that you mention are only available on the "Core" BDB.

Charles Lamb
666757
Mark,

That's an interesting reply you left. It's very difficult for me to get a grasp of what's going on since I don't really know the internals of berkeley db. From briefly scanning the JE architecture whitepaper, it seems that you are probably right. The keys are searched in memory data is stored at the leaves of the B+ trees.

Julian
1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 17 2011
Added on Sep 10 2011
2 comments
684 views