cancel
Showing results for 
Search instead for 
Did you mean: 

Library inclusion during runtime

mustachetomi
Champ in-the-making
Champ in-the-making
Hi,

I have the following situation: I am currently working with the alfresco version 5.0.a and wrote a class for the repo-amp. It uses a library that is loaded from a external maven repository and available as a normal jar file. This library enables me to connect with a image database that is on a separate server and needs an authentication API that is located in this library JAR. When I start the compilation (I use the all-in-one project), it goes through without a problem, but i made a test printout and this failed with the reason that the authentication (which is the first thing that needs to happen during the run of my class) failed because the authentication class is not available. This brought me to the conclusion, that currently the jar is loaded during the compilation (which needs to happen, or it would not load at all) but is not available during run-time.

Currently the library is added in the repo-amp POM and loaded into my local repository. I need help to include it in the run-time and access it.

Thank you for the help Smiley Happy
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
There should be an option to package your jar in the amp.

darionis
Champ on-the-rise
Champ on-the-rise
If you unzip your amp, you should find your jar in the lib folder. If it is not there, there is no point going further and running your app.

How do you add this dependency? If it is declared as dependency in the pom, it should be packaged in the amp. Paste your pom fragment.   

I have found the problem but don't have any solutions for it:

INFO: validateJarFile (****) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

What could cause this. It is in the AMP file but it does not get loaded.

Thx

PS: I updated to the Alfresco Repository 5.0.d