Quantcast

few issues

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

few issues

Chris Hyzer
Hey,

We use and like beanshell, but have a few issues:

1. Can you build it with debug information compile flag on by default?  It would help navigate the source code.  I believe it is not on in 2.0b4 since I dont see line numbers in stack traces.

2. The link to source code is broken:

http://www.beanshell.org/bsh-2.0b4-src.zip

3. When I run a script the exception throw gets swallowed, how am I supposed to know what the problem is without debugging it?  I want it to throw the cause exception (even as cause of new exception), so I can figure out what is going on.  Here is the stack that should be thrown:

###################
2009-11-05 00:45:39,458: [main] ERROR BySqlStatic$1.callback(90) - com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`grouper_v1_5/grouper_group_set`, CONSTRAINT `fk_group_set_member_stem_id` FOREIGN KEY (`member_stem_id`) REFERENCES `grouper_stems` (`id`))
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1016)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2022)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1940)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1925)
    at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate(P6LogPreparedStatement.java:186)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
    at edu.internet2.middleware.grouper.hibernate.BySqlStatic$1.callback(BySqlStatic.java:85)
    at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:408)
    at edu.internet2.middleware.grouper.hibernate.BySqlStatic.executeSql(BySqlStatic.java:65)
    at edu.internet2.middleware.grouper.hibernate.BySqlStatic.executeSql(BySqlStatic.java:53)
    at edu.internet2.middleware.grouper.app.gsh.sqlRun.invoke(sqlRun.java:56)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bsh.Reflect.invokeMethod(Unknown Source)
    at bsh.Reflect.invokeStaticMethod(Unknown Source)
    at bsh.Reflect.invokeCompiledCommand(Unknown Source)
    at bsh.Name.invokeLocalMethod(Unknown Source)
    at bsh.Name.invokeMethod(Unknown Source)
    at bsh.BSHMethodInvocation.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHBinaryExpression.eval(Unknown Source)
    at bsh.BSHArguments.getArguments(Unknown Source)
    at bsh.BSHMethodInvocation.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at edu.internet2.middleware.grouper.app.gsh.ShellHelper.eval(ShellHelper.java:49)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.run(GrouperShell.java:380)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:199)
    at edu.internet2.middleware.grouper.app.gsh.TestGsh.runGshScriptHelper(TestGsh.java:144)
    at edu.internet2.middleware.grouper.app.gsh.TestGsh.testGshTest(TestGsh.java:71)

###################
But this is all I see from exception in BeanShell, the underlying one gets swallowed somehow:
###################
// Error: unable to evaluate command: Sourced file: inline evaluation of: ``assertTrue( "run sqlRun() to delete stems", sqlRun("delete from grouper_stems wh . . . '' : Error invoking compiled command: : Error in compiled command: java.lang.RuntimeException: Problem with query in bysqlstatic: delete from grouper_stems where name not like ':',
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
// Error: FAIL (there are now 0 stems) Line: -1 : <invoked from Java code>
Error: FAIL (there are now 0 stems) Line: -1 : <invoked from Java code>

    at edu.internet2.middleware.grouper.app.gsh.TestGsh.runGshScriptHelper(TestGsh.java:156)
    at edu.internet2.middleware.grouper.app.gsh.TestGsh.testGshTest(TestGsh.java:71)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at edu.internet2.middleware.grouper.app.gsh.TestGsh.main(TestGsh.java:61)

###################

Its important that we get a resolution for this soon.

Thanks a lot!
Chris



     
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: few issues

David Lee
For source code try this link

http://www.beanshell.org/bsh-2.0b5-src.zip


Anything else, I think your on your own.  The site and code hasnt been
touched in years, and the author hasn't commented to this group at least.

You may be interested in this "fork"

http://code.google.com/p/beanshell2/




David A. Lee
[hidden email]  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



Chris Hyzer wrote:

