Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
Hi: Are you tried to make a connection using JDBC outside Cocoon? An easy application I often use is Squirrel SQL - http://squirrel-sql.sourceforge.net/ BTW, can you post the error you got? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can not get Connection from DataSource named //192.168.10.1:5432/test
I'm trying to bind the ojb-jdo example to postgresql when open the page,it show me Cannot get Connection from DataSource named //192.168.10.1:5432/test below is my repository.xml descriptor-repository version="1.0" isolation-level="read-uncommitted"jdbc-connection-descriptor jcd-alias="test" default-connection="true" platform="PostgreSQL" jdbc-level="3.0" driver="org.postgresql.Driver" protocol="jdbc" subprotocol="postgresql" dbalias="//192.168.10.1:5432/test" username="postgres" password="" eager-release="false" batch-mode="false" useAutoCommit="1" ignoreAutoCommitExceptions="false"connection-pool maxActive="21" validationQuery=""/sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl"attribute attribute-name="autoNaming" attribute-value="true"/attribute attribute-name="grabSize" attribute-value="20"/attribute attribute-name="globalSequenceId" attribute-value="false"/attribute attribute-name="globalSequenceStart" attribute-value="1"//sequence-manager/jdbc-connection-descriptorclass-descriptor class="com.goodwill.bean.Registration" table="REGISTRATION"field-descriptor name="id" primarykey="true" default-fetch="true" autoincrement="true" sequence-name="user_seq'::text" column="ID" jdbc-type="INTEGER"/field-descriptor name="name" nullable="false" default-fetch="true" column="NAME" jdbc-type="VARCHAR"/field-descriptor name="email" nullable="false" default-fetch="true" column="EMAIL" jdbc-type="VARCHAR"/field-descriptor name="age" default-fetch="true" column="AGE" jdbc-type="INTEGER"/field-descriptor name="password" nullable="false" default-fetch="true" column="PASSWORD" jdbc-type="VARCHAR"//class-descriptor/descriptor-repository and this is cocoon.xconf about jdbc jdbc logger="core.datasources.test" name="test" pool-controller max="10" min="5"/ dburljdbc:postgres://192.168.10.1:5432/test/dburl userpostgres/user password/ /jdbc can anyone point what's wrong Best Regards Johnson
Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
1.I build a postgres in the same server,try to store in it. 2. the message is. file:/jakarta-tomcat-5.0.18/webapps/cocoon/test/flow/registration.js, line 8: uncaught JavaScript exception: at registration (file:/jakarta-tomcat-5.0.18/webapps/cocoon/test/flow/registration.js, Line 8): org.apache.ojb.broker.PersistenceBrokerException: Cannot get Connection from DataSource named //192.168.10.1:5432/test The repository.xml package.jdo and the build.xml are gen by Druid 3.4. Best Regards Johnson - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 4:06 PM Subject: Re: Can not get Connection from DataSource named //192.168.10.1:5432/test Hi: Are you tried to make a connection using JDBC outside Cocoon? An easy application I often use is Squirrel SQL - http://squirrel-sql.sourceforge.net/ BTW, can you post the error you got? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
the detail error message is Original Exception: org.apache.ojb.broker.PersistenceBrokerException: Cannot get Connection from DataSource named //192.168.10.1:5432/test at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.localBegin(Connectio nManagerImpl.java:193) at org.apache.ojb.broker.core.PersistenceBrokerImpl.beginTransaction(Persistenc eBrokerImpl.java:382) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.beginTransaction(Dele gatingPersistenceBroker.java:129) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.beginTransaction(Dele gatingPersistenceBroker.java:129) at org.apache.ojb.jdori.sql.OjbStoreConnector.begin(OjbStoreConnector.java:116) at com.sun.jdori.common.TransactionImpl.beginInternal(Unknown Source) at com.sun.jdori.common.TransactionImpl.begin(Unknown Source) at com.goodwill.RegistrationDAO.retrieve(Unknown Source) 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:324) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230) at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:1105) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:190) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:138) at org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(Interprete dFunctionImpl.java:121) at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244) at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.c allFunction(FOM_JavaScriptInterpreter.java:719) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(C allFunctionNode.java:160) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok e(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel ineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe linesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:312) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod e.java:133) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok e(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel ineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe linesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:312) at org.apache.cocoon.Cocoon.process(Cocoon.java:656) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Re: Can not get Connection from DataSource
Hi: Can you connect to the database using: http://squirrel-sql.sourceforge.net/ Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
Plus Druid - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 5:00 PM Subject: Re: Can not get Connection from DataSource Hi: Can you connect to the database using: http://squirrel-sql.sourceforge.net/ Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
From your posts, looks like your are on a windows machine. I guess postgres is running on a Linux machine. Webmin is running on the same server where you have you postgreSQL server. Is there running tomcat 5.0.18. Because to me it looks like a tipicla closed port on the server. Are you checked the firewall? What about pgAdminIII? It this running on the same machine as you are running Tomcat? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Antonio, thanks for the help. The funny thing is everything worked fine getting one record. I used the ojb sample and modified that to use my database and table. I then tried to modify the bean and DAO class to return a collection instead is strings and integers so I can build a list instead of a simple record. The Collection is filled with classes of the same structure as the original bean. I also modified the repository.xml file to point to the new class instead of the bean. Of course the form was adjusted to accept the Collection and return the different records. When I fill the Collection manually the form works fine. I checked all the variable types and can not find anything wrong. :-/ AFAIK There is no example of a database filled list Woody form using flow. Any ideas on how to perform tests? Bert - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 2:48 AM Subject: Re: building Collection from JDO problems Hi Bert: Review variable names. Based on the error looks like you are trying to use a method or property of a JS variable that was not initializated. Check for the new Packages if they are correct written. Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
the server is linux with cocoon 2.1.4 and postgreSQL 7.1.4 on it,tomcat is 5.0.18. I use win xp,pgAdmin on it to connect the postgres. there're in the same network,no firewall. Druid is on server. Best Regards Johnson - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 5:34 PM Subject: Re: Can not get Connection from DataSource From your posts, looks like your are on a windows machine. I guess postgres is running on a Linux machine. Webmin is running on the same server where you have you postgreSQL server. Is there running tomcat 5.0.18. Because to me it looks like a tipicla closed port on the server. Are you checked the firewall? What about pgAdminIII? It this running on the same machine as you are running Tomcat? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Bert Van Kets dijo: Antonio, thanks for the help. The funny thing is everything worked fine getting one record. I used the ojb sample and modified that to use my database and table. I then tried to modify the bean and DAO class to return a collection instead is strings and integers so I can build a list instead of a simple record. The Collection is filled with classes of the same structure as the original bean. I also modified the repository.xml file to point to the new class instead of the bean. Hmm. I think it is not a good idea to have a list as a bean in the repository.xml. My approach is similar as yours but in the repository.xml there are beans not lists of beans. Of course the form was adjusted to accept the Collection and return the different records. When I fill the Collection manually the form works fine. I checked all the variable types and can not find anything wrong. :-/ It is still not working? Please review the above hint. AFAIK There is no example of a database filled list Woody form using flow. You can define a BeanList that you will fill with an iterator. This BeanList can be retrieved from the flow. Then use CForm binding framework to pass the list to a woody repeater. This will work. Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
Johnson dijo: Are you tried to connect to 127.0.0.1 instead of 192.168.10.1? Perhaps in 192.168.10.1 the 5432 port not open or postgreSQL does not allow connect to this port. If you are planning to deploy your DB Server in the same machine as Tomcat, I will recommend you to use 127.0.0.1 address instead of 192.168.10.1. If not you will need to reconfigure the IP address each time you will deploy your app (fresh install or an update). Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
the same pls see file:/jakarta-tomcat-5.0.18/webapps/cocoon/test/flow/registration.js, line 8: uncaught JavaScript exception: at registration (file:/jakarta-tomcat-5.0.18/webapps/cocoon/test/flow/registration.js, Line 8): org.apache.ojb.broker.PersistenceBrokerException: Cannot get Connection from DataSource named postgres://127.0.0.1:5432/test org.apache.avalon.framework.CascadingRuntimeException: file:/jakarta-tomcat-5.0.18/webapps/cocoon/test/flow/registration.js, line 8: uncaught JavaScript exception: at registration (file:/jakarta-tomcat-5.0.18/webapps/cocoon/test/flow/registration.js, Line 8): org.apache.ojb.broker.PersistenceBrokerException: Cannot get Connection from DataSource named postgres://127.0.0.1:5432/test best regards johnson ps.the server has two nics. one is 192.168.10.1,another 192.168.10.252 - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 5:58 PM Subject: Re: Can not get Connection from DataSource Johnson dijo: Are you tried to connect to 127.0.0.1 instead of 192.168.10.1? Perhaps in 192.168.10.1 the 5432 port not open or postgreSQL does not allow connect to this port. If you are planning to deploy your DB Server in the same machine as Tomcat, I will recommend you to use 127.0.0.1 address instead of 192.168.10.1. If not you will need to reconfigure the IP address each time you will deploy your app (fresh install or an update). Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Hmm. I think it is not a good idea to have a list as a bean in the repository.xml. My approach is similar as yours but in the repository.xml there are beans not lists of beans. Sorry for the confusion. I meant that I created a class called Link containing integers and strings to fill the Collection in the bean called LinksBean. I don't see what's wrong with this approach. After all, this is how it's done in several samples. The only thing I am trying to do here is to fill the bean using ojb. Right now, I'm trying to get Rhino Debugger running so that I can have a peak in the instantiation of the objects in the Flow. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
I found the chane of dbalias don't affect the result if the jcd-alias is define in cocoon.xconf. - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 5:58 PM Subject: Re: Can not get Connection from DataSource Johnson dijo: Are you tried to connect to 127.0.0.1 instead of 192.168.10.1? Perhaps in 192.168.10.1 the 5432 port not open or postgreSQL does not allow connect to this port. If you are planning to deploy your DB Server in the same machine as Tomcat, I will recommend you to use 127.0.0.1 address instead of 192.168.10.1. If not you will need to reconfigure the IP address each time you will deploy your app (fresh install or an update). Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Bert Van Kets dijo: Hmm. I think it is not a good idea to have a list as a bean in the repository.xml. My approach is similar as yours but in the repository.xml there are beans not lists of beans. Sorry for the confusion. I meant that I created a class called Link containing integers and strings to fill the Collection in the bean called LinksBean. I don't see what's wrong with this approach. After all, this is how it's done in several samples. The only thing I am trying to do here is to fill the bean using ojb. Right now, I'm trying to get Rhino Debugger running so that I can have a peak in the instantiation of the objects in the Flow. You can also use eclipse.org to debug your Cocoon servlet: http://wiki.cocoondev.org/Wiki.jsp?page=DebuggingCocoon It would help inside the Java DAO class. Remember to put a breakpoint inside the DAO class. Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Flow] Releasing components
Hi Cocoon community, I just took a look at the cron block sample. It obtains a component: cocoon.getComponent(Packages.org.apache.cocoon.components.cron.JobScheduler.ROLE); but I can't find the place where it is released. Is this done automatically now? Thanks in advance! -- Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Xinclude/Xpointer problem with XHTML Namespace
Can't believe I solved it!! In my case it has to have a xhtml extension. article1 xi:include href=article1/index.xml#xmlns(xhtml=http://www.w3.org/1999/xhtml)xpoint er(//xhtml:title) / /article1 Regards Christian -Ursprüngliche Nachricht- Von: Christian Kreutz [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 20. Februar 2004 20:23 An: [EMAIL PROTECTED] Betreff: AW: Xinclude/Xpointer problem with XHTML Namespace -Ursprüngliche Nachricht- Von: Bruno Dumon [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 17. Februar 2004 00:51 An: [EMAIL PROTECTED] Betreff: Re: AW: Xinclude/Xpointer problem with XHTML Namespace On Mon, 2004-02-16 at 19:17, Christian Kreutz wrote: First of all thanks very trying to help me with this. It is good to know there seems more behind this problem then just a small error - played to long with this problem to be just easy to solve. :-) It seems it has to do something with the html tag combined with the XHTML namespace. I tried your things and had the same results. I found this point what might has do somehting with it: http://archives.real- time.com/pipermail/cocoon-devel/2003-May/013622.h tm l That issue has been fixed for a while: http://nagoya.apache.org/bugzilla/show_bug.cgi ?id=19423 It refered to the fact that you couldn't use the xmlns() stuff in xpointer expressions. I am using Xalan 2.5.0. Is this maybe a reason? Xalan does however indeed have something to do with it. To build a DOM from SAX events, we use the trax API whose implementation is provided by Xalan. And I know Xalan does different stuff for HTML then XML, and does this by checking the root element. The only thing I still have to find out is what it does exactly do different here. It must be something with the DOM it builds (since two completely independent XPath implementations can't handle it). I can't promise when I'll be able to look into this further. Maybe some evening this week. If you want to have a look at it yourself, the DOM-tree is made in XPointerContent.getDocument() and the XPath is evaluated on this in XPointerPart.process(). I tried it the last days with Xalan 2.5.2 but it didn't work. I also tried it with Xlink but the same error ocurs. With java I am unfortunately not experienced enough to go to deep in the above mentioned functions. I am going to investigate the next days further but honestly I am quite hopeless solving this problem myself and think about changing to something other then xhtml files. Cheers and thanks very much for your help so far Christian -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice for database manipulation?
Hi Bertrand! FYI, I recently put some thoughts to paper about implementing business logic in Cocoon, I've posted a summary on my weblog at http://codeconsult.ch/bertrand/archives/000242.html I have read your summary and I think it is great. First question: Is the paper the summary is based on Open Source :-) ? I really like the idea of having a Avalon component acting as a facade of the business logic. Actually I have been playing around with this kind of architecture and it works great for me. Right now, my facade and the business layer are on the same machine, but in order to have my application distibuted I would like to connect the bisiness layer via RMI and/or SOAP. So I have to extend my facade with those facilities. Are there any helpers within the cocoon distribution or do I have to implement the RMI/SOAP stuff myself? Does anybody have gained some experience in this area? Any advice is greatly appreciated. My architecture: Flow Controller: calls the facade, delivers business objects to the view Facade: Avalon component, calls the business logic business layer: Java classes persistence layer: JDO (very slow) / ODMG Best Regards, Bastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
I have Tomcat running in Eclipse and can debug my own Java classes, that's no problem at all. Thanks for the suggestion though. :-D It seems I don't even get to the DAO class. :-( I have tried to debug the fluscript, but see that I don't even get into the DAO class. Aparently when I instatiate the DAO class it appears to be undefined. Now I'm totally baffled as I see no reason what so ever why this could be. The class can certainly be found. It's in the classes directory in the same package as my bean, which is fuond without any problem. Eclipse compiles teh DAO class without any errors. :-/ What is are the possible reasons for flowscript to have an undefined when instatiating a class (creating a variable out of the Package)? This is the line of code I use in the flow: var dao = new Packages.be.bvar.admin.links.LinksDAO(); Thanks, Bert - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 11:16 AM Subject: Re: building Collection from JDO problems Bert Van Kets dijo: Hmm. I think it is not a good idea to have a list as a bean in the repository.xml. My approach is similar as yours but in the repository.xml there are beans not lists of beans. Sorry for the confusion. I meant that I created a class called Link containing integers and strings to fill the Collection in the bean called LinksBean. I don't see what's wrong with this approach. After all, this is how it's done in several samples. The only thing I am trying to do here is to fill the bean using ojb. Right now, I'm trying to get Rhino Debugger running so that I can have a peak in the instantiation of the objects in the Flow. You can also use eclipse.org to debug your Cocoon servlet: http://wiki.cocoondev.org/Wiki.jsp?page=DebuggingCocoon It would help inside the Java DAO class. Remember to put a breakpoint inside the DAO class. Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Bert Van Kets dijo: What is are the possible reasons for flowscript to have an undefined when instatiating a class (creating a variable out of the Package)? This is the line of code I use in the flow: var dao = new Packages.be.bvar.admin.links.LinksDAO(); Are you jaring the DAO classes? Where are you puting this classes? Are the classes visibles at all? I often add a line: cocoon.log.error(dao = + dao); To help me know if this variable is empty or not. Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
Johnson dijo: I use tomcat 4.1.30 the same? Tomcat 4.1.30 or Tomcat 4.1.29. Also just to be sure. Did you have the posgresql JDBC driver in WEB-APP/lib? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
1.4.1.30 2.yes I have - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 8:45 PM Subject: Re: Can not get Connection from DataSource Johnson dijo: I use tomcat 4.1.30 the same? Tomcat 4.1.30 or Tomcat 4.1.29. Also just to be sure. Did you have the posgresql JDBC driver in WEB-APP/lib? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
Johnson dijo: I'm trying to bind the ojb-jdo example to postgresql when open the page,it show me Cannot get Connection from DataSource named //192.168.10.1:5432/test below is my repository.xml descriptor-repository version=1.0 isolation-level=read-uncommitted jdbc-connection-descriptor jcd-alias=test default-connection=true platform=PostgreSQL jdbc-level=3.0 driver=org.postgresql.Driver protocol=jdbc subprotocol=postgresql dbalias=//192.168.10.1:5432/test username=postgres password= eager-release=false batch-mode=false useAutoCommit=1 ignoreAutoCommitExceptions=false connection-pool maxActive=21 validationQuery=/ sequence-manager className=org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl attribute attribute-name=autoNaming attribute-value=true/ attribute attribute-name=grabSize attribute-value=20/ attribute attribute-name=globalSequenceId attribute-value=false/ attribute attribute-name=globalSequenceStart attribute-value=1/ /sequence-manager /jdbc-connection-descriptor class-descriptor class=com.goodwill.bean.Registration table=REGISTRATION field-descriptor name=id primarykey=true default-fetch=true autoincrement=true sequence-name=user_seq'::text column=ID ^ A valid name for a sequence? Can you change it? I don't like it and maybe this is the source of the problem Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
I see , I will try! Tks. Best Regards Johnson - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 8:51 PM Subject: Re: Can not get Connection from DataSource named //192.168.10.1:5432/test Johnson dijo: I'm trying to bind the ojb-jdo example to postgresql when open the page,it show me Cannot get Connection from DataSource named //192.168.10.1:5432/test below is my repository.xml descriptor-repository version=1.0 isolation-level=read-uncommitted jdbc-connection-descriptor jcd-alias=test default-connection=true platform=PostgreSQL jdbc-level=3.0 driver=org.postgresql.Driver protocol=jdbc subprotocol=postgresql dbalias=//192.168.10.1:5432/test username=postgres password= eager-release=false batch-mode=false useAutoCommit=1 ignoreAutoCommitExceptions=false connection-pool maxActive=21 validationQuery=/ sequence-manager className=org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl attribute attribute-name=autoNaming attribute-value=true/ attribute attribute-name=grabSize attribute-value=20/ attribute attribute-name=globalSequenceId attribute-value=false/ attribute attribute-name=globalSequenceStart attribute-value=1/ /sequence-manager /jdbc-connection-descriptor class-descriptor class=com.goodwill.bean.Registration table=REGISTRATION field-descriptor name=id primarykey=true default-fetch=true autoincrement=true sequence-name=user_seq'::text column=ID ^ A valid name for a sequence? Can you change it? I don't like it and maybe this is the source of the problem Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
Johnson dijo: I'm trying to bind the ojb-jdo example to postgresql when open the page,it show me Cannot get Connection from DataSource named //192.168.10.1:5432/test below is my repository.xml descriptor-repository version=1.0 isolation-level=read-uncommitted jdbc-connection-descriptor jcd-alias=test default-connection=true platform=PostgreSQL jdbc-level=3.0 driver=org.postgresql.Driver protocol=jdbc subprotocol=postgresql dbalias=//192.168.10.1:5432/test username=postgres password= eager-release=false batch-mode=false useAutoCommit=1 ignoreAutoCommitExceptions=false connection-pool maxActive=21 validationQuery=/ ^^ Where is your validation query? You can write any query that will be tested against your database. Example: I have a table called Catalog then I can write as a validation query: validationQuery=SELECT 1 FROM Catalog More info at: http://db.apache.org/ojb/repository.html#connection-pool sequence-manager className=org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl attribute attribute-name=autoNaming attribute-value=true/ attribute attribute-name=grabSize attribute-value=20/ attribute attribute-name=globalSequenceId attribute-value=false/ attribute attribute-name=globalSequenceStart attribute-value=1/ /sequence-manager Change the sequence-manager to: sequence-manager className=org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl attribute attribute-name=grabSize attribute-value=20/ attribute-value=1/ /sequence-manager /jdbc-connection-descriptor class-descriptor class=com.goodwill.bean.Registration table=REGISTRATION field-descriptor name=id primarykey=true default-fetch=true autoincrement=true sequence-name=user_seq'::text column=ID ^^^ Remove it. You are not using nextval sequences. After these changes, try again! :-D Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
You need to change the sequence manager. Here is the doc to configure the High/LowSequenceManager: http://db.apache.org/ojb/sequencemanager.html#High/Low%20sequence%20manager Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Map return type in action
Anna Bikkina wrote: Hi, I just a need a gory detail I am not able to find. When I write my own action file and its returns a map. How can I use the map in my xsp which gets executed when my action is succesful. Something like getParamter etc... can someone please write the syntax to get the Map details from a action. Thanks, Anna. Action: --- map.put(foo, bar); return map; Sitemap: map:act type=... map:generate type=xsp src=myserverpage.xsp map:parameter name=foo value={foo}/ /map:generate /map:act XSP: try { String foo = parameters.getParameter(foo); } catch (ParameterException e) { throw new ProcessingException(e); } HTH, -- Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Are you jaring the DAO classes? No, just compiling them in the classes folder in the right package directory. I tried to jar them at first, but then none of them were found. Where are you puting this classes? see above Are the classes visibles at all? Aparently not in the Cocoon package. I did a print(dao) in the flowscript and it returns undefind Your system, writing to the log, has the same message. Printing to the console is a little easier int his case as I don't have to shut down Tomcat to open the log file. Freaking MS. :-( To help me know if this variable is empty or not. Aparently it not. :-( Hence my question in my previous mail. Bert Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Processing errors from Database Actions
Derek Hohls wrote: Perhaps I have used the wrong keywords, but I cannot find anything in the docs that deals with this I am trying to present to the user the reason why a Database Add (or Update) action may have failed. The sitemap is set up for the entry form to be redisplayed on failure (via XSP)... but I would like to know how to access the specific error condition that triggered the failure, from within the XSP and then present a suitable message. Any help or a pointer to examples would be appreciated. Action may only return values to the sitemap when they were successful. Therefore error conditions cannot be communicated that way. Because of this, everything that is would be returned is additionally stored using an output module. This includes the JDBC error message. The default is to use the request attribute module. Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Bert Van Kets dijo: Are you jaring the DAO classes? No, just compiling them in the classes folder in the right package directory. I tried to jar them at first, but then none of them were found. This is weird! How jaring is not avaliable. In my devel environment I use eclipse + ant to build a jar with my DAO classes that is then copied to WEB-INF/lib directory of my Cocoon app. After this I need to reboot tomcat. This way I did it hundreds if not thousands of times while developing my current work. Are you tried to investigate why your classes packaged in a jar are not seeing by Cocoon. I think this is the root of the problem. Are the classes visibles at all? Aparently not in the Cocoon package. I did a print(dao) in the flowscript and it returns undefind Your system, writing to the log, has the same message. Printing to the console is a little easier int his case as I don't have to shut down Tomcat to open the log file. Freaking MS. :-( No problem :-D To help me know if this variable is empty or not. Aparently it not. :-( Yes. It is empty, because you got undefined that means the variable don't got any value. Can you send again the javascript code? Please don't snip, because the problem can be related where you define the variable and where you use it. This is why I prefer to write the code in Java and not in Javascript. I will be glad to have a similar IDE as eclipse for Javascript. ;-) Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
just delete the attrib of seq,and rebuild,still don't work Johnson - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 9:06 PM Subject: Re: Can not get Connection from DataSource named //192.168.10.1:5432/test You need to change the sequence manager. Here is the doc to configure the High/LowSequenceManager: http://db.apache.org/ojb/sequencemanager.html#High/Low%20sequence%20manager Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Here is my flowscript. In this form it fails on dao.retrieve(linksBean, factory); because dao is undefined. cocoon.load(resource://org/apache/cocoon/woody/flow/javascript/woody2.js); function linksForm_JDO(form) { // Get OJB factory var factory = cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROL E); // Create a empty Bean var linksBean = new Packages.be.bvar.admin.links.LinksBean(); var dao = new Packages.be.bvar.admin.links.LinksDAO(); cocoon.log.error(dao = + dao); dao.retrieve(linksBean, factory); // Load the Bean to the form form.load(linksBean); // Let woody handle the form form.showForm(links-form-display); // Update the Bean based on user input form.save(linksBean); // Update Bean in Database //dao.update(linksBean, factory); // Clean up the operation cocoon.releaseComponent(factory); // Send response to the user cocoon.request.setAttribute(linksForm, form.getWidget()); cocoon.sendPage(links-success-pipeline); } And here is the DAO class (I took the update method out to minimise teh possible problems) : package be.bvar.admin.links; import java.util.Collection; import javax.jdo.PersistenceManager; import javax.jdo.Query; import org.apache.cocoon.ojb.jdo.components.JdoPMF; /** * @author BeKe * */ public class linksDAO { public void retrieve(LinksBean bean, JdoPMF pmf) { /* 1. Get the PersistenceManager */ PersistenceManager persistenceManager = pmf.getPersistenceManager(); // 2. start transaction persistenceManager.currentTransaction().begin(); Query query = persistenceManager.newQuery(be.bvar.admin.links.Link.class); Collection thisCollection = (Collection) query.execute(); bean.setLinks(thisCollection); // 3. End transaction persistenceManager.currentTransaction().commit(); } } And here is the class descriptor from the repository.xml file : class-descriptor class=be.bvar.admin.links.Links table=links field-descriptor name=ID column=ID jdbc-type=INTEGER primarykey=true/ field-descriptor name=url column=url jdbc-type=VARCHAR/ field-descriptor name=titel column=title jdbc-type=VARCHAR/ field-descriptor name=description column=description jdbc-type=VARCHAR/ /class-descriptor Thansk again for your help!! Bert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource named //192.168.10.1:5432/test
Johnson dijo: just delete the attrib of seq,and rebuild,still don't work. Is the error the same or is there other error? Are you did all the changes I suggested? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice for database manipulation?
[EMAIL PROTECTED] wrote: Hello Christian, -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Monday, 16 February 2004 13:51 To: [EMAIL PROTECTED] Subject: Re: Best practice for database manipulation? Other than that, my advice is to put your database access into a java class (better: Avalon components) and access it from flow. If This sounds like a good idea. I've been studying several *.js files and I get a general idea of how it should work, but...what do I get from building my classes into Avalon components and... what should I do to convert my classes into Avalon components? I cannot afford to spend a considerable amount of time to study yet another framework. You gain flexibility and if your classes hold state or configuration, the Avalon component manager (soon service manager) manages them for you. The pattern is to define an interface as contract to fulfill and configure at startuo time the right implementation to use. Avalon provides a number of lifecycle interfaces that allow the manager to setup your components. E.g. give access to other components or pass configuration data to them. It also manages concurrent access to a component by instantiating additional ones, pooling instances or sharing instances across thread depending on the marker on the component. Cocoon is based on this principle and whenever you access a generator for example, the Avalon component manager directs the play. If your classes don't have any such requirements, converting a normal class to a component is to a) create a corresponding interface b) add a ROLE constant to the interface as individual name c) declare your component in cocoon.xconf using component-instance/ d) access the component from other components that implement the servicable interface. (your component gets a reference to its managing component manager) e) use manager.lookup(YourInterface.ROLE) to access it f) release the component when done using manager.release(myComponent) d) does not apply for flow e+f) there are methods on the cocoon object in flow for this. Avalon is very easy to program to. Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Flow] Releasing components
Andreas Hartmann wrote: Hi Cocoon community, I just took a look at the cron block sample. It obtains a component: cocoon.getComponent(Packages.org.apache.cocoon.components.cron.JobScheduler.ROLE); but I can't find the place where it is released. Is this done automatically now? Not (yet?) done automatically. Use cocoon.releaseComponent(componentVar). See http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=107708176218215w=2 Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Bert Van Kets dijo: Here is my flowscript. In this form it fails on dao.retrieve(linksBean, factory); because dao is undefined. cocoon.load(resource://org/apache/cocoon/woody/flow/javascript/woody2.js); Hint: Set the above line in sitemap to avoid writing it over and over: map:flow language=javascript map:script src=resource://org/apache/cocoon/woody/flow/javascript/woody2.js/ !-- Here put other scripts, you can include many script as you want. I prefer to put in 1 file related functions for one operation -- /map:flow function linksForm_JDO(form) { // Get OJB factory var factory = cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROL E); // Create a empty Bean var linksBean = new Packages.be.bvar.admin.links.LinksBean(); ^^^ Not showed, but I guess it exists. Anyway this is not the problem. var dao = new Packages.be.bvar.admin.links.LinksDAO(); cocoon.log.error(dao = + dao); When dao will got a right Object, the above line will print something like: [EMAIL PROTECTED] but you got dao=undefined So this means you are not getting the right object. Flow is not able to got it. Can you tell where are you deploying be.bvar.admin.links.LinksDAO? Please write the full dir structure you are using in WEB-INF/classes. This is not really a JDO problem this is a Flow problem that cannot find the right Java class. And here is the DAO class (I took the update method out to minimise teh possible problems) : OK. :-D package be.bvar.admin.links; import java.util.Collection; import javax.jdo.PersistenceManager; import javax.jdo.Query; import org.apache.cocoon.ojb.jdo.components.JdoPMF; /** * @author BeKe * */ public class linksDAO { public void retrieve(LinksBean bean, JdoPMF pmf) { /* 1. Get the PersistenceManager */ PersistenceManager persistenceManager = pmf.getPersistenceManager(); // 2. start transaction persistenceManager.currentTransaction().begin(); Query query = persistenceManager.newQuery(be.bvar.admin.links.Link.class); Collection thisCollection = (Collection) query.execute(); bean.setLinks(thisCollection); // 3. End transaction persistenceManager.currentTransaction().commit(); } } And here is the class descriptor from the repository.xml file : class-descriptor class=be.bvar.admin.links.Links table=links ^ This class is diferent from the LinksBean. Why you are using 2 diferent classes? Any way here is not the problem. field-descriptor name=ID column=ID jdbc-type=INTEGER primarykey=true/ field-descriptor name=url column=url jdbc-type=VARCHAR/ field-descriptor name=titel column=title jdbc-type=VARCHAR/ field-descriptor name=description column=description jdbc-type=VARCHAR/ /class-descriptor Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Hint: Set the above line in sitemap to avoid writing it over and over: OK, did that. It does indeed make life easier in the long run. :-) When dao will got a right Object, the above line will print something like: [EMAIL PROTECTED] but you got dao=undefined right So this means you are not getting the right object. Flow is not able to got it. Can you tell where are you deploying be.bvar.admin.links.LinksDAO? Please write the full dir structure you are using in WEB-INF/classes. Here's the full path to the class file : D:\java\projects\bvar\WEB-INF\classes\be\bvar\admin\links D:\java\projects\bvar is where my project resides. The class file is clearly there. This is not really a JDO problem this is a Flow problem that cannot find the right Java class. Aparently. And it has me scratching my head for several days now. And here is the class descriptor from the repository.xml file : class-descriptor class=be.bvar.admin.links.Links table=links ^ This class is diferent from the LinksBean. Why you are using 2 diferent classes? Any way here is not the problem. From my understanding, the structure of the repository node must match the class in which you load the data. As I have Link classes in a Collection (in the LinksBean class), each containing one record of data, I thought the repository has to point to the Link class and not to the bean containing the Collection. Bert Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with capture logicsheet function dom-variable
Hello, I was trying to get a document fragment into a DOM variable in a XSP with: capture:dom-variable name="SomeFragment" sometagxxxyyyzzz/sometag /capture:dom-variable But it fails with a NULL Pointer exception (without any usefull information ...). How can I get a document fragment into a DOM variable in an XSP? I am using cocoon 2.0 (2.1). Please help me to use the capture logicsheet in a proper way ! The capture logicsheet function "fragement-variable" works well! thx, Dietmar Following the original message: An Error Occurredorg.apache.cocoon.ProcessingExceptionException in ServerPagesGenerator.generate()org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.NullPointerExceptionOriginal Exception: java.lang.NullPointerException at org.apache.xalan.transformer.TransformerIdentityImpl.flushStartDoc(TransformerIdentityImpl.java:885) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1016) at org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:130) at org.apache.cocoon.www.static_.DA_Dev_conf_xsp.generate(C:\Workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\RSFDemoEAR\RSFDemoWEB.war\cocoon-files\org\apache\cocoon\www\static_\DA_Dev_conf_xsp.java:200) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:260) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:545) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:218) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:489) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:150) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307) at org.apache.cocoon.Cocoon.process(Cocoon.java:621) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1083) at at.rsf4j.cocoon.servlet.RSFCocoonServlet.service(RSFCocoonServlet.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:187) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
Re: woody, flow and database confusion
Hello Bert, it seems we went exactly the same route this week. Maybe we should put together our efforts to get this thing working and to help other people with a wiki page. I only don't have that time til beginning of March because there is still an exam to be passed. So let me write a short mail about my experiences. We have at least our own application running with OJB. We can retrieve lists or single objects from the db and display them with Woody, we can store them back and delete them. We only have still a problem with object identity, so that storing does indeed create a new object in db, but that's another problem we didn't have a closer look yesterday evening. The way to this was long and stony, so you are not the only one :) We started also with OJB/JDO and had bad feelings when we saw that we have to maintain at least two files (package.jdo, repository.xml) to get it working. The reason for it is that JDO and OJB are two different products, OJB provides only a plugin for Sun JDO at the moment, but both must get their configuration. Though it's easy to write a stylesheet that converts one format into the other I tried to use only JDO. But JDO is just the API, the SPI must be provided by the database vendor and as there are probably not that much for a specific at the moment, you need OJB. Then we found out that the JDO implementation has a performance problem: Retrieving 20 rows out of 6.000 in a db leads to instantiation of all 6.000 objects, they are filtered by JDO. That's not a problem of OJB, it's just how Sun JDO works. So we were back nearly to the beginning. We decided to go on with OJB (as it allows easy switch between different persistence frameworks (JDO, ODMG, OTM, PB)), but used the OTM. This one provides also object level transaction. Now the application itself. I don't love the idea of accessing the persistence layer from the flow/controller layer directly. We access it only from the application layer to have obvious tiers. We have a DAOFactory that returns DAOs (e.g. either JDO or OTM), the implementation of the persistence framework access is abstracted. In theory we can switch to Castor, Hibernate or what else without touching the application layer. Each object specific DAO will provide different methods for retrieving, storing, deleting etc. As the layers below the flow layer are no Avalon components and not in relation to Cocoon, but Plain Old Java we kicked out Cocoon OJB block completely and just use OJB. If this was a good decision we will see. But it won't be that difficult to switch the datasource back to Avalon/Cocoon in OJB properties file. BTW, we package all classes, configuration files and so on into our application JAR, deploy it in WEB-INF/lib and it works without any problem. Joerg On 18.02.2004 12:15, Bert Van Kets wrote: I have been trying for several days to get grips on the super trio Woody, Flow and OJB/JDO. I don't have any succes yet, but that is mainly to the complexity of getting OJB/JDO to run. Could someone please shed a light on this to get me going again? I have created a bean to store all form data. The Woody form and the FlowScipt have been created too. I have used the obj/woody sample as a template to get things running. That's the easy part (relatively speaking). I'm using mySQL as a databasource and have a datasource configured in cocoon.xconf. This datasource is used in XSP pages using ESQL without any problem, so that works for sure. My biggest confusion is where I need to configure the link from the bean datastore to the database. Where do I configure OJB and JDO? I have OJB.properties, package.jdo, repository.dtd and repository.xml in the WEB-INF/classes directory. I see a total overlap in the configuration in the package.jdo and repository.xml file. Why is that? Is either of them not needed? I have created a DAO class file too. This is a direct copy of the Employee_DAO class file from the samples. I only replaced the package and replaced the bean methods with the ones from my bean. All this compiles without any problem. The bean and the DAO class are packaged in a jar file and put in the WEB-INF lib directory. I assume this is where I will eventually create queries using OJB code to fill the bean with data. Am I correct? Thanks a lot for any help, Bert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem svg jpeg cocoon 2.0.4 and tomcat 4.1.27
Hello, I have problems with serializer svg to jpeg The examples ...cocoon/samples/hello-world/hello.jpg not display in mozilla. open the file logs core.log and message is [core.manager] cocoon/samples/hello-world/hello.jpg)Thread-38/ExcaliburComponentSelector: UnnamedSelector: ComponentSelector could not find the component can help me. Thank's very much, -- Cordialmente, Andres Taborda Departamento de Sistemas http://www.saludcolombiaeps.com.co email:[EMAIL PROTECTED] SaludColombia E.P.S.. - Una Sola Familia Calle 5C # 43-05 B. Tequendama Telefono : 57 (002) 551 04 89 - 57 (002) 551 04 90 Cali - Colombia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not get Connection from DataSource
how fool I'm just write wrong db-url in cocoon.xconf must be postgresql I wrote to postgres ths for your help Johnson - Original Message - From: Antonio Gallardo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 8:45 PM Subject: Re: Can not get Connection from DataSource Johnson dijo: I use tomcat 4.1.30 the same? Tomcat 4.1.30 or Tomcat 4.1.29. Also just to be sure. Did you have the posgresql JDBC driver in WEB-APP/lib? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
I saw in your flow script: var dao = new Packages.be.bvar.admin.links.LinksDAO(); but in your Java file: public class linksDAO { Just a typo? No, it is not a typo and probably the reason why I have this problem. I'm not going to repeat what I was just shouting, but it wasn't pretty. Like always, the problems that are the most difficult to solve are the most stupid problems made. I still have to test it, but I'm sure this is at least one problem solved. I'll see where I get now. I have another obligation at the moment (family). Thanks a lot all for your help and explanation. I will type out (a) step by step Wiki page(s) to explain on how to set up Flow/Woody/OJB. There's no need for other people to go through my ordeal (even though they probably won't make the same stupid error as I made). Bert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem svg jpeg cocoon 2.0.4 and tomcat 4.1.27
Hi Andres: Can you upgrade to Cocoon 2.1.4? Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Incomplete image requests
Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={2}/> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> The image link is built up in my xsp page as: artists-photo1> xsp:element name=img> xsp:attribute name=src>artistImage//xsp:attribute> /xsp:element> /artists-photo1> So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: . snippet . tr> td valign=top align=center>xsl:apply-templates select=//artists-photo1/>/td> /tr> tr> td valign=top>xsl:apply-templates select=//artists-photo2/>/td> /tr> /table> /body> /html> /xsl:template> xsl:template match=artists-photo1> xsl:apply-templates/> /xsl:template> xsl:template match=artists-photo2> xsl:apply-templates/> /xsl:template> many thanks in advance On 19 Feb 2004, at 12:31, Simon Mieth wrote: On Thu, 19 Feb 2004 12:19:13 + beyaNet Consultancy [EMAIL PROTECTED]> wrote: Hi Simon, I think I am coming closer to the answer I have been having with the svg canvas size not changing. If I make a request for the image outside of the iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4 6.jpg), then the image changes according to the sizes I give it. If i try and call the image so that it loads within the iframe, then no matter what values you give the height and width of the svg tag no change to the canvas size takes place. Any ideas? Hi Andrew, maybe you have inside your html-source image width= height= >-statements, then the browser scale the image allways to this size. If the image is larger or smaller, the browser scale ever to this size. If so, remove the width= and height= and have allready img src= /> and the browser will diplay the size from your image. Best Regards, Simon
Re: Incomplete image requests
forgot to attach the the svg file, here it is svg.xsp Description: Binary data many thanks in advance On 21 Feb 2004, at 18:36, beyaNet Consultancy wrote: Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={2}/> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> The image link is built up in my xsp page as: artists-photo1> xsp:element name=img> xsp:attribute name=src>artistImage//xsp:attribute> /xsp:element> /artists-photo1> So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: . snippet . tr> td valign=top align=center>xsl:apply-templates select=//artists-photo1/>/td> /tr> tr> td valign=top>xsl:apply-templates select=//artists-photo2/>/td> /tr> /table> /body> /html> /xsl:template> xsl:template match=artists-photo1> xsl:apply-templates/> /xsl:template> xsl:template match=artists-photo2> xsl:apply-templates/> /xsl:template> many thanks in advance On 19 Feb 2004, at 12:31, Simon Mieth wrote: On Thu, 19 Feb 2004 12:19:13 + beyaNet Consultancy [EMAIL PROTECTED]> wrote: Hi Simon, I think I am coming closer to the answer I have been having with the svg canvas size not changing. If I make a request for the image outside of the iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4 6.jpg), then the image changes according to the sizes I give it. If i try and call the image so that it loads within the iframe, then no matter what values you give the height and width of the svg tag no change to the canvas size takes place. Any ideas? Hi Andrew, maybe you have inside your html-source image width= height= >-statements, then the browser scale the image allways to this size. If the image is larger or smaller, the browser scale ever to this size. If so, remove the width= and height= and have allready img src= /> and the browser will diplay the size from your image. Best Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Link Livesites: Cocoon 2.1.4
Dear Mr and Mss We use cocoon in our Edoc electronic dokument system for Max Planck Society http://www.edoc.mpg.de . More information about our project find you on www.edoc.mpg.de website. Kind regards Karol Kozak -- *°*°* Karol *°*°* [EMAIL PROTECTED] GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...) jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fw: Problems with capture logicsheet function dom-variable
Please urgent HELP I have no idea to solve the problem ... thanks in advance !!! Dietmar - Original Message - From: Dietmar Schlar To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 3:34 PM Subject: Problems with capture logicsheet function "dom-variable" Hello, I was trying to get a document fragment into a DOM variable in a XSP with: capture:dom-variable name="SomeFragment" sometagxxxyyyzzz/sometag /capture:dom-variable But it fails with a NULL Pointer exception (without any usefull information ...). How can I get a document fragment into a DOM variable in an XSP? I am using cocoon 2.0 (2.1). Please help me to use the capture logicsheet in a proper way ! The capture logicsheet function "fragement-variable" works well! thx, Dietmar Following the original message: An Error Occurredorg.apache.cocoon.ProcessingExceptionException in ServerPagesGenerator.generate()org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.NullPointerExceptionOriginal Exception: java.lang.NullPointerException at org.apache.xalan.transformer.TransformerIdentityImpl.flushStartDoc(TransformerIdentityImpl.java:885) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1016) at org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:130) at org.apache.cocoon.www.static_.DA_Dev_conf_xsp.generate(C:\Workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\RSFDemoEAR\RSFDemoWEB.war\cocoon-files\org\apache\cocoon\www\static_\DA_Dev_conf_xsp.java:200) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:260) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:545) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:218) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:489) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:150) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307) at org.apache.cocoon.Cocoon.process(Cocoon.java:621) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1083) at at.rsf4j.cocoon.servlet.RSFCocoonServlet.service(RSFCocoonServlet.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:187) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331) at
Re: Incomplete image requests
geoff, my fault, sorry. Copied the wrong pipe. The correct pipe is: map:match pattern=**artistImage/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={2}/> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> many thanks in advance On 21 Feb 2004, at 18:56, Geoff Howard wrote: beyaNet Consultancy wrote: Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={2}/> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> Huh? You have two wildcard tokens in your pattern and reference only the second and the non-existant third. Did you type wrong? The image link is built up in my xsp page as: artists-photo1> xsp:element name=img> xsp:attribute name=src>artistImage/1/xsp:expr>artistID/xsp:expr>.jpg/xsp:attribute> /xsp:element> /artists-photo1> And here you are referring to an image source which looks like it would be matched by a pattern like artistImage/*/*.jpg in your sitemap, but you don't appear to have such a pattern matcher set up. Is this really what you're using?? So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: The only mysterious thing here is why the first image works at all given the above data. Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
And the woes continue... :-( The LinkDAO class is now instantiated, but when I get to building the Query I get an error saying I don't implement javax.jdo.spi.persistenceCapable on the class used for putting data in my collection. No document references the need for a persistanceCapable implementation in this situation. Full stack trace below. When debugging in Eclipse, javaw.exe (Tomcat) even throws me a bug crash. Here's the code again I use to retreive the data. Am I missing a step? The OJB docs don't tell me a lot. :-/ public void retrieve(LinksBean bean, JdoPMF pmf) { /* 1. Get the PersistenceManager */ PersistenceManager persistenceManager = pmf.getPersistenceManager(); // 2. start transaction persistenceManager.currentTransaction().begin(); Query query = persistenceManager.newQuery(Link.class); Collection thisCollection = (Collection) query.execute(); bean.setLinks(thisCollection); // 3. End transaction persistenceManager.currentTransaction().commit(); } Any help is appreciated. Bert Original Exception: javax.jdo.JDOUserException: Class given to getExtent, be.bvar.admin.links.Link, does not implement javax.jdo.spi.PersistenceCapable at com.sun.jdori.common.PersistenceManagerImpl.getExtent(Unknown Source) at com.sun.jdori.common.query.QueryImpl.checkCandidates(Unknown Source) at com.sun.jdori.common.query.QueryImpl.execute(Unknown Source) at be.bvar.admin.links.LinksDAO.retrieve(LinksDAO.java:26) at java.lang.reflect.Method.invoke(Native Method) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230) at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:1105) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:190) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:138) at org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(Interprete dFunctionImpl.java:121) at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244) at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.c allFunction(FOM_JavaScriptInterpreter.java:719) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(C allFunctionNode.java:160) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok e(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel ineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe linesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:312) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod e.java:133) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok e(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel ineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe linesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:312) at org.apache.cocoon.Cocoon.process(Cocoon.java:656) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
Re: Incomplete image requests
beyaNet Consultancy wrote: forgot to attach the the svg file, here it is I just looked quickly at your xsp and before we get any further into this, can you explain why you're not using an image/database reader for this? Is it because of the hibernate support? I don't see any purpose for putting this into svg (as base64 jpeg) just to re-serialize as jpg. I've seen about a million messages go by about this general topic so you may just need to quickly summarize the issue. Assuming you have some need to do it this way though, I'd recommend putting some logging (or just System.out.println which should get spit out in your terminal console) to see what is going on internally. Are you sure you're getting data back in each case fo example? Geoff many thanks in advance On 21 Feb 2004, at 18:36, beyaNet Consultancy wrote: Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg map:generate type=serverpages src=xsp/svg.xsp map:parameter name=imageNum value={2}/ map:parameter name=artistID value={3}/ /map:generate map:serialize type=svg2jpeg/ /map:match The image link is built up in my xsp page as: artists-photo1 xsp:element name=img xsp:attribute name=srcartistImage/1/xsp:exprartistID/xsp:expr.jpg/xsp:attribute /xsp:element /artists-photo1 So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: . snippet . tr td valign=top align=centerxsl:apply-templates select=//artists-photo1//td /tr tr td valign=topxsl:apply-templates select=//artists-photo2//td /tr /table /body /html /xsl:template xsl:template match=artists-photo1 xsl:apply-templates/ /xsl:template xsl:template match=artists-photo2 xsl:apply-templates/ /xsl:template many thanks in advance On 19 Feb 2004, at 12:31, Simon Mieth wrote: On Thu, 19 Feb 2004 12:19:13 + beyaNet Consultancy [EMAIL PROTECTED] wrote: Hi Simon, I think I am coming closer to the answer I have been having with the svg canvas size not changing. If I make a request for the image outside of the iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4 6.jpg), then the image changes according to the sizes I give it. If i try and call the image so that it loads within the iframe, then no matter what values you give the height and width of the svg tag no change to the canvas size takes place. Any ideas? Hi Andrew, maybe you have inside your html-source image width= height= -statements, then the browser scale the image allways to this size. If the image is larger or smaller, the browser scale ever to this size. If so, remove the width= and height= and have allready img src= / and the browser will diplay the size from your image. Best Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best practice for database manipulation?
Hi Christian, This all sounds promising and it's not that I don't want to do the work, but I'm very pressed for time so if I explain what my classes do (at least the simplest one) could you give me a hint as to which part of Avalon I should study and/or copy from (i.e. copy and adapt)? Here we go: what I basically have/need is the following: Objects passed around are persons, i.e. a set of data belonging to 1 person. I create a (Corba) connection to the server (I have 2 of these) by providing a servername, namingservice address and some extra settings. I can pass several types of queries which result in data that are processed in a separate class to something that is more easily manageable by Cocoon. I get stuck when trying to convert the modified XML (through a Woody form) back into a structure readable by the server for storage. The following situations need to be handled: 1. if data is not modified, don't store 2. if data is modified, store, pass on success or failure 3. if new person's data is stored, check for duplicate, pass on success or failure In all cases success or failure should be indicated on a page that also displays the (updated) person's details. When writing this I realise this looks a lot like access to a regular database, so maybe you can tell me which classes I can study best? Thanks and bye, Helma -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED] Sent: Monday, 16 February 2004 13:51 To: [EMAIL PROTECTED] Subject: Re: Best practice for database manipulation? Other than that, my advice is to put your database access into a java class (better: Avalon components) and access it from flow. If This sounds like a good idea. I've been studying several *.js files and I get a general idea of how it should work, but...what do I get from building my classes into Avalon components and... what should I do to convert my classes into Avalon components? I cannot afford to spend a considerable amount of time to study yet another framework. You gain flexibility and if your classes hold state or configuration, the Avalon component manager (soon service manager) manages them for you. The pattern is to define an interface as contract to fulfill and configure at startuo time the right implementation to use. Avalon provides a number of lifecycle interfaces that allow the manager to setup your components. E.g. give access to other components or pass configuration data to them. It also manages concurrent access to a component by instantiating additional ones, pooling instances or sharing instances across thread depending on the marker on the component. Cocoon is based on this principle and whenever you access a generator for example, the Avalon component manager directs the play. If your classes don't have any such requirements, converting a normal class to a component is to a) create a corresponding interface b) add a ROLE constant to the interface as individual name c) declare your component in cocoon.xconf using component-instance/ d) access the component from other components that implement the servicable interface. (your component gets a reference to its managing component manager) e) use manager.lookup(YourInterface.ROLE) to access it f) release the component when done using manager.release(myComponent) d) does not apply for flow e+f) there are methods on the cocoon object in flow for this. Avalon is very easy to program to. Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building Collection from JDO problems
Hi Bert: It looks like a table game :-) Well you went to the next step and you are faced with the next trivia :-D AFAIK, the problem is that you need to JDO enhance your classes. See the build.xml that Druid did for you. Also remeber you need to use jdo 1.01 NOT jdo 1.00 Best Regards, Antonio Gallardo Bert Van Kets dijo: And the woes continue... :-( The LinkDAO class is now instantiated, but when I get to building the Query I get an error saying I don't implement javax.jdo.spi.persistenceCapable on the class used for putting data in my collection. No document references the need for a persistanceCapable implementation in this situation. Full stack trace below. When debugging in Eclipse, javaw.exe (Tomcat) even throws me a bug crash. Here's the code again I use to retreive the data. Am I missing a step? The OJB docs don't tell me a lot. :-/ public void retrieve(LinksBean bean, JdoPMF pmf) { /* 1. Get the PersistenceManager */ PersistenceManager persistenceManager = pmf.getPersistenceManager(); // 2. start transaction persistenceManager.currentTransaction().begin(); Query query = persistenceManager.newQuery(Link.class); Collection thisCollection = (Collection) query.execute(); bean.setLinks(thisCollection); // 3. End transaction persistenceManager.currentTransaction().commit(); } Any help is appreciated. Bert Original Exception: javax.jdo.JDOUserException: Class given to getExtent, be.bvar.admin.links.Link, does not implement javax.jdo.spi.PersistenceCapable at com.sun.jdori.common.PersistenceManagerImpl.getExtent(Unknown Source) at com.sun.jdori.common.query.QueryImpl.checkCandidates(Unknown Source) at com.sun.jdori.common.query.QueryImpl.execute(Unknown Source) at be.bvar.admin.links.LinksDAO.retrieve(LinksDAO.java:26) at java.lang.reflect.Method.invoke(Native Method) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230) at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:1105) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:190) at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti nuationInterpreter.java:138) at org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(Interprete dFunctionImpl.java:121) at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244) at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.c allFunction(FOM_JavaScriptInterpreter.java:719) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(C allFunctionNode.java:160) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok e(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel ineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe linesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:312) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod e.java:133) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok e(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel ineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe linesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess or.java:312) at org.apache.cocoon.Cocoon.process(Cocoon.java:656) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
Re: woody, flow and database confusion
Joerg Heinicke dijo: Hello Bert, it seems we went exactly the same route this week. Great! I think I takes me 1 or 2 months while understanding how to start all this puzzle and choicing between OJB and Hibernate and why + what if I am wrong and this cannot work at all, also waiting for a more functional Woody and Flow, and a couple of additional things, etc.! :-DD In fact, I am glad to see the path being opened in mid 2003 now is clear and other can use and improve the road. This was the main goal of OJB block and I like to see that it is useful to other people. Share the ideas with the community is great! Maybe we should put together our efforts to get this thing working and to help other people with a wiki page. I will love this! I am sad that I cannot had the time to do this. I need to tell I am newbie in OJB too. Maybe 1 or 2 days ahead in some cases, but this is nothing. Of course we are trying to improve our knowledge and will share it. In short, please write the wiki page and I promise to review it and improve it in case I know a little bit more. I will do it very glad. I only don't have that time til beginning of March because there is still an exam to be passed. So let me write a short mail about my experiences. We have at least our own application running with OJB. We can retrieve lists or single objects from the db and display them with Woody, we can store them back and delete them. We only have still a problem with object identity, I think there is an old bug in JDO implementation in OJB related to indetities. We fight with this problem 2 weeks with no results, then we decided to switch to PB implementation. But let the open door to rewrote the code when JDO will be avaliable. so that storing does indeed create a new object in db, but that's another problem we didn't have a closer look yesterday evening. We started also with OJB/JDO and had bad feelings when we saw that we have to maintain at least two files (package.jdo, repository.xml) to get it working. The reason for it is that JDO and OJB are two different products, OJB provides only a plugin for Sun JDO at the moment, but both must get their configuration. Though it's easy to write a stylesheet that converts one format into the other I tried to use only JDO. While writing the code in Druid, I noted that repository.xml has far more info that the .jdo onces. In fact after querying on the OJB maillist I noted we don't need to put too much info inside the .jdo. AFAIK, the only need info in .jdo is the info that currently druid put on the .jdo files. But JDO is just the API, the SPI must be provided by the database vendor and as there are probably not that much for a specific at the moment, you need OJB. Then we found out that the JDO implementation has a performance problem: Retrieving 20 rows out of 6.000 in a db leads to instantiation of all 6.000 objects, they are filtered by JDO. That's not a problem of OJB, it's just how Sun JDO works. So we were back nearly to the beginning. Hmm.. switching between JDO-(PB|OTM|ODMG) is not too painfull. This in one of the best features of OJB at all. We decided to go on with OJB (as it allows easy switch between different persistence frameworks (JDO, ODMG, OTM, PB)), but used the OTM. This one provides also object level transaction. Now the application itself. I don't love the idea of accessing the persistence layer from the flow/controller layer directly. We access it only from the application layer to have obvious tiers. We have a DAOFactory that returns DAOs (e.g. either JDO or OTM), the implementation of the persistence framework access is abstracted. We choosed to have DAO classes with static methods, that way we don't need to create too many DAO objects. Between Flow and DAO classes fly the Beans. Some of them are BeanList. They are easily passed to the cforms using the framework binding. I am not sure if this is the best approach, but it works. I will be glad if we can comment about what are the pros and the cons of Joerg approach vs. this approach. I am not a Java or OO guru. Comments are very welcome. In theory we can switch to Castor, Hibernate or what else without touching the application layer. Can you explain what is the application layer? I am confused here. Is the application layer the view in the MVC paradigm? Each object specific DAO will provide different methods for retrieving, storing, deleting etc. As the layers below the flow layer are no Avalon components and not in relation to Cocoon, but Plain Old Java we kicked out Cocoon OJB block completely and just use OJB. If this was a good decision we will see. I thought to do this too. In fact the first experiment was using directly OJB in Cocoon: http://wiki.cocoondev.org/Wiki.jsp?page=OJBWithJDO Later, I thought that the best approach was to use a common factory for all the servlet instead of using OJB directly. But it won't be that difficult to switch the
Re: Incomplete image requests
Geoff, yes, the reason I am not using an image/database reader is because of the hibernate middle layer used in the system and wanting to keep the system consistent. In terms of whether I am getting back information, yes I am. If i make a single call for either image then the data is returned to the browser, if I try and make multiple image requests then only one image is returned successfully and then the browser sits there waiting for the next one. many thanks in advance... On 21 Feb 2004, at 22:32, Geoff Howard wrote: beyaNet Consultancy wrote: forgot to attach the the svg file, here it is I just looked quickly at your xsp and before we get any further into this, can you explain why you're not using an image/database reader for this? Is it because of the hibernate support? I don't see any purpose for putting this into svg (as base64 jpeg) just to re-serialize as jpg. I've seen about a million messages go by about this general topic so you may just need to quickly summarize the issue. Assuming you have some need to do it this way though, I'd recommend putting some logging (or just System.out.println which should get spit out in your terminal console) to see what is going on internally. Are you sure you're getting data back in each case fo example? Geoff many thanks in advance On 21 Feb 2004, at 18:36, beyaNet Consultancy wrote: Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg map:generate type=serverpages src=xsp/svg.xsp map:parameter name=imageNum value={2}/ map:parameter name=artistID value={3}/ /map:generate map:serialize type=svg2jpeg/ /map:match The image link is built up in my xsp page as: artists-photo1 xsp:element name=img xsp:attribute name=srcartistImage/1/xsp:exprartistID/xsp:expr.jpg/xsp: attribute /xsp:element /artists-photo1 So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: . snippet . tr td valign=top align=centerxsl:apply-templates select=//artists-photo1//td /tr tr td valign=topxsl:apply-templates select=//artists-photo2//td /tr /table /body /html /xsl:template xsl:template match=artists-photo1 xsl:apply-templates/ /xsl:template xsl:template match=artists-photo2 xsl:apply-templates/ /xsl:template many thanks in advance On 19 Feb 2004, at 12:31, Simon Mieth wrote: On Thu, 19 Feb 2004 12:19:13 + beyaNet Consultancy [EMAIL PROTECTED] wrote: Hi Simon, I think I am coming closer to the answer I have been having with the svg canvas size not changing. If I make a request for the image outside of the iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4 6.jpg), then the image changes according to the sizes I give it. If i try and call the image so that it loads within the iframe, then no matter what values you give the height and width of the svg tag no change to the canvas size takes place. Any ideas? Hi Andrew, maybe you have inside your html-source image width= height= -statements, then the browser scale the image allways to this size. If the image is larger or smaller, the browser scale ever to this size. If so, remove the width= and height= and have allready img src= / and the browser will diplay the size from your image. Best Regards, Simon -- -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]