grouper-users - [grouper-users] Groovy Shell and v2.3
Subject: Grouper Users - Open Discussion List
List archive
- From: "Imholz, John J." <>
- To: "" <>
- Subject: [grouper-users] Groovy Shell and v2.3
- Date: Thu, 5 May 2016 16:31:58 +0000
- Accept-language: en-US
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)
- [grouper-users] Groovy Shell and v2.3, Imholz, John J., 05/05/2016
- Re: [grouper-users] Groovy Shell and v2.3, Waldbieser, Carl, 05/05/2016
Archive powered by MHonArc 2.6.16.