You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... can't seem to wrap my head around it - for now :
# jruby -Ijdbc-derby/lib -J-cp tomcat-catalina.jar:tomcat-juli.jar 9000_regression.rbjava.lang.System.set_property(javax.naming.Context::INITIAL_CONTEXT_FACTORY,'org.apache.naming.java.javaURLContextFactory')java.lang.System.set_property(javax.naming.Context::URL_PKG_PREFIXES,'org.apache.naming')putsinit_context=Java::JavaxNaming::InitialContext.newbegininit_context.create_subcontext'jdbc'rescuejavax.naming.NameAlreadyBoundExceptionendrequire'jdbc/derby'Jdbc::Derby.load_driverdata_source=org.apache.derby.jdbc.EmbeddedDataSource.newdata_source.database_name="memory:DerbyDB-JNDI"data_source.create_database="create"data_source.user="sa"data_source.password=""Java::JavaxNaming::InitialContext.new.bind'jdbc/DerbyDB',data_sourcebound=Java::JavaxNaming::InitialContext.new.lookup'jdbc/DerbyDB'putsboundputsbound.java_class# jruby 1.7.20 (1.9.3p551) 2015-05-04 3086e6a on Java HotSpot(TM) 64-Bit Server VM 1.7.0_72-b14 +jit [linux-amd64]## javax.naming.InitialContext@1189857e# org.apache.derby.jdbc.EmbeddedDataSource@5683befd# org.apache.derby.jdbc.EmbeddedDataSource## jruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-05-11 69147e5 Java HotSpot(TM) 64-Bit Server VM 24.72-b04 on 1.7.0_72-b14 +jit [linux-amd64]## javax.naming.InitialContext@6da9d673# Reference Class Name: org.apache.derby.jdbc.EmbeddedDataSource# Type: password# Content:# Type: databaseName# Content: memory:DerbyDB-JNDI# Type: user# Content: sa# Type: loginTimeout# Content: 0# Type: createDatabase# Content: create# Type: attributesAsPassword# Content: false# javax.naming.Reference
for some reason under 9K this is no longer bound as a javax.sql.DataSource but instead as a javax.naming.Reference - EmbeddedDataSource implements both ... must be some spooky toJava conversion going around
several .jars are needed to run the script
gem install jdbc-derby thus require 'jdbc/derby' will work
... can't seem to wrap my head around it - for now :
for some reason under 9K this is no longer bound as a
javax.sql.DataSource
but instead as ajavax.naming.Reference
-EmbeddedDataSource
implements both ... must be some spookytoJava
conversion going aroundseveral .jars are needed to run the script
gem install jdbc-derby
thusrequire 'jdbc/derby'
will workadd'em to class-path e.g.
jruby -J-cp tomcat-catalina-7.0.61.jar:tomcat-juli-7.0.61.jar 9000_regression.rb
The text was updated successfully, but these errors were encountered: