Open GoogleCodeExporter opened 8 years ago
And yet another bug report:
Hi,
I tried to create a new simple project following your video example,
but I encountered a problem with this line:
pluginManager.addPluginsFrom(new URI("classpath://*"));
here is a sample of my code - well, it is not a sample, it is the
majority of my program :):
PluginManager pluginManager =
PluginManagerFactory.createPluginManager();
pluginManager.addPluginsFrom(new URI("classpath://*"));
MyPluginable plugin = pluginManager.getPlugin(MyPluginable.class);
System.out.println(plugin.sayHello());
(where MyPluginable is my interface)
the output of my program is:
null
Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
the "null" output is printed on the line containing
"pluginManager.addPluginsFrom(new URI("classpath://*"))"
I tried to run this code in Intellij (the output was as I wrote
above) and then in Netbeans, where the output was:
null
Hello world!
I suspected problems with classpath, so using this method from this
site: http://www.java-tips.org/java-se-tips/java.lang/how-to-print-classpat...
I printed the whole classpath during program running - in IntelliJ it
printed several jar files and the correct location of .class files:
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/alt-rt.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/charsets.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/deploy.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/javaws.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/jce.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/jsse.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/management-agent.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/plugin.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/resources.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/rt.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/ext/dnsns.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/ext/localedata.jar
/C:/Program%20Files/Java/jdk1.6.0_21/jre/lib/ext/sunjce_provider.jar
/D:/skola/BAKALARKA/pokusPlugin/out/production/pokusPlugin/
-------------------- class files are here (what a surprise)
/D:/skola/BAKALARKA/pokusPlugin/lib/dist/jspf.core-1.0.0.jar
/C:/Program%20Files%20(x86)/JetBrains/IntelliJ%20IDEA%2010.0/lib/
idea_rt.jar
when I tried to print classpath in Nebeans, it printed only this:
/D:/skola/BAKALARKA/pokusPlugin/lib/dist/jspf.core-1.0.0.jar
/D:/skola/BAKALARKA/pokusPlugin/build/classes/
/D:/skola/BAKALARKA/pokusPlugin/src/
please notice that in Netbeans, there are (almost) no jar files
so my questions are:
- is it OK, when there are many jar files in classpath? it seems to
me, that exactly this scenario causes OutOfMemoryError
- do you see something wrong with my code? why is there always that
"null" in output and how to get rid of that OutOfMemoryError :)
thanks a lot
Original comment by r.biedert
on 11 Jan 2011 at 8:20
1.0.0 RC2 should contain a workaround for at least large default classpaths.
Please report your results!
Original comment by r.biedert
on 11 Jan 2011 at 9:26
And 1.0.0 RC3 contains a workaround that actually works (see forum 'problem
loading plugins - OutOfMemoryError, etc.'). Lowering priority.
Original comment by r.biedert
on 11 Jan 2011 at 12:24
Original issue reported on code.google.com by
r.biedert
on 16 Nov 2010 at 8:33