[JBossCache] - PojoCache can't find classloader
by chip_schoch
I have a two server cluster and am trying to cache a sessionData object using PojoCache. When I initially start the app and try it I see the exception listed at the bottom.
I am kind of confused about what I am supposed to do. I am using jdk5.0, Cache 1.4.1 SP2. I don't get any exception when I put the object in a single server cache, but when it goes into the cluster it throws. I have read and tries to follow all the instructions I could find but none seems to go flawlessly. For instance, it is not clear that to me that if I am annotating my classes that I still need to use the aopc precompiler to make this work, or is it just supposed to work?
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:763)
at java.io.ObjectInputStream.(ObjectInputStream.java:278)
at org.jboss.invocation.MarshalledValueInputStream.(MarshalledValueInputStream.java:74)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:186)
at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:254)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:650)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:535)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:358)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
at org.jgroups.JChannel.up(JChannel.java:1091)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:377)
at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:393)
at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:158)
at org.jgroups.stack.Protocol.receiveUpEvent(Protocol.java:488)
at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:771)
at org.jgroups.stack.UpHandler.run(Protocol.java:60)
2007-03-06 20:45:59,638 ERROR [org.jgroups.blocks.RpcDispatcher] exception marshalling object
java.io.IOException: No ClassLoaders found for: com.eLynx.Dispatch.SessionData
at org.jboss.serial.classmetamodel.ClassMetamodelFactory.getClassMetaData(ClassMetamodelFactory.java:332)
at org.jboss.serial.classmetamodel.StreamingClass.readStream(StreamingClass.java:72)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:381)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
at org.jboss.serial.io.JBossObjectInputStreamSharedTree.readObjectOverride(JBossObjectInputStreamSharedTree.java:61)
at org.jboss.cache.marshall.JBossObjectStreamFactory$JBossObjectInputStreamOverride.readObjectOverride(JBossObjectStreamFactory.java:33)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:343)
at org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallObject(TreeCacheMarshaller140.java:432)
at org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallHashMap(TreeCacheMarshaller140.java:566)
at org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallObject(TreeCacheMarshaller140.java:456)
at org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallMethodCall(TreeCacheMarshaller140.java:493)
at org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallObject(TreeCacheMarshaller140.java:436)
at org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallMethodCall(TreeCacheMarshaller140.java:493)
at org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallObject(TreeCacheMarshaller140.java:436)
at org.jboss.cache.marshall.TreeCacheMarshaller140.objectFromStream(TreeCacheMarshaller140.java:148)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:167)
at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:254)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:650)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:535)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:358)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
at org.jgroups.JChannel.up(JChannel.java:1091)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:377)
at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:393)
at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:158)
at org.jgroups.stack.Protocol.receiveUpEvent(Protocol.java:488)
at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:771)
at org.jgroups.stack.UpHandler.run(Protocol.java:60)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.eLynx.Dispatch.SessionData
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.jboss.serial.classmetamodel.ClassMetamodelFactory.resolveClassByName(ClassMetamodelFactory.java:269)
at org.jboss.serial.classmetamodel.ClassMetamodelFactory.getClassMetaData(ClassMetamodelFactory.java:289)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025593#4025593
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025593
19Â years, 1Â month
[JBoss Seam] - Re: Weird behaviour with outjection
by rlhr
So I'm finally back to this issue and narrowed down the problem.
I have 2 SFSB named testAction (defined in previous post) and anotherAction that actually outject the User bean.
The scope of both SFSB is conversation and the outjection on both SFSB is defined as:
| @Out(required=true)
| private User user = null;
|
In anotherAction SFSB, the outjection works fine. In the other one, the outjection is not done unless the xhtml file contains something like #{testAction.user.xxx}.
Now if in the testAction is change the code as follow:
| @Out(required=true)
| private User user2 = null;
|
And consequently use in my xhtml file #{user2.xxx}, everything is fine.
This change works too:
| @Out(value="user2", required=true)
| private User user = null;
|
So it looks like the problem comes from the fact that the 2 user bean are outjected under the same name.
Since they are outjected in different conversations, why is this a problem?
Is this a bug or is it not possible to outject bean under the same name?
Thanks,
Richard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025591#4025591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025591
19Â years, 1Â month
[JBoss Seam] - How to implement cross cutting classes jar in a seam ear?
by trickyvail
I'm trying to split my utility classes away into their own jar file so I can easily reuse them from different seam projects and maintain a single source tree. I've created a jar containing the classes but I have not been able to add the jar into my ear (or war) correctly.
I've tried a few different approaches with no success:
- adding the jar to project.ear/project.war/WEB-INF/lib (class not found)
- adding the jar to project.ear/ and adding a module tag inside application.xml (bean class has no local, webservice or remote interfaces defined)
- adding the jar to project.ear and adding a loader-repository tag inside jboss-app.xml (expected only one loader-repository tag)
Some of the classes inside my jar are seam components which is why I've posted this question in the seam forum. My project.ear is esentially a generic empty seam-gen project to which I've added my jar.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025590#4025590
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025590
19Â years, 1Â month
[JBoss Seam] - Re: How can I pass parameters to action methods
by javarebel
My requirement is to get an identifier in which link I have clicked in the backing bean. I am able to find a solution for this.
In XHTML File
-------------------------
<c:forEach items="#{listingSearch.pagesLinks}" var="page">
<s:link action="#{listingSearch.next()}"
value="#{page.globalListingId}">
<f:param name="linkId" value="#{page.globalListingId}" />
</s:link>
</c:forEach>
In Backing bean
-----------------------
@RequestParameter
private String linkId;
public void next() {
System.out.println("You Clicked on link Id : " + this.linkId);
return;
}
or
FacesContext facesContext = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest)
facesContext.getExternalContext().getRequest();
String linkIdFromCtx = ((String[])request.getParameterMap()
.get("linkId"))[0];
System.out.println("Ctx: You Clicked on link Id : " + linkIdFromCtx);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025588#4025588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025588
19Â years, 1Â month
[Beginners Corner] - Remote access to MBeans
by colomb
There are countless MBeans exposed through the JBoss AS jmx-console. I've enabled remote jmx access using the
| JAVA_OPTS="-Dcom.sun.management.jmxremote.port=3543 $JAVA_OPTS"
| JAVA_OPTS="-Dcom.sun.management.jmxremote.authenticate=false $JAVA_OPTS"
| JAVA_OPTS="-Dcom.sun.management.jmxremote.ssl=false $JAVA_OPTS"
|
and then connect to the process using the standalone swing jconsole app. The only MBeans I see though that are related to jboss are in the jboss.ws, and nothing else. What do I need to do to expose all those MBeans??
The goal is to create an application that can query/listen to some of the MBeans.
I also have a simple app that creates an MBeanServerConnection and lists the domains and get the same thing. I'm guessing maybe the url is wrong or I have some configuration issues. Any help would be greatly appreciated. Thanks,
| JMXServiceURL url =
| new JMXServiceURL( "service:jmx:rmi:///jndi/rmi://server:3543/jmxrmi" );
| JMXConnector jmxc = JMXConnectorFactory.connect( url, null );
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025587#4025587
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025587
19Â years, 1Â month