Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

View: New views
7 Messages — Rating Filter:   Alert me  

Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

by Jeff Rubinoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've been trying the NB 6.1 Using Java Libraries in Rails Application tutorial, at http://www.netbeans.org/kb/61/ruby/java-ruby.html. When I run the project, I get a java.lang.OutOfMemoryError: Java heap space. Output attached. speak.htm My guess is that there is something about either my JDK (6_u11) or the Ruby/JRuby version that doesn't play nicely with freetts, which is from 2005 after all. I've double-checked that all my alterations to the rubyweblog project were identical with the tutorial, and they are. Has anyone got any idea what is wrong?

jeff

Re: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

by Martin Krauskopf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jeff Rubinoff wrote:

> I've been trying the NB 6.1 Using Java Libraries in Rails Application
> tutorial, at  http://www.netbeans.org/kb/61/ruby/java-ruby.html
> http://www.netbeans.org/kb/61/ruby/java-ruby.html . When I run the project,
> I get a java.lang.OutOfMemoryError: Java heap space. Output attached.
> http://www.nabble.com/file/p21672075/speak.htm speak.htm  My guess is that
> there is something about either my JDK (6_u11) or the Ruby/JRuby version
> that doesn't play nicely with freetts, which is from 2005 after all. I've
> double-checked that all my alterations to the rubyweblog project were
> identical with the tutorial, and they are. Has anyone got any idea what is
> wrong?

Hi Jeff,

Usage of NB 6.1 is discouraged. Better to switch to 6.5, and latest JRuby.

