NB60, DataProvider, NullPointerException

View: New views
4 Messages — Rating Filter:   Alert me  

NB60, DataProvider, NullPointerException

by HJ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello together,

i have the following configuration:

- NetBeans 6.0
- Glassfish V2 from the NetBeans Installer
- Oracle jdbc driver ojdbc14.jar
- Windows XP

I imported a Visual Web JSF Project developed under 5.5.1 and deployed to a former Glassfish V2 installation, into the NB 6.0 IDE.
After fixing some imports, compilation and deployment against the new Glassfish installation (with jdbc and OraclePool configurations) was successfully.
Running the application throws a NullPointerException at the following code-line (in bold):
  try
                    {
                        s_Bean.read_Data("SELECT PERSNR, SNAME, FIRMA, KOSTL from V_PERSONAL01 WHERE DBUSER=" + "'" + s_Bean.getDBUSER() + "'");
                        t_personalDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.t_RowSet}"));
                        s_Bean.setT_RowSet(null);
                        s_Bean.setPERSNR((String) (t_personalDataProvider.getValue("PERSNR")));

The code worked well in 5.5.1 and the former Glassfish V2 installation, the rowset is filled and i can see the field values of the table in the debugger. I am using SQL-Statements for reading database informations together with TopLink persistence for CRUD Operations.

The error message is:
java.lang.NullPointerException
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1820)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1087)
and also in the log-file:
[#|2007-12-06T13:28:10.242+0100|SEVERE|sun-appserver9.1|org.apache.catalina.core.ContainerBase|_ThreadID=21;_ThreadName=RMI TCP Connection(19)-127.0.0.1;_RequestID=c4063d2c-ac62-48c8-b9e0-6257d71c3f37;|PWC1415: Error stopping container StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[/EmployeeCare]
java.lang.NoClassDefFoundError: java/sql/RowId
        at java.lang.Class.getDeclaredMethods0(Native Method)

Is there any help around ?

Thanks a lot

HJ



Re: NB60, DataProvider, NullPointerException

by John Baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I don't see how the project could get in this state, but
it appears a library is missing from your project.

Either reply her, with a list of the libraries in your project
or
create a new visual web project with a rowset (drag and drop a database table to the designer page)
and compare the libraries created in this new project with the project that has the error.
If there are any libraries missing, you might try adding by hand.

John

HJ wrote:
Hello together,

i have the following configuration:

- NetBeans 6.0
- Glassfish V2 from the NetBeans Installer
- Oracle jdbc driver ojdbc14.jar
- Windows XP

I imported a Visual Web JSF Project developed under 5.5.1 and deployed to a former Glassfish V2 installation, into the NB 6.0 IDE.
After fixing some imports, compilation and deployment against the new Glassfish installation (with jdbc and OraclePool configurations) was successfully.
Running the application throws a NullPointerException at the following code-line (in bold):
  try
                    {
                        s_Bean.read_Data("SELECT PERSNR, SNAME, FIRMA, KOSTL from V_PERSONAL01 WHERE DBUSER=" + "'" + s_Bean.getDBUSER() + "'");
                        t_personalDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.t_RowSet}"));
                        s_Bean.setT_RowSet(null);
                        s_Bean.setPERSNR((String) (t_personalDataProvider.getValue("PERSNR")));

The code worked well in 5.5.1 and the former Glassfish V2 installation, the rowset is filled and i can see the field values of the table in the debugger. I am using SQL-Statements for reading database informations together with TopLink persistence for CRUD Operations.

The error message is:
java.lang.NullPointerException
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1820)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1087)
and also in the log-file:
[#|2007-12-06T13:28:10.242+0100|SEVERE|sun-appserver9.1|org.apache.catalina.core.ContainerBase|_ThreadID=21;_ThreadName=RMI TCP Connection(19)-127.0.0.1;_RequestID=c4063d2c-ac62-48c8-b9e0-6257d71c3f37;|PWC1415: Error stopping container StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[/EmployeeCare]
java.lang.NoClassDefFoundError: java/sql/RowId
        at java.lang.Class.getDeclaredMethods0(Native Method)

Is there any help around ?

Thanks a lot

HJ


Re: NB60, DataProvider, NullPointerException

by HJ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



I don't see how the project could get in this state, but
it appears a library is missing from your project.

Either reply her, with a list of the libraries in your project
or
create a new visual web project with a rowset (drag and drop a database table to the designer page)
and compare the libraries created in this new project with the project that has the error.
If there are any libraries missing, you might try adding by hand.

John

HJ wrote:
Hello together,

i have the following configuration:

- NetBeans 6.0
- Glassfish V2 from the NetBeans Installer
- Oracle jdbc driver ojdbc14.jar
- Windows XP

I imported a Visual Web JSF Project developed under 5.5.1 and deployed to a former Glassfish V2 installation, into the NB 6.0 IDE.
After fixing some imports, compilation and deployment against the new Glassfish installation (with jdbc and OraclePool configurations) was successfully.
Running the application throws a NullPointerException at the following code-line (in bold):
  try
                    {
                        s_Bean.read_Data("SELECT PERSNR, SNAME, FIRMA, KOSTL from V_PERSONAL01 WHERE DBUSER=" + "'" + s_Bean.getDBUSER() + "'");
                        t_personalDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.t_RowSet}"));
                        s_Bean.setT_RowSet(null);
                        s_Bean.setPERSNR((String) (t_personalDataProvider.getValue("PERSNR")));

The code worked well in 5.5.1 and the former Glassfish V2 installation, the rowset is filled and i can see the field values of the table in the debugger. I am using SQL-Statements for reading database informations together with TopLink persistence for CRUD Operations.

The error message is:
java.lang.NullPointerException
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1820)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1087)
and also in the log-file:
[#|2007-12-06T13:28:10.242+0100|SEVERE|sun-appserver9.1|org.apache.catalina.core.ContainerBase|_ThreadID=21;_ThreadName=RMI TCP Connection(19)-127.0.0.1;_RequestID=c4063d2c-ac62-48c8-b9e0-6257d71c3f37;|PWC1415: Error stopping container StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[/EmployeeCare]
java.lang.NoClassDefFoundError: java/sql/RowId
        at java.lang.Class.getDeclaredMethods0(Native Method)

Is there any help around ?

Thanks a lot

HJ



Re: NB60, DataProvider, NullPointerException

by HJ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

HJ wrote:
Hello John,

i tested the following:

1. I created a new VWproject in NB 6.0
2. I connect to my oracle db
3. I draged a table component on page1 and bind it to the db table
4. I included all the libs in the .war and deployed it to Glassfish (specially sqlx.jar, rowset.jar (former 5.5.1 deployment) and rowset-1.0.1.jar)
5. I run the application, see the data table with values ! in the browser  and Glassfish throws error:

CoyoteRequest PWC4003: Exception thrown by attributes event listener
java.lang.NoClassDefFoundError: com/sun/sql/rowset/CachedRowSetX
        at com.sun.data.provider.impl.CachedRowSetDataProvider.setCachedRowSet(CachedRowSetDataProvider.java:231)
        at alles.Page1._init(Page1.java:42)
        at alles.Page1.init(Page1.java:270)
        at com.sun.rave.web.ui.appbase.servlet.LifecycleListener.fireInit(LifecycleListener.java:590)

Here is the code line where it happens:
 
private void _init() throws Exception {
        t_vertreterregelungDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.t_vertreterregelungRowSet}"));     
    }

