group reconciliation using JDBC

4 views
Skip to first unread message

Tzahi Sharoni

unread,
Oct 6, 2009, 4:09:04 PM10/6/09
to Velo
Hi there,

long time since my last post, but I successfully since then to
reconcile identities (accounts). I tried to use groovy to reconcile
groups but I got fatal error of "java.lang.NullPointerException"

I think my main problem is that I am not really sure what are the
mandatory resource group attributes. I tried to use the sample I found
in http://docs.safehaus.org/display/VELO10/JDBC+Tutorial but no luck

Anyhow my script is as followed:
def queryManager = cntx.get("queryManager");
String groupsQuery = "select GroupName as group_name, description as
display_Name, description as description from groups";
queryManager.add(groupsQuery);
cntx.set("queryManager",queryManager);

Can you please direct me to the list of attributes - i could not find
them in previous discussions?
am I missing something?

Thanks and Regards,
Tzahi

Zach Sharoni

unread,
Oct 7, 2009, 3:31:19 AM10/7/09
to Tzahi Sharoni, Velo

Just added a line from the server log:

2009-10-07 09:23:09,367 WARN  [org.jboss.mq.Connection] Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect

org.jboss.mq.SpyJMSException: No pong received; - nested throwable: (java.io.IOException: ping timeout‏.)

        at org.jboss.mq.Connection$PingTask.run(Connection.java:1313‏)

        at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364‏)

        at java.lang.Thread.run(Thread.java:619‏)

Caused by: java.io.IOException: ping timeout‏.

Thanks,

Tzahi

No virus found in this incoming message.

Checked by AVG - www.avg.com

Version: 8.5.420 / Virus Database: 270.14.3/2412 - Release Date: 10/06/09 06:50:00

Zach Sharoni

unread,
Oct 7, 2009, 6:17:41 AM10/7/09
to Zach Sharoni, Velo

Please ignore the last error message. The correct input from the log is as followed:

2009-10-07 12:11:48,265 DEBUG [velo.adapters.JdbcAdapter] Execution of JdbcAdapter->runQuery() method started...

2009-10-07 12:11:48,265 DEBUG [velo.adapters.JdbcAdapter] Jdbc query execution for 'SELECT' action type STARTED.

2009-10-07 12:11:48,266 DEBUG [velo.adapters.JdbcAdapter] Executing query...

2009-10-07 12:11:48,267 DEBUG [velo.adapters.JdbcAdapter] Successfully finished executing a -SELECT- query!

2009-10-07 12:11:48,267 DEBUG [velo.resource.operationControllers.JdbcSpmlResourceOperationController] Returned from adapter groups with amount '3'

2009-10-07 12:11:48,267 WARN  [velo.ejb.impl.TaskBean] Indicating task execution failure for task ID: 38

2009-10-07 12:11:48,298 DEBUG [velo.ejb.impl.TaskStatusBean] Successfully changed status of task ID '38' to status: FATAL_ERROR

 

The used query was as followed:

def queryManager = cntx.get("queryManager");

String groupsQuery = "select GroupName as group_name, description as

display_Name, description as description from groups";

queryManager.add(groupsQuery);

cntx.set("queryManager",queryManager);

Tzahi

Version: 8.5.420 / Virus Database: 270.14.3/2412 - Release Date: 10/06/09 18:34:00

Asaf

unread,
Oct 7, 2009, 9:00:56 AM10/7/09
to Velo
Tzahi,

This seems to be very weird, it's Jboss JMS that can't make a ping,
Can you please restar thte server, retry and attach the entire
server.log file?


Thanks,
Asaf.

