You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Cedric Picard <C....@kainos.com> on 2002/11/25 19:08:22 UTC

XConfTools reports a NullPointerException

Hi,

Still trying to merge cocoon into our own web application, I seem to be
getting a NullPointerException when running the XConfTools ant task.

Basically, here is the file hierarchy:
webapp\
	- sitemap.xmap (default
generators/transformers/serializers/matchers + mounting of
CMReports\sitemap.xmap - that is, the original sitemap but with only one
pipeline which mounts the sub-sitemap)
	- CMReports\
		- sitemap.xmap
		- documents\CMUsers.xsp
		- stylesheets\CMUsers.xsl
	- *.jsp (our own pages)
	- *.tld
	- src\ (contains all built-in cocoon actions, as well as jsp
actions, helper classes)
	- WEB-INF\
		- web.xml
		- cocoon.xconf
		- logkit.xconf

When invoking XConfTools, I get the following stack trace:
java.lang.NullPointerException
        at XConfToolTask.process(XConfToolTask.java:113)
        at XConfToolTask.execute(XConfToolTask.java:84)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)

And here are the basic targets for the generation of the war file:

	
<!--==================================================================
	// Defines the required jars
	//
================================================================-->
		<path id="webclient.classpath">
			<path refid="local.classpath" />
			<pathelement path="${logkit.classpath}" />
			<pathelement
path="${avalon.framework.classpath}" />
			<pathelement
path="${avalon.excalibur.classpath}" />
			<pathelement path="${resolver.classpath}" />
			<pathelement path="${cocoon.classpath}" />
		</path>

	
<!--==================================================================
	// Create the required build folders
	//
================================================================-->
	<target name="prepare-webapp" depends="config">
		<mkdir dir="${webclient.classes.dir}" />
		<mkdir dir="${war.dir}" />
	</target>

	
<!--==================================================================
	// XConf the sitemap.map and cocoon.xconf & Compile the required
classes
	//
================================================================-->
	<target name="classesWWC" depends="prepare-webapp,
checkDependencies, classesCore, classesDMS, classesWorkflow,
 						     classesLocale,
classesUtils" unless="wwc.skip">
		<taskdef name="xconf-tool" classname="XConfToolTask"
classpath="${anttask.dir}" />
		<xconf-tool directory="${webclient.classes.dir}"
	                    extension="xmap"
	
configuration="${webclient.root}/sitemap.xmap" />
		<xconf-tool directory="${webclient.classes.dir}"
	                    extension="xmap"
	
configuration="${webclient.root}/sitemap.xmap" />
		<xconf-tool directory="${webclient.classes.dir}"
	                    extension="xconf"
	
configuration="${webclient.root}/cocoon.xconf" />
		<javac destdir="${webclient.classes.dir}"
nowarn="${build.compiler.noWarnings}"
		    deprecation="${build.compiler.deprecationInfo}"
debug="${build.compiler.debug}"
		    optimize="${build.compiler.optimize}">
			<classpath refid="webclient.classpath" />
			<src refid="wwc.src.path" />
			<patternset refid="wwc.src" />
		</javac>
	</target>

	
<!--==================================================================
	// Create the WAR file for the Web Client
	//
================================================================-->
	<target name="warWWC" depends="classesWWC"
	    unless="wwc.skip">
		<war jarfile="${workflow.webclient}"
webxml="${wwc.web-inf.dir}/web.xml">
		    <classes dir="${webclient.classes.dir}">
				<patternset refid="wwc.classes" />
		    </classes>
		    <fileset dir="${webclient.root}" >
		    		<patternset refid="wwc.additional.files"
/>
		    </fileset>	   
		</war>
	</target>

Any idea what seems to be missing/incorrect?

Regards,
Cedric Picard,
Software Engineer
Kainos Software Ltd.



--

This e-mail is confidential and is intended for the named recipient only. If
you receive it in error please destroy the message and all copies. Kainos
Software Ltd. does not accept liability for damage sustained as a result of
malicious software (e.g. viruses). Kainos does not accept liability for, or
permit, the creation of contracts on its behalf by e-mail, the publication of
any defamatory statement by its employees by e-mail, or changes subsequently
made to the original message. The Company's registered office is located at
4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland, Tel +44 28 9057 1100.

Re: gif

Posted by Joerg Heinicke <jo...@gmx.de>.
Carlos Marcelo Santos wrote:
> Hi Joerg:
> Do you mean that I must use the following:
> fo:external-graphic
> src="http://localhost:8080/cocoon/mount/html-pdf/1.jpg"/>

