Discussion

unable to call file Service using File listner

I have created a file listener. and I added the service file the same in it. but it is still not calling the same. but Listener is reading the file as ti deletes it after reading it but it doesnt execute the service file mentioned in the file listener. Any idea what else i have to do to make sure the connection between the same that when ever file listners read the data it calls the service file

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

September 20, 2011 - 3:17pm

Was there ever a resolution on this? My team and I are running into the same thing where a file listener (which SMA says is running) is never calling the service file and the activity contained within it.

The files we have placed within the folder the listener is monitoring have not been removed. No error files have been created.

This is the only log entry that occurs:

2011-09-20 14:54:06,692 [j2ee14_ws,maxpri=10]] [ STANDARD] [ ] ( services.file.FileListener) ERROR File.FWEnrRecFileListener arunv - Exception caught while processing service files.
com.pega.pegarules.pub.PRException: PRException
From: (AC4B0549F5D276D88F8FF5F382284E8DF)
at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.getServiceRequestorForFileListener(ServiceAPI.java:2611)
at com.pega.pegarules.integration.engine.internal.services.file.FileListener.establishRequestorWithLock(FileListener.java:643)
at com.pega.pegarules.integration.engine.internal.services.file.FileListener.drainDirectory(FileListener.java:1269)
at com.pega.pegarules.integration.engine.internal.services.file.FileListener.run_(FileListener.java:1916)
at com.pega.pegarules.integration.engine.internal.services.listener.ServiceListenerBaseImpl.run(ServiceListenerBaseImpl.java:445)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.AsyncServant.processAsyncTask(AsyncServant.java:186)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.AsyncServant.invoke(AsyncServant.java:151)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:315)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:266)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:239)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:348)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:389)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:411)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:171)
at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
at com.pega.pegarules.session.internal.engineinterface.etier.mdb.PRAsync.processRequest(PRAsync.java:154)
at com.pega.pegarules.session.internal.engineinterface.etier.asynchbeans.AsyncTask.run(AsyncTask.java:63)
at com.pega.pegarules.session.internal.engineinterface.etier.asynchbeans.RunnableWrapper.run(RunnableWrapper.java:70)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:761)
at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:218)
at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:158)
at java.lang.Thread.run(Thread.java:811)
Caused by:
java.lang.NullPointerException
at com.pega.pegarules.monitor.internal.tracer.TracerSessionImpl.ctor(TracerSessionImpl.java:308)
at com.pega.pegarules.monitor.internal.tracer.TracerSessionImpl.(TracerSessionImpl.java:285)
at com.pega.pegarules.monitor.internal.tracer.TracerSessionRackImpl.establishSession(TracerSessionRackImpl.java:203)
at com.pega.pegarules.monitor.internal.tracer.TracerRuleWatchRackImpl.checkRuleWatch(TracerRuleWatchRackImpl.java:142)
at com.pega.pegarules.monitor.internal.tracer.TracerSessionRackImpl.getSessionWithWatch(TracerSessionRackImpl.java:228)
at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.initializeThreadContext(ServiceAPI.java:2064)
at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.getServiceRequestorForFileListener(ServiceAPI.java:2607)
... 24 more
---------------------------------------------------------------------

Thank you all for any help you might provide.

Pega
August 19, 2011 - 10:47am

Check the server log for error messages. If there are none, try to determine whether any of the activities or parse rules listed in your service rule are being executed. You can increase the logging levels on the rules, as well as the service listener to get more logging output. If you haven't done so yet, use the Run button on the file service rule to unit test the parsing of the file data and the execution of any activities.

August 20, 2011 - 8:11am

This may be a security issue. Please make sure 'Authenticate?' is not checked in the Service method, unless you want to authenticate the requestors. You may also like to enable ‘May start?’ in the activity .
If you want the requestors to be authenticated, put user id/password in REQUESTOR LOGIN section of your FILE LISTENER.
If this does not solve your problem, try what have been suggested earlier by TANDP.

August 22, 2011 - 4:42am

I have done the same, I have done the simulation of service file which runs just fine and able to parse data as well even fire the activity but File listner never seem to call the file service at all. When i checked the logs in pega server. I identified one error which is sql exception.