On Oct 7, 6:17 am, "Zach Sharoni" <tzahi.shar...@gmail.com> wrote:
> Please ignore the last error message. The correct input from the log is as
> followed:
>
> 2009-10-07 12:11:48,265 DEBUG [velo.adapters.JdbcAdapter] Execution of
> JdbcAdapter->runQuery() method started...
>
> 2009-10-07 12:11:48,265 DEBUG [velo.adapters.JdbcAdapter] Jdbc query
> execution for 'SELECT' action type STARTED.
>
> 2009-10-07 12:11:48,266 DEBUG [velo.adapters.JdbcAdapter] Executing query...
>
> 2009-10-07 12:11:48,267 DEBUG [velo.adapters.JdbcAdapter] Successfully
> finished executing a -SELECT- query!
>
> 2009-10-07 12:11:48,267 DEBUG
> [velo.resource.operationControllers.JdbcSpmlResourceOperationController]
> Returned from adapter groups with amount '3'
>
> 2009-10-07 12:11:48,267 WARN  [velo.ejb.impl.TaskBean] Indicating task
> execution failure for task ID: 38
>
> 2009-10-07 12:11:48,298 DEBUG [velo.ejb.impl.TaskStatusBean] Successfully
> changed status of task ID '38' to status: FATAL_ERROR
>
> The used query was as followed:
>
> def queryManager = cntx.get("queryManager");
>
> String groupsQuery = "select GroupName as group_name, description as
>
> display_Name, description as description from groups";
>
> queryManager.add(groupsQuery);
>
> cntx.set("queryManager",queryManager);
>
> Tzahi
>
> inhttp://docs.safehaus.org/display/VELO10/JDBC+Tutorialbut no luck

Zach Sharoni

unread,
Oct 7, 2009, 9:25:41 AM10/7/09
to asa...@gmail.com, Velo
I restarted the server and that problem was fixed. I still have problem with group reconciliation

Tzahi
Version: 8.5.420 / Virus Database: 270.14.5/2418 - Release Date: 10/06/09 18:34:00

Zach Sharoni

unread,
Oct 8, 2009, 6:08:03 AM10/8/09
to asa...@gmail.com, Velo

Hi all,

I didn't get any response so I guess I wasn't clear enough in my problem:

1. I tried to execute group reconciliation task

2. I feel the query using attributes that I think are relevant (I only got an error once for not using the display_name)

3. I use queryManager object to set the query

4. I got "java.lang.NullPointerException" in the task which is related to a null object

Can you please share with me an up-to-dated sample for a groovy script or let me know what is wrong? Seriously, I tried to debug it myself without any luck for the all last day.

Again, the log and the script are described below:

2009-10-07 12:11:48,265 DEBUG [velo.adapters.JdbcAdapter] Execution of

JdbcAdapter->runQuery() method started...

2009-10-07 12:11:48,265 DEBUG [velo.adapters.JdbcAdapter] Jdbc query

execution for 'SELECT' action type STARTED.

2009-10-07 12:11:48,266 DEBUG [velo.adapters.JdbcAdapter] Executing query...

2009-10-07 12:11:48,267 DEBUG [velo.adapters.JdbcAdapter] Successfully

finished executing a -SELECT- query!

2009-10-07 12:11:48,267 DEBUG [velo.resource.operationControllers.JdbcSpmlResourceOperationController]

Returned from adapter groups with amount '3'

2009-10-07 12:11:48,267 WARN  [velo.ejb.impl.TaskBean] Indicating task

execution failure for task ID: 38

2009-10-07 12:11:48,298 DEBUG [velo.ejb.impl.TaskStatusBean] Successfully

changed status of task ID '38' to status: FATAL_ERROR

The used query was as followed:

> def queryManager = cntx.get("queryManager");

> String groupsQuery = "select GroupName as group_name, description as

> display_Name, description as description from groups";

> queryManager.add(groupsQuery);

> cntx.set("queryManager",queryManager);

Thanks,

Tzahi

-----Original Message-----
From: Zach Sharoni [mailto:tzahi....@gmail.com]
Sent: Wednesday, October 07, 2009 3:26 PM
To: 'asa...@gmail.com'; 'Velo'
Subject: RE: [velo-users:293] Re: group reconciliation using JDBC

