You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Michel Bergijk <mi...@cmg.nl> on 2002/01/30 09:26:30 UTC

IllegalAccessException & PortletException: questions

Hi all,

Being new in portals, I do not know what to do with the Exceptions
IllegalAccessException & PortletException.

I have looked in the JavaDocs what these exceptions mean, but can not get
any information how to solve this problem. 
PortletException: Occurs when anything unexpected happens when processing a
Portlet. 
IllegalAccessException: Thrown if an application attempts to access or
modify a field, or to call a method that it does not have access to. 

What did I do?
Created a Portlet, with (an excerpt from my) code:
	public ConcreteElement getContent (RunData runData)
	{
		user = new User();
		openWriter(); // Michel: My own brand of logger, it did not
work.
		writer.println ("CompanyList.ConcreteElement: creating
order");
		order = new Order(writer);
		StringElement quote = new StringElement();
		return (new StringElement (getCompanyList () ) );
	}

I compiled this porlet, and copied the resulting class files to 
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\classes

Next I added the following lines to portlets.xreg and local-portlets.xreg:
    <portlet-entry name="CompanyList" hidden="false" 
	type="instance" application="false">
        <meta-info>
            <title>Company list</title>
            <description>Gets the company list from SAP IDES</description>
        </meta-info>
        <classname>CompanyList</classname>
        <media-type ref="html"/>
    </portlet-entry>

This method worked for the normal HelloWorld and HelloUser portlets.

My questions:
1 Does anyone know what I need to do to get information about these
Exceptions?
2 What did I do wrong, given my code snippets?


With regards,

Michel Bergijk
ABAP/4 Engineer
CMG Oost-Nederland B.V.
Division Trade, Transport & Industry
Meander 901
6825 MH Arnhem
PO Box 7015
6801 HA Arnhem
The Netherlands
Mobile	+31 (0)6 53 20 4657
Fax:	+31 (0)26 376 5310
E-mail:	Michel.Bergijk@cmg.nl
Internet:	www.cmg.nl


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


Re: IllegalAccessException & PortletException: questions

Posted by Santiago Gala <sg...@hisitech.com>.
Michel Bergijk wrote:

>Hi all,
>
>Being new in portals, I do not know what to do with the Exceptions
>IllegalAccessException & PortletException.
>
>I have looked in the JavaDocs what these exceptions mean, but can not get
>any information how to solve this problem. 
>PortletException: Occurs when anything unexpected happens when processing a
>Portlet. 
>IllegalAccessException: Thrown if an application attempts to access or
>modify a field, or to call a method that it does not have access to. 
>
>What did I do?
>Created a Portlet, with (an excerpt from my) code:
>	public ConcreteElement getContent (RunData runData)
>	{
>		user = new User();
>		openWriter(); // Michel: My own brand of logger, it did not
>work.
>		writer.println ("CompanyList.ConcreteElement: creating
>order");
>		order = new Order(writer);
>		StringElement quote = new StringElement();
>		return (new StringElement (getCompanyList () ) );
>	}
>
>I compiled this porlet, and copied the resulting class files to 
>C:\Apache\tomcat\webapps\jetspeed\WEB-INF\classes
>
>Next I added the following lines to portlets.xreg and local-portlets.xreg:
>    <portlet-entry name="CompanyList" hidden="false" 
>	type="instance" application="false">
>        <meta-info>
>            <title>Company list</title>
>            <description>Gets the company list from SAP IDES</description>
>        </meta-info>
>        <classname>CompanyList</classname>
>        <media-type ref="html"/>
>    </portlet-entry>
>
>This method worked for the normal HelloWorld and HelloUser portlets.
>
>My questions:
>1 Does anyone know what I need to do to get information about these
>Exceptions?
>2 What did I do wrong, given my code snippets?
>
Which version are you using? cvs? cooked? have you recompiled?

IllegalAccessException can be thrown when you recompile partially and 
some API calls have changed but you don't recompile classes using these 
calls. Try to build clean. PortletException wraps a lot of different 
problems (it could be wrapping the IllegalAccessException).

Show us the logs for context.



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