Paul,

In answer to your questions:
o Is the class CompanyList.class, or it's jar file, located
   in the correct directory? <jetspeed_home>/WEB-INF/classes/... or
   <jetspeed_home>/WEB-INF/lib
The classes are copied with a batch file to
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\classes, my batch file:
ECHO Copying classes to C:\Apache\tomcat\webapps\jetspeed\WEB-INF\classes
copy *.class C:\Apache\tomcat\webapps\jetspeed\WEB-INF\classes\*.class 
All classes are available.

o Based on the stacktrace, where did the exception occur?
I copy the relevant parts from my classes:
First, CompanyList.java
{
        writer.println("CompanyList.getCompanyList: Logging in into IDES");
// Shown in my private logfile
        // Log in into IDES
        order.logIn (user);
        // Create the BAPI
        writer.println("CompanyList.getCompanyList: creating function " +
bapi); // Shown in my private logfile
        order.createFunction (bapi);
        
        // Get the company list
        writer.println("CompanyList.getCompanyList: getting
COMPANYCODE_LIST"); // NOT SHOWN
        tableArray = order.getTableAsString("COMPANYCODE_LIST");
        // Finish with closing the connection to IDES
        order.closeClient();
                
        // Change tableArray to a HTML formatted string
        StringBuffer buffer = new StringBuffer();
        int length = tableArray.length;
        
        for (int i = 0; i < length; i++)
        {
                buffer.append(tableArray[i] + "<br>");
        }
        return buffer.toString();
}

Next: Order.java
private JCO.Client client;

public void logIn (User user)
{
        write ("Order.logIn: logging in user " + user.getUser() ); // Shown
in my private logger
        try 
        {
                client = JCO.createClient(user.getLoginParams() );
                write ("Order.logIn: connecting" ); // NOT SHOWN
                client.connect();
                // And create the repository
                createRepository();
        }
        catch (Exception exception) 
        {
                write ("Exception: " + exception.getMessage() +
"Order.logIn()");
                closeClient ("Exception: " + exception.getMessage(),
"Order.logIn()");
                System.exit(1);
        }
}

The relevant parts in my private logger:
CompanyList.ConcreteElement: creating order
Order.<init>: constructed
CompanyList.ConcreteElement: creating StringElement
CompanyList.ConcreteElement: getting company list
CompanyList.getCompanyList: Logging in into IDES
Order.logIn: logging in user mbergijk
EOF

By the way, as a stand alone application, using (almost) the same code,
everything works. Of course, almost is the dangerous word in this sentence.

So, the original code of Order.java (from the application that worked):
public void logIn (User user) throws Exception
{
        try 
        {
                client = JCO.createClient(user.getLoginParams() );
                client.connect();
                // And create the repository
                createRepository();
        }
        catch (Exception exception) {
                closeClient ("Exception: " + exception.getMessage(),
"Order.logIn()");
        }
}

o Do the demo portlets work?
Yes. See the following copy of my Jetspeed portals page for the turbine
user:
Company list       
org.apache.turbine.util.TurbineException: Error rendering Velocity 
template: /controls/html/jetspeed.vm: Invocation of method 'getContent' 
in class CompanyList threw exception class java.lang.UnsatisfiedLinkError 

CMG Stock Quote       
CMG stock price: CMGStockQuote.getQuote: Error opening socket: 
soaptest.activestate.com  
 
Hello User       
Hello Michel! Currently the following portals are available:
None! Check back later

Note: Error opening socket is probably caused by me working behind a
firewall. This is not a pressing problem. First let me fix this
native-language problem. Then start the firewall problem in another thread.
The HelloUser portlet works as expected.

The JCO.Client class is situated in jCO.jar, placed in
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\lib. When I try to rename this jar
file while Jetspeed is running, I get a share violation. This means that the
jCO.jar file is in use while Jetspeed is running. From this I must conclude
Jetspeed is capable of finding the jCO.jar file, and can use it. 

Conclusion:
I still think Jetspeed cannot find my DLL's in C:\WINNT\system32. These
DLL's are used by jCO.jar when connecting to SAP.

Based on my inclusions, I hope someone can shed some light on this problem.

Michel

-----Original Message-----
From: Paul Spencer [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 1 februari 2002 19:46
To: Jetspeed Users List
Subject: Re: Finding native-language definitions


Michel,
 From the log, I see the following error:
Invocation of method 'getContent' in class CompanyList threw exception 
class java.lang.UnsatisfiedLinkError

This tells me the problem is in your code, not Jetspeed's.

Places to look:
o Based on the stacktrace, where did the exception occur?

o Is the class CompanyList.class, or it's jar file, located
   in the correct directory? <jetspeed_home>/WEB-INF/classes/... or
   <jetspeed_home>/WEB-INF/lib

o Do the demo portlets work?

Paul Spencer

> 
> The contents of the logfile:
> Multiple occurrences of:
> [Fri Feb 01 15:32:00 CET 2002] -- DEBUG -- Adding entry CompanyList of
class
> class org.apache.jetspeed.services.registry.NormalizedPortletEntry to
> registry Registry
> ...and once:
> [Fri Feb 01 15:32:06 CET 2002] -- ERROR -- Error rendering Velocity
> template: /controls/html/jetspeed.vm: Invocation of method 'getContent' in
> class CompanyList threw exception class java.lang.UnsatisfiedLinkError
> 
> The last part with its neighbours:
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- template exists:
>
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\templates\vm\controllers\html\card
> .vm returning /html/card.vm
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- Controller calculated setSize 3
> row 1 colNum: 2 rowNum: 1
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- Column 0
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- Row 0 object:
> org.apache.jetspeed.portal.controls.VelocityPortletControl@1b6220
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- Row 1 object:
> org.apache.jetspeed.portal.controls.VelocityPortletControl@474e45
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- Column 1
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- Row 0 object:
> org.apache.jetspeed.portal.controls.VelocityPortletControl@63a721
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- template exists:
>
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\templates\vm\controllers\html\mult
> icolumn.vm returning /html/multicolumn.vm
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- template exists:
>
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\templates\vm\controls\html\jetspee
> d.vm returning /html/jetspeed.vm
> [Fri Feb 01 15:32:06 CET 2002] -- ERROR -- Error rendering Velocity
> template: /controls/html/jetspeed.vm: Invocation of method 'getContent' in
> class CompanyList threw exception class java.lang.UnsatisfiedLinkError
> [Fri Feb 01 15:32:06 CET 2002] -- DEBUG -- template exists:
>
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\templates\vm\controls\html\jetspee
> d.vm returning /html/jetspeed.vm
> [Fri Feb 01 15:32:08 CET 2002] -- DEBUG -- template exists:
>
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\templates\vm\controls\html\jetspee
> d.vm returning /html/jetspeed.vm
> [Fri Feb 01 15:32:08 CET 2002] -- DEBUG -- template exists:
>
C:\Apache\tomcat\webapps\jetspeed\WEB-INF\templates\vm\navigations\html\bott
> om.vm returning /html/bottom.vm
> 
> Michel
> 
> 
> Yesterday, Brendan O'Bra reported that he was getting the "can't find
native
> definition" error because he was running on a machine that did not have X
> Windows installed, and the Java Virtual Machine was dying when it tried to
> load Swing.  That would be a pretty wild coincidence if you were having
the
> same problem, eh?  But NoClassDefFound is usually a problem with your
> CLASSPATH or a classloader problem.  "Can't find native definition" is the
> description for the UnsatisfiedLinkError.  Can you copy the exact error
> message(s) you are seeing and post it here?
> 
> Mark

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to