Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!

Ali Gohar

Ranch Hand
+ Follow
since Mar 18, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ali Gohar

Hi,

I've slimlined jboss-5.1.0.GA's default configuration and removed ejb/jms etc stuff from it and it currently supports web applications only. My web application is trying to send a message to a remote jboss queue but it fails when it tries to create a jms session. I can lookup the initial context and can create the connection but when i try to create session using my connection object, i get NullPointerException. My connection object is definately not null, I print it on console. I've not removed any libraries from client/ and common/lib directories though. Here is the stack trace:



Doesn't give much information

Any idea what am i doing wong?

Thank you.
6 years ago
Fixed the problem It looks like PowerMock 1.4.5 is not compatible with easymock 2.2. It works with EasyMock 3.0 as easymock 3.0 doesn't use class extensions anymore separately it is built into it. Also it needs javassist 3.12.0.GA. Thanks.
7 years ago
Thanks for your reply. Don't know to be honest I am still learning but looking at the example on their website, it looks like we can mock classes having final methods etc using PowerMock.createMock method. Have a look at http://code.google.com/p/powermock/wiki/MockFinal.
7 years ago
I am using following in my pom.xml


I get this exception:

then i added javassist to my pom.xml like this:

I've got rid of that problem but now I get another exception while trying to use PowerMock.createMock() method. Here is my code to create mock. its simple:

Exception i get is:


Any idea what am i doing wrong?

Thanks
7 years ago
Hi,

I am using JBossWS generated web services with EJB3 endpoint, but i get following exception:


I am using jboss 4.2.2. Any help?

Thanks
10 years ago
Hi,

I have generated a client stubs for RPC/Encoded style webservices using wscompile tool of JWSDP 2.0. But when i run the client, i get following error

no serializer is registered for (class [Lcom.test.mywebservices.service.TemplateVariable;, {http://com.test.mywebservices/types}ArrayOfTemplateVariable)
at com.sun.xml.rpc.encoding.TypeMappingUtil.getSerializer(TypeMappingUtil.java:51)
at com.sun.xml.rpc.encoding.InternalTypeMappingRegistryImpl.getSerializer(InternalTypeMappingRegistryImpl.java:376)
at com.test.mywebservices.service.TemplateVariables_SOAPSerializer.initialize(TemplateVariables_SOAPSerializer.java:28)
at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.initialize(ReferenceableSerializerImpl.java:65)
at com.sun.xml.rpc.encoding.InternalTypeMappingRegistryImpl.getSerializer(InternalTypeMappingRegistryImpl.java:381)

The client is embedded in my j2ee application and i am deploying it on jboss 4.2.2 with jdk 5.0.

Please help.

Thanks
10 years ago
Hi,

I am having issues in looking up the resources (Queues etc) in HAJNDI at port 1100 on localhost with my jboss servers split across a cluster spanning different networks (different subnets). We have jboss servers on each side of network and they are able to join a single cluster without any issue. JBoss and Java version is same on all servers, which is jboss-4.0.2 and java 5.

When look up is performed on a non master node, it just hangs up. Whereas it works fine on a master node.

Here is the network setup:

we have 2 VLANs, separated by Cisco routers and the routers are using PIMv2 in sparse mode, with a Rendezvous Point configured on each side of the intersite link. Multicast routing between the vlans is handled by the routers. The routers can see the servers joining the multicast groups, and that is reflected in the servers on each vlan joining the same cluster, as shown in the log files.

Any help will be appreciated.

Thank you.
10 years ago
it seems that your jsp page has got some problems.. Paste the code of your jsp page
10 years ago
Any Idea about the first problem? @SoapBinding annotation is not working for jboss-4.2.2.

I am trying to generate the WSDL as RPC/ENCODED but even specifying that in soapbinding it is still generating the wsdl as document/literal.

Any idea?

Thanks
You'll have to keep the reference to the stateful session bean at some place like user's session. Otherwise if you loose the reference, it will remain in the pool and will be swiped out after sometime.

There is no mention of the @WebContext in the 4.2.2 Release Notes



Yes, it seems that it is no more in 4.2.2 release

Do you have the JBoss client library in your path? (I had to add it as a library in Eclipse) It's in ~JBOSS/client/jbossws-client.jar



Yes, i've that in classpath.

They should have provided some other way to set the context thing if they have removed @WebContext.
I am using Jboss-4.2.2, and it seems that @WebContext is not available for it anymore.

Any other idea?

Thanks
These are two different methods of messaging. Queue is used for point to point messaging means there will be one receiver of the message. There can be more but the message will be received to one of them. It also guarantees delivery of the message, means message will be there in the queue unless it is consumed by someone.

whereas Topic is used for Pub/Sub messaging or broadcasting a message to topic and all the listeners against that topic can consume the message.