Compiling Java Services

[SIZE=2]Hello All,
This is the structure of my package on the IS- MyPackageName\mypackagename\subflows

I am trying to compile a java service which uses an external jar. I have placed the jar file under MyPackageName\code\jars directory and reloaded the package. When the java service is created in the root folder ie under mypackagename folder it works perfectly but when I create it under mypackagename.subflows folder it does not compile. I get a java:46: cannot resolve symbol exception.

So I tried the following:

  1. Placed the jar file under MyPackageName\code\jars\static and reloaded the package. In this case I get the following error:
    java:46: cannot resolve symbol
    exception.

  2. Extracted the classes from the jar file and placed it along with class file of that subfolder ie in MyPackageName\code\classes\mypackagename and reloaded the package. In this case I get the following error:
    [B]bad class file: class file contains wrong class: Please remove or make sure it appears in the correct subdirectory of the classpath.

[/b]3. Placed the jar file under MyPackageName\code\classes\mypackagename and reloaded the package. In this case I get the following error:
java:46: cannot resolve symbol exception.

When I had faced a similar problem earlier, Point No:1 had resolved it. But now it does not seem to be working.

Any inputs to resolve this are appreciated.

Thanks,
Shompa
[/size]

I would install the JAR file on the IS server. I believe the path is: ~/IntegrationServer/lib/jars

By “install”, just copy the jar file to that folder and restart the IntegrationServer.

You can then import your needed class files from the JAR within your java services.
This should resolve your symbol issue and it will allow all of your java services in any
package to access this JAR.

_brett.

Hi,

Its still not working for me.I am still getting the error
java:46: cannot resolve symbol exception.Please advise.

What’s at line 46? Can’t resolve symbol means it can’t find a variable or a class (or the method is coded badly or a host of other reasons). Is line 46 referencing a variable, a class, a method, what?

Does the code in the jar work outside of the context of webMethods?