In 6.5 you might try to increase the heap by setting e.g. '-Xmx256m' (or
more, or less) in the JVM Arguments (project's properties | Run category).

As you suggested it might be problem of the freetts library itself, or
in the older version of JRuby or in the JVM itself. If increasing of the
heap for the JVM does not help, you might try to file bug against
freetts with some simpler scenario, e.g. reproducing without JRuby. Or
against JRuby, if it is not reproducible without JRuby, etc.

        m.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

by Martin Krauskopf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Martin Krauskopf wrote:
> Jeff Rubinoff wrote:
>> I've been trying the NB 6.1 Using Java Libraries in Rails Application
>> tutorial, at  http://www.netbeans.org/kb/61/ruby/java-ruby.html
>> http://www.netbeans.org/kb/61/ruby/java-ruby.html . When I run the
>> project,
>> I get a java.lang.OutOfMemoryError: Java heap space. Output attached.
>> http://www.nabble.com/file/p21672075/speak.htm speak.htm  My guess is
>> that
>> there is something about either my JDK (6_u11)

PS: did you try different JDK?

> or the Ruby/JRuby version
>> that doesn't play nicely with freetts, which is from 2005 after all. I've
>> double-checked that all my alterations to the rubyweblog project were
>> identical with the tutorial, and they are. Has anyone got any idea
>> what is
>> wrong?
>
> Hi Jeff,
>
> Usage of NB 6.1 is discouraged. Better to switch to 6.5, and latest JRuby.
>
> In 6.5 you might try to increase the heap by setting e.g. '-Xmx256m' (or
> more, or less) in the JVM Arguments (project's properties | Run category).
>
> As you suggested it might be problem of the freetts library itself, or
> in the older version of JRuby or in the JVM itself. If increasing of the
> heap for the JVM does not help, you might try to file bug against
> freetts with some simpler scenario, e.g. reproducing without JRuby. Or
> against JRuby, if it is not reproducible without JRuby, etc.
>
>     m.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

by Jeff Rubinoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

martin,
Thanks. I wasn't clear in my post--I'm using NB 6.5, but trying out the 6.1 tutorial to see if it works. I've taken over upkeep on these tutorials from Chris. I'm trying to find out if there is something that I'm doing wrong, or if the tutorial instructions won't work, or if the tutorial simply doesn't work at all with 6.5/latest JRuby/JDK 6.

Jeff
Martin Krauskopf wrote:
Jeff Rubinoff wrote:
> I've been trying the NB 6.1 Using Java Libraries in Rails Application
> tutorial, at  http://www.netbeans.org/kb/61/ruby/java-ruby.html
> http://www.netbeans.org/kb/61/ruby/java-ruby.html . When I run the project,
> I get a java.lang.OutOfMemoryError: Java heap space. Output attached.
> http://www.nabble.com/file/p21672075/speak.htm speak.htm  My guess is that
> there is something about either my JDK (6_u11) or the Ruby/JRuby version
> that doesn't play nicely with freetts, which is from 2005 after all. I've
> double-checked that all my alterations to the rubyweblog project were
> identical with the tutorial, and they are. Has anyone got any idea what is
> wrong?

Hi Jeff,

Usage of NB 6.1 is discouraged. Better to switch to 6.5, and latest JRuby.

In 6.5 you might try to increase the heap by setting e.g. '-Xmx256m' (or
more, or less) in the JVM Arguments (project's properties | Run category).

As you suggested it might be problem of the freetts library itself, or
in the older version of JRuby or in the JVM itself. If increasing of the
heap for the JVM does not help, you might try to file bug against
freetts with some simpler scenario, e.g. reproducing without JRuby. Or
against JRuby, if it is not reproducible without JRuby, etc.

        m.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: dev-help@ruby.netbeans.org

Re: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

by Jeff Rubinoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My Ruby on Rails project does not have Run or JVM properties and does not allow me to set the JDK in the Java properties. Can I set it as a Rake argument?

Martin Krauskopf wrote:
Jeff Rubinoff wrote:
> I've been trying the NB 6.1 Using Java Libraries in Rails Application
> tutorial, at  http://www.netbeans.org/kb/61/ruby/java-ruby.html
> http://www.netbeans.org/kb/61/ruby/java-ruby.html . When I run the project,
> I get a java.lang.OutOfMemoryError: Java heap space. Output attached.
> http://www.nabble.com/file/p21672075/speak.htm speak.htm  My guess is that
> there is something about either my JDK (6_u11) or the Ruby/JRuby version
> that doesn't play nicely with freetts, which is from 2005 after all. I've
> double-checked that all my alterations to the rubyweblog project were
> identical with the tutorial, and they are. Has anyone got any idea what is
> wrong?

Hi Jeff,

Usage of NB 6.1 is discouraged. Better to switch to 6.5, and latest JRuby.

In 6.5 you might try to increase the heap by setting e.g. '-Xmx256m' (or
more, or less) in the JVM Arguments (project's properties | Run category).

As you suggested it might be problem of the freetts library itself, or
in the older version of JRuby or in the JVM itself. If increasing of the
heap for the JVM does not help, you might try to file bug against
freetts with some simpler scenario, e.g. reproducing without JRuby. Or
against JRuby, if it is not reproducible without JRuby, etc.

        m.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: dev-help@ruby.netbeans.org

Re: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

by Martin Krauskopf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jeff Rubinoff wrote:
> My Ruby on Rails project does not have Run or JVM properties and does not
> allow me to set the JDK in the Java properties.

Yes, it is implemented for non-Rails one only:

http://www.netbeans.org/issues/show_bug.cgi?id=146551

  Can I set it as a Rake
> argument?

For Rails you have to workaround as described here:

http://wiki.netbeans.org/FaqRubyJVMArguments

        m.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Cannot run freetts libraries in NB 6.5 (Using Java Libraries in Rails Application tutorial)

by ckutler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeff,

I just ran through this tutorial and I did not run into the problem that you show (see below).

However, I ran into another problem. The first time I ran it, I got this error:

uninitialized constant PostsController::VoiceManager

I don't know why that happened because I have to following at the top of the posts_controller.rb file:

include Java
import com.sun.speech.freetts.Voice
import com.sun.speech.freetts.VoiceManager


To make the program work, I edited the call to VoiceManager to qualify the class. That is, I changed it from

voice = VoiceManager.instance.get_voice('kevin16')

to

voice = com.sun.speech.freetts.VoiceManager.instance.get_voice('kevin16')

I do not know why I needed to do this. As far as I know, I should not have to.

I am using Windows XP, NetBeans 6.5 with the built in JRuby (1.1.4) and the WEBrick server. Java Version is 1.6.0_10.


Jeff Rubinoff wrote:
I've been trying the NB 6.1 Using Java Libraries in Rails Application tutorial, at http://www.netbeans.org/kb/61/ruby/java-ruby.html. When I run the project, I get a java.lang.OutOfMemoryError: Java heap space. Output attached. speak.htm My guess is that there is something about either my JDK (6_u11) or the Ruby/JRuby version that doesn't play nicely with freetts, which is from 2005 after all. I've double-checked that all my alterations to the rubyweblog project were identical with the tutorial, and they are. Has anyone got any idea what is wrong?

jeff