> Hey,
>
> We use and like beanshell, but have a few issues:
>
> 1. Can you build it with debug information compile flag on by default?  It would help navigate the source code.  I believe it is not on in 2.0b4 since I dont see line numbers in stack traces.
>
> 2. The link to source code is broken:
>
> http://www.beanshell.org/bsh-2.0b4-src.zip
>
> 3. When I run a script the exception throw gets swallowed, how am I supposed to know what the problem is without debugging it?  I want it to throw the cause exception (even as cause of new exception), so I can figure out what is going on.  Here is the stack that should be thrown:
>
> ###################
> 2009-11-05 00:45:39,458: [main] ERROR BySqlStatic$1.callback(90) - com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`grouper_v1_5/grouper_group_set`, CONSTRAINT `fk_group_set_member_stem_id` FOREIGN KEY (`member_stem_id`) REFERENCES `grouper_stems` (`id`))
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
>     at com.mysql.jdbc.Util.getInstance(Util.java:381)
>     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1016)
>     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
>     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
>     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
>     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)
>     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)
>     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)
>     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)
>     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2022)
>     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1940)
>     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1925)
>     at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate(P6LogPreparedStatement.java:186)
>     at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
>     at edu.internet2.middleware.grouper.hibernate.BySqlStatic$1.callback(BySqlStatic.java:85)
>     at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:408)
>     at edu.internet2.middleware.grouper.hibernate.BySqlStatic.executeSql(BySqlStatic.java:65)
>     at edu.internet2.middleware.grouper.hibernate.BySqlStatic.executeSql(BySqlStatic.java:53)
>     at edu.internet2.middleware.grouper.app.gsh.sqlRun.invoke(sqlRun.java:56)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at bsh.Reflect.invokeMethod(Unknown Source)
>     at bsh.Reflect.invokeStaticMethod(Unknown Source)
>     at bsh.Reflect.invokeCompiledCommand(Unknown Source)
>     at bsh.Name.invokeLocalMethod(Unknown Source)
>     at bsh.Name.invokeMethod(Unknown Source)
>     at bsh.BSHMethodInvocation.eval(Unknown Source)
>     at bsh.BSHPrimaryExpression.eval(Unknown Source)
>     at bsh.BSHPrimaryExpression.eval(Unknown Source)
>     at bsh.BSHBinaryExpression.eval(Unknown Source)
>     at bsh.BSHArguments.getArguments(Unknown Source)
>     at bsh.BSHMethodInvocation.eval(Unknown Source)
>     at bsh.BSHPrimaryExpression.eval(Unknown Source)
>     at bsh.BSHPrimaryExpression.eval(Unknown Source)
>     at bsh.Interpreter.eval(Unknown Source)
>     at bsh.Interpreter.eval(Unknown Source)
>     at bsh.Interpreter.eval(Unknown Source)
>     at edu.internet2.middleware.grouper.app.gsh.ShellHelper.eval(ShellHelper.java:49)
>     at edu.internet2.middleware.grouper.app.gsh.GrouperShell.run(GrouperShell.java:380)
>     at edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:199)
>     at edu.internet2.middleware.grouper.app.gsh.TestGsh.runGshScriptHelper(TestGsh.java:144)
>     at edu.internet2.middleware.grouper.app.gsh.TestGsh.testGshTest(TestGsh.java:71)
>
> ###################
> But this is all I see from exception in BeanShell, the underlying one gets swallowed somehow:
> ###################
> // Error: unable to evaluate command: Sourced file: inline evaluation of: ``assertTrue( "run sqlRun() to delete stems", sqlRun("delete from grouper_stems wh . . . '' : Error invoking compiled command: : Error in compiled command: java.lang.RuntimeException: Problem with query in bysqlstatic: delete from grouper_stems where name not like ':',
> Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
> // Error: FAIL (there are now 0 stems) Line: -1 : <invoked from Java code>
> Error: FAIL (there are now 0 stems) Line: -1 : <invoked from Java code>
>
>     at edu.internet2.middleware.grouper.app.gsh.TestGsh.runGshScriptHelper(TestGsh.java:156)
>     at edu.internet2.middleware.grouper.app.gsh.TestGsh.testGshTest(TestGsh.java:71)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at edu.internet2.middleware.grouper.app.gsh.TestGsh.main(TestGsh.java:61)
>
> ###################
>
> Its important that we get a resolution for this soon.
>
> Thanks a lot!
> Chris
>
>
>
>      
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Beanshell-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/beanshell-users
>  

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Loading...