|
The error stack I got:
Original Exception: java.lang.NullPointerExceptionat org.apache.xml.serializer.ToStream.ensurePrefixIsDeclared(ToStream.java:2675) at org.apache.xml.serializer.ToStream.startElement(ToStream.java:1777) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) at org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:130) at org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:130) at org.apache.cocoon.transformation.AbstractSAXTransformer.startTransformingElement(AbstractSAXTransformer.java:692) at org.apache.cocoon.transformation.SQLTransformer.start(SQLTransformer.java:801) at org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer.java:340) at org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement(SQLTransformer.java:493) at org.apache.cocoon.transformation.SQLTransformer.endTransformingElement(SQLTransformer.java:774) at org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractSAXTransformer.java:358) What I did:
1. I copied the
"mysql-connector-java-3.0.11-stable-bin.jar" to $COCOON_HOME/WEB-INF/lib
2. add the following to the web.xml
<!-- For MySQL Driver:
-->
com.mysql.jdbc.Driver 3. add the following to the cocoon.xconf <jdbc name="YourPoolName">
<pool-controller min="5" max="10"/> <dburl>jdbc:mysql://boss.mylab.org:3306/tbdb?autoReconnect=true</dburl> <user>YourUsername</user> <password>YourPassword</password> </jdbc> in fact I am not quite sure the port number,
database name, user name and password above.
A> the database server doesn't
require an user name or password to use the database, but it dos require an
account to login in to the OS, I don't know how to set the user and
password to the OS ?
B> also, I don't know if the port number
is right? Is it just a random un-used one, or there is a specific port number
for mysql in unix?
C> I am not sure the database name too.
After I login on to the server by ssh, I can type
mysql
use tbdb
and then, I can inquery the table I want,
so is "tbdb" the one I should set after the port
number?
4: here is what I add to the sitemap.xmap
<map:match pattern="allUsers">
<map:generate src="allUsers.xml" /> <map:transform
type="sql">
<map:parameter name="use-connection"
value="YourPoolName" /> <map:parameter name="show-nr-of-rows"
value="true" /> <map:parameter name="clob-encoding"
value="UTF-8" /> </map:transform> <map:serialize type="xml" /> </map:match> 5, here is the allUsers.xml
<?xml version="1.0" ?>
<document>
<execute-query
xmlns="http://apache.org/cocoon/SQL/2.0"> <query name="allUsers">
select uid
from users;
</query> </execute-query> </document>
So I started the server and input the Url, the response is
very very slow(about 5 minutes) and what I got the above error
stack.
Now I totally have no idea why
Thanks for your help and
time! |
- Re: [HELP]Failed to execute pipeline. Antonio Gallardo
- Re: [HELP]Failed to execute pipeline. Joerg Heinicke
- [HELP]Failed to execute pipeline. steval
- RE: [HELP]Failed to execute pipeline. Reinhard Poetz
- [HELP]Failed to execute pipeline. Richard Grant
- RE: [HELP]Failed to execute pipeline. Patrick Dobbs
- [HELP]Failed to execute pipeline. David van Leerdam
- [HELP]Failed to execute pipeline. Gregg Wigen
- Re: [HELP]Failed to execute pipeline. Joerg Heinicke
- [HELP]Failed to execute pipeline. pfennig63-cocoonusers
- [HELP]Failed to execute pipeline. Milkwayboat
- [HELP]Failed to execute pipeline. Khanh Vo
- Re: [HELP]Failed to execute pipeline. John L. Webber
