CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 java.lang.NullPointerException

Print topic Send  topic

Author Message
Juan
Posted: 02/02/2004, 5:48 AM

Hello,

I have a very simple grid showing a list of users and getting the
following message when try to access it:
java.lang.NullPointerException

Any idea? Do you need more information?

Thanks in advance,

Juan
ignat


Posts: 55
Posted: 02/02/2004, 7:25 AM

Juan,

Yes, more information would be helpful. Does your grid have where parameters defined? If yes, what are they? Did you add some custom code? Please provide us with full stack trace of the exception.

Regards,
Ignat.
View profile  Send private message
Juan
Posted: 02/03/2004, 5:13 PM

Hello Ignat,

The sample project is at www.htmlspider.com.br/downloads/sample.zip

No I didn't define where parameters, and I did not add any custom code.
The code is as the generated by the builder. I have just deleted some
unwanted colums from the grid, that should be the cause of the problem.

Thanks for your help.



ignat wrote:

> Juan,
>
> Yes, more information would be helpful. Does your grid have where
> parameters defined? If yes, what are they? Did you add some custom
> code? Please provide us with full stack trace of the exception.
>
> Regards,
> Ignat.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/



--
-----------------------------------------------------------
Juan Jose Velazquez Garcia
Martin
Posted: 02/03/2004, 6:21 PM


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You may check the .xml file that matches your changes. In my
experience when you do changes to the ui this changes are reflected
in the xml file.

Martin.


"Juan" <velazquez@htmlspider.com.br> escribió en el mensaje
news:bvph09$6h8$1@news.codecharge.com...
> Hello Ignat,
>
> The sample project is at www.htmlspider.com.br/downloads/sample.zip
>
> No I didn't define where parameters, and I did not add any custom
> code. The code is as the generated by the builder. I have just
> deleted some unwanted colums from the grid, that should be the
> cause of the problem.
>
> Thanks for your help.
>
>
>
> ignat wrote:
>
> > Juan,
> >
> > Yes, more information would be helpful. Does your grid have
> > where parameters defined? If yes, what are they? Did you add some
> > custom code? Please provide us with full stack trace of the
> > exception.
> >
> > Regards,
> > Ignat.
> > ---------------------------------------
> > Sent from YesSoftware forum
> > http://forums.codecharge.com/
>
>
>
> --
> -----------------------------------------------------------
> Juan Jose Velazquez Garcia

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQCBXLs6OgKg7BNEoEQJiUQCcCcGFxccEVjjGTVZSz9kwtawGL6oAn26M
g+dvciv3CuKsDpEFuszFPwKR
=4S//
-----END PGP SIGNATURE-----

Anton
Posted: 02/04/2004, 12:45 AM

If you have an EditableGrid and use CheckBox then there is a known problem with the MVC data model. A patch from CCS was sent to me and this fixed the problem.
ignat


Posts: 55
Posted: 02/04/2004, 2:41 AM

Juan,

Your usuario_list page worked for me without any NullPointerExcpetion. But I had to replace your SQL:
SELECT NOME, EMAIL, LOGIN, SENHA, NIVEL_ADMINISTRATIVO, NIVEL_CADASTROS, NIVEL_CONTABILIDADE, NIVEL_CONTAS_PAGAR, NIVEL_CONTAS_RECEBER, NIVEL_CONTAS_CORRENTES, NIVEL_ORDEM_TRABALHO, NIVEL_ATIVO_FIXO, NIVEL_FATURAMENTO, NIVEL_PRODUCAO, NIVEL_CONTRATOS, NIVEL_COMPRAS FROM usuario
wiht the new one:
SELECT * FROM usuario
Because NIVEL_ADMINISTRATIVO column doesn't exist in usuario table definition.

Regards,
Ignat.
View profile  Send private message
Juan
Posted: 02/04/2004, 2:49 PM

Hello Martin,

I checked the .xml file and the changes seems ok.


Martin wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> You may check the .xml file that matches your changes. In my
> experience when you do changes to the ui this changes are reflected
> in the xml file.
>

-----------------------------------------------------------
Juan Jose Velazquez Garcia
Juan
Posted: 02/04/2004, 2:50 PM

Hello Anton,

It isn't an editable grid. Thanks for the information.


Anton wrote:

> If you have an EditableGrid and use CheckBox then there is a known
> problem with the MVC data model. A patch from CCS was sent to me and
> this fixed the problem.


--
-----------------------------------------------------------
Juan Jose Velazquez Garcia
Juan
Posted: 02/04/2004, 2:53 PM

Hello Ignat,

The field NIVEL_ADMINISTRATIVO was added later to the table.
Unfortunately it isn't the problem. It is istill not working here.

May be it?s a Tomcat configuration ...

Thanks.


ignat wrote:


