[Anthill-pro] AuthorizationException running sample remotingscript

Pacileo, Kenneth kenneth_pacileo at uhc.com
Fri Mar 14 08:01:44 CST 2008


Ryan,

 

We have 3.4.11 in our stage env and ran into a problem upgrading to
3.4.12 (see Curt's email yesterday ... we're still waiting for the fix).
After testing the latest version in our stage env we will upgrade but we
can't risk just putting an upgrade into our prod env and taking it down.

 

In the meantime, the test script I ran was run right on the server so I
didn't think I needed to download the remoting package (as Ryan
suggested) to the server. 

 

Do you have any other suggestions?

 

Regards,

Ken

 

________________________________

From: anthill-pro-bounces at lists.urbancode.com
[mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of Steve
Boone
Sent: Friday, March 14, 2008 9:42 AM
To: AnthillPro user and support list.
Cc: AnthillPro user and support list.
Subject: Re: [Anthill-pro] AuthorizationException running sample
remotingscript

 

Ken,

I don't think you are doing anything wrong, the examples in 3.4.6 were a
little out of date,  however, they have been updated along with other
changes made to the remoting API.   I would suggest checking out the
newest version of AnthillPro 3.4.12

Cheers,
Steve Boone

On 3/14/08, Pacileo, Kenneth <kenneth_pacileo at uhc.com> wrote:


I'm getting an AuthorizationException trying to run the sample script
from the help section "Chap 34 Remote Scripting". I created the test
script and ran the ah3client.cmd passing in the test script. We are
using AnthillPro 3.4.6 with JDK 1.5.0_12. What am I doing wrong?

Regards,
Ken

Test script:
import com.urbancode.anthill3.main.client.AnthillClient;
import com.urbancode.anthill3.persistence.UnitOfWork;
import com.urbancode.anthill3.domain.project.*;

String serverHost = "localhost";
int serverPort = 4567;
String userName = "<username>"; /* Replaced here */
String password = "<password>"; /* Replaced here */

// obtain connection to the Anthill server
AnthillClient anthill = AnthillClient.connect(serverHost, serverPort,
                                              userName, password);

System.out.println("anthill object = " + anthill);
System.out.println("executing anthill.createUnitOfWork()");

// create a Unit of Work
UnitOfWork uow = anthill.createUnitOfWork();

// Project
Project[] projects = ProjectFactory.getInstance().restoreAll();

for (int i = 0; i < projects.length; i++) {
  print(projects[i].getName());
}

uow.commitAndClose();


Output:
E:\anthill3\server\opt\remoting\bin>ah3client.cmd testscript.txt
CLASSPATH=..\conf\client;..\conf\spring-client;..\lib\anthill3-client.ja
r;..\lib\bsh-2.0b4-c1.jar;..\lib\devilfish.jar;
..\lib\log4j.jar;..\lib\CommonsNet.jar;..\lib\CommonsUtil.jar;..\lib\spr
ing-core.jar;..\lib\spring-beans.jar;..\lib\commons-logging.jar;..\lib\c
ommons-lang-2.1.jar
anthill object = com.urbancode.anthill3.main.client.AnthillClient at e2dae9
executing anthill.createUnitOfWork()
Script threw exception: Sourced file: testscript.txt : Typed variable
declaration : Method Invocation anthill.createUnit
OfWork : at Line: 21 : in file: testscript.txt : anthill
.createUnitOfWork ( )

Target exception:
com.urbancode.anthill3.domain.security.AuthorizationException:
java.io.InvalidClassException: com.urba
ncode.anthill3.persistence.remoting.common.SessionToken; local class
incompatible: stream classdesc serialVersionUID = 1
, local class serialVersionUID = 4083838054053219010

com.urbancode.anthill3.domain.security.AuthorizationException:
java.io.InvalidClassException: com.urbancode.anthill3.per
sistence.remoting.common.SessionToken; local class incompatible: stream
classdesc serialVersionUID = 1, local class serialVersionUID =
4083838054053219010
        at
com.urbancode.anthill3.persistence.remoting.client.UnitOfWorkClient.auth
enticate(UnitOfWorkClient.java:196)
        at
com.urbancode.anthill3.main.client.AnthillClient.createUnitOfWork(Anthil
lClient.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at bsh.Reflect.invokeMethod(Unknown Source)
        at bsh.Reflect.invokeObjectMethod(Unknown Source)
        at bsh.Name.invokeMethod(Unknown Source)
        at bsh.BSHMethodInvocation.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHVariableDeclarator.eval(Unknown Source)
        at bsh.BSHTypedVariableDeclaration.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.source(Unknown Source)
        at bsh.Interpreter.main(Unknown Source)
Caused by: java.io.InvalidClassException:
com.urbancode.anthill3.persistence.remoting.common.SessionToken; local
class incompatible: stream classdesc serialVersionUID = 1, local class
serialVersionUID = 4083838054053219010
        at
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
        at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
        at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699
)
        at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at
com.urbancode.devilfish.common.NetworkUtils.readObject(NetworkUtils.java
:117)
        at
com.urbancode.devilfish.common.NetworkUtils.readObject(NetworkUtils.java
:109)
        at
com.urbancode.anthill3.persistence.remoting.devilfish.RemoteUnitOfWorkSe
rviceClient.authenticate(RemoteUnitOf
WorkServiceClient.java:93)
        at
com.urbancode.anthill3.persistence.remoting.client.UnitOfWorkClient.auth
enticate(UnitOfWorkClient.java:193)
        ... 16 more

E:\anthill3\server\opt\remoting\bin>
  
  



This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.

_______________________________________________
Anthill-pro mailing list
Anthill-pro at lists.urbancode.com
http://lists.urbancode.com/mailman/listinfo/anthill-pro

 



This e-mail, including attachments, may include confidential and/or 
proprietary information, and may be used only by the person or entity to 
which it is addressed. If the reader of this e-mail is not the intended 
recipient or his or her authorized agent, the reader is hereby notified 
that any dissemination, distribution or copying of this e-mail is 
prohibited. If you have received this e-mail in error, please notify the 
sender by replying to this message and delete this e-mail immediately.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.urbancode.com/pipermail/anthill-pro/attachments/20080314/8ecf642a/attachment-0001.htm


More information about the Anthill-pro mailing list