I restarted the server and that problem was fixed. I still have problem with group reconciliation

Tzahi

-----Original Message-----

From: velo-...@googlegroups.com [mailto:velo-...@googlegroups.com] On Behalf Of Asaf

Sent: Wednesday, October 07, 2009 3:01 PM

To: Velo

Subject: [velo-users:293] Re: group reconciliation using JDBC

Tzahi,

Version: 8.5.420 / Virus Database: 270.14.5/2418 - Release Date: 10/06/09 18:34:00

Asaf

unread,
Oct 8, 2009, 12:12:16 PM10/8/09
to Velo
Tzahi,
You hanve't attached the server.log yet, I can't find the NPE on any
of the debug lines you have sent,
Please send the entire log by:

stop->start the server, perform the reconcile and attach the log file
to here,


Thanks.
> > inhttp://docs.safehaus.org/display/VELO10/JDBC+Tutorialbutno luck
>
> > Anyhow my script is as followed:
>
> > def queryManager = cntx.get("queryManager");
>
> > String groupsQuery = "select GroupName as group_name, description as
>
> > display_Name, description as description from groups";
>
> > queryManager.add(groupsQuery);
>
> > cntx.set("queryManager",queryManager);
>
> > Can you please direct me to the list of attributes - i could not find
>
> > them in previous discussions?
>
> > am I missing something?
>
> > Thanks and Regards,
>
> > Tzahi
>
> > No virus found in this incoming message.
>
> > Checked by AVG -www.avg.com
>
> > Version: 8.5.420 / Virus Database: 270.14.3/2412 - Release Date: 10/06/09
> > 06:50:00
>
> > No virus found in this incoming message.
> > Checked by AVG -www.avg.com
> > Version: 8.5.420 / Virus Database: 270.14.3/2412 - Release Date: 10/06/09
> > 18:34:00
>
> No virus found in this incoming message.
> Checked by AVG -www.avg.com

Zach Sharoni

unread,
Oct 8, 2009, 1:26:35 PM10/8/09
to asa...@gmail.com, Velo

Hi Asaf,

Attached below is the server log for the reconciliation operation. Let me know if you need anything else.

Tzahi

<<...>>

Version: 8.5.420 / Virus Database: 270.14.5/2418 - Release Date: 10/07/09 05:18:00 <<...>>

server - Copy.log
server - Copy.log

Trouby

unread,
Oct 15, 2009, 9:33:39 AM10/15/09
to Velo
Tzahi,

Where do you see the NPE? I don't see it in the log file,
Do you mean that the task fails and in the task log you see an NPE?
If not, can you let me know what failure has logged into the failed
task?


Anyway, before submitting more info, try to change the query to:
select GroupName as unique_id, description as display_name,
description as description from groups


That makes more sense, unique_id / display_name are required.


Asaf.


On Oct 8, 7:26 pm, "Zach Sharoni" <tzahi.shar...@gmail.com> wrote:
> Hi Asaf,
>
> Attached below is the server log for the reconciliation operation. Let me know if you need anything else.
>
> Tzahi
>
> Version: 8.5.420 / Virus Database: 270.14.5/2418 - Release Date: 10/07/09 05:18:00
>
>
>
>  server - Copy.log
> 471KViewDownload
>
>  server - Copy.log
> 471KViewDownload

Zach Sharoni

unread,
Oct 15, 2009, 10:38:35 AM10/15/09
to asa...@gmail.com, Velo

Hi Asaf,

I changed the query and it works - I got success the first time for this operation. The NPE was displayed before on the task and not on the log.

Now I changed the default policy to allow creating a resource group in the repository for any new group. Unfortunately, I got a failure on the task which looks as a JMS error:

