Community
Participate
Working Groups
Overview: (More detailed restatement of summary) Steps to Reproduce: (Minimized, easy-to-follow steps that will trigger the bug) 1)Import Devices 2)Error searching for devices Actual Results: (What MTJ did after performing the above steps) S40_5th_Edition_SDK_Feature_Pack_1 S60_3rd_MIDP_SDK_FP1 Sun Java (TM) Wireless Toolkit 2.5.2 for CLDC All these SDK above cannot be imported. "Error searching for devices" Expected Results: (What MTJ should have done, were the bug not present) Build Date & Platform: (update with the correct values from your workspace) Installation : Eclipse Platform Version: 3.4.1 Build id: M20080911-1700 MTJ install : Runtime | SDK | Examples java.runtime : Java(TM) SE Runtime Environment (build 1.6.0_07-b06) os.name: : Windows XP Professional, Service Pack 3 Additional Builds and Platforms: (Whether or not it occurs on other platforms) S40_5th_Edition_SDK_Feature_Pack_1 S60_3rd_MIDP_SDK_FP1 Sun Java (TM) Wireless Toolkit 2.5.2 for CLDC Additional Information: (Any other useful information)
Created attachment 114793 [details] Picture for screen shot
this issue associated with xp (sp3) usually happens because xp (sp3) usually blocks the emulator executable and since that mtj is not able to runs the emulator to identify and import the devices. can you please double check on windows firewall to see if the emulator executables are on the exclude list? thanks, gustavo
It is ok when I use eclipseme,I can import the devices correctly. I have no firewall opened including windows firewall.
eclipseme.feature_1.7.9_site is OK with Eclipse Version: 3.3.2 Build id: M20080221-1800
With Eclipse Platform Version: 3.3.2 Build id: M20080221-1800 and eclipseme.feature_1.7.9_site I can import all the 3 SDK to IDE.
thanks for the additional information can you past the details of the error message? is a log generated on the workspace? if yes, can you also attached gustavo (In reply to comment #5) > With > Eclipse Platform Version: 3.3.2 Build id: M20080221-1800 and > eclipseme.feature_1.7.9_site > > I can import all the 3 SDK to IDE. >
Created attachment 114816 [details] Error details
Hi, This error you reported seems similar to the one reported in the user list http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.dsdp.mtj/msg00279.html, and its related to the javadoc importer. This feature is not available in Eclipseme (only mtj), thats why the import works fine when you are using EclipseME. We are trying to evaluate this error but I can't reproduce the behavior reported, may you provide which MTJ Build you're using (Build id)?
dsdp-mtj-runtime-incubation-N20081007 dsdp-mtj-runtime-incubation-0.9RC1 They hava the same problem whenever which version of eclipse I use.
Revision 328 private IRunnableWithProgress getDeviceSearchRunnable( final File[] searchDirectories) { // The runnable to do the device search return new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { getShell().getDisplay().asyncExec(new Runnable() { public void run() { deviceList.clear(); } }); for (int i = 0; i < searchDirectories.length; i++) { DeviceFactory.findDevices(searchDirectories[i], deviceList, monitor); } getShell().getDisplay().asyncExec(new Runnable() { public void run() { deviceViewer.refresh(); deviceViewer.setAllChecked(true); } }); } catch (CoreException e) { throw new InvocationTargetException(e); } } }; } Revision 474 private IRunnableWithProgress getDeviceSearchRunnable( final File[] searchDirectories) { // The runnable to do the device search return new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { getShell().getDisplay().syncExec(new Runnable() { public void run() { deviceList.clear(); } }); for (File element : searchDirectories) { DeviceFactory.findDevices(element, deviceList, monitor); } getShell().getDisplay().syncExec(new Runnable() { public void run() { deviceViewer.refresh(); deviceViewer.setAllChecked(true); } }); } catch (CoreException e) { throw new InvocationTargetException(e); } } }; }
dsdp-mtj-runtime-incubation-I20080813 is ok
sorry my mistake dsdp-mtj-runtime-incubation-I20080813 has the same problem Error searching for devices
Created attachment 114861 [details] Import WTK
Created attachment 114862 [details] eclipseme.feature_1.7.9_site works fine
gang, if you have sometime, can you please take a look at this bug? it is related to the import javadoc feature. in some scenarios it is throwing a NPE, but it only happens in some machines. we are also investigating this issue here. thanks, :) gustavo (In reply to comment #14) > Created an attachment (id=114862) [details] > eclipseme.feature_1.7.9_site works fine >
Created attachment 114894 [details] ^_^ Suggest add an option for not Search for Javadoc
Find the Error Function getDefaultDocRootDirectories When I have "doc_location[1].pdf" file in "C:\" and I was importing "C:\Nokia\Devices\S40_5th_Edition_SDK_Feature_Pack_1" SDK the error reproduced
name contains "doc" string
^_^ find the error Happy
in JavadocDetector.java GenericLocalFSSearch private URL searchForLibraryDoc(File parentDir, final ILibrary library) { String libFileName = library.toFile().getName(); int dotIdx = libFileName.lastIndexOf('.'); final String libName; if (dotIdx > -1) libName = libFileName.substring(0, dotIdx); else libName = libFileName; File[] files = parentDir.listFiles(new FileFilter() { public boolean accept(File pathname) { boolean accept = false; // if the directory's name starts with the library's name // or the library's name starts with the directory's name // it is may be the library's javadoc directory, it is just // a very simple strategy accept = pathname.getName().startsWith(libName) || libName.startsWith(pathname.getName()); // if not found and the library has configuration or profile // API, deal with it specially if (!accept && (library.hasConfiguration() || library .hasProfile())) { for (int i = 0; i < PROFILEJAVADOCDIRECTORIES.length; i++) { if (pathname.getName().startsWith( PROFILEJAVADOCDIRECTORIES[i])) { accept = true; break; } } } return accept; } }); if (files != null && files.length > 0) { try { return files[0].toURI().toURL(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { // Now recurse to sub directories File[] subdirectories = parentDir.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.isDirectory(); } }); ///////////////////////////////////////////////////////////////////// if (subdirectories!=null) ////add this will be ok { ////add this will be ok for (int i = 0; i < subdirectories.length; i++) { return searchForLibraryDoc(subdirectories[i], library); } } ////add this will be ok ////////////////////////////////////////////////////////////////////// } return null; } ///searchForLibraryDoc
congratulations!!!! and many thanks finally someone was able to find a root cause of the error. i will check tomorrow if it there are other possible scenarios that we are not covering. another wasy to fix it is to change the getDefaultDocRootDirectories method. public File[] getDefaultDocRootDirectories(ILibrary library) { if (library == null) return null; ArrayList<File> docfiles = new ArrayList<File>(); File parentDir = library.toFile().getParentFile(); for (int i = 0; i < DEFAULTSEARCHDEPTH && parentDir != null; i++) { File[] tmpDocfiles = parentDir.listFiles(new FileFilter() { public boolean accept(File pathname) { // find the directory whose name contains "doc" string /**************************************/ /* Also check if the file is a folder */ /**************************************/ return pathname.isDirectory() && pathname.getName().indexOf("doc") != -1; } }); for (File file : tmpDocfiles) { docfiles.add(file); } parentDir = parentDir.getParentFile(); } if (docfiles.size() > 0) return docfiles.toArray(new File[0]); else return null; } } (In reply to comment #19) > ^_^ find the error Happy >
Gustavo£¬ sorry for the late response, I think your fix is ok, I test it on my machine, everything looks fine and no NPE throws any more, thanks. dzw, thank you very much for your effort. (In reply to comment #21) > congratulations!!!! and many thanks finally someone was able to find a root > cause of the error. > i will check tomorrow if it there are other possible scenarios that we are not > covering. another wasy to fix it is to change the getDefaultDocRootDirectories > method. > public File[] getDefaultDocRootDirectories(ILibrary library) { > if (library == null) > return null; > ArrayList<File> docfiles = new ArrayList<File>(); > File parentDir = library.toFile().getParentFile(); > for (int i = 0; i < DEFAULTSEARCHDEPTH && parentDir != null; i++) { > File[] tmpDocfiles = parentDir.listFiles(new FileFilter() { > public boolean accept(File pathname) { > // find the directory whose name contains "doc" string > /**************************************/ > /* Also check if the file is a folder */ > /**************************************/ > return pathname.isDirectory() && > pathname.getName().indexOf("doc") != -1; > } > }); > for (File file : tmpDocfiles) { > docfiles.add(file); > } > parentDir = parentDir.getParentFile(); > } > if (docfiles.size() > 0) > return docfiles.toArray(new File[0]); > else > return null; > } > } > (In reply to comment #19) > > ^_^ find the error Happy > >
since we haven't published 0.9 yet, i think it is good idea that we include this fix. anyone against that? :) gep (In reply to comment #22) > Gustavo£¬ > sorry for the late response, I think your fix is ok, I test it on my machine, > everything looks fine and no NPE throws any more, thanks. > > dzw, > thank you very much for your effort. > > (In reply to comment #21) > > congratulations!!!! and many thanks finally someone was able to find a root > > cause of the error. > > i will check tomorrow if it there are other possible scenarios that we are not > > covering. another wasy to fix it is to change the getDefaultDocRootDirectories > > method. > > public File[] getDefaultDocRootDirectories(ILibrary library) { > > if (library == null) > > return null; > > ArrayList<File> docfiles = new ArrayList<File>(); > > File parentDir = library.toFile().getParentFile(); > > for (int i = 0; i < DEFAULTSEARCHDEPTH && parentDir != null; i++) { > > File[] tmpDocfiles = parentDir.listFiles(new FileFilter() { > > public boolean accept(File pathname) { > > // find the directory whose name contains "doc" string > > /**************************************/ > > /* Also check if the file is a folder */ > > /**************************************/ > > return pathname.isDirectory() && > > pathname.getName().indexOf("doc") != -1; > > } > > }); > > for (File file : tmpDocfiles) { > > docfiles.add(file); > > } > > parentDir = parentDir.getParentFile(); > > } > > if (docfiles.size() > 0) > > return docfiles.toArray(new File[0]); > > else > > return null; > > } > > } > > (In reply to comment #19) > > > ^_^ find the error Happy > > > >
Since this issue is critical, +1 to published the fix on 0.9 version. (In reply to comment #23) > since we haven't published 0.9 yet, i think it is good idea that we include > this fix. anyone against that? > > :) > gep
+1 I'm OK to publish it on 0.9 as well.
+1 to include the fix on 0.9
bug fix and added to 0.9 release. tests run with the follwoing SDKs on windpws XP: - nokia s40 - nokia s60 - motorola sdk - sonyericsson - LG SDK - Sprint SDK
all bugs we integrated and release on MTj 0.9