You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Wolfgang Schur <ws...@ibvag.com> on 2002/07/05 09:43:59 UTC

A solution: tdk2.2, pgsql, newapp: error when trying to update the rdf table

Yes, that seems to be the problem.
Changing doUpdate() to the following avoids the setProperties method and 
circumvents the NumberKey issue.


public void doUpdate(RunData data, Context context)
    throws Exception
    {
         Rdf entry = new Rdf();
         entry.setRdfId(new NumberKey 
(data.getParameters().getString("rdfid")));
         entry.setTitle(data.getParameters().getString ("title"));
         entry.setUrl(data.getParameters().getString ("url"));
         entry.setAuthor(data.getParameters().getString ("author"));
         entry.setDept(data.getParameters().getString ("dept"));
         entry.setBody(data.getParameters().getString ("body"));
         //data.getParameters().setProperties(entry);
         entry.setModified(true);
         entry.setNew(false);
         entry.save();
     }

To fix the problem alltogether, I think the imports in 
BaseValueParser.java (in the turbine package) need to be changed from 
org.apache.turbine.om.NumberKey to org.apache.torque.om.NumberKey.

Cheers Wolfgang

Akmal Sarhan wrote:
> 
> if I am not mistaken, the only problem here is
> org.apache.torque.om.NumberKey , which is a problem of the actual 
> version of turbine that is using both the decoupled and the coupled 
> version of torque.
> 
> so you are trying to insert the NumberKey of the decoupled and turbine 
> is expecting its own :(
> 
> regards
> Akmal
> 
>> From: daniel robinson <dr...@dnai.com>
>> Reply-To: dan@drob.org
>> To: Turbine Users List <tu...@jakarta.apache.org>
>> Subject: Re: tdk2.2, pgsql, newapp: error when trying to update the 
>> rdf table
>> Date: Thu, 04 Jul 2002 10:55:36 -0700
>>
>> Wolfgang,
>>
>> Hi.  I believe that this is a well known error with the definition of
>> the fields types for PostgreSQL.  You can check the how-to-PostgreSQL,
>> however the instructions there call for patching the CVS version.  I was
>> able to find the correct values in the mail archives and cut and paste
>> into the PostgreSQL config. file.  I don't have time right now to get
>> this together :(, but I will later today when I have a moment and post 
>> it.
>>
>> Dan
>>
>>
>>
>> Wolfgang Schur wrote:
>>
>>> Hi,
>>> has anyone else experienced an exception when trying to update the rdf
>>> table in the example app? Adding/updating users works fine, also
>>> adding rdf records works. Only rdf Update gives this error. Seems that
>>> this is a known error (see the hint in FluxUserForm.vm, line 80).
>>> Passing a record id via hidden form elements seems not to work.
>>> Is any solution for this known?
>>> Best regards
>>> Wolfgang
>>>
>>> -------------------------------------------------------
>>> Here the stack trace:
>>>
>>> Horrible Exception: java.lang.reflect.InvocationTargetException
>>>     at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
>>>     at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
>>>
>>>
>>>     at java.lang.reflect.Method.invoke(Method.java:324)
>>>     at
>>> org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityActionEvent.java:166) 
>>>
>>>
>>>     at
>>> org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionEvent.java:114) 
>>>
>>>
>>>     at
>>> org.apache.turbine.modules.actions.VelocityAction.perform(VelocityAction.java:114) 
>>>
>>>
>>>     at
>>> org.apache.turbine.modules.actions.VelocitySecureAction.perform(VelocitySecureAction.java:100) 
>>>
>>>
>>>     at
>>> org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
>>>     at
>>> org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143) 
>>>
>>>
>>>     at org.apache.turbine.modules.Page.build(Page.java:90)
>>>     at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
>>>     at org.apache.turbine.Turbine.doGet(Turbine.java:577)
>>>     at org.apache.turbine.Turbine.doPost(Turbine.java:667)
>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>>     at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>>>     at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
>>>
>>>
>>>     at
>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
>>>
>>>
>>>     at
>>> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>>>     at
>>> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
>>>
>>>
>>>     at
>>> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
>>>
>>>
>>>     at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
>>>
>>>
>>>     at
>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) 
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>>>     at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
>>>
>>>
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>>>     at
>>> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1017) 
>>>
>>>
>>>     at
>>> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1115) 
>>>
>>>
>>>     at java.lang.Thread.run(Thread.java:536)
>>> Caused by: java.lang.Exception: property rdfId is of unsupported type
>>> class org.apache.torque.om.NumberKey
>>>     at
>>> org.apache.turbine.util.parser.BaseValueParser.setProperty(BaseValueParser.java:1371) 
>>>
>>>
>>>     at
>>> org.apache.turbine.util.parser.BaseValueParser.setProperties(BaseValueParser.java:1225) 
>>>
>>>
>>>     at org.mycompany.newapp.modules.actions.SQL.doUpdate(SQL.java:102)
>>>     ... 47 more
>>>
>>>
>>
>>
>>
>> -- 
>> To unsubscribe, e-mail:   
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
> 
> 
> 
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 



-- 
****************************************************
IBV Internet Business Ventures AG
Wolfgang Schur              Tel: ++49-69-857007-20
Pirazzistrasse 12 A         Fax: ++49-69-857007-22
D-63067 Offenbach           Email: wschur@ibvag.com
Germany
****************************************************


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>