Tools>Security bug on Oracle

The short description of the problem:
In Developer version 2.0.3 when I select Tools>Security I get a null pointer exception and the dialog never shows up.

Details:
The repository_server points to an Oracle instance in a PC over the network. I have created a solution in this repository and added user security (with an admin of course) and setup the solution to ask for a password.

When I open the solution, I’m asked the login/password and I successfully login. Then I select Tools>Security I get a null pointer exception and the dialog never appears.

Here is the trace I found in the log:

questiondata[0]= 0
questiondata[1]= 1
questiondata[2]= 3

questiondata[3]= 4
java.lang.NullPointerException
java.lang.NullPointerException
        at com.servoy.j2db.develop.h.f.<init>(Unknown Source)
        at com.servoy.j2db.develop.h.e.<init>(Unknown Source)
        at com.servoy.j2db.develop.c.a2.doIt(Unknown Source)
        at com.servoy.j2db.cmd.b$2.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
size of dialog0 java.awt.Point[x=358,y=314]

Any idea of what’s happening?

Did you delete some of the servoy_xxxx tables? The code assumes those are always there.

No I have no touched the servoy tables.

Right now I’ve changed to repository to MySQL without any problem.

If you have some tests/procedures you want me to go throught in order to find the bug I’ll do it.

We’ve been able to reproduce this issue in some specific instances, we’re investigating a fix.

Is it possible for you to try 2.1 beta with oracle? that version seems to work alright.

I’ve launched Servoy beta2 build 300 and it detected that the version of the repository_server was 20 and not 21. It asked me if I wanted to upgrade and I said ok. Then, after reading the list of tables on the server it throwed a Null Pointer Exception:

