
| Key: |
UP-1872
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Adam Rybicki
|
| Votes: |
0
|
| Watchers: |
1
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
Environment:
|
Windows, HSQL, JDK 1.6, but this is probably irrelevant
|
|
|
I published a CSqlQuery channel with the following SQL:
SELECT a.USER_ID,a.USER_NAME,b.FIRST_NAME,b.LAST_NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME
I then subscribed to the channel and it worked as expected. I then decided to make a change, obviously inspired by the example in personDirectory.xml and changed the channel's SQL to be as follows (using Channel Admin link):
SELECT a.USER_ID,a.USER_NAME,b.FIRST_NAME||' '||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME
This resulted in the following exception:
org.jasig.portal.PortalException: java.sql.SQLException: Unexpected token: ||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME in statement [INSERT INTO UP_CHANNEL_PARAM (CHAN_ID, CHAN_PARM_NM, CHAN_PARM_VAL, CHAN_PARM_OVRD) VALUES (215,'sql','SELECT a.USER_ID,a.USER_NAME,b.FIRST_NAME||' '||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME']
at org.jasig.portal.channels.CChannelManager.doAction(CChannelManager.java:509)
at org.jasig.portal.channels.CChannelManager.setRuntimeData(CChannelManager.java:117)
at org.jasig.portal.ChannelRenderer$Worker.execute(ChannelRenderer.java:459)
at org.jasig.portal.utils.threading.BaseTask.run(BaseTask.java:27)
at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:431)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:166)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Unexpected token: ||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME in statement [INSERT INTO UP_CHANNEL_PARAM (CHAN_ID, CHAN_PARM_NM, CHAN_PARM_VAL, CHAN_PARM_OVRD) VALUES (215,'sql','SELECT a.USER_ID,a.USER_NAME,b.FIRST_NAME||' '||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME']
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
at org.jasig.portal.RDBMChannelRegistryStore.insertChannelParam(RDBMChannelRegistryStore.java:732)
at org.jasig.portal.RDBMChannelRegistryStore.saveChannelDefinition(RDBMChannelRegistryStore.java:625)
at org.jasig.portal.ChannelRegistryManager.publishChannel(ChannelRegistryManager.java:515)
at org.jasig.portal.channels.CChannelManager.doAction(CChannelManager.java:491)
What's interesting, is that I then clicked "Return to Portal" and logged off. After I logged on again, the channel was running with the new SQL. Going back to Channel Admin I noticed that the new SQL was there. This SQL was NOT saved in the database, but it was replaced in the memory-cached channel definition. Restarting Tomcat reverted the channel definition to the original SQL
|
|
Description
|
I published a CSqlQuery channel with the following SQL:
SELECT a.USER_ID,a.USER_NAME,b.FIRST_NAME,b.LAST_NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME
I then subscribed to the channel and it worked as expected. I then decided to make a change, obviously inspired by the example in personDirectory.xml and changed the channel's SQL to be as follows (using Channel Admin link):
SELECT a.USER_ID,a.USER_NAME,b.FIRST_NAME||' '||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME
This resulted in the following exception:
org.jasig.portal.PortalException: java.sql.SQLException: Unexpected token: ||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME in statement [INSERT INTO UP_CHANNEL_PARAM (CHAN_ID, CHAN_PARM_NM, CHAN_PARM_VAL, CHAN_PARM_OVRD) VALUES (215,'sql','SELECT a.USER_ID,a.USER_NAME,b.FIRST_NAME||' '||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME']
at org.jasig.portal.channels.CChannelManager.doAction(CChannelManager.java:509)
at org.jasig.portal.channels.CChannelManager.setRuntimeData(CChannelManager.java:117)
at org.jasig.portal.ChannelRenderer$Worker.execute(ChannelRenderer.java:459)
at org.jasig.portal.utils.threading.BaseTask.run(BaseTask.java:27)
at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:431)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:166)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Unexpected token: ||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME in statement [INSERT INTO UP_CHANNEL_PARAM (CHAN_ID, CHAN_PARM_NM, CHAN_PARM_VAL, CHAN_PARM_OVRD) VALUES (215,'sql','SELECT a.USER_ID,a.USER_NAME,b.FIRST_NAME||' '||b.LAST_NAME AS NAME,b.EMAIL FROM UP_USER a,UP_PERSON_DIR b WHERE a.USER_NAME=b.USER_NAME']
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
at org.jasig.portal.RDBMChannelRegistryStore.insertChannelParam(RDBMChannelRegistryStore.java:732)
at org.jasig.portal.RDBMChannelRegistryStore.saveChannelDefinition(RDBMChannelRegistryStore.java:625)
at org.jasig.portal.ChannelRegistryManager.publishChannel(ChannelRegistryManager.java:515)
at org.jasig.portal.channels.CChannelManager.doAction(CChannelManager.java:491)
What's interesting, is that I then clicked "Return to Portal" and logged off. After I logged on again, the channel was running with the new SQL. Going back to Channel Admin I noticed that the new SQL was there. This SQL was NOT saved in the database, but it was replaced in the memory-cached channel definition. Restarting Tomcat reverted the channel definition to the original SQL |
Show » |
| There are no comments yet on this issue.
|
|