2011-08-22 11:34:45,782 [egaRULES-MasterAgent] [ STANDARD] [ ] ( engine.context.AgentRuleUtils) ERROR - Error saving Data-Agent-Queue instance for: Pega-ProCom on node bc10496dfd87add1bf90a6bbfd47646a
com.pega.pegarules.pub.database.DatabaseException: Database-Saver-UpdateInsertfail
From: (B864C43AFBEAB69F19AC1A46F9AB6A21E:(Master Agent))
SQL: insert into pr_data (PHYSICIANFIRSTNAME , PHYSICIANLASTNAME , PHYSICIANSPECILIZATION , PRACTICE , PXCREATEDATETIME , PXCREATEOPERATOR , PXCREATEOPNAME , PXCREATESYSTEMID , PXINSNAME , PXOBJCLASS , PXUPDATEDATETIME , PXUPDATEOPERATOR , PXUPDATEOPNAME , PXUPDATESYSTEMID , PYLABEL , SICORRATTACHSTATUS , pzInsKey , pzPVStream) values (? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?)
SQL Inserts: <<null>> <<null>> <<null>> <<null>> <2009-03-06 03:20:06.394> <marik@pegasystems.com> <Ken Marin> <pega> <PEGA-PROCOM!BC10496DFD87ADD1BF90A6BBFD47646A> <Data-Agent-Queue> <2009-03-06 03:37:41.708> <ecksm> <Matt Eckstein> <PRPCDevelopment> <Pega-ProCom: Correspondence, SLA events, & Bulk Processing> <<null>> <DATA-AGENT-QUEUE PEGA-PROCOM!BC10496DFD87ADD1BF90A6BBFD47646A> <<stream>>

Caused by SQL Problems.
Problem #1, SQLState 42000, Error code 904: java.sql.SQLException: ORA-00904: "PRACTICE": invalid identifier

at com.pega.pegarules.engine.database.ExceptionInformation.createExceptionDueToDBFailure(ExceptionInformation.java:174)
at com.pega.pegarules.engine.database.DatabasePreparedStatement.addBatch(DatabasePreparedStatement.java:531)
at com.pega.pegarules.engine.database.Saver.saveAltOp(Saver.java:1237)
at com.pega.pegarules.engine.database.StatementOperationStore.performAltOps(StatementOperationStore.java:106)
at com.pega.pegarules.engine.database.DatabasePreparedStatement.addBatch(DatabasePreparedStatement.java:555)
at com.pega.pegarules.engine.database.Saver.saveExistingInstanceWithNoDeletedColumnNotOnlyIfNew(Saver.java:1127)
at com.pega.pegarules.engine.database.Saver.saveInstance(Saver.java:726)
at com.pega.pegarules.engine.database.DatabaseImpl.performOps(DatabaseImpl.java:2250)
at com.pega.pegarules.engine.database.DatabaseImpl.attemptToProcessUpdates(DatabaseImpl.java:1607)
at com.pega.pegarules.engine.database.DatabaseImpl.processUpdates(DatabaseImpl.java:1504)
at com.pega.pegarules.engine.database.Saver.save(Saver.java:522)
at com.pega.pegarules.engine.database.DatabaseImpl.save(DatabaseImpl.java:3813)
at com.pega.pegarules.engine.database.DatabaseImpl.save(DatabaseImpl.java:3797)
at com.pega.pegarules.engine.context.AgentRuleUtils.saveDataInstance(AgentRuleUtils.java:170)
at com.pega.pegarules.engine.context.AgentRuleUtils.checkAndUseDataInstance(AgentRuleUtils.java:229)
at com.pega.pegarules.engine.context.MasterForNewAgents.run(MasterForNewAgents.java:242)
at com.pega.pegarules.engine.context.agent.PRTimer$RunLoop.run(PRTimer.java:280)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: ORA-00904: "PRACTICE": invalid identifier

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:212)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:951)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1159)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3367)
at com.pega.pegarules.engine.database.DatabasePreparedStatement.addBatch(DatabasePreparedStatement.java:479)
... 13 more
2011-08-22 11:34:45,795 [egaRULES-MasterAgent] [ STANDARD] [ ] ( engine.context.AgentRuleUtils) ERROR - Error saving Data-Agent-Queue instance for: PegaCESvcs on node bc10496dfd87add1bf90a6bbfd47646a
com.pega.pegarules.pub.database.DatabaseException: Database-Saver-UpdateInsertfail

this error is recurring, thus I am not not sure if it is related to same. but Since it on the PegaCESvcs i believe it is same.
any idea how to fix the same?

August 22, 2011 - 5:32am

http://pdn.pega.com/Devnet/PRPCv5/kb/26021.asp
See if this helps

August 22, 2011 - 6:24am

I would but as it doesn’t even initiate the service file itself so chances of issue in activity are negligible.
The file listener completely fails to call the File service method. As if it does it would create a myservicepage which it fails to do so.

October 3, 2011 - 5:58am

pega test

June 28, 2013 - 7:32am

HI ,,My service file was not getting called by the listner. Then i unchcked the authorized box (in security tab of activity)in the activity which we are  calling in the service file.THen the listner started calling the service file.Please try if it is helping or not.