|
|
|
|
java 1.6.0 : can't access data over http with DefaultSearchEngine
Posted:
Mar 16, 2007 2:11 AM
|
|
|
I use JavaHelp to display html pages from an applet. since I have set up the new runtime jre1.6.0, the full text search does not work and the java console gives the following messages:
MergineSearchEngine: base: jar:http://localhost/dokpe/procedures/procall.jar!/procedures.hs MergineSearchEngine: params: {engine=com.sun.java.help.search.DefaultSearchEngine, data=_jhs} Exception while creating engine named com.sun.java.help.search.DefaultSearchEngine for view: javax.help.SearchView@ac06d4 java.lang.reflect.InvocationTargetException ...
The problem does not appear when the html page with the applet is loaded directly via the network: MergineSearchEngine: makeEngine MergineSearchEngine: base: jar:file:/C:/xampplite/htdocs/dokpe/procedures/procall.jar!/procedures.hs MergineSearchEngine: params: {engine=com.sun.java.help.search.DefaultSearchEngine, data=_jhs}
I have downloaded the source code of JavaHelp and tried a few tests in the MergingSearchEngine code where the engine object is instanciated.
Loading directly the the DefaultSearchEngine with engine = new DefaultSearchEngine(base, params); gives java.security.InvalidParameterException at com.sun.java.help.search.DefaultSearchEngine.<init>(DefaultSearchEngine.java:86)
The exception was not throw with older version of java e.g. 1.5.0_06
Am I missing something ? Should I submit this as a bug for DefaultSearchEngine class ?
Any workaround would be greatly appreciated !
Francois R.
********************************************************************************
You may leave the list at any time by sending message with no subject and "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives are available at http://archives.java.sun.com/archives/javahelp-interest.html. Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.
|
|
|
|
|
|
|
Re: [JAVAHELP] java 1.6.0 : can't access data over http with DefaultSearchEngine
Posted:
Mar 16, 2007 9:19 AM
in response to: Francois Rappaz
|
|
|
I'd say submit a bug report. Looks like a regression.
Binky
Francois Rappaz wrote: > I use JavaHelp to display html pages from an applet. since I have set up the > new runtime jre1.6.0, the full text search does not work and the java > console gives the following messages: > > MergineSearchEngine: base: > jar:http://localhost/dokpe/procedures/procall.jar!/procedures.hs > MergineSearchEngine: params: > {engine=com.sun.java.help.search.DefaultSearchEngine, data=_jhs} > Exception while creating engine named > com.sun.java.help.search.DefaultSearchEngine for view: > javax.help.SearchView@ac06d4 > java.lang.reflect.InvocationTargetException > ... > > The problem does not appear when the html page with the applet is loaded > directly via the network: > MergineSearchEngine: makeEngine > MergineSearchEngine: base: > jar:file:/C:/xampplite/htdocs/dokpe/procedures/procall.jar!/procedures.hs > MergineSearchEngine: params: > {engine=com.sun.java.help.search.DefaultSearchEngine, data=_jhs} > > I have downloaded the source code of JavaHelp and tried a few tests in the > MergingSearchEngine code where the engine object is instanciated. > > Loading directly the the DefaultSearchEngine with > engine = new DefaultSearchEngine(base, params); > gives > java.security.InvalidParameterException at > com.sun.java.help.search.DefaultSearchEngine.<init>(DefaultSearchEngine.java:86) > > The exception was not throw with older version of java e.g. 1.5.0_06 > > Am I missing something ? > Should I submit this as a bug for DefaultSearchEngine class ? > > Any workaround would be greatly appreciated ! > > Francois R. > > ******************************************************************************** > > You may leave the list at any time by sending message with no subject and > "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives > are available at http://archives.java.sun.com/archives/javahelp-interest.html. > Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.
********************************************************************************
You may leave the list at any time by sending message with no subject and "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives are available at http://archives.java.sun.com/archives/javahelp-interest.html. Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.
|
|
|
|
|
|
|
|
Re: [JAVAHELP] java 1.6.0 : can't access data over http with DefaultSearchE
Posted:
Sep 18, 2007 3:37 AM
in response to: Roger Brinkley
|
|
|
I've hit this as well: JavaHelp 2.0_05 + Java 1.6_02 + applet context => exception when using search view.
Did the bug get reported? I don't see anything in the bug parade.
__Jason
|
|
|
|
|
|
|
|
Re: [JAVAHELP] java 1.6.0 : can't access data over http with DefaultSearchE
Posted:
Oct 31, 2007 3:17 AM
in response to: Roger Brinkley
|
|
|
I have found a workaround: on XP, go to the Control Panel-Java, and turn off the "Keep temporary files on my computer" and the search works again. It's obviously related to the way le java 1.6 plugin caches files when they are sent by http. There are some bugs reports around this in sun base (but mine has never been answered since I posted it).
With the files caching activated in the Control Panel Java, DefaultSearchEngine.java with debug=true gives
---------------------------------------------------- MergineSearchEngine: startSearch() MergineSearchEngine: makeEngine MergineSearchEngine: base: jar:http://localhost/dokpe/procedures/procall.jar!/procedures.hs MergineSearchEngine: params: {engine=com.sun.java.help.search.DefaultSearchEngine, data=_jhs} DefaultSearchEngine: Loading Search Database DefaultSearchEngine: base: jar:http://localhost/dokpe/procedures/procall.jar!/procedures.hs DefaultSearchEngine: params: {engine=com.sun.java.help.search.DefaultSearchEngine, data=_jhs} =========== java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(Unknown Source) at java.util.zip.ZipFile.getEntry(Unknown Source) at java.util.jar.JarFile.getEntry(Unknown Source) at com.sun.deploy.cache.CachedJarFile.getEntry(Unknown Source) at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source) at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source) at sun.plugin.net.protocol.jar.CachedJarURLConnection.getInputStream(Unknown Source) at com.sun.java.help.search.SearchEnvironment.readFromDB(SearchEnvironment.java:314) at com.sun.java.help.search.SearchEnvironment.<init>(SearchEnvironment.java:81) at com.sun.java.help.search.QueryEngine.<init>(QueryEngine.java:61) at com.sun.java.help.search.DefaultSearchEngine.<init>(DefaultSearchEngine.java:80) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ......
Exception while creating engine named com.sun.java.help.search.DefaultSearchEngine for view: javax.help.SearchView@64dd79 java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at javax.help.search.MergingSearchEngine.makeEngine(MergingSearchEngine.java:172) at javax.help.search.MergingSearchEngine.<init>(MergingSearchEngine.java:62)
MergineSearchEngine: startSearch()
In SearchEnvironment.java I tried to disable caching on the urlConnection
uc.setRequestProperty("Cache-Control","no-store,max-age=0,no-cache"); uc.setRequestProperty("Expires","0"); uc.setRequestProperty("Pragma","no-cache");
before the connect() method of the connections but the errors are the same
Francois
|
|
|
|
|
|
|
|
Re: [JAVAHELP] java 1.6.0 : can't access data over http with DefaultSearchE
Posted:
Oct 31, 2007 6:14 AM
in response to: frappaz2
|
|
|
I found another workaround of not JARing up the files, but then I had to declare *.* as the application/octet mime type since the index files don't have any extensions.
I've since switched to Oracle Help, which works. (Although you lose search hit highlighting.)
__Jason
|
|
|
|
|
|
|
|
printing and server-based javahelp
Posted:
Mar 19, 2007 5:14 PM
in response to: Francois Rappaz
|
|
|
Used to use the JavaHelp Viewer but now I'm on server-based product and will be using server-based JavaHelp. Looks like I'm dependent on the browser's printing facility. Anyone found a way to print multiple selected pages or a whole topic at a time from the browser as you can do with the JavaHelp Viewer?
--jo
********************************************************************************
You may leave the list at any time by sending message with no subject and "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives are available at http://archives.java.sun.com/archives/javahelp-interest.html. Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.
|
|
|
|
|
|
|
|
Re: java 1.6.0 : can't access data over http with DefaultSearchEngine
Posted:
Nov 27, 2007 8:40 AM
in response to: Francois Rappaz
|
|
|
I am also getting an error when searching my JavaHelp.
When I enter a search string I get:
Exception while creating engine named com.sun.java.help.search.DefaultSearchEngine for view: javax.help.SearchView@19c86c5 java.lang.reflect.InvocationTargetException
The rest of the help system seems to work correctly.
The "Keep temporary files on my computer" workaround worked, but I can't ask the users of the applet to make that change. Is this a JavaHelp bug?
In case it helps here is some of what is in the applets jar.
JavaHelpSearch/ html/ help.hs helpIndex.xml helpTOC.xml JavaHelpSearch/DOCS JavaHelpSearch/DOCS.TAB JavaHelpSearch/OFFSETS JavaHelpSearch/POSITIONS JavaHelpSearch/SCHEMA JavaHelpSearch/TMAP Map.jhm
|
|
|
|
|
|
|
|
Re: java 1.6.0 : can't access data over http with DefaultSearchEngine
Posted:
Nov 28, 2007 1:55 AM
in response to: emanresu
|
|
|
I post in the bug database (without news until now) and in the java.developper.zone forum on pluggin. I think it's the same problem: with caching enabled the applet can't open another jar file for reading with java 1.6. The post can be found at http://forum.java.sun.com/thread.jspa?threadID=5238421&tstart=0
Francois
|
|
|
|
|
|
|
|
Re: java 1.6.0 : can't access data over http with DefaultSearchEngine
Posted:
Nov 28, 2007 2:18 PM
in response to: frappaz2
|
|
|
Thanks for the info. I'll leave the help outside the applet's jar for now.
|
|
|
|
|
|
|
|
Re: java 1.6.0 : can't access data over http with DefaultSearchEngine
Posted:
Nov 3, 2008 7:36 PM
in response to: Francois Rappaz
|
|
|
I encountered the same problem and just resolved it.
in JavaHelpTM 2.0 System User's Guide:
The master helpset can be an actual, functioning helpset or it can be empty (dataless). A dataless master helpset defines a set of views that do not contain data (there is no <data> tag specified for the views). Thedataless master helpset serves as a container into which subhelpsets can be merged. You might use a dataless master to ensure that a set of views is shown in the merged helpset.
so when subsets are merged together, the views in master helpset always do not contain data. The resolved method is to remove data tag from the SearchView element in master helpset
|
|
|
|
|