No, but with "file:///path/to/the/image.jpg".

> I probe it without results.
> Where are the log files?

%Tomcat%/webapps/cocoon/WEB-INF/logs/*.log

Joerg


> ----- Original Message -----
> From: "Joerg Heinicke" <jo...@gmx.de>
> 
>>Hi Carlos,
>>
>>have a look into the log files. I guess you will find hints, that the
>>path to the image is resolved not in the way you want it. If this is
>>true, the base path is missing I don't want to tell something wrong,
>>because I don't know exactly, but I think in Cocoon you can only work
>>with absolute paths.
>>
>>Joerg
>>
>>Carlos Marcelo Santos wrote:
>>
>>>I use the following lines
>>>
>>>
>>>            <fo:page-sequence master-reference="all">
>>>                <fo:static-content flow-name="xsl-region-before">
>>>                    <fo:block><fo:external-graphic src="1.jpg"
>>>content-height="100%" content-width="100%"/></fo:block>
>>>                </fo:static-content>
>>>                ...
>>>                ...
>>>                ...
>>>                ...
>>>                ...
>>>
>>>I had intented with jpg and gif too.
>>>The output in pdf is ok, but I can't see any image.
>>>What do I wrong?
>>>Are there some component that I must install to see it?
>>>
>>>Thanks.
>>>
>>>Carlos Marcelo Santos.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Re: gif

Posted by Carlos Marcelo Santos <cs...@3pilares.com>.
Hi Joerg:
Do you mean that I must use the following:
fo:external-graphic
src="http://localhost:8080/cocoon/mount/html-pdf/1.jpg"/>
I probe it without results.
Where are the log files?

Thanks Joerg.

Carlos Marcelo Santos.

----- Original Message -----
From: "Joerg Heinicke" <jo...@gmx.de>
To: <co...@xml.apache.org>
Sent: Monday, November 25, 2002 8:00 PM
Subject: Re: gif


> Hi Carlos,
>
> have a look into the log files. I guess you will find hints, that the
> path to the image is resolved not in the way you want it. If this is
> true, the base path is missing I don't want to tell something wrong,
> because I don't know exactly, but I think in Cocoon you can only work
> with absolute paths.
>
> Joerg
>
> Carlos Marcelo Santos wrote:
> > I use the following lines
> >
> >
> >             <fo:page-sequence master-reference="all">
> >                 <fo:static-content flow-name="xsl-region-before">
> >                     <fo:block><fo:external-graphic src="1.jpg"
> > content-height="100%" content-width="100%"/></fo:block>
> >                 </fo:static-content>
> >                 ...
> >                 ...
> >                 ...
> >                 ...
> >                 ...
> >
> > I had intented with jpg and gif too.
> > The output in pdf is ok, but I can't see any image.
> > What do I wrong?
> > Are there some component that I must install to see it?
> >
> > Thanks.
> >
> > Carlos Marcelo Santos.
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Re: gif

Posted by Joerg Heinicke <jo...@gmx.de>.
Hi Carlos,

have a look into the log files. I guess you will find hints, that the 
path to the image is resolved not in the way you want it. If this is 
true, the base path is missing I don't want to tell something wrong, 
because I don't know exactly, but I think in Cocoon you can only work 
with absolute paths.

Joerg

Carlos Marcelo Santos wrote:
> I use the following lines
>  
>  
>             <fo:page-sequence master-reference="all">
>                 <fo:static-content flow-name="xsl-region-before">
>                     <fo:block><fo:external-graphic src="1.jpg" 
> content-height="100%" content-width="100%"/></fo:block>
>                 </fo:static-content>
>                 ...
>                 ...
>                 ...
>                 ...
>                 ...
>  
> I had intented with jpg and gif too.
> The output in pdf is ok, but I can't see any image.
> What do I wrong?
> Are there some component that I must install to see it?
>  
> Thanks.
>  
> Carlos Marcelo Santos.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


gif

Posted by Carlos Marcelo Santos <cs...@3pilares.com>.
XConfTools reports a NullPointerExceptionI use the following lines


            <fo:page-sequence master-reference="all">
                <fo:static-content flow-name="xsl-region-before">
                    <fo:block><fo:external-graphic src="1.jpg" content-height="100%" content-width="100%"/></fo:block>
                </fo:static-content>
                ...
                ...
                ...
                ...
                ...

I had intented with jpg and gif too.
The output in pdf is ok, but I can't see any image.
What do I wrong?
Are there some component that I must install to see it?

Thanks.

Carlos Marcelo Santos.