I had this working in 0.6 but I updated to the latest version 0.7 and I have a Java error occurring again. Originally, even with the 0.6 version, I couldn't get the rake task to run to test the database. After spending considerable time checking the classpath, I cleaned up a couple of bogus entries and the rake task completed normally.

However, since upgrading, I have a similar error "cannot load Java class jdbc_adapter.JdbcConnectionFactory (NameError)"

E:\activerecord-jdbc>jruby -S rake --trace
(in E:/activerecord-jdbc)
** Invoke manifest (first_time)
** Execute manifest
You really need Hoe installed to be able to package this gem
** Invoke default (first_time)
** Invoke java_compile (first_time)
** Execute java_compile
mkdir -p pkg/classes
javac -target 1.4 -source 1.4 -d pkg/classes -cp E:\jruby-1.0.3\lib\asm-2.2.3.ja r;E:\jruby-1.0.3\lib\asm-commons-2.2.3.jar;E:\jruby-1.0.3\lib\backport-util-conc urrent.jar;E:\jruby-1.0.3\lib\bsf.jar;E:\jruby-1.0.3\lib\jline-0.9.91.jar;E:\jru by-1.0.3\lib\jruby.jar;E:\jruby-1.0.3\lib\jruby.jar src/java/jdbc_adapter/JdbcMySQL Spec.java src/java/jdbc_adapter/JdbcConnectionFactory.java src/java/jdbc_adapter /SQLBlock.java src/java/jdbc_adapter/JdbcAdapterInternalService.java src/java/
jdbc_adapter/JdbcDerbySpec.java
jar cf lib/jdbc_adapter/jdbc_adapter_internal.jar -C pkg/classes/ .
** Invoke test (first_time)
** Invoke test_mysql (first_time)
** Execute test_mysql
E:/jruby-1.0.3/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dep endencies.rb:499:in `require': cannot load Java class jdbc_adapter.JdbcConnectio
nFactory (NameError)
      from E:/activerecord-jdbc/./test/mysql_multibyte_test.rb:2
      from :1:in `load'
      from :1
      from :1:in `each'
      from :1
rake aborted!
Command failed with status (1): [E:/jruby-1.0.3/bin/jruby.bat -Ilib;test;dr...]

I have used a completely clean classpath when only the classpath set by the rake task is used. I tried installing both jruby and activerecord-jdbc-adapter on a clean Windows XP machine with Java 6 and still the rake task fails. How do I get to the bottom of this? I don't know why the rake task isn't seeing the classes. I'm stumped.

Thanks

Pete Helgren

_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to