Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Groovy Shell and v2.3

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Groovy Shell and v2.3


Chronological Thread 
  • From: "Waldbieser, Carl" <>
  • To: "Imholz, John J." <>
  • Cc:
  • Subject: Re: [grouper-users] Groovy Shell and v2.3
  • Date: Thu, 5 May 2016 12:56:55 -0400 (EDT)

John,

Are you using HEAD from https://github.com/wgthom/groovysh4grouper.git ?
I normally use the Jython shell from, and we are still running Grouper 2.2.

I'm not sure what the error below is trying to say, other than it doesn't
seem to like the db version or java version ...

I'd be curious to know if the Jython and Clojure REPLs are also experiencing
this issue, or if it is specific to the Groovy wrapper setup.
I trust gsh is working just fine?

Thanks,
Carl Waldbieser
ITS Systems Programmer
Lafayette College

----- Original Message -----
From: "Imholz, John J."
<>
To:

Sent: Thursday, May 5, 2016 12:31:58 PM
Subject: [grouper-users] Groovy Shell and v2.3

I'd like to use a shell with a little more functionality and saw Groovy Shell
for Grooper. Should I try something else?


The difference in startup is:

gsh.sh:
${JAVA} -Xms$MEM_START -Xmx$MEM_MAX -Dgrouper.home="$GROUPER_HOME/"
-Dfile.encoding=utf-8 $GSH_JVMARGS -classpath "${GROUPER_CP}" $GSH $*

gsh.groovy:
groovysh -cp "${GROUPER_CP}" -Djava.security.manager
-Djava.security.policy="${GROUPER_CONF}/.groovy/java.policy"
-Duser.home="${GROUPER_CONF}" $*

The groovy startup script fails on GrouperStartup.startup():

// Grouper Shell Bootstrap
import edu.internet2.middleware.grouper.*
import edu.internet2.middleware.grouper.app.gsh.*
import edu.internet2.middleware.grouper.audit.*
import edu.internet2.middleware.grouper.filter.*
import edu.internet2.middleware.grouper.hibernate.*
import edu.internet2.middleware.grouper.misc.*

// creates threadlocal and stores information about the current context of
the database transactions. (how is this used?)
GrouperContext.createNewDefaultContext(GrouperEngineBuiltin.GSH, false, true)

// signals expecting to print to screen (can't find any uses though)
GrouperStartup.runFromMain = true

// only used by GrouperDdlUtils
GrouperShell.runFromGsh = true;

// Grouper start up
GrouperStartup.startup()

The error is:
Grouper ddl object type 'Grouper' has dbVersion: 0 and java version: 30
Couldnt startup grouper: Problem in HibernateSession: null
java.lang.NullPointerException: Problem in HibernateSession: null
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO.session(Hib3DAO.java:323)
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAOFactory.getSession(Hib3DAOFactory.java:186)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.<init>(HibernateSession.java:241)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSession(HibernateSession.java:467)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:659)
at
edu.internet2.middleware.grouper.hibernate.BySqlStatic.select(BySqlStatic.java:138)
at
edu.internet2.middleware.grouper.hibernate.BySqlStatic.select(BySqlStatic.java:124)
at
edu.internet2.middleware.grouper.ddl.GrouperDdl.addTableIndices(GrouperDdl.java:13233)
at
edu.internet2.middleware.grouper.ddl.GrouperDdl.access$3700(GrouperDdl.java:103)
at
edu.internet2.middleware.grouper.ddl.GrouperDdl$25.updateVersionFromPrevious(GrouperDdl.java:1836)
at
edu.internet2.middleware.grouper.ddl.GrouperDdlUtils.upgradeDatabaseVersion(GrouperDdlUtils.java:2104)
at
edu.internet2.middleware.grouper.ddl.GrouperDdlUtils.bootstrapHelper(GrouperDdlUtils.java:631)
at
edu.internet2.middleware.grouper.ddl.GrouperDdlUtils.bootstrap(GrouperDdlUtils.java:340)
at
edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:251)
at
edu.internet2.middleware.grouper.misc.GrouperStartup$startup.call(Unknown
Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at groovysh_evaluate.run(groovysh_evaluate:8)
at groovysh_evaluate$run.call(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at groovysh_evaluate$run.call(Unknown Source)
at
org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:67)
at org.codehaus.groovy.tools.shell.Interpreter$evaluate.call(Unknown
Source)
at
org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:152)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:114)
at org.codehaus.groovy.tools.shell.Shell$leftShift$0.call(Unknown
Source)
at
org.codehaus.groovy.tools.shell.commands.LoadCommand$_load_closure1.doCall(LoadCommand.groovy:80)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)



Archive powered by MHonArc 2.6.16.

Top of Page