[JBoss Portal] - Re: kCGErrorRangeCheck Error : while JbossPortal 2.6.3
by cybershastri
Hi Chris,
Thanks for the reply.
I used the option -Djava.awt.headless=true and now i dont see the error.
However, I keep getting the below error repeatedly every few minutes after the server is started.
As of now I dont need WSRP package. But, I would like to have a fix to this as we might need it in future.
21:54:36,927 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}Fault
21:54:36,927 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}InvalidCookieFault
21:54:36,928 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}UnsupportedMimeTypeFault
21:54:36,932 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}InconsistentParametersFault
21:54:36,932 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}UnsupportedLocaleFault
21:54:36,933 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}InvalidHandleFault
21:54:36,933 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}InvalidRegistrationFault
21:54:36,933 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}InvalidUserCategoryFault
21:54:36,934 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}PortletStateChangeRequiredFault
21:54:36,934 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}UnsupportedWindowStateFault
21:54:36,934 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}UnsupportedModeFault
21:54:36,935 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}InvalidSessionFault
21:54:36,935 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}MissingParametersFault
21:54:36,935 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}OperationFailedFault
21:54:36,935 INFO [STDOUT] no object for {urn:oasis:names:tc:wsrp:v1:types}AccessDeniedFault
21:54:36,989 WARN [ServiceObjectFactory] Unable to narrow port selection for
UnifiedPortComponentRef
serviceEndpointInterface=org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType
portQName=null
enableMTOM=false
portComponentLink=null
callProperties=[]
stubProperties=[]
configName=null
configFile=null
21:54:37,404 ERROR [Scheduler$Listener] Invoke of the Schedulable MBean failed
javax.management.MBeanException
at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:180)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.varia.scheduler.Scheduler$MBeanListener.handleNotification(Scheduler.java:1346)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
at $Proxy11.handleNotification(Unknown Source)
at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:221)
at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:184)
at javax.management.timer.Timer.sendNotification(Timer.java:1295)
at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1264)
at javax.management.timer.TimerAlarmClock.run(Timer.java:1347)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: org.jboss.portal.portlet.InvokerUnavailableException: Problem getting service description for producer self, please see the logs for more information.
at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getPortlets(WSRPConsumerImpl.java:157)
at org.jboss.portal.portlet.federation.impl.FederatedPortletInvokerService.getPortlets(FederatedPortletInvokerService.java:90)
at org.jboss.portal.core.management.PortletDiscoveryService.processPortletDiscovery(PortletDiscoveryService.java:88)
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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
... 20 more
Caused by: java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:204)
at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:337)
at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:517)
at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:277)
at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:151)
at $Proxy271.getServiceDescription(Unknown Source)
at org.jboss.portal.wsrp.consumer.ProducerInfo.getUnmanagedServiceDescription(ProducerInfo.java:618)
at org.jboss.portal.wsrp.consumer.ProducerInfo.internalRefresh(ProducerInfo.java:303)
at org.jboss.portal.wsrp.consumer.ProducerInfo.detailedRefresh(ProducerInfo.java:254)
at org.jboss.portal.wsrp.consumer.ProducerInfo.refresh(ProducerInfo.java:249)
at org.jboss.portal.wsrp.consumer.ProducerInfo.getPortletMap(ProducerInfo.java:566)
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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
at org.jboss.portal.wsrp.consumer.ProducerInfo_$$_javassist_106.getPortletMap(ProducerInfo_$$_javassist_106.java)
at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getPortlets(WSRPConsumerImpl.java:152)
... 27 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:333)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:183)
... 45 more
Caused by: org.jboss.ws.WSException: Invalid HTTP server response [404] - Not Found
at org.jboss.ws.core.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:77)
at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:473)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:305)
... 50 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116879#4116879
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116879
18 years, 3 months
[JBoss Seam] - Retreiving data based on displayed data
by felixk2
Hi,
I'm not sure if I am doing this correctly so any help would be appreciated. Here is the situation: I have a page that displays a particular Customer. Underneath that Customer i'd like to list all the orders.
I've created a bean with the following method:
public List<CustomerProduct> customerProductListByCustomer(Customer customer)
I have a rich:datatable on the view that calls this method and fills in the table. Problem is I need to use this method to determine if the table should be rendered. So I have the following in the view:
<h:outputText value="No Customer Products Exist." rendered="#{empty customerProductList.customerProductListByCustomer(customerHome.instance)}"/>
| <rich:dataTable id="customerProductList" var="customerProduct"
| value="#{customerProductList.customerProductListByCustomer(customerHome.instance)}"
| rendered="#{not empty customerProductList.customerProductListByCustomer(customerHome.instance)}">
| <rich:column>
| <f:facet name="header">Name</f:facet>
| #{customerProduct.productInstanceName}
| </rich:column>
| </rich:dataTable>
The problem with this approach is that now Hibernate queries my database 3 times. Twice to check if there is data to render, and once to populate the table.
My question is, is my method the standard way to do this? I'd rather just have a bean with an @Out that I can use to check if is empty and use to populate the datatable, but then I can't pass it an argument (in this case the customer). Any suggestions?
Thanks,
Felix
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116876#4116876
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116876
18 years, 3 months
[EJB/JBoss] - Serializable no remote classloading
by newtetris
I try to return an Interface of a serializable Object and simply access a getter but all I get is a ClassNotFoundException:
on JBoss 4.2.2.GA
| java.lang.reflect.UndeclaredThrowableException
| at $Proxy0.findRessource(Unknown Source)
| at org.test.EJBTester.main(EJBTester.java:39)
| Caused by: java.lang.ClassNotFoundException: org.test.RessourceImpl
| at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:82)
| at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:76)
| 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.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:174)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
| 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 org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
| at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:239)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:133)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:120)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:957)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:586)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
|
files:
| public interface Ressource
| {
| public void setId(Long id);
| public Long getId();
| }
|
| public class RessourceImpl implements Ressource, Serializable
| {
| private Long id;
|
| public Long getId() {
| return this.id;
| }
| public void setId(Long id) {
| this.id = id;
| }
| }
|
| @Stateless
| @Remote(value=RessourceBean.class)
| public class RessourceBeanImpl implements RessourceBean, Serializable
| {
| public Ressource findRessource(Long id) {
| // simplified
| Ressource res = new RessourceImpl();
| res.setId(1L);
| return res;
| }
| }
| @Remote
| public interface RessourceBean
| {
| Ressource findRessource(Long id);
| }
|
|
the test:
| public class EJBTester
| {
| public static void main(String[] args)
| {
| RessourceBean res = null;
| try
| {
| Properties props = new Properties();
| props.setProperty("java.naming.provider.url", "jnp://localhost:1099");
| props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
| props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| //
| props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
| //props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
| //props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
| System.setProperty("java.security.policy", "client.policy");
| System.setSecurityManager(new RMISecurityManager());
| InitialContext ctx = new InitialContext( props );
| //res = (RessourceBean) ctx.lookup("org.test.ejb.RessourceBean");
| res = (RessourceBean) ctx.lookup("TestEJB/RessourceBeanImpl/remote");
| if (null != res)
| {
| Ressource r = res.findRessource(null);
| if (null != r)
| {
| System.out.println("id = " + r.getId());
| }
| }
| }
| catch (Exception e)
| {
| e.printStackTrace();
| }
| }
|
| }
On the client I only added the interfaces and retrieve successfully the SSB .. And the funny thing is as you might have noticed on glassfish it works without any problems it fetches the (ressource)implemenation via RMIClassloader ;)
Any hints/suggestions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116874#4116874
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116874
18 years, 3 months
[JBossWS] - Writing a client - no examples for BindingProvider based doc
by mjhammel
Short background: I'm migrating a project from JBOSS 4.0.5GA that used Axis to generate WSDL interfaces for my JAX-RPC based clients.
I've got a simple web service up under JBOSS. I can see it under http://localhost:8080/jbossws/services. It has a very simplistic Web Service that simply reads data from a table in the DB using EJB's generated using Hibernate to reveng an existing db. Accessing the WSDL through the localhost url requires a login userid and password, which seems to mean I have my database-based authentication setup correctly (or at least I think it does). The server side appears ready to access with a client.
So I've read up on writing clients:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=62678 (found the Wiki pages and sample explanations discussed there:
http://jbws.dyndns.org/mediawiki/index.php?title=Samples)
http://jbws.dyndns.org/mediawiki/index.php?title=JAX-WS_User_Guide#Servic...
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=123643
http://jbws.dyndns.org/mediawiki/index.php?title=JBossWS_JAX-WS_Tools#Cli...
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=108760
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=104091
http://jbws.dyndns.org/mediawiki/index.php?title=Authentication
http://jbws.dyndns.org/mediawiki/index.php?title=JBossWS_JAX-WS_Tools
All the examples I can find show the use of BindingProvider to set the username and password. Some of these links suggest looking at the example code in the testsuite in the JBOSS source code. So I downloaded the JBOSS-4.2.2GA source but none of the code (any of it) uses BindingProvider.
Then I discovered that the source was actually JBOSS-WS from http://labs.jboss.com/jbossws/downloads/. My first questions, then, are this: isn't WS included in the application server? Do I need to download the WS binary and add it to the JBOSS application server (for V4.2.2GA of the app server)? At the moment I've got a compile-time problem so have not been able to simply try it and find out.
Looking through the examples in the WS source code I cannot find an example that seems to implement the simplistic code shown in the client example here:
http://jbws.dyndns.org/mediawiki/index.php?title=JBossWS_JAX-WS_Tools#Cli...
I was hoping it would be as easy as this shows, with the added properties to the BindingProvider for username and password. The SimpleUserNameTestCase example uses a QName class and does a Service.create(), something the JAX-WS Tools page (http://jbws.dyndns.org/mediawiki/index.php?title=JBossWS_JAX-WS_Tools#Cli...) recommends not doing.
I've written this client, but it fails to compile with an error I've not seen in any discussions or in any googled pages:
package wsTestJAXWS;
|
| import java.net.URL;
| import javax.xml.ws.*;
| import javax.jws.*;
|
| /* Web Services interfaces */
| import com.cei.crunch.server.subscriberservices.*;
|
| /* Crunch DB tables. */
| import com.cei.crunch.ejb.Subscriber;
|
| public class wsTestJAXWS {
|
| private static URL targetURL = null;
| private String subscriberID = null;
| private String pw = null;
| private String host = null;
| private String crunchServer = null;
| private Subscriber profile = null;
| SubscriberServicesEndpoint ss = null;
|
| private boolean serviceBind()
| {
| try {
|
| SubscriberServicesService service = new SubscriberServicesService();
| ss = service.getSubscriberServicesPort();
|
| /* Set NEW Endpoint Location */
| BindingProvider bp = (BindingProvider)ss;
| bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, crunchServer);
|
| /* Setup to authenticate with the server. */
| bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, subscriberID);
| bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, pw);
|
| return true;
| }
| catch (Exception e) {
| System.out.println("Failed to login to server.");
| System.exit(1);
| }
| return false;
| }
|
| public void run(String[] args) {
|
| /* Save the subscriber login information. */
| if ( args.length != 3 )
| {
| System.out.println("Missing command line args (userid, password, server).");
| System.exit(1);
| }
| this.subscriberID = args[0];
| this.pw = args[1];
| this.host = args[2];
|
| // crunchServer = "https://" + this.host + ":8443/Crunch/services/SubscriberServices";
| crunchServer = "http://" + this.host + ":8080/Crunch/services/SubscriberServices";
| System.out.println("Trying to connect to " + crunchServer + " as User: " + subscriberID + ", password: " + pw);
|
| /* Get the WSDL interfaces to the server. */
| if ( serviceBind() == false )
| {
| System.out.println("Login failed.");
| System.exit(1);
| }
|
| /* Retrieve subscriber profile information. */
| try {
| profile = ss.findSubscriber("CRUNCH-DEFAULT-SUPERUSER");
| }
| catch (Exception e) {
| System.out.println("Failed findSubscriber(): " + e.getMessage());
| e.printStackTrace();
| System.exit(1);
| }
| if ( profile == null )
| {
| System.out.println("findSubscriber() failed.");
| System.exit(1);
| }
|
| System.out.println("Subscriber name : " + profile.getFirstname());
| System.out.println("Subscriber email: " + profile.getEmailAddress());
| }
|
| public static void main(String[] args) {
| new wsTestJAXWS().run(args);
| }
|
| }
The compile time error is this:
-client.test:
| [javac] Compiling 1 source file to /home/mjhammel/src/cei/crunch/build/classes/client
| [javac] /home/mjhammel/src/cei/crunch/src/com/cei/crunch/clients/tests/wsTestJAXWS.java:74: cannot access javax.xml.bind.annotation.XmlAccessorType
| [javac] file javax/xml/bind/annotation/XmlAccessorType.class not found
| [javac] profile = ss.findSubscriber("CRUNCH-DEFAULT-SUPERUSER");
| [javac] ^
| [javac] /home/mjhammel/src/cei/crunch/src/com/cei/crunch/clients/tests/wsTestJAXWS.java:76: cannot access javax.xml.bind.annotation.XmlElement
| [javac] file javax/xml/bind/annotation/XmlElement.class not found
| [javac] catch (Exception e) {
| [javac] ^
| [javac] 2 errors
I can't find any discussion on what the XmlAccessorType or XmlElement classes are or why they're being referenced at the specified points in my code.
FYI: The SubscriberServicesService class is being generated using wsconsume (http://jbws.dyndns.org/mediawiki/index.php?title=Wsconsume).
Any pointers to getting this first test client working with username/password login (BASIC authentication, with DatabaseServerLoginModule configured in my application-policy) would be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116866#4116866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116866
18 years, 3 months