> Juan,
>
> Your usuario_list page worked for me without any
> NullPointerExcpetion. But I had to replace your SQL:
SELECT  
> NOME, EMAIL, LOGIN, SENHA, NIVEL_ADMINISTRATIVO, NIVEL_CADASTROS,  
> NIVEL_CONTABILIDADE, NIVEL_CONTAS_PAGAR, NIVEL_CONTAS_RECEBER,  
> NIVEL_CONTAS_CORRENTES, NIVEL_ORDEM_TRABALHO, NIVEL_ATIVO_FIXO,  
> NIVEL_FATURAMENTO, NIVEL_PRODUCAO, NIVEL_CONTRATOS, NIVEL_COMPRAS  
> FROM usuario
wiht the new one:
SELECT * FROM  
> usuario
Because NIVEL_ADMINISTRATIVO column doesn't
> exist in usuario table definition.
>
> Regards,
> Ignat.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/



--
-----------------------------------------------------------
Juan Jose Velazquez Garcia
Juan
Posted: 02/04/2004, 3:03 PM

Trying to run live page within CodeCharge I'm getting the following
error:

HTTP Status 404 - /erp/adm/usuario_list.jsp

type Status report
message /erp/adm/usuario_list.jsp
description The requested resource (/erp/adm/usuario_list.jsp) is not
available.

Apache Tomcat/4.1.27



------------------------------------------------------
Juan José Velazquez Garcia
ignat


Posts: 55
Posted: 02/05/2004, 12:43 AM

Hi Juan!

Quote Juan:
Trying to run live page within CodeCharge I'm getting the following
error:

HTTP Status 404 - /erp/adm/usuario_list.jsp


Of course 404. Why do you publish to "C:\jtech\Tomcat 4.1\webapps\erp\adm" upacked and then expect it appear at http://localhost:8080/erp/adm? usuario_list.jsp is at doc root. So if you configured Tomcat context for that URL should be "http://localhost:8080/your_context/usuario_list.jsp".

To start with, make it simple first. Publish to "C:\jtech\Tomcat 4.1\webapps" as war file and "Server URL" set to "http://localhost:8080/administrador".

Regards,
Ignat.
View profile  Send private message
Anton
Posted: 02/05/2004, 12:51 AM

Build as a non-war distribution and if your error goes back to the line 37 of the AbstractProcessor.java:

param.setValue(((Control)row.get(param.getSourceName())).getValue());

then the problem is with null being returned from param.getSourceName())

This routes back to the CCS IDE version of 'cut and paste of a CCS control' where you cut and paste BETWEEN grids!

It may come as a 'surprise' when, for example, THE SORT COLUMNS have the wrong data field settings. This can be caused by a CCS IDE control 'cut and paste' between two different grids. The NullPointerException may NOT be in the row of data but in the column sort settings!

I find it extremely useful to build as a non-war distribution so that I can trace back through the code in a CCSBuild source sub-directory.

Be careful though as the source file generator pattern used by CCS does NOT produce 100% true and accurate CCS source .java files which marry to .class files found in a war-distribution. This is a known problem. It is however extremely useful to have reference to the .java files - if only to improve one's knowledge of the CCS MVC design pattern.

Rgds

Anton

Quote Juan:
Hello Anton,

It isn't an editable grid. Thanks for the information.


Anton wrote:

> If you have an EditableGrid and use CheckBox then there is a known
> problem with the MVC data model. A patch from CCS was sent to me and
> this fixed the problem.


--
-----------------------------------------------------------
Juan Jose Velazquez Garcia
Anton
Posted: 02/05/2004, 7:08 AM

Quote ignat:
SELECT NOME, EMAIL, LOGIN, SENHA, NIVEL_ADMINISTRATIVO, NIVEL_CADASTROS, NIVEL_CONTABILIDADE, NIVEL_CONTAS_PAGAR, NIVEL_CONTAS_RECEBER, NIVEL_CONTAS_CORRENTES, NIVEL_ORDEM_TRABALHO, NIVEL_ATIVO_FIXO, NIVEL_FATURAMENTO, NIVEL_PRODUCAO, NIVEL_CONTRATOS, NIVEL_COMPRAS FROM usuario
wiht the new one:
SELECT * FROM usuario
Because NIVEL_ADMINISTRATIVO column doesn't exist in usuario table definition.

And also, where is the column for the link's href source parameter USUARIO_ID ?

With no column USUARIO_ID data being pulled from the data file then the link can not function. This is why the 'Select *' works - assuming USUARIO_ID is actually the PK column for the table.

Rgds

Anton
Wake

Posts: 6
Posted: 03/03/2004, 4:30 AM

What kind of ODBC data source do you use ?
System,User или File DSN?
Make sure that there are no data sources with the same name but
of different type.
_________________
Notes on CCS, Joomla, etc.
http://php-builder.org
View profile  Send private message
Danny
Posted: 11/27/2004, 3:28 PM

Can anyone tell why I keep getting this message. How I solve this problem

java.lang.nullpointer exception
at standarddui.setdata (standarddui.java)
at photoalbum.init (photoalbum.java)
at sun.applet.appletpanel.run (unknown source)
at java.lang.threat.run (unknown source)

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.