2009-10-15 16:29:34,170 INFO  [velo.reconciliation.processes.ReconcileGroupsProcess] Raising 'GROUP_CREATED' event for group name 'DBA'

2009-10-15 16:29:34,177 INFO  [velo.ejb.impl.EventBean] Executing event 'Created Group' with response amount(for all reconcile policies) '1'

2009-10-15 16:29:34,178 INFO  [velo.entity.ReconcileEvent] Starting execution of event 'Created Group' for reconcile policy 'Default'

2009-10-15 16:29:34,180 INFO  [velo.actions.Action] Action is executed for action class name: velo.entity.ReadyAction

2009-10-15 16:29:34,180 DEBUG [velo.actions.Action] Action Validation phase has -started- for class: velo.entity.ReadyAction

2009-10-15 16:29:34,181 DEBUG [velo.actions.Action] Action Validation phase has successfully -ended- for class: velo.entity.ReadyAction

2009-10-15 16:29:34,181 DEBUG [velo.actions.Action] Action PRE phase has -started- for class: velo.entity.ReadyAction

2009-10-15 16:29:34,182 DEBUG [velo.actions.Action] Action PRE phase has -started- for class: velo.entity.ReadyAction

2009-10-15 16:29:34,183 INFO  [velo.actions.Action] Action is executed for action class name: velo.actions.readyActions.AddResourceGroupToRepository

2009-10-15 16:29:34,184 DEBUG [velo.actions.Action] Action Validation phase has -started- for class: velo.actions.readyActions.AddResourceGroupToRepository

2009-10-15 16:29:34,185 DEBUG [velo.actions.Action] Action Validation phase has successfully -ended- for class: velo.actions.readyActions.AddResourceGroupToRepository

2009-10-15 16:29:34,185 DEBUG [velo.actions.Action] Action PRE phase has -started- for class: velo.actions.readyActions.AddResourceGroupToRepository

2009-10-15 16:29:34,185 DEBUG [velo.actions.Action] Action PRE phase has -started- for class: velo.actions.readyActions.AddResourceGroupToRepository

2009-10-15 16:29:34,196 DEBUG [velo.ejb.impl.ResourceGroupBean] Persisting group 'DBA', of resource 'test application 1'

2009-10-15 16:29:34,197 DEBUG [velo.ejb.impl.ResourceGroupBean] Checking whether group name: 'DBA' On resource name: 'test application 1' exist or not...

2009-10-15 16:29:34,215 WARN  [velo.ejb.impl.TaskBean] Indicating task execution failure for task ID: 57

2009-10-15 16:29:34,253 DEBUG [velo.ejb.impl.TaskStatusBean] Successfully changed status of task ID '57' to status: FATAL_ERROR

2009-10-15 16:29:34,255 INFO  [velo.ejb.impl.EventBean] Executing system event with unique name 'TASK_FAILURE'

2009-10-15 16:29:34,256 INFO  [velo.ejb.impl.EventBean] Finding System Event with uniqueName 'TASK_FAILURE'

2009-10-15 16:29:34,261 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null

2009-10-15 16:29:34,262 ERROR [org.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f578aff:ca37:4ad73150:9c status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f578aff:ca37:4ad73150:9c status: ActionStatus.ABORT_ONLY >)

2009-10-15 16:29:34,265 ERROR [velo.ejb.impl.MDBTaskExecuter] A JMS EXCEPTION HAS OCCURED, PRINTING STACKTRACE............!

2009-10-15 16:29:34,266 ERROR [STDERR] javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection

I am attaching my log to this mail.

<<...>>

Version: 8.5.421 / Virus Database: 270.14.16/2435 - Release Date: 10/15/09 03:57:00

server(2).txt

Asaf S

unread,
Oct 15, 2009, 11:17:20 AM10/15/09
to Zach Sharoni, Velo
Hey,

Are you sure your DB is configured correctly?
This does not seems to be related to Velo at all,

