[Management, JMX/JBoss] - twiddle + java.lang.ClassNotFoundException: org.jboss.manage
by massoo
hi,
whenever I try to get the stats from the command line twiddle as :
anonymous wrote : twiddle.sh -s jnp://10.10.25.40:1099 get "jboss.management.local:name=ejb/SeakeyIncomingMessageParser,J2EEServer=Local,EJBModule=SeaKeyBackEndModule.jar,J2EEApplication=ejb.jar,j2eeType=StatelessSessionBean stats"
I get the following errors on the conosle
anonymous wrote : 01:24:48,315 ERROR [Twiddle] Exec failed
| java.lang.reflect.UndeclaredThrowableException
| at $Proxy0.getAttributes(Unknown Source)
| at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java:156)
| at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:290)
| Caused by: java.lang.ClassNotFoundException: org.jboss.management.j2ee.statistics.StatelessSessionBeanStatsImpl (no security manager: RMI class loader disabled)
| at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
| at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
| at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
| at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
| at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
| at java.util.ArrayList.readObject(ArrayList.java:591)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
| at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
| at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:120)
| at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
| at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:51)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
| at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:59)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
| ... 3 more
What should i do to solve this ?
Regards
Shann
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996361#3996361
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996361
19 years, 4 months
[JBoss Seam] - Re: Getting LazyInitializationErrors with a SMPC
by SmokingAPipe
"norman.richards(a)jboss.com" wrote : Yes, it works. It's just a new name. Are you using a seam managed persistence context?
Yes, definitely. Here's the scenario, which is just like basically every other web application on the planet: A user goes to a login-page, logs in, the "User" object is stored in the session, and then the user can access a bunch of protected pages that display and manipulate the "user" object. Just what every web app anywhere does.
Here's what I've got:
<!DOCTYPE faces-config PUBLIC
| "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
| "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
|
| <faces-config>
|
| <application>
| <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
| </application>
|
| <!-- We use the Seam Managed Persistence Context (SMPC) to avoid -->
| <!-- the dreaded LazyInitializationExceptions -->
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.TransactionalSeamPhaseListener</phase-listener>
| </lifecycle>
|
| <!-- a couple of converters also, removed for brevity -->
|
| </faces-config>
and the LoginAction bean, with some boilerplate deleted:
| @Stateful
| @Name("login")
| public class LoginAction implements Login {
|
| @In(required=false) @Out(required=false)
| private Customer customer;
|
| private String name = null;
|
| private String password = null;
|
| @In(create=true)
| private transient FacesMessages facesMessages;
|
| /** Injected not created */
| @In(create=true) EntityManager smpc;
|
| public String gatewayLogin() {
| if(smpc == null) {
| logger.severe("No entity manager was found, so this will not work.");
| return "/internal-error.jsp";
| }
|
| if(password == null) return "internal-login";
|
| if(name == null) return "internal-login";
|
| password = password.trim().toLowerCase();
|
| final List<Customer> results = smpc.createQuery("from Customer where " +
| "name = :name and password = :password")
| .setParameter("name", name)
| .setParameter("password", getPassword())
| .getResultList();
| if (results.isEmpty()) {
| logger.info("no such customer was found");
| facesMessages.add("invalidLogin",
| new FacesMessage("The username or password was invalid"));
| customer = null;
| } else {
| customer = results.get(0);
| logger.info("About to log in this customer: " + customer);
| return "/customer/index";
| }
| }
|
And persistence.xml:
<persistence>
| <persistence-unit name="foo">
| <jta-data-source>java:/FooDS</jta-data-source>
|
| <properties>
| <property name="hibernate.hbm2ddl.auto"
| value="update"/>
|
| <property name="jboss.entity.manager.factory.jndi.name"
| value="java:/EntityManagerFactories/smpcData"/>
|
| </properties>
| </persistence-unit>
| </persistence>
|
And components.xml:
| <components>
|
| <component name="org.jboss.seam.core.init">
| <property name="debug">true</property>
| <property name="jndiPattern">Foo/#{ejbName}/local</property>
| <property name="myFacesLifecycleBug">false</property>
| </component>
|
| <!-- 120 second conversation timeout -->
| <component name="org.jboss.seam.core.manager">
| <property name="conversationTimeout">120000</property>
| </component>
|
| <!-- We can use Seam-managed persistence context to avoid -->
| <!-- dreaded LazyInitializationExceptions -->
| <component name="smpc"
| class="org.jboss.seam.core.ManagedPersistenceContext">
| <property name="persistenceUnitJndiName">java:/EntityManagerFactories/smpcData</property>
|
| </component>
|
| </components>
|
And finally, the Customer class itself, trimmed:
| @Entity
| @Name("customer")
| @Scope(ScopeType.SESSION)
| @Roles({@Role(name="createCustomer",scope=ScopeType.CONVERSATION)})
| public class Customer extends Person implements Serializable {
|
Anyway, after I do the login, the "customer" is properly set in the HTTP session, as you would expect, but when I go to access some collection from the customer object, I get a LIE. I'm totally baffled by this, because I thought that SMPC was supposed to nearly eliminate LIEs.
Thanks for any help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996359#3996359
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996359
19 years, 4 months
[JBoss Seam] - Usage of selectitems breaks application flow (weird!)
by atzbert
I've been struggling with this for weeeks now. And I ultimately tracked it down to selectitems. Neither the f:selectItems with converter nor the si:selectitems will work. the selectitems will be displayed as expected in a drop-down box (i.e. selectOnemenu) but as soon as I want to execute any action from this page, the application doesn't react anymore. this only happens to those selectitems which represents entities and have to be converted. (no usable logs after a certain point, no exceptions thrown)
Before I loose myself in tons of details and source extracts:
Did anyone of you ever experience strange behaviour when working with selectitems. Is there anything, maybe related to the entitymanager or the extended persistence context (which I use) I need to know about?
Any help / suggestion or advise is MUCH appreciated! I'm really stuck here.
Merry Christmas,
Tino
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996356#3996356
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996356
19 years, 4 months