Until now i don't know what really happens.
Thanks a lot.
HJ


I don't see how the project could get in this state, but
it appears a library is missing from your project.

Either reply her, with a list of the libraries in your project
or
create a new visual web project with a rowset (drag and drop a database table to the designer page)
and compare the libraries created in this new project with the project that has the error.
If there are any libraries missing, you might try adding by hand.

John

HJ wrote:
Hello together,

i have the following configuration:

- NetBeans 6.0
- Glassfish V2 from the NetBeans Installer
- Oracle jdbc driver ojdbc14.jar
- Windows XP

I imported a Visual Web JSF Project developed under 5.5.1 and deployed to a former Glassfish V2 installation, into the NB 6.0 IDE.
After fixing some imports, compilation and deployment against the new Glassfish installation (with jdbc and OraclePool configurations) was successfully.
Running the application throws a NullPointerException at the following code-line (in bold):
  try
                    {
                        s_Bean.read_Data("SELECT PERSNR, SNAME, FIRMA, KOSTL from V_PERSONAL01 WHERE DBUSER=" + "'" + s_Bean.getDBUSER() + "'");
                        t_personalDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.t_RowSet}"));
                        s_Bean.setT_RowSet(null);
                        s_Bean.setPERSNR((String) (t_personalDataProvider.getValue("PERSNR")));

The code worked well in 5.5.1 and the former Glassfish V2 installation, the rowset is filled and i can see the field values of the table in the debugger. I am using SQL-Statements for reading database informations together with TopLink persistence for CRUD Operations.

The error message is:
java.lang.NullPointerException
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1820)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1087)
and also in the log-file:
[#|2007-12-06T13:28:10.242+0100|SEVERE|sun-appserver9.1|org.apache.catalina.core.ContainerBase|_ThreadID=21;_ThreadName=RMI TCP Connection(19)-127.0.0.1;_RequestID=c4063d2c-ac62-48c8-b9e0-6257d71c3f37;|PWC1415: Error stopping container StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[/EmployeeCare]
java.lang.NoClassDefFoundError: java/sql/RowId
        at java.lang.Class.getDeclaredMethods0(Native Method)

Is there any help around ?

Thanks a lot

HJ




LightInTheBox - Buy quality products at wholesale price!