Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

permissions exception

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to save permissions in a group and i clicked the checkbox for attachments:

<!-- BEGIN ERROR STACK TRACE <br /> java.lang.reflect.InvocationTargetException <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) <br /> at java.lang.reflect.Method.invoke(Unknown Source) <br /> at net.jforum.Command.process(Command.java:106) <br /> at net.jforum.view.admin.GroupAction.process(GroupAction.java:209) <br /> at net.jforum.JForum.service(JForum.java:298) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) <br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825) <br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:743) <br /> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) <br /> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) <br /> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) <br /> at java.lang.Thread.run(Unknown Source) <br /> Caused by: java.sql.SQLException: You have an error in your SQL syntax near 'jforum_roles FROM jforum_roles r, jforum_user_groups ug WHERE ug.user_id = r.use' at line 1 <br /> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2816) <br /> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1518) <br /> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1609) <br /> at com.mysql.jdbc.Connection.execSQL(Connection.java:2234) <br /> at com.mysql.jdbc.Connection.execSQL(Connection.java:2159) <br /> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1802) <br /> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1896) <br /> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1821) <br /> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1683) <br /> at net.jforum.drivers.generic.security.UserSecurityModel.deleteUserRoleByGroup(UserSecurityModel.java:126) <br /> at net.jforum.view.admin.PermissionProcessHelper.processData(PermissionProcessHelper.java:122) <br /> at net.jforum.view.admin.GroupAction.permissionsSave(GroupAction.java:195) <br /> ... 22 more <br /> <br /> END ERROR STACK TRACE-->
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems your mysql.sql (WEB-INF/config/database/mysql directory) is invalid. Can you please attach it here, using the file upload form?

Thanks,
Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a similar problem after a fresh installation of jforum214. I'm on debian/jetty/mysql3.23.49. I get the sql syntax error message when clicking the save button on a group permission page.

As you suggested to Anonymous, I am attaching my mysql.sql file.

The relevant portion of my stack trace looks like this

Caused by: java.sql.SQLException: You have an error in your SQL syntax near 'jforum_role_values FROM jforum_role_values rv, jforum_roles r WHERE r.role_id = ' at line 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2816)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1518)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1609)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2234)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2159)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1802)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1896)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1821)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1683)
at net.jforum.drivers.generic.security.GroupSecurityModel.deleteAllRoles(GroupSecurityModel.java:70)
at net.jforum.security.PermissionControl.deleteAllRoles(PermissionControl.java:91)
at net.jforum.view.admin.PermissionProcessHelper.init(PermissionProcessHelper.java:191)
at net.jforum.view.admin.PermissionProcessHelper.<init>(PermissionProcessHelper.java:79)
at net.jforum.view.admin.GroupAction.permissionsSave(GroupAction.java:195)
[originally posted on jforum.net by guyhillyer]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rafael

Thinking this might be a jdbc driver problem, I tried replacing the mysq-connect-java-3.1.4-beta-bin.jar with mysql-connector-java-3.0.15-ga-bin.jar, with the same result. I'm mystified, what do you think is going on?

-- Guy
[originally posted on jforum.net by guyhillyer]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hard to say. I can suggest you to use a debugger ( I use Eclipse's one) and put a breakpoint at



then watch the SQL query that will be executed. The error description looks like some problem with the SLQ's .properties file - I mean, if there are some missing "\" OR a blank space after it, the java properties parser gets confused.

Have you tried downloading the package again and replacing the .sql files?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i got the same error, the following mysql.sql solves the problem for me:



best regards, --- squirrel.
[originally posted on jforum.net by Anonymous]
 
Can't .... do .... plaid .... So I did this tiny ad instead:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic