akhil achuthan

Ranch Hand
+ Follow
since Mar 29, 2006
Merit badge: grant badges
For More
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 akhil achuthan

I am using a thirdparty framework OpenKM(runs on tomcat and accessed via webservice api's) and am accessing the services via jboss(7.0.2) cxf. I have a client jar for OpenKM that i am calling via my webservice methods. The client inturn access the OpenKM server webservice. I am having an issue at times that my call complaints about methos being unavailable in the client jar classes, whereas actually they are. I start jboss and things work well and fine. Only at times i get this issue. Once occurred, this keeps occurring until i restart jboss. Then again things work fine, sometimes for a few mins, sometimes for many days and then suddenly this error pops up again.

I tried replacing the cxf version to 2.6.4 from 2.4.1. Things worked fine for 2 weeks, but now the NoSuchMethodException is popping up again.

Any idea why this is happening. Please help


The following is the exception that i encounter
com.lb.cams.component.impl.OKMDocumentManagement.createFolder is the method in my application that access the method in the client jar..


javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Service class com.openkm.ws.client.folder.OKMFolder does not implement the create method.
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:338)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:323)
at javax.xml.ws.Service.getPort(Service.java:99)
at com.openkm.ws.client.folder.OKMFolder_Service.getOKMFolderPort(OKMFolder_Service.java:72)
at com.lb.cams.component.impl.OKMDocumentManagement.createFolder(OKMDocumentManagement.java:214)
at com.lb.cams.component.impl.OKMDocumentManagement.createDocument(OKMDocumentManagement.java:74)
at com.lb.cams.web.controller.ApplicationController.uploadAttachment(ApplicationController.java:605)
at com.lb.cams.web.controller.ApplicationController.addDetails(ApplicationController.java:499)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Service class com.openkm.ws.client.folder.OKMFolder does not implement the create method.
at org.apache.cxf.jaxws.JAXWSMethodDispatcher.bind(JAXWSMethodDispatcher.java:70)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.bindOperation(JaxWsServiceFactoryBean.java:283)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:257)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:681)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:292)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:423)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:535)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:249)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:155)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:469)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:336)
... 61 more
Caused by: java.lang.NoSuchMethodException: com.openkm.ws.client.folder.OKMFolder.create(java.lang.String, com.openkm.ws.client.folder.Folder)
at java.lang.Class.getMethod(Class.java:1622)
at org.apache.cxf.jaxws.JAXWSMethodDispatcher.getImplementationMethod(JAXWSMethodDispatcher.java:90)
at org.apache.cxf.jaxws.JAXWSMethodDispatcher.bind(JAXWSMethodDispatcher.java:57)
... 75 more



I had tried replacing the cxf jars and tried. So probably its not a problem with cxf. And when this error occurs it is rectified when i restart jboss (and not tomcat). So not a problem with tomcat as well. So i just infer that its a problem with either jboss or the client jar that i have created, but what?

Please help
11 years ago
I am trying to use Pentaho to create a few query based tabular reports for my web application(Spring MVC). Pentaho tutorials looks too confusing with so many components that i did not get what is used for what. At last i jumped to the conclusion that i should be using a Pentaho report designer to create a report .prpt file and use in my application.

As of now i am not sure if i am correct in this decision of using report designer. IS this correct of am i to use something else from pehtaho.

Secondly, what I have got from pentaho report designer is a .prpt file. How do i make them appear in my Web application fromt end via my controller?

Please help...
11 years ago
Is it possible to define lazy fetch for specific named queries in an entity POJO. I mean i have a Person table with a one-to-many mapping defined on to other tables. Eg: For my UI which lists only the names of all the Person rows, I just need the name of all the person entries and feel that I need not fetch the entire column contents of the table along with the data of whatever mapped children tables it has. I mean all my named queries that I have defined in my JPA Pojo should return me the entire object with child values as well, except this specific query alone.

Thanks in advance
In the below example, i am having ManyToOne relationship from Address to my parent entity Person. Now i am required to set the corresponding foreign key reference in my Person table as null whenever i delete an entry from the Address table.

I am using JPA 2.0 EntityManager.delete(addressEntity) method to delete the Address entity. But i am stuck up with the following exception. Neither my Address entity nor my reference key changed as null in Person table.


Please help me in solving the above said problem.

javax.persistence.RollbackException: Error while committing the transaction
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:93)
....
Caused by: javax.persistence.EntityNotFoundException: deleted entity passed to persist: [Person#<null>]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1197)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1148)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:81)
... 3 more



Thanks,
Akhil
Got a reference over the net

http://community.jboss.org/wiki/WritingaClusteredHASingletonService

I could access the my HASingleton with this approach, but still have a problem. The hash codes printed within the startSingleton() and stopSingleton() are the same for a JVM lifecycle. But for the same lifecycle if I print the hashcode within my custom method that I access using the HA-JNDI lookup, I get a different has code printed. Coz of I doubt if am going the right way...
13 years ago
I have it configured it inside my jboss-service.xml within a .sar file. The snippet is given below.

<mbean code="net.test.app.akhil.init.ejb.ControlInitBean" name="jnpr.jmp:service=ControlInitBean,component=jive">
<depends>jboss.j2ee:module=inventory.jar,service=EJB3</depends>
</mbean>


Actually my ControlInitBean is a HASingletonSupport class.
13 years ago
Im using a clustered JBoss4.2.3GA environment. To attain the singleton behaviour im having a class say AppHA.java that extends org.jboss.ha.singleton.HASingletonSupport. As this is no normal java class it should not be correct to acess this class by creating a new instance using the new operator( new AppHA() ). Now how do I access a public custom method within this AppHA class?


Thanks in advance
13 years ago
how to define the type of a collection at runtime.

For example,

if i have an Arraylist which has to be created based on the type, may be integer sometimes, or String or any object. I will know the type only at runtime.

I cannot declare the arraylist like ArrayList<String> arrList = new ArrayList<String>(), as this will not work for any other object type. I do not want to declare the arraylist raw as well.

Please suggest......
14 years ago
What are the jersey jars/jar versions that would sink together.. I am running into all sorts of classNotFoundException and NoClassDefFoundError by using these jars..

I am using :
jersey-client-1.1.4.1.jar
jersey-server-1.1.4.1.jar
jersey-core-1.1.4.1.jar
jersey-0.5-ea.jar
asm-3.1.jar

Each time i replace these jars with some other version i get one of the above mentioned error or exception......


please help

14 years ago
im into a ne problem now.. i need to pass an argument value to my ReST method through my URL. But whatever i pass the server does not receive it.


@Path("/inventory") // sets the path for this service
public class InventoryResource
{
@GET // This method will process GET
// requests to the @Path value set above
@ProduceMime("text/html") // content type to output
@Path("/deviceInventory/{id}")
public Appliance getDeviceInventory(@QueryParam("id") int id)
{
System.out.println(">>>>>>>>>>>>>>> FETCHING INVENTORY <<<<<<<<<<<<<<<<<<<<<<<<< : "+id);
Appliance app = new Appliance();
//fetch the details and set it into app object.
return app;
}
}

i tried all the foll urls
http://localhost:8080/MyRestServer/rest/inventory/deviceInventory/id=25
http://localhost:8080/MyRestServer/rest/inventory/deviceInventory/25
http://localhost:8080/MyRestServer/rest/inventory/deviceInventory/id/25

but in all the case i get the server print as
>>>>>>>>>>>>>>> FETCHING INVENTORY <<<<<<<<<<<<<<<<<<<<<<<<< : 0
14 years ago
thanks.... its much much better now....

i could access the server method with the url. but the response is failing.. seeing a long list of exceptions too... probably looks like jar version issues..

17:17:55,328 INFO [STDOUT] INSIDE GET METHOD ----------------------------------
17:17:55,328 INFO [ProviderFactoryImpl] Searching for providers that implement: interface javax.ws.rs.ext.MessageBodyWriter
17:17:55,343 INFO [ProviderFactoryImpl] Provider found: class com.sun.jersey.impl.provider.entity.StringProvider
17:17:55,343 INFO [ProviderFactoryImpl] Provider found: class com.sun.jersey.impl.provider.entity.ByteArrayProvider
17:17:55,343 INFO [ProviderFactoryImpl] Provider found: class com.sun.jersey.impl.provider.entity.FileProvider
17:17:55,343 INFO [ProviderFactoryImpl] Provider found: class com.sun.jersey.impl.provider.entity.InputStreamProvider
17:17:55,343 INFO [ProviderFactoryImpl] Provider found: class com.sun.jersey.impl.provider.entity.DataSourceProvider
17:17:55,343 INFO [ProviderFactoryImpl] Provider found: class com.sun.jersey.impl.provider.entity.MimeMultipartProvider
17:17:55,343 INFO [ProviderFactoryImpl] Provider found: class com.sun.jersey.impl.provider.entity.FormProvider
17:17:55,343 INFO [ProviderFactoryImpl] Provider found: class com.sun.jersey.impl.provider.entity.FormMultivaluedMapProvider
17:17:55,343 ERROR [[JerseyWebApplication]] Servlet.service() for servlet JerseyWebApplication threw exception
java.lang.InstantiationException: com.sun.jersey.impl.provider.entity.XMLRootElementProvider$App
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.ws.rest.spi.service.ServiceFinder$LazyIterator.next(ServiceFinder.java:450)
at com.sun.ws.rest.impl.provider.ProviderFactoryImpl.cacheProviderMap(ProviderFactoryImpl.java:109)
at com.sun.ws.rest.impl.provider.ProviderFactoryImpl.createMessageBodyWriter(ProviderFactoryImpl.java:173)
at com.sun.ws.rest.spi.container.AbstractContainerResponse.writeEntity(AbstractContainerResponse.java:245)
at com.sun.ws.rest.spi.container.AbstractContainerResponse.writeEntity(AbstractContainerResponse.java:223)
at com.sun.ws.rest.impl.container.servlet.HttpResponseAdaptor.commitAll(HttpResponseAdaptor.java:125)
at com.sun.ws.rest.spi.container.servlet.ServletContainer.service(ServletContainer.java:134)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
14 years ago
somethinz happening strange... i get an exception java.lang.NoClassDefFoundError: javax/ws/rs/core/HttpContext while starting jboss. I see that this class is available with jsr311-api-0.3.jar, but not with any versions above 0.4 or so.

The version jars either contains javax/ws/rs/core/HttpContext or javax/ws/rs/core/Request. Either case i get exception for the other class not found....

confused........

14 years ago
thanks for the reply..

i checked out the link specified.. the jboss that i use 5.1.0 does not seem to support no-interface session beans..

Getting bk, the following is what i did- just for info I have no idea as to how to deploy a ReST application

1. i tried creating a session bean just like mentioned - code below (along with a remote interface) :

@Stateless(name = "RestServer")
@Path("myPath")
public class RestServer implements RestRemote
{
@Context private UriInfo info;

@GET
public String get()
{
System.out.println("INSIDE GET METHOD ----------------------------------");
return "this is a test";
}
}

2. Bundled the session bean into a jar - restserver.jar and put it in jboss server/default/deploy folder, and started jboss.
3. Jboss started normally, the restserver.jar got deployed as a normal session bean, but what about the ReST. I see nothing for webservices or REST in my jboss ..
4. How do i access the method get() through a browser by passing a url? i tried many combinations, but failed

14 years ago
hi,
i m using jboss5. Am in need of having a ReST implementation in my jb5 server. Be exact i need to have server methods like addUser, getUserName, deleteUser etc as my ReST methods that will access and get the data from other ejb session beans in my application and return the value.

Can somebody please give a sample code for the server part. How to i code a server session bean to make it as ReSTfull WS class? and how do i access the methods using ReST?


thanks
14 years ago
Im using JBoss 5.1 and am in need of notifying my web client if the jboss server shuts down, probably with reason....

Im a newbie to web related technologies................ Can anybody let me know on how to approach this issue.......

Thanks