com.servoy.j2db.persistence.RepositoryException: java.lang.NullPointerException
com.servoy.j2db.persistence.RepositoryException: java.lang.NullPointerException
        at com.servoy.j2db.persistence.j.a(Unknown Source)
        at com.servoy.j2db.persistence.Server.createRepositoryTables(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.startOrCreateRepository(Unknown Source)
        at com.servoy.j2db.develop.ar.try(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.cQ(Unknown Source)
        at com.servoy.j2db.J2DBClient.dataBaseInit(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:119)
        at Servoy.main(Servoy.java:27)

Then I decided to erase the servoy tables in oracle (by the way it would be nice if every servoy tables began with servoy_, not like log among others).

I sat servoy.didFirstTimeInit=false but I don’t know if that matters.

During the creation of the repository I had the following error:

[1] Created table 'reports' in server 'crm'.
[1] Added column with name 'report_name' to table 'reports'.
[1] Added column with name 'column_type' to table 'reports'.
[1] Added column with name 'sql_from' to table 'reports'.
[1] Added column with name 'column_id' to table 'reports'.
[1] Added column with name 'sql_part' to table 'reports'.
[1] Added column with name 'reportsid' to table 'reports'.
[1] Added column with name 'sql_query' to table 'reports'.
[1] Added column with name 'sql_groupby' to table 'reports'.
[1] Added column with name 'textkey_orderby' to table 'reports'.
[1] Added column with name 'sql_where' to table 'reports'.
[1] Added column with name 'sql_select' to table 'reports'.
[1] Added column with name 'sql_joins' to table 'reports'.
[1] Added column with name 'sql_result' to table 'reports'.
[1] Added column with name 'one' to table 'reports'.
[1] Added column with name 'textkey_where' to table 'reports'.
[1] Added column with name 'sql_orderby' to table 'reports'.
create table reports (report_name VARCHAR2(100), column_type VARCHAR2(50), sql_from VARCHAR2(1000), column_id NUMBER(10,0), s
ql_part VARCHAR2(50), reportsid NUMBER(10,0) not null, sql_query VARCHAR2(10000), sql_groupby VARCHAR2(1000), textkey_orderby
 VARCHAR2(10), sql_where VARCHAR2(1000), sql_select VARCHAR2(1000), sql_joins VARCHAR2(1000), sql_result VARCHAR2(30000), one
 NUMBER(10,0), textkey_where VARCHAR2(10), sql_orderby VARCHAR2(1000), primary key (reportsid))
Database name Oracle
Table Name AUDIT_ACTIONS
Table Name VALUELIST
com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: ORA-
00910: specified length too long for its datatype

com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: ORA-
00910: specified length too long for its datatype

        at com.servoy.j2db.persistence.f.a(Unknown Source)
        at com.servoy.j2db.persistence.XMLImporter.importSolutionFromFileAs(Unknown Source)
        at com.servoy.j2db.persistence.XMLImporter.importSolutionFromFile(Unknown Source)
        at com.servoy.j2db.develop.av.a(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:119)
        at Servoy.main(Servoy.java:27)

The dialog in Servoy showed:
com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: ORA-00910: specified length too long for its datatype

I pushed the OK button and got a second dialog in Servoy:

Fatal init, could not start data service:
object already exported

java.rmi.server.ExportException: object already exported
java.rmi.server.ExportException: object already exported
        at sun.rmi.transport.ObjectTable.putTarget(Unknown Source)
        at sun.rmi.transport.Transport.exportObject(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
Loaded the get connection for server log_server in 1 times
Loaded the get connection for server crm in 1 times
        at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
        at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
        at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
        at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
        at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
        at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
        at com.servoy.j2db.server.ApplicationServer.exportObject(Unknown Source)
        at com.servoy.j2db.server.ApplicationServer.registerService(Unknown Source)
        at com.servoy.j2db.server.ApplicationServer.startDataServer(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:119)
        at Servoy.main(Servoy.java:27)

The consequence of these errores was that Servoy aparently has not created the crm solution.

After restart, I created a new solution (with a new connection to oralce).

In the new solution I created an inital form and put some fields on it. Then I tried to open the Security dialog in the Tool menu and I saw an error dialog telling me “Cannot show security dialog”. The detail textarea was empty but on the log I saw:

size of SelectFieldDialog java.awt.Point[x=476,y=244]
java.lang.NullPointerException
java.lang.NullPointerException
        at com.servoy.j2db.develop.h.f.<init>(Unknown Source)
        at com.servoy.j2db.develop.h.e.<init>(Unknown Source)
        at com.servoy.j2db.develop.c.a1.doIt(Unknown Source)
        at com.servoy.j2db.cmd.b$2.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Solution 'test' commit by thread TaskExecuter[0]
Solution 'test' committed by thread TaskExecuter[0]

End of the story. The problem is not solved.

The database dependent mapping does indeed a bad create when the varchar size is bigger than 4K, will be fixed in Servoy 2.1 b3

This was actually fixed in Servoy 2.1 b3 but now in rc2 I again have an issue with this.

However this time there is no exception at all.

This is what I do:

  1. I start Servoy Developer and create a new solution.
  2. In the menu Tools I choose Security.
  3. I click OK on the alert dialog that tells me to create an administrator (the security dialog opens)
  4. I click on “Administrators”
  5. I click on “Add user”
  6. I enter login and pass, click ok
  7. I click on the checkbox of the newly created used to include it into the Administrator group.
    8 ) I click on the OK button to close the security dialog.
  8. Now I try to enter again into the securty dialog so I choose Tools>Security
  9. I enter login and password (correctly of course) and click ok
  10. I see and error dialog telling me “Login failed”

Please correct this before releasing 2.1

I can’t reproduce that problem.
Do you still experience it? Also in 21rc3?

I’ve just reproduced the problem in rc3 following my previous indications.

If I do exactly what I said, I obtain the same outcome.

I mention here that the repository has been created from scratch by rc3 itself (nothing in the database before starting).

I just want to add that I use the driver classes12.jar and an OCI connection.
I use an OCI connection because I beleive that otherwise there is a problem to send large BLOB through the connection.

Using a thin connection to build the repository (first time use) resulted in an exception:

19-ago-2004 16:44:51 net.sf.hibernate.dialect.Dialect
INFO: Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException:
El tamaM-1o de los datos es mayor que el tamaM-1o mM-_ximo para este tipo: 32104
com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException:
El tamaM-1o de los datos es mayor que el tamaM-1o mM-_ximo para este tipo: 32104
at com.servoy.j2db.persistence.ao.a(Unknown Source)
at com.servoy.j2db.persistence.e.a(Unknown Source)
at com.servoy.j2db.persistence.XMLImporter.importSolutionFromFileAs(Unknown Source)
at com.servoy.j2db.persistence.XMLImporter.importSolutionFromFile(Unknown Source)
at com.servoy.j2db.develop.au.a(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:119)
at Servoy.main(Servoy.java:27)

In english it means that the size of the data is superior to the maximum allowed size for this type of field. I guess that 32104 is the maximum size.
(I don’t know which field it’s talking about)

That error indicates that you don’t have all libraries that are included with rc3, your error looks like an older error that occurred in hibernate (the database dependency layer included with Servoy). Can you install Servoy 2.1RC4 in a clean directory and test how it works then? We have tested RC4 with both Oracle 9i and Oracle 10g and do not experience any problems.

I’m downloading right now rc4. In less than an hour I’ll tell you something.

I’m sorry but I got the same problem if I strictly follow my steps BUT I’ve made it work once when I didn’t follow exactly the steps … but I don’t exactly recall what I did! :shock:

I’m still trying to reproduce the right steps, without luck so far.

Apparently this is a driver issue.
You should use a thin connection to oracle and a driver named “classes12.jar” of 1,35 MB (1.417.242 bytes).

The driver I used was called “classes12.jar” but it size was smaller (1,07 MB).