Custom Process

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Custom Process

Post by Hubertus »

Could someone please be so kind and post a working custom process implementation ? I tried with the example from the Programmers Reference but quite without luck. What I'd like to implement (once I get around the basics) is a process that reads the contents of a directory and stores the filenames back into a passed temporary BO.

Many thanks in advance,
Hubertus
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Post by Hubertus »

I compiled the SimpleProcess and LongProcess examples from the Programmers Reference using NetBeans into labman.jar (com.labman).
I've added this .jar to the classpath entry in setEnv.sh, ClientStarter.sh as stated in the Programmers Reference and additionally to startWareIM.sh (I'm using Linux)
When running a process that calls for example com.labman.LongProcess as a custom component I get the error message:
Operation error. Process implementation component com.labman.LongProcess is not found or has invalid format
I'm quite a newbie to java. IMHO the language itself doesn't seem to be my problem but the class hierarchy and all the nice buzz words around java...
The .jar, the source and a .bsv is here http://www.hiden.org/files/u1/customprocess.zip
Could someone please be so kind and point me in a direction where I can try to start localizing this problem ? Currently I have absolutely no idea on where to look.

Many thanks,
Hubertus
aware_support
Posts: 7526
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

I had a quick look. You appear to have done everything correctly. The only reason for this problem then is that your jar is not being picked up. Could you attach the contents of your scripts?
Aware IM Support Team
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Post by Hubertus »

My scripts are here http://hiden.org/files/u1/scripts.zip

Thanks
Hubertus
aware_support
Posts: 7526
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

To be sure can you place your jar file into AwareIM/Tomcat/shared/lib directory and then refer to it in the scripts like so:

$AWARE_HOME/LabMan.jar
Aware IM Support Team
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Post by Hubertus »

Thanks for the tip - something has changed. However there's now a different error message. "Unknown System Error"
The Tomcat log shows:
ActionErrorException thrown with message Unknown system error

com.bas.webapp.actions.d: Unknown system error

at com.bas.webapp.actions.b.a(Unknown Source)

at com.bas.webapp.actions.BusinessProcessAction.a(Unknown Source)

at com.bas.webapp.actions.BusinessProcessAction.aX(Unknown Source)

at com.bas.webapp.actions.BusinessProcessAction.c(Unknown Source)

at com.bas.webapp.actions.BusinessProcessAction.execute_onClick(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.cc.framework.adapter.struts.ActionUtil.handleFormAction(Unknown Source)

at com.cc.framework.adapter.struts.FWAction.handleFormAction(Unknown Source)

at com.cc.framework.adapter.struts.ActionUtil.execute(Unknown Source)

at com.cc.framework.adapter.struts.FWAction.execute(Unknown Source)

at com.cc.framework.adapter.struts.FWAction.execute(Unknown Source)

at com.cc.framework.adapter.struts.RequestProcessorUtil.processAction(Unknown Source)

at com.cc.framework.adapter.struts.FWRequestProcessor.processActionPerform(Unknown Source)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

at java.lang.Thread.run(Unknown Source)

aware_support
Posts: 7526
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Most probably this is a failure in your process. Have a look at the output of the Aware IM Server. At least this means that your process is now being picked up.

You can add diagnostics messages inside the body of your process like so:
System.out.println ("My message");

The message will be printed out in the Aware IM Server output window.
Aware IM Support Team
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Post by Hubertus »

Many thanks for your help ! I'm now up and running. 8)
The final problem was that I've been using the wrong java version :oops:

Just one final question: When compiling a new version of my custom process do I really need to restart AwareIM every time ?

Hubertus
aware_support
Posts: 7526
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

You should always use Java version that comes with Aware IM.

Yes, you do need to restart Aware IM when compiling a new version of your process - Java doesn't support hot deployment of a class.
Aware IM Support Team
himanshu
Posts: 724
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Post by himanshu »

I am struggling with simple test with custom process as SimpleProcess

getting the same error like other users:
Operation error. Process implementation component com.labman.LongProcess is not found or has invalid format
i set path at awareim.conf, wrapper.conf, setenv.bat then also same error is comming.

please help me if there is a change in custom process integration
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
aware_support
Posts: 7526
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

There are no changes. The error message indicates that either your jar was not found on the classpath or your process does not implement IProcess interface.

We use custom plugins all the time - they do work, so look for the problems in your code/setup
Aware IM Support Team
himanshu
Posts: 724
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Post by himanshu »

Hi Support,

please help me to set my classpath

i try at mostly everywhere but not sucess. I am using AwareIM on my windows xp please suggest in which files i have to set up.

i even try the LabMan.jar

as per ProgrammerRefrence i add jar files

created CustomJars folder
put my JAR into

modify these files too
awareim.conf
wrapper.conf

:!: :?
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
himanshu
Posts: 724
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Post by himanshu »

i think i made it :D
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Post Reply