cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

Missing dependent jar file while uploading custom action (MII 12.2)

shaji_chandran
Participant
0 Likes
1,076

Hi Experts,

I am trying to develop a custom action at MII 12.2 version. I have packaged my required java classes files inside a jar file with a catalog xml file mentioned below. I have  added the dependent jar files inside the main jar file which is ReadActions.jar. At MII 12.2 I do not see any place where I can upload the dependent jar files. So I added those inside the Assembly jar file. But while uploading custom action jar file I am getting and error as com.sap.xmii.Illuminator.logging.LHException: Missing dependency file xxx1.jar


Can anyone help me on this? Did I mention the dependent jar files correctly (comma separator) in the catalog.xml ?

<?xml version = "1.0" encoding="utf-8" ?>

<ComponentCatalog>

<Category Name="ReadActions" Description="ReadActions">

<Component Type="Action"

Name="ReadData"

Description="Reading"

Label="ReadData"

ClassName="xxx.xxx.ReadActions"

AssemblyName="ReadActions.jar"

Dependencies="xxx1.jar,xxx2.jar,xxx3.jar,xxx4.jar"

HelpFileName="" />

</Category>

</ComponentCatalog>

Thanks

Shaji

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Shaji,

You can zip up all the jar files and upload them as a single file to the custom actions screen,

You have mentioned the dependencies correctly.

Regards,

Anushree

shaji_chandran
Participant
0 Likes

Hi Anushree,

I have done the same only. But my file type is jar. This jar files includes all java classes for custom action and dependent jar files as well. Should I change the file type to Zip?  Will that make any difference?

Thanks

Shaji

shaji_chandran
Participant
0 Likes

Anushree,

I tried with zip format as well and got same result

Thanks

Shaji

Former Member
0 Likes

Hi Shaji,

Can you please tell us what is the file structure inside the jar file you are uploading.

Regards,

Anushree

shaji_chandran
Participant
0 Likes

Hi Anushree,

Thanks for you time to respond.

Please see the file structure of jar file

META-INF/

META-INF/MANIFEST.MF

excel/

excel/action/

excel/action/ExcelActions.class

excel/action/ExcelConfigurationDialog.class

catalog.xml

xxx1.jar

xxx2.jar

xxx3.jar

xxx4.jar

Thanks

Shaji

Former Member
0 Likes

Hi Shaji,

Try making a separate jar file such that it has:

META-INF/

META-INF/MANIFEST.MF

excel/

excel/action/

excel/action/ExcelActions.class

excel/action/ExcelConfigurationDialog.class

catalog.xml

Zip the jar file with :

xxx1.jar

xxx2.jar

xxx3.jar

xxx4.jar

Your final zip file should have 5 jars only. Let us know if it works.

Regards,

Anushree

shaji_chandran
Participant
0 Likes

Hi Anushree,

No luck this time as well.

Here is my catalog xml

<?xml version = "1.0" encoding="utf-8" ?>

<ComponentCatalog>

<Category Name="ExcelActions" Description="ExcelActions">

<Component Type="Action"

Name="ReadData"

Description="Reading Data "

Label="ReadData"

ClassName="excel.action.ExcelActions"

AssemblyName="ExcelAction.jar"

Dependencies="main.jar"

HelpFileName="" />

</Category>

</ComponentCatalog>

My jar file structure

      0 Tue Feb 03 12:36:16 IST 2015 META-INF/

    71 Tue Feb 03 12:36:16 IST 2015 META-INF/MANIFEST.MF

     0 Mon Feb 02 12:32:52 IST 2015 excel/

     0 Mon Feb 02 12:32:52 IST 2015 excel/action/

  3339 Mon Feb 02 12:41:56 IST 2015 excel/action/ExcelActions.class

  2437 Mon Feb 02 12:29:18 IST 2015 excel/action/ExcelConfigurationDialog.class

   375 Tue Feb 03 12:36:04 IST 2015 catalog.xml

7809039 Tue Feb 03 12:35:54 IST 2015 main.jar

Error message at log

Missing dependency file main.jar

[EXCEPTION]

com.sap.xmii.Illuminator.logging.LHException: Missing dependency file main.jar

at com.sap.xmii.xacute.components.ComponentCatalogManager.deployPreparation(ComponentCatalogManager.java:367)

at com.sap.xmii.xacute.components.ComponentCatalogManager.addAssembly(ComponentCatalogManager.java:135)

at com.sap.xmii.xacute.components.ComponentCatalogManager.addArchive(ComponentCatalogManager.java:189)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:592)

at com.sap.xmii.ejb.sysres.ZipHandler.writeResource(ZipHandler.java:42)

at com.sap.xmii.ejb.sysres.ZipHandler.writeResource(ZipHandler.java:18)

at com.sap.xmii.ejb.sysres.upload.ResourceUploaderBean.uploadDone(ResourceUploaderBean.java:59)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:592)

Former Member
0 Likes

Hi Shaji,

Your jar file structure should look like:

META-INF/

META-INF/MANIFEST.MF

excel/

excel/action/

excel/action/ExcelActions.class

excel/action/ExcelConfigurationDialog.class

catalog.xml

all bundled up as XYZ.jar

Then XYZ.jar and main.jar should be bundled up as a jar or a zip say ABC.zip.

If you unzip ABC.zip you should see XYZ.jar and main.jar.

Regards,

Anushree

shaji_chandran
Participant
0 Likes

Hi Anushree,

I applied the change which you mentioned. Now I am able to deploy custom action at MII 14.0 where I can upload the dependency file separately. But at MII 12.2 I am still getting the same error (com.sap.xmii.Illuminator.logging.LHException: Missing dependency file main.jar ). Also I could not find any place in MII 12.2 upload dependency jar files.

Please help

Thanks

Shaji

Former Member
0 Likes

Hi Shaji,

So you have created a .zip(or jar?) file which has both your ExcelActions.jar and Main.jar as mentioned by me above but still you are not able to upload your action?

It should work. If it doesn't, maybe its a system bug. Could you mention your complete MII version.

Regards,

Anushree

former_member185280
Active Contributor
0 Likes

It may be caused by the 12.2 server using an older version of the Java JRE than your action or libraries were compiled with.

shaji_chandran
Participant
0 Likes

Hi Christian,

Yes I had received such error (Unsupported minor version) earlier. But I fixed it by compiling at right version.

Anyway thanks for your response

Thanks

Shaji

shaji_chandran
Participant
0 Likes

Hi Anushree,

Now I realized the issue. I was accessing my MII server through Remote Desktop Connection and my jar files were stored on local machine. I used to upload the custom action jar files from my local machine. I think while browsing jar files from local machine created the issue (jar files might have corrupted). Now I copied the jar files to the MII server and browsed from there which worked.

Sorry for wasting your time.

I appreciate your continuous support again

Thanks

Shaji

shaji_chandran
Participant
0 Likes

Hi

I am able to deploy the custom action succesfully. But while running the custom action I am getting java.lang.NoClassDefFoundError. I am sure that this java class exists inside the jar file through which I deployed the custom action.

Do we need to set any classpath or put jar in a particular folder?

Thanks

Shaji

shaji_chandran
Participant
0 Likes

At last it worked. I can't have 3 level hierarchy\compression inside jar files

I kept all my actions jar and dependent jars inside one jar file and uploaded the same. This approach worked.

Thanks

Shaji

Answers (0)