Seems like Jboss(hibernate via DS) can't open a connection to the DB.
Please make sure that your Jboss AS / DataStore / DB are configured properly,




Asaf.

Zach Sharoni

unread,
Oct 15, 2009, 11:35:46 AM10/15/09
to Asaf S, Velo

Hi Asaf,

 

It is not clear to me – it seems to me that both connections are valid: my Velo DB and my sample DB

 

In the log you can see that it queried 3 groups: IT, DBA and Managers. It also reconciled my accounts successfully. Also I  believe the server works fine with my velo DB.

 

Please note that without the "CREATE GROUP" event the task ended successfully. The problem appears only when this event is defined.

 

Tzahi

lang=HE>

No virus found in this incoming message.

Checked by AVG - www.avg.com

Version: 8.5.421 / Virus Database: 270.14.16/2435 - Release Date: 10/15/09 03:57:00

Trouby

unread,
Oct 15, 2009, 1:18:00 PM10/15/09
to Velo
I see,
You are actually right, your dump is partial and I didn't take a look
at the entire log before,

It seems like the response for the event 'ADD GROUP' cannot be
executed for some reason,


I can't really think of the reason, please file a bug in JIRA and dump
your DB plus specify the groovy action for the reconciliation,
If you use Mysql just use 'mysqldump -uuser -ppassword DB_NAME >
file.sql', attach it and the groovy action to a jira ticket,


We'll try to debug it after you submit the use case,


Thanks,
Asaf.

On Oct 15, 5:35 pm, "Zach Sharoni" <tzahi.shar...@gmail.com> wrote:
> Hi Asaf,
>
> It is not clear to me – it seems to me that both connections are valid: my Velo DB and my sample DB
>
> In the log you can see that it queried 3 groups: IT, DBA and Managers. It also reconciled my accounts successfully. Also I  believe the server works fine with my velo DB.
>
> Please note that without the "CREATE GROUP" event the task ended successfully. The problem appears only when this event is defined.
>
> Tzahi
>
> From: Asaf S [mailto:asaf...@gmail.com]
> Sent: Thursday, October 15, 2009 5:17 PM
> To: Zach Sharoni
> Cc: Velo
> Subject: Re: [velo-users:306] Re: group reconciliation using JDBC ended with "java.lang.NullPointerException"
>
> Hey,
>
> Are you sure your DB is configured correctly?
> This does not seems to be related to Velo at all,
>
> Seems like Jboss(hibernate via DS) can't open a connection to the DB.
> Please make sure that your Jboss AS / DataStore / DB are configured properly,
>
> Asaf.
>
> ...
>
> read more »

Zach Sharoni

unread,
Oct 19, 2009, 5:17:34 AM10/19/09
to asa...@gmail.com, Velo

I opened a ticket (http://jira.safehaus.org/browse/VELO-376) and attached my DB

No virus found in this incoming message.

Checked by AVG - www.avg.com

Version: 8.5.421 / Virus Database: 270.14.16/2435 - Release Date: 10/15/09 12:02:00

Zach Sharoni

unread,
Oct 22, 2009, 3:07:11 AM10/22/09
to Zach Sharoni, asa...@gmail.com, Velo

Hi Asaf,

Any news on the ticket?

Thanks,

Tzahi

_____________________________________________

From: Zach Sharoni [mailto:tzahi....@gmail.com]

Sent: Monday, October 19, 2009 11:18 AM
To: 'asa...@gmail.com'; 'Velo'
Subject: RE: [velo-users:310] Re: group reconciliation using JDBC ended with "java.lang.NullPointerException"

I opened a ticket (http://jira.safehaus.org/browse/VELO-376) and attached my DB

Thanks,

No virus found in this incoming message.

Checked by AVG - www.avg.com

Version: 8.5.421 / Virus Database: 270.14.16/2435 - Release Date: 10/15/09 12:02:00

Reply all
Reply to author
Forward
0 new messages