cancel
Showing results for 
Search instead for 
Did you mean: 

Problems creating custom action block MII 12.0

Former Member
0 Kudos

Hi Guys,

All the test are running under MII 12.0.4 build 120

I have this java class:

package br.com.test.demo;

import com.sap.xmii.xacute.actions.ActionReflectionBase;
import com.sap.xmii.xacute.core.ILog;
import com.sap.xmii.xacute.core.Transaction;

public class DemoActionBlock extends ActionReflectionBase {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7873508537613286862L;

	public DemoActionBlock() {
		super();
	}
	
	public String getResultado() {
		return _resultado;
	}

	public void setResultado(String r) {
		_resultado = r;
	}

	public void Invoke(Transaction transaction, ILog log) {
		log.info("Entrou no método Invoke");
		_resultado = "Oi";
		_success = true;
		log.info("Saindo do método Invoke");
	}
	
	public boolean isConfigurable() {
		return false;
	}
	
	private String _resultado;
		
}

A very simple class, and I'm trying to deploy it in MII 12.0

I changed this sample in many ways, but the same error occurs always:

* [INFO ]: Execution Started At: 17:32:47
    * [ERROR]: STEP EXCEPTION () : Invalid Assignment Target: [DemoActionBlock.Resultado]
    * [ERROR]: STEP EXCEPTION (Teste_2_0) : Invalid Assignment Target: [DemoActionBlock.Resultado]
    * [ERROR]: STEP EXCEPTION (Sequence) : Item 'DemoActionBlock' is not an Action
    * [ERROR]: TRANSACTION EXECUTION TERMINATED
    * [INFO ]: Execution Completed At: 17:32:47 Elapsed Time was 0 mS

I believe that the problem may be in my xml file:

<?xml version="1.0" encoding="UTF-8"?>
<ComponentCatalog>
	<Category Name="DemoActionBlock" Description="Custom Action Block">
		<Component Type="Action" Name="DemoActionBlock" Description="" Label="DemoActionBlock" 
			ClassName="br.com.test.demo.DemoActionBlock" 
			AssemblyName="custom2.jar" HelpFileName=""></Component>
	</Category>
</ComponentCatalog>

But I don't know what is the error exactly.

I would appreciate some help.

Thanks in advance,

Pedro Sena

Edited by: Pedro Sena on Nov 17, 2008 6:34 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes,

I'm creating my MANIFEST.MF with the following content:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_16-b02 (Sun Microsystems Inc.)

Just inside META-INF dir in my jar file.

Do I need to specify any extra value in this file ?

Thanks for your reply.

Regards,

Pedro Sena

Edited by: Pedro Sena on Nov 18, 2008 3:29 PM

Former Member
0 Kudos

That looks fine, though I dont know if compiling on 1.5 instead of 1.4 would cause an issue.

Also when creating the jar, I also had to use the "Add directory entries" option (in eclipse).

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Guys,

The problem was the java version used.

I was compiling my coding in 1.5, but the required version is 1.4

Thanks for all.

Regards,

Pedro Sena

Former Member
0 Kudos

Helo Pedro,

your code is correct. Looks that you had delete custom2.jar from your MII server. Please upload again

your custom2.jar. After upload check the entry custom2.jar and deployed. Remember to delete the

cache under Java WebStart after the deployment.

Regards

Pedro

Former Member
0 Kudos

Hi Christian Libich

How do you do it ?

Thanks

Former Member
0 Kudos

This link is very outdated and some of the screen have changed, but its basically how I create my jars

[http://www.fsl.cs.sunysb.edu/dquigley/cse219/index.php?it=eclipse&tt=jar&pf=y|http://www.fsl.cs.sunysb.edu/dquigley/cse219/index.php?it=eclipse&tt=jar&pf=y]

Former Member
0 Kudos

Nobody?

Former Member
0 Kudos

When you create your jar do you do also create a manifest file?

Edited by: Christian Libich on Nov 18, 2008 3:27 PM