cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Action Database Problem
Date Thu, 31 Aug 2006 11:01:27 GMT

> Hi,
> 
> your class AmeliSelect extends javax.swing.AbstractAction
> Try extending from org.apache.cocoon.acting.AbstractAction .

Beside this possible solution, you are heading for problems in my opinion. I strongly advice
not to use actions for database persistence. You will end up with an enormeous amount of unmanageable
code. Use flow and a jdo implementation. look for brickscms for a hands on example,

Regards Ard

> 
> Maybe this will solve your problem.
> 
> Ralph
> 
> rachid harradi wrote:
> > Hello,
> > 
> > my AmeliSele "class" is:
> > 
> > 
> > package dbmanager;
> > 
> > import java.awt.Component;
> > import java.awt.event.ActionEvent;
> > import java.sql.Connection;
> > import java.sql.PreparedStatement;
> > import java.sql.ResultSet;
> > import java.sql.ResultSetMetaData;
> > import java.sql.SQLException;
> > import java.sql.Statement;
> > import java.sql.Time;
> > import java.sql.Timestamp;
> > import java.sql.Types;
> > import java.util.ArrayList;
> > import java.util.HashMap;
> > import java.util.Iterator;
> > import java.util.List;
> > import java.util.Map;
> > 
> > import javax.swing.AbstractAction;
> > 
> > import org.apache.avalon.excalibur.datasource.DataSourceComponent;
> > import org.apache.avalon.framework.activity.Disposable;
> > import org.apache.avalon.framework.component.ComponentManager;
> > import org.apache.avalon.framework.component.ComponentSelector;
> > import org.apache.avalon.framework.component.Composable;
> > import org.apache.avalon.framework.configuration.Configuration;
> > import 
> org.apache.avalon.framework.configuration.ConfigurationException;
> > import org.apache.avalon.framework.parameters.Parameters;
> > import org.apache.avalon.framework.service.ServiceException;
> > import org.apache.avalon.framework.service.ServiceManager;
> > import org.apache.avalon.framework.thread.ThreadSafe;
> > import org.apache.cocoon.Constants;
> > import org.apache.cocoon.ProcessingException;
> > import org.apache.cocoon.acting.AbstractDatabaseAction;
> > 
> > import org.apache.cocoon.environment.ObjectModelHelper;
> > import org.apache.cocoon.environment.Redirector;
> > import org.apache.cocoon.environment.Request;
> > import org.apache.cocoon.environment.SourceResolver;
> > import org.apache.commons.lang.StringUtils;
> > import org.xml.sax.InputSource;
> > 
> > import cuba.ComponentException;
> > 
> > public class AmeliSelect extends AbstractAction implements 
> ThreadSafe, Composable, Disposable {
> > 
> > 	// private static final Map selectStatements = new HashMap();
> > 	// private DBManager dbm = null;
> > 	// private ServiceManager manager = null;
> > 	// private InputSource inputSource = null;
> > 	// DataSourceComponent datasource = null;
> > 	protected ComponentSelector dbselector;
> > 
> > 	protected ComponentManager manager;
> > 	private static HashMap mappers = null;
> > 
> > 	// public void service(ServiceManager serviceManager) throws
> > 	// ServiceException {
> > 	// System.out.println("[User.java | service] beginn");
> > 	// this.manager = serviceManager;
> > 	//
> > 	// }
> > 	public void compose(ComponentManager manager) throws 
> org.apache.avalon.framework.component.ComponentException {
> > 		// TODO Auto-generated method stub
> > 		this.dbselector = (ComponentSelector) manager
> > 		.lookup(DataSourceComponent.ROLE + "Selector");
> > 	}
> > 
> > 
> > //	public void compose()
> > //			throws 
> org.apache.avalon.framework.component.ComponentException {
> > //		this.dbselector = (ComponentSelector) manager
> > //				
> .lookup(DataSourceComponent.ROLE + "Selector");
> > //	}
> > 
> > 	protected final DataSourceComponent getDataSource(String pool)
> > 			throws 
> org.apache.avalon.framework.component.ComponentException {
> > 		return (DataSourceComponent) 
> this.dbselector.select(pool);
> > 	}
> > 
> > 	public Map act(Redirector redirector, SourceResolver resolver,
> > 			Map objectModel, String source, 
> Parameters param) throws Exception {
> > 		// DataSourceComponent datasource = null;
> > 		// Connection conn = null;
> > 		// int currentIndex = 0;
> > 		//
> > 		// // read global parameter settings
> > 		// boolean reloadable = 
> Constants.DESCRIPTOR_RELOADABLE_DEFAULT;
> > 		// if (this.settings.containsKey("reloadable"))
> > 		// reloadable = Boolean.valueOf((String)
> > 		// this.settings.get("reloadable")).booleanValue();
> > 		// // read local parameter settings
> > 		// try {
> > 		// Configuration conf =
> > 		// 
> this.getConfiguration(param.getParameter("descriptor", (String)
> > 		// this.settings.get("descriptor")),
> > 		// resolver,
> > 		// 
> param.getParameterAsBoolean("reloadable",reloadable));
> > 		//
> > 		// Request request = 
> ObjectModelHelper.getRequest(objectModel);
> > 		//
> > 		// Configuration[] keys =
> > 		// 
> conf.getChild("table").getChild("keys").getChildren("key");
> > 		// Configuration[] values =
> > 		// 
> conf.getChild("table").getChild("values").getChildren("value");
> > 		//
> > 		// PreparedStatement statement = null;
> > 		// ResultSet rset = null;
> > 		// boolean result = false;
> > 		//
> > 		// for (int i = 0; i < keys.length; i++) {
> > 		// final String parameter = 
> keys[i].getAttribute("param");
> > 		// Object value = request.getParameter(parameter);
> > 		// if (StringUtils.isEmpty((String)value)) {
> > 		// if (statement == null) {
> > 		// final String query = this.getSelectQuery(conf);
> > 		// System.out.println("[User.java | User] pre");
> > 		// this.dbm = (DBManager) 
> this.manager.lookup(DBManager.ROLE);
> > 		// System.out.println("[User.java | User] middle");
> > 		// datasource = this.dbm.getDsc();
> > 		// conn = datasource.getConnection();
> > 		//	                     
> > 		// statement = conn.prepareStatement(query);
> > 		// currentIndex = 1;
> > 		// for (int j = 0; j < keys.length; j++, 
> currentIndex++) {
> > 		// this.setColumn(statement, currentIndex, 
> request, keys[j]);
> > 		// }
> > 		// rset = statement.executeQuery();
> > 		// result = rset.next();
> > 		// }
> > 		// if (result) {
> > 		// value = this.getColumn(rset, request, keys[i]);
> > 		// }
> > 		// }
> > 		// if (value != null) {
> > 		// request.setAttribute(parameter, value.toString());
> > 		// }
> > 		// }
> > 		//
> > 		// for (int i = 0; i < values.length; i++) {
> > 		// final String parameter = 
> values[i].getAttribute("param");
> > 		// Object value = request.getParameter(parameter);
> > 		// if (StringUtils.isEmpty((String)value)) {
> > 		// if (statement == null) {
> > 		// final String query = this.getSelectQuery(conf);
> > 		// datasource = this.getDataSource(conf);
> > 		// conn = datasource.getConnection();
> > 		// statement = conn.prepareStatement(query);
> > 		// currentIndex = 1;
> > 		// for (int j = 0; j < keys.length; j++, 
> currentIndex++) {
> > 		// this.setColumn(statement, currentIndex, 
> request, keys[j]);
> > 		// }
> > 		// rset = statement.executeQuery();
> > 		// result = rset.next();
> > 		// }
> > 		// if (result) {
> > 		// value = this.getColumn(rset, request, values[i]);
> > 		// }
> > 		// }
> > 		// if (value != null) {
> > 		// request.setAttribute(parameter, value.toString());
> > 		// }
> > 		// }
> > 		// if(statement != null) {
> > 		// statement.close();
> > 		// }
> > 		// return EMPTY_MAP;
> > 		// } catch (Exception e) {
> > 		// throw new ProcessingException("Could not 
> prepare statement :position
> > 		// = " + currentIndex, e);
> > 		// } finally {
> > 		// if (conn != null) {
> > 		// try {
> > 		// conn.close();
> > 		// } catch (SQLException sqe) {
> > 		// getLogger().warn("There was an error closing 
> the datasource", sqe);
> > 		// }
> > 		// }
> > 		// if (datasource != null) {
> > 		// this.dbselector.release(datasource);
> > 		// }
> > 		// }
> > 		//
> > 		// // Result is empty map or exception. No null.
> > 		String query = " select ID_Entity AS ID_Entity, 
> ID_Field AS ID_Field, DataType AS DataType, Caption AS 
> Caption , Mask AS Mask, DefaultValue AS DefaultValue, 
> Mandatory AS Mandatory, ValueCheck AS ValueCheck , Enabled AS 
> Enabled, Visible AS Visible, Range_Lower AS Range_Lower, 
> Range_Upper AS Range_Upper , ValueCheck AS ValueCheck, Size 
> AS Size , Icon AS Icon, Language AS Language FROM Field_Descriptions";
> > 
> > 		// AmeliSelect.selectStatements.put(conf, query);
> > 
> > 		Request request = 
> ObjectModelHelper.getRequest(objectModel);
> > 		Map map = new HashMap();
> > 		DataSourceComponent dataSource = 
> getDataSource("ameli_para_dev_datasource");
> > 		Connection connection = null;
> > 		try {
> > 			connection = dataSource.getConnection();
> > 			Statement statement = 
> connection.createStatement();
> > 			String cmd = query;
> > 
> > 			ResultSet rs = statement.executeQuery(cmd);
> > 			List list = constructResultFromResultSet(rs);
> > 			Iterator iterator = list.iterator();
> > //			Converter.
> > 			map.putAll((Map) list);
> > 			statement.close();
> > 
> > 		} catch (Exception e) {
> > 			// TODO: handle exception
> > //			getLogger().error("Query failed: ", e);
> > 		} finally {
> > 			try {
> > 				if (connection != null) {
> > 					connection.close();
> > 				}
> > 			} catch (SQLException sqe) {
> > 				// TODO: handle exception
> > //				getLogger().error("Error 
> closing the datasource", sqe);
> > 			}
> > 
> > 		}
> > 
> > 		return (map);
> > 	}
> > 
> > 	public void dispose() {
> > 		this.manager.release(dbselector);
> > 	}
> > 
> > 	protected String getSelectQuery(Configuration conf)
> > 			throws ConfigurationException {
> > 		String query = null;
> > 
> > 		// synchronized (AmeliSelect.selectStatements) {
> > 		// query = 
> (String)AmeliSelect.selectStatements.get(conf);
> > 
> > 		// if (query == null) {
> > 		// Configuration table = conf.getChild("table");
> > 		// Configuration[] keys = 
> table.getChild("keys").getChildren("key");
> > 		// Configuration[] values =
> > 		// table.getChild("values").getChildren("value");
> > 		//
> > 		// StringBuffer queryBuffer = new 
> StringBuffer("SELECT ");
> > 		// queryBuffer.append(buildList(keys, 0));
> > 		// queryBuffer.append(buildList(values, keys.length));
> > 		// queryBuffer.append(" FROM ");
> > 		// queryBuffer.append(table.getAttribute("name"));
> > 		//
> > 		// queryBuffer.append(" WHERE ");
> > 		// queryBuffer.append(buildList(keys, " AND "));
> > 		// query = queryBuffer.toString();
> > 		query = " select ID_Entity AS ID_Entity, 
> ID_Field AS ID_Field, DataType AS DataType, Caption AS 
> Caption , Mask AS Mask, DefaultValue AS DefaultValue, 
> Mandatory AS Mandatory, ValueCheck AS ValueCheck , Enabled AS 
> Enabled, Visible AS Visible, Range_Lower AS Range_Lower, 
> Range_Upper AS Range_Upper , ValueCheck AS ValueCheck, Size 
> AS Size , Icon AS Icon, Language AS Language FROM Field_Descriptions";
> > 
> > 		// AmeliSelect.selectStatements.put(conf, query);
> > 		// }
> > 		// }
> > 		// // return query;
> > 		return null;
> > 	}
> > 
> > 	protected List constructResultFromResultSet(ResultSet rs)
> > 			throws SQLException {
> > 		ResultSetMetaData md = rs.getMetaData();
> > 		int columnCount = md.getColumnCount();
> > 		List results = new ArrayList();
> > 		// save information in first row
> > 		HashMap propInfo = new HashMap();
> > 		for (int i = 0; i < columnCount; i++) {
> > 			String columnName = md.getColumnName(i + 1);
> > 			propInfo.put("column" + i, columnName);
> > 		}
> > 		Persistable pInfo = getNewPersistable();
> > 		pInfo.setProperties(propInfo);
> > 		results.add(pInfo);
> > 		// get data from rs start from pos 1
> > 		while ((rs != null) && (rs.next())) {
> > 			HashMap props = new HashMap();
> > 			for (int i = 0; i < columnCount; i++) {
> > 				String columnName = 
> md.getColumnName(i + 1);
> > 				int type = md.getColumnType(i + 1);
> > 				Object o = getValue(rs, type, i + 1);
> > //				if (debugSQL())
> > //					
> System.err.println(columnName + " = " + o);
> > 				if (o != null) {
> > 					props.put(columnName, o);
> > 				} else {
> > 					// 
> props.put(columnName, "<null>");
> > 				}
> > 			}
> > 			Persistable p = getNewPersistable();
> > 			// if (debugSQL())
> > 			// System.err.println("Setting 
> properties with: " + props);
> > //			logger.debug("Setting properties with: 
> " + props);
> > 			p.setProperties(props);
> > 			results.add(p);
> > 		}
> > 		return results;
> > 	}
> > 	protected Persistable getNewPersistable() {
> > 		return new DefaultPersistable();
> > 	}
> > 	protected Object getValue(ResultSet rs, int type, int index) {
> > 		// if (debugSQL())
> > 		// System.err.println("COLUMN TYPE = " + type);
> > 		// logger.debug("COLUMN TYPE = " + type);
> > 
> > 		try {
> > 		  
> > 		  // handle the mysql TINYINT to Boolean Type
> > 		  	if ((rs.toString().indexOf("mysql") > 
> 0) && (type == Types.TINYINT)) 
> > 		  	  {
> > 		  	    // type for TinyBoolean in mysql !! 
> not standard
> > 		  	  	type = -1111;
> > 		  	  }
> > 		  	
> > 		  	if ((rs.toString().indexOf("microsoft") 
> > 0) && (type == Types.FLOAT)) 
> > 		  	  {
> > 		  	    // type for Float in sqlserver !! 
> not standard
> > 		  	  	type = Types.DOUBLE;
> > //				System.out.println("type " + 
> type);		  	  	
> > 		  	  }
> > 		  	
> > 			Mapper m = getMapper(new Integer(type));
> > 			if (m != null) {
> > 				return m.getValue(rs, index);
> > 			}
> > 		} catch (Exception x) {
> > 			// NULL values in the database cause 
> most of the Mapper classes to
> > 			// fail
> > 			// a NULL value will result in the 
> absence of this property from the
> > 			// result.
> > 			// if (debugSQL())
> > 			// System.err.println(
> > 			// "Warning: Unknown column type or 
> NULL value for column " +
> > 			// index);
> > //			logger.fatal(
> > //					"Warning: Unknown 
> column type or NULL value for column "
> > //							+ index, x);
> > 		}
> > 		return null;
> > 	}
> > 	
> > 	protected Mapper getMapper(Object key) {
> > 		if (mappers == null) {
> > 			mappers = new HashMap();
> > 			registerMapper(Byte.class, 
> Types.TINYINT, new ByteMapper());
> > 			DateMapper dm = new DateMapper();
> > 			registerMapper(java.util.Date.class, 
> Types.DATE, dm);
> > 			// always convert sql Dates to util 
> Dates from ResultSets
> > 			registerMapper(java.sql.Date.class, 0, dm);
> > 			registerMapper(Double.class, 
> Types.DOUBLE, new DoubleMapper());
> > 			registerMapper(Float.class, 
> Types.FLOAT, new FloatMapper());
> > 			registerMapper(Integer.class, 
> Types.INTEGER, new IntMapper());
> > 			
> registerMapper(java.math.BigDecimal.class, Types.NUMERIC,
> > 					new NumericMapper());
> > 			registerMapper(Long.class, 
> Types.BIGINT, new LongMapper());
> > 			registerMapper(Short.class, 
> Types.SMALLINT, new ShortMapper());
> > 			StringMapper strm = new StringMapper();
> > 			registerMapper(String.class, 
> Types.VARCHAR, strm);
> > 			// mySQL return VARCHAR as CHAR
> > 			registerMapper(String.class, Types.CHAR, strm);
> > 			registerMapper(null, Types.LONGVARCHAR, strm);
> > 			registerMapper(Time.class, Types.TIME, 
> new TimeMapper());
> > 			registerMapper(Timestamp.class, Types.TIMESTAMP,
> > 					new TimestampMapper());
> > 			// assume blob as string
> > 			// mySQL return blob as LONGVARBINARY
> > 			registerMapper(String.class, Types.BLOB, strm);
> > 			registerMapper(String.class, 
> Types.LONGVARBINARY, strm);
> > 			// mySQL return tinyint as Boolean
> > 			registerMapper(Boolean.class, -1111, 
> new TinyBooleanMapper());
> > 			// SQLServer return value
> > 			registerMapper(Boolean.class, 
> Types.BIT, new BooleanMapper());
> > 		}
> > 		return (Mapper) mappers.get(key);
> > 	}
> > 	
> > 	public static void registerMapper(Class valueType, int sqlType,
> > 			Mapper aMapper) {
> > 		if (valueType != null)
> > 			mappers.put(valueType, aMapper);
> > 		if (sqlType != 0)
> > 			mappers.put(new Integer(sqlType), aMapper);
> > 	}
> > 
> > 	
> > 
> > 	public void actionPerformed(ActionEvent arg0) {
> > 		// TODO Auto-generated method stub
> > 		
> > 	}
> > }
> > 
> > 
> > and my sitemap is:
> > 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> > 
> > <map:components>
> >  	<map:actions>
> >          <map:action name="select" logger="sitemap.action.select" 
> >          	src="dbmanager.AmeliSelect"/>
> >       </map:actions>
> > </map:components>
> > 
> > <map:pipelines >
> >    <map:pipeline>
> >      <map:match pattern="/select">
> >       	<map:act type="select">
> >       		<!--map:generate type="file" 
> src="content/ObjectionHTML.xml"/>
> >       		<map:transform 
> src="stylesheets/objection04.xslt"/-->
> >       		<map:serialize type="html" />
> >       	</map:act>
> >      </map:match>
> >    </map:pipeline>
> > </map:pipelines>
> > 
> > </map:sitemap>
> > 
> > by http://localhost:8080/cocoon/amelidb/select i get Error:
> > 
> > 
> > An error has occured
> > java.lang.ClassCastException: $Proxy22
> > 
> > Cocoon stacktrace[hide] 
> > 
> > Error while creating node 'act' at 
> file:/E:/workspace3/cocoon-2.1.9/build/webapp/amelidb/sitemap.
> xmap:14:31 
> file:/E:/workspace3/cocoon-2.1.9/build/webapp/amelidb/sitemap.
> xmap - 14:31  
> > 
> > Failed to load sitemap from 
> file:/E:/workspace3/cocoon-2.1.9/build/webapp/amelidb/sitemap.
> xmap 
> file:/E:/workspace3/cocoon-2.1.9/build/webapp/amelidb/sitemap.
> xmap - 14:31 [ConfigurationException] 
> > file:/E:/workspace3/cocoon-2.1.9/build/webapp/sitemap.xmap 
> - 947:66 <map:mount> 
> > 
> > 
> > Java stacktrace[show] 
> > 
> > java.lang.ClassCastException: $Proxy22
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode
> .compose(ActTypeNode.java:80)
> > 	at 
> org.apache.cocoon.components.LifecycleHelper.setupComponent(Li
> fecycleHelper.java:359)
> > 	at 
> org.apache.cocoon.components.LifecycleHelper.setupComponent(Li
> fecycleHelper.java:195)
> > 	at 
> org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.
> setupNode(DefaultTreeBuilder.java:455)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.ActNodeBuil
> der.buildNode(ActNodeBuilder.java:69)
> > 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNodeBuilder.buildChildNodesList(AbstractParentProcessingN
> odeBuilder.java:121)
> > 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNodeBuilder.buildChildNodes(AbstractParentProcessingNodeB
> uilder.java:136)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNodeBu
> ilder.buildNode(MatchNodeBuilder.java:77)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> eBuilder.buildNode(PipelineNodeBuilder.java:110)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> deBuilder.buildNode(PipelinesNodeBuilder.java:63)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.SitemapNode
> Builder.buildNode(SitemapNodeBuilder.java:70)
> > 	at 
> org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.
> createTree(DefaultTreeBuilder.java:334)
> > 	at 
> org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.
> build(DefaultTreeBuilder.java:407)
> > 	at 
> org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.
> build(DefaultTreeBuilder.java:369)
> > 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.build
> ConcreteProcessor(TreeProcessor.java:339)
> > 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.setup
> ConcreteProcessor(TreeProcessor.java:304)
> > 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreeProcessor.java:250)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.i
> nvoke(MountNode.java:117)
> > 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:46)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableM
> atchNode.invoke(PreparableMatchNode.java:130)
> > 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:68)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(PipelineNode.java:142)
> > 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:68)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(PipelinesNode.java:92)
> > 	at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:234)
> > 	at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:176)
> > 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreeProcessor.java:252)
> > 	at org.apache.cocoon.Cocoon.process(Cocoon.java:686)
> > 	at 
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
> java:1153)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > 	at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:252)
> > 	at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173)
> > 	at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:213)
> > 	at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:178)
> > 	at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126)
> > 	at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105)
> > 	at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:107)
> > 	at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> ter.java:148)
> > 	at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:869)
> > 	at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHa
> ndler.processConnection(Http11BaseProtocol.java:664)
> > 	at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> cpEndpoint.java:527)
> > 	at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> aderFollowerWorkerThread.java:80)
> > 	at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684)
> > 	at java.lang.Thread.run(Unknown Source)
> > 
> > Java full stacktrace[show] 
> > 
> > org.apache.cocoon.ProcessingException: Failed to load 
> sitemap from 
> file:/E:/workspace3/cocoon-2.1.9/build/webapp/amelidb/sitemap.xmap
> > 	at [ConfigurationException] - 
> file:/E:/workspace3/cocoon-2.1.9/build/webapp/amelidb/sitemap.
> xmap:14:31
> > 	at <map:mount> - 
> file:/E:/workspace3/cocoon-2.1.9/build/webapp/sitemap.xmap:947:66
> > 	at 
> org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.
> build(DefaultTreeBuilder.java:373)
> > 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.build
> ConcreteProcessor(TreeProcessor.java:339)
> > 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.setup
> ConcreteProcessor(TreeProcessor.java:304)
> > 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreeProcessor.java:250)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.i
> nvoke(MountNode.java:117)
> > 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:46)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableM
> atchNode.invoke(PreparableMatchNode.java:130)
> > 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:68)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(PipelineNode.java:142)
> > 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:68)
> > 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(PipelinesNode.java:92)
> > 	at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:234)
> > 	at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:176)
> > 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreeProcessor.java:252)
> > 	at org.apache.cocoon.Cocoon.process(Cocoon.java:686)
> > 	at 
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
> java:1153)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > 	at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:252)
> > 	at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173)
> > 	at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:213)
> > 	at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:178)
> > 	at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126)
> > 	at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105)
> > 	at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:107)
> > 	at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> ter.java:148)
> > 	at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:869)
> > 	at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHa
> ndler.processConnection(Http11BaseProtocol.java:664)
> > 	at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> cpEndpoint.java:527)
> > 	at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> aderFollowerWorkerThread.java:80)
> > 	at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684)
> > 	at java.lang.Thread.run(Unknown Source)
> > Caused by: 
> org.apache.avalon.framework.configuration.ConfigurationExcepti
> on: Error while creating node 'act' at 
file:/E:/workspace3/cocoon-2.1.9/build/webapp/amelidb/sitemap.xmap:14:31
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodesList(AbstractParentProcessingNodeBuilder.java:128)
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodes(AbstractParentProcessingNodeBuilder.java:136)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNodeBuilder.buildNode(MatchNodeBuilder.java:77)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNodeBuilder.buildNode(PipelineNodeBuilder.java:110)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNodeBuilder.buildNode(PipelinesNodeBuilder.java:63)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.SitemapNodeBuilder.buildNode(SitemapNodeBuilder.java:70)
> 	at org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.createTree(DefaultTreeBuilder.java:334)
> 	at org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:407)
> 	at org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:369)
> 	... 30 more
> Caused by: java.lang.ClassCastException: $Proxy22
> 	at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.compose(ActTypeNode.java:80)
> 	at org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:359)
> 	at org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:195)
> 	at org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.setupNode(DefaultTreeBuilder.java:455)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.ActNodeBuilder.buildNode(ActNodeBuilder.java:69)
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodesList(AbstractParentProcessingNodeBuilder.java:121)
> 	... 38 more
> 
> The Apache Cocoon Project 
> 
> i need your help!!!!
> 

-- 
F&F Computer Anwendungen        Tel: +49 89 51727-312
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195                 Mail: r.seidl@ff-muenchen.de
D-80686 Muenchen                http://www.ff-muenchen.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message