[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Unsharable class question  XML
Forum Index -> Terracotta Platform
Author Message
vidarmoe

neo

Joined: 08/03/2006 10:46:55
Messages: 5
Offline

Hi!

I am working on getting my BEA Pageflow app to work with DSO. I have some challenges with the com.bea.wlw.netui.pageflow.PageFlowStack object. It gives me the following error message:

<Thread "SSLListenThread.Default" listening on port 7002, ip address *.*>
####<07.aug.2006 kl 00.27 CEST> <Error> <HTTP> <Server1> <cgServer> <ExecuteThread: '14' for queue: 'default'> <<WLS Kernel>> <> <BEA-101020> <[ServletContext(id=1265975,name=terracottaWeb,context-path=/terracottaWeb)] Servlet failed with Exception
java.lang.Throwable:
***************************************************************************************************
Attempt to share an instance of a non-portable class by passing it as an argument to a method of a
logically-managed class. This unshareable class has a logically-managed superclass.
Subclasses of logically-managed classes cannot be shared. Please either modify the class
hierarchy or ensure that instances of this class don't enter the shared object graph.

Thread : ExecuteThread: '14' for queue: 'default'
JVM ID : VM(0)
Logically-managed class name : java.util.HashMap
Logical method name : put(Object,Object)
Unshareable class : com.bea.wlw.netui.pageflow.PageFlowStack
Logically-managed superclass names: java.util.Stack
***************************************************************************************************

at com.tc.object.ClientObjectManagerImpl.throwNonPortableException(ClientObjectManagerImpl.java:541)
at com.tc.object.ClientObjectManagerImpl.checkPortabilityOfLogicalAction(ClientObjectManagerImpl.java:516)
at com.tc.object.tx.ClientTransactionManagerImpl.logicalInvoke(ClientTransactionManagerImpl.java:548)
at com.tc.object.TCObjectLogical.logicalInvoke(TCObjectLogical.java:19)
at com.tc.object.bytecode.ManagerImpl.logicalInvoke(ManagerImpl.java:181)
at com.tc.object.bytecode.ManagerUtil.logicalInvoke(ManagerUtil.java:92)
at java.util.HashMap.put(HashMap.java)
at weblogic.servlet.internal.session.TerracottaSessionData.setAttribute(TerracottaSessionData.java:55)
at com.bea.wlw.netui.pageflow.PageFlowUtils.persistStack(PageFlowUtils.java:334)
at com.bea.wlw.netui.pageflow.PageFlowUtils.getPageFlowStack(PageFlowUtils.java:304)
at com.bea.wlw.netui.pageflow.PageFlowUtils.getPageFlowStack(PageFlowUtils.java:286)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:527)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.__TC_run(WebAppServletContext.java:7051)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.__TC_invokeServlet(WebAppServletContext.java:3902)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
>

I have tried excluding the PageFlowStack class as shown below, but I still get the same error message. What am I doing wrong? Don't see how I can exclude neither Stack nor HashMap, so I am unsure of how to proceed here...

My config files is attached, and also shown here:

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

<!-- This is a minimal Terracotta configuration file that's just
enough to start the system.

DSO services are started by default; they require no
immediate manual configuration, although you will have to
define locks, roots, and instrumented classes, below, to
run your own applications.

JDBC services are not started by default; they require
you to configure the database-listener host and port,
below, before they can run correctly.

For more information, consult the Terracotta documentation
and/or the sample configuration files provided with the
server.
-->

<tc:tc-config
xmlns:tc="http://www.terracottatech.com/config-v1">

<system>
<jdbc-enabled>false</jdbc-enabled>
<dso-enabled>true</dso-enabled>

<!-- This switch affects how the server behaves in the
presence of differing configurations for your
application (the elements inside the <application>
element, below).

In the default configuration model, 'production',
the server's own local configuration is canonical:
if a client connects and has a different configuration,
it will read the server's configuration instead and
use that. (This will cause a DSO client to disconnect
and stop, because DSO clients are unable to modify
their configuration once running.)

In the 'development' configuration model, if a
client connects and has a different configuration from
server, the server accepts the client's new configuration and
uses it. Further, any currently-connected clients are
updated to match the new configuration. (Again,
for DSO, this means they will disconnect and stop.)

'development' mode allows you to modify configuration
on-the-fly more easily and have the system respond
to it automatically, while 'production' mode allows
you to be sure your configuration won't change at
runtime.

See the documentation for more details.
-->
<configuration-model>development</configuration-model>
</system>

<application>

<jdbc>
<database>
<listener>
<host>mydatabasehost.mycompany.com</host>
<port>9010</port>
</listener>
</database>
</jdbc>

<dso>
<instrumented-classes>
<include>
<class-expression>*..*</class-expression>
</include>
<!-- Some standard exclusions for app server internal classes
(enable these classes only if necessary) -->
<exclude>weblogic..*</exclude>
<exclude>com.rsa..*</exclude>
<exclude>org.apache.coyote..*</exclude>
<exclude>org.apache.catalina..*</exclude>
<exclude>org.apache.jasper..*</exclude>
<exclude>org.apache.tomcat..*</exclude>
<exclude>com.bea.wlw.netui.pageflow.PageFlowStack</exclude>
</instrumented-classes>

<transient-fields>
<field-name>com.bea.wlw.netui.pageflow.FlowController._transientActionServlet</field-name>
</transient-fields>


<locks>
<autolock>
<method-expression>* *..*.*(..)</method-expression>
<lock-level>write</lock-level>
</autolock>
</locks>

<roots>
<root>
<!-- CHANGE THIS SECTION TO INCLUDE THE ROOT OF YOUR OBJECT GRAPH -->
<field-name>com.mycompany.mypkg.ClassOne.myfield</field-name>
</root>
</roots>
</dso>

</application>

</tc:tc-config>


Regards,
Vidar Moe
 Filename tc-config.xml [Disk] Download
 Description
 Filesize 4 Kbytes
 Downloaded:  40 time(s)

achhabra

neo

Joined: 07/06/2006 10:27:12
Messages: 9
Offline

Hi Vidar,

The <instrumented-classes><exclude> tag is only for performance enhancement. This tells the DSO that the excluded classes are not part of the shared object graph so DSO should not instrument those classes. If you do not want a particular object to be part of the object graph, you have to use the <transient-fields> tag or <honor-transient> tag. Please see the product guide for more details on these tags.

Looking at the stack trace, it seems that the unshareable object is not stored in any field. It is being "put" in a HashMap so you may not be able to use any of the above methods to exclude this unshareable class. If that is indeed the case, your only choices are either to change the source code or change the app server options (if possible) so that this code is not executed. If instead of extending the java.util.Stack you had a class that encapsulated a java.util.Stack object, Terracotta DSO would allow you to add that object to the shared object graph.

Arvind
Field Engineer
Terracotta, Inc.
vidarmoe

neo

Joined: 08/03/2006 10:46:55
Messages: 5
Offline

Ok, I will have to investigate this. If source code change is the only option, the product actually does not work with default page flow applications created with BEA WebLogic Workshop. I will investigate a little bit further.

Regards,
Vidar
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team