You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Saku Seppälä <sa...@tsk.fi> on 2005/08/12 15:49:16 UTC
SQLException when accessing jetspeed
Hi,
After the recent mavenplugin and build changes I have
litte trouble in deploying jetspeed-2. I have downloaded
the most recent version from svn head and building it self goes
just fine with the new instructions, but when I deploy
jetspeed-2 and try to access it with web-browser from:
http://localhost/jetspeed
I keep getting the following SQLexception. Has anyone else
been succesfull in building and deployin jetspeed using
the embedded HSQL database after the recent changes
in build system. Just a few weeks ago I had no problems
in building and deploying jetspeed2 from the svn.
- Saku
org.apache.jasper.JasperException: (OJB operation): encountered
SQLException [Unexpected token: MEDIATYPE_TO_MIMETYPE in statement
[SELECT A0.MEDIATYPE_ID,A0.NAME,A0.CHARACTER_SET,A0.TITLE,A0.DESCRIPTION
FROM MEDIA_TYPE A0 INNER JOIN (MEDIATYPE_TO_MIMETYPE A1 INNER JOIN
MIMETYPE A2 ON A1.MIMETYPE_ID=A2.MIMETYPE_ID) ON
A0.MEDIATYPE_ID=A1.MEDIATYPE_ID WHERE A2.NAME IN
('text/html','text/xml','text/xhtml')]]; nested exception is
java.sql.SQLException: Unexpected token: MEDIATYPE_TO_MIMETYPE in
statement [SELECT
A0.MEDIATYPE_ID,A0.NAME,A0.CHARACTER_SET,A0.TITLE,A0.DESCRIPTION FROM
MEDIA_TYPE A0 INNER JOIN (MEDIATYPE_TO_MIMETYPE A1 INNER JOIN MIMETYPE
A2 ON A1.MIMETYPE_ID=A2.MIMETYPE_ID) ON A0.MEDIATYPE_ID=A1.MEDIATYPE_ID
WHERE A2.NAME IN ('text/html','text/xml','text/xhtml')]
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.springframework.jdbc.UncategorizedSQLException: (OJB operation):
encountered SQLException [Unexpected token: MEDIATYPE_TO_MIMETYPE in
statement [SELECT
A0.MEDIATYPE_ID,A0.NAME,A0.CHARACTER_SET,A0.TITLE,A0.DESCRIPTION FROM
MEDIA_TYPE A0 INNER JOIN (MEDIATYPE_TO_MIMETYPE A1 INNER JOIN MIMETYPE
A2 ON A1.MIMETYPE_ID=A2.MIMETYPE_ID) ON A0.MEDIATYPE_ID=A1.MEDIATYPE_ID
WHERE A2.NAME IN ('text/html','text/xml','text/xhtml')]]; nested
exception is java.sql.SQLException: Unexpected token:
MEDIATYPE_TO_MIMETYPE in statement [SELECT
A0.MEDIATYPE_ID,A0.NAME,A0.CHARACTER_SET,A0.TITLE,A0.DESCRIPTION FROM
MEDIA_TYPE A0 INNER JOIN (MEDIATYPE_TO_MIMETYPE A1 INNER JOIN MIMETYPE
A2 ON A1.MIMETYPE_ID=A2.MIMETYPE_ID) ON A0.MEDIATYPE_ID=A1.MEDIATYPE_ID
WHERE A2.NAME IN ('text/html','text/xml','text/xhtml')]
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:99)
org.springframework.orm.ojb.OjbAccessor.convertJdbcAccessException(OjbAccessor.java:107)
org.springframework.orm.ojb.OjbAccessor.convertOjbAccessException(OjbAccessor.java:89)
org.springframework.orm.ojb.OjbAccessor.convertOjbAccessException(OjbAccessor.java:86)
org.springframework.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceBrokerTemplate.java:170)
org.springframework.orm.ojb.PersistenceBrokerTemplate.executeFind(PersistenceBrokerTemplate.java:188)
org.springframework.orm.ojb.PersistenceBrokerTemplate.getCollectionByQuery(PersistenceBrokerTemplate.java:214)
org.apache.jetspeed.capabilities.impl.JetspeedCapabilities.getMediaTypesForMimeTypes(JetspeedCapabilities.java:345)
org.apache.jetspeed.capabilities.impl.JetspeedCapabilities.getCapabilityMap(JetspeedCapabilities.java:189)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:284)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
$Proxy0.getCapabilityMap(Unknown Source)
org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:67)
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:203)
org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:185)
org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:208)
org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:215)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:45)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: SQLException when accessing jetspeed
Posted by sa...@tsk.fi.
Lainaus Ate Douma <at...@douma.nu>:
> Yes, but I remember having exact the same error about a week ago.
> This was before I refactored the plugin and it was somehow caused
> by a corrupted version in my maven plugin cache.
>
> As you say you have the latest source and plugin installed I
> find it strange to see this same error popup again.
> Only advise I can give right now:
> - delete the maven plugin cache: ${maven.home.local}/cache
> - delete the maven-plugin from the local plugin folder:
> ${maven.home.local}/plugins
> - delete the maven-plugin from the maven plugin folder: ${MAVEN_HOME}/plugins
>
> Then, run maven initMavenPlugin again and try anew...
>
Thanks for the help, but this was all my own mistake.
While playing with the build.properties file I had apparently
deleted accidentally two last characters from variable:
org.apache.jetspeed.production.database.ojb.platform=Hsqldb
making it
org.apache.jetspeed.production.database.ojb.platform=Hsql
After fixing this everything worked fine.
Saku
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: SQLException when accessing jetspeed
Posted by Ate Douma <at...@douma.nu>.
Saku Seppälä wrote:
> Hi,
>
> After the recent mavenplugin and build changes I have
> litte trouble in deploying jetspeed-2. I have downloaded
> the most recent version from svn head and building it self goes
> just fine with the new instructions, but when I deploy
> jetspeed-2 and try to access it with web-browser from:
> http://localhost/jetspeed
> I keep getting the following SQLexception. Has anyone else
> been succesfull in building and deployin jetspeed using
> the embedded HSQL database after the recent changes
> in build system. Just a few weeks ago I had no problems
> in building and deploying jetspeed2 from the svn.
Yes, but I remember having exact the same error about a week ago.
This was before I refactored the plugin and it was somehow caused
by a corrupted version in my maven plugin cache.
As you say you have the latest source and plugin installed I
find it strange to see this same error popup again.
Only advise I can give right now:
- delete the maven plugin cache: ${maven.home.local}/cache
- delete the maven-plugin from the local plugin folder: ${maven.home.local}/plugins
- delete the maven-plugin from the maven plugin folder: ${MAVEN_HOME}/plugins
Then, run maven initMavenPlugin again and try anew...
Good luck,
Ate
>
> - Saku
>
> org.apache.jasper.JasperException: (OJB operation): encountered
> SQLException [Unexpected token: MEDIATYPE_TO_MIMETYPE in statement
> [SELECT A0.MEDIATYPE_ID,A0.NAME,A0.CHARACTER_SET,A0.TITLE,A0.DESCRIPTION
> FROM MEDIA_TYPE A0 INNER JOIN (MEDIATYPE_TO_MIMETYPE A1 INNER JOIN
> MIMETYPE A2 ON A1.MIMETYPE_ID=A2.MIMETYPE_ID) ON
> A0.MEDIATYPE_ID=A1.MEDIATYPE_ID WHERE A2.NAME IN
> ('text/html','text/xml','text/xhtml')]]; nested exception is
> java.sql.SQLException: Unexpected token: MEDIATYPE_TO_MIMETYPE in
> statement [SELECT
> A0.MEDIATYPE_ID,A0.NAME,A0.CHARACTER_SET,A0.TITLE,A0.DESCRIPTION FROM
> MEDIA_TYPE A0 INNER JOIN (MEDIATYPE_TO_MIMETYPE A1 INNER JOIN MIMETYPE
> A2 ON A1.MIMETYPE_ID=A2.MIMETYPE_ID) ON A0.MEDIATYPE_ID=A1.MEDIATYPE_ID
> WHERE A2.NAME IN ('text/html','text/xml','text/xhtml')]
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> root cause
>
> org.springframework.jdbc.UncategorizedSQLException: (OJB operation):
> encountered SQLException [Unexpected token: MEDIATYPE_TO_MIMETYPE in
> statement [SELECT
> A0.MEDIATYPE_ID,A0.NAME,A0.CHARACTER_SET,A0.TITLE,A0.DESCRIPTION FROM
> MEDIA_TYPE A0 INNER JOIN (MEDIATYPE_TO_MIMETYPE A1 INNER JOIN MIMETYPE
> A2 ON A1.MIMETYPE_ID=A2.MIMETYPE_ID) ON A0.MEDIATYPE_ID=A1.MEDIATYPE_ID
> WHERE A2.NAME IN ('text/html','text/xml','text/xhtml')]]; nested
> exception is java.sql.SQLException: Unexpected token:
> MEDIATYPE_TO_MIMETYPE in statement [SELECT
> A0.MEDIATYPE_ID,A0.NAME,A0.CHARACTER_SET,A0.TITLE,A0.DESCRIPTION FROM
> MEDIA_TYPE A0 INNER JOIN (MEDIATYPE_TO_MIMETYPE A1 INNER JOIN MIMETYPE
> A2 ON A1.MIMETYPE_ID=A2.MIMETYPE_ID) ON A0.MEDIATYPE_ID=A1.MEDIATYPE_ID
> WHERE A2.NAME IN ('text/html','text/xml','text/xhtml')]
>
> org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:99)
>
>
> org.springframework.orm.ojb.OjbAccessor.convertJdbcAccessException(OjbAccessor.java:107)
>
>
> org.springframework.orm.ojb.OjbAccessor.convertOjbAccessException(OjbAccessor.java:89)
>
>
> org.springframework.orm.ojb.OjbAccessor.convertOjbAccessException(OjbAccessor.java:86)
>
>
> org.springframework.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceBrokerTemplate.java:170)
>
>
> org.springframework.orm.ojb.PersistenceBrokerTemplate.executeFind(PersistenceBrokerTemplate.java:188)
>
>
> org.springframework.orm.ojb.PersistenceBrokerTemplate.getCollectionByQuery(PersistenceBrokerTemplate.java:214)
>
>
> org.apache.jetspeed.capabilities.impl.JetspeedCapabilities.getMediaTypesForMimeTypes(JetspeedCapabilities.java:345)
>
>
> org.apache.jetspeed.capabilities.impl.JetspeedCapabilities.getCapabilityMap(JetspeedCapabilities.java:189)
>
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> java.lang.reflect.Method.invoke(Unknown Source)
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:284)
>
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
>
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
>
>
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
>
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
>
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
>
> $Proxy0.getCapabilityMap(Unknown Source)
>
> org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:67)
>
>
> org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:203)
>
>
> org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:185)
>
>
> org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:208)
>
> org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:215)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
>
>
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
> org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:45)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org