Is it possible to use Spring MVC on JBoss App server?
If so, how?
Used the Spring MVC with Tomcat Apache server, but now i have to move my project to a JBoss app server.
But i'm getting an error, and i'm not sure why. It seems like i can't use my classes.
125 ERROR [Engine] StandardWrapperValve[project]: Servlet.service() for servlet project threw exception java.lang.NullPointerException
at java.util.Hashtable.containsKey(Hashtable.java:307)
at com.scap.handle.ControlStatusContainer.deleteUser(ControlStatusContainer.java:70)
at web.shnController.handleRequest(shnController.java:121)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
Anyone got a suggestion?
Thanks in advance.
I would recommend to insert some tracing in com.scap.handle.ControlStatusContainer.deleteUser since the HashMap used in ControlStatusContainer.java line 70 seems not initialized properly.
Related
Like Spring Boot uses Apache Tomcat, Undertow and Jetty and i have worked on an assignment of same. So just trying to map understanding.
What application server is used by Quarkus?
I have created an application in server and found Jboss libaries, Arjuna Libraries for transaction
which is used by Jboss servers or wildfly servers. But i am not sure whether it is based on Jboss.
Can anyone please clarify?
In short, Quarkus can be thought of as its own application server. However, it is comprised of many open source libraries that have been around for a while, such as:
RESTEasy for JAX-RS
Undertow for the Servlet/Websocket engine
Netty for the network IO layer
Hibernate for JPA
The full set of extensions can be found on the Quarkus Starter website.
I run Morphia 0.102 with the Mongo Java Client 2-11.2.
This is a client / server app. At the moment I test the server side locally on GlassFish.
Ok, when I run some code on the client, using Mongo and Morphia, no issue. Then when some code is called on the server side, it instantiates Morphia on the server with
mongoClient = new MongoClient("199.00.000.000", 27017);
morphia = new Morphia(); //exception thrown
The exception:
Caused by: java.lang.NoClassDefFoundError: com/mongodb/DBObject
at com.google.code.morphia.Morphia.<init>(Morphia.java:48)
at com.google.code.morphia.Morphia.<init>(Morphia.java:44)
I've spent several hours trying to change the versions of Morphia and the MongoDriver, with no result and I have no clue.
Any idea?
Are you including the morphia jar in your war file? Adding things to that glassfish folder is almost always the wrong answer.
So, adding the jar in the glassfish folder solved this exception when I was running GlassFish locally, from Netbeans. The issue came back when I uploaded my Java EE module on the server.
Adding the mongo and morphia jars in all kinds of folders did not solve anything then. The thing that solved it :
- I integrated my Java EE module into an EAR, then deployed the EAR (before that I was only deploying the Java EE Module without an EAR - surely a very bad practice, but I did not know).
I'm trying to connect the JPA (EclipsLink implementation) used on my application to JBoss DS, but don't know how to do it.
The application that I'm working is a OSGi Based application runing on a Equinox container that runs as a servlet on a JBoss WAR file.
How can I configure my application so that it connects the JBoss DS?
Sounds pretty complicated. What have you tried, and what error are you getting?
Normally you just set the datasource in the JPA persistence.xml, does that work?
I am developing a REST web service with Apache CXF 2.3 and deploying in JBoss 4.2.3 GA. When I try to access my web service, I am getting this following error
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader.
I was able to fix this error by adding the correct version of JAXB api jar in \lib\endorsed folder. But I am doubtful whether it will interfere in any other web application JAXB related functionality. One more web application is using some other version of JAXB. Is there any other graceful way of solving this issue. Thanks for any advice.
Seam 2.1 and JBoss 4.2.2
I have set up the first App to have the EJB in the EAR with a local interface.
the 2nd app can look up JDNI name "ear-name/ejbname/local" but fails with "NoClassDefFound".
Does the EJB .jar need to be outside of the EAR?
Is this a classloader visibility issue or Is this a JBoss version issue? or something else?
Thank you for your thoughts..
I cannot answer if it will work or not. However, I can tell you how we do this.
We have created a #Webservice component that uses this EJB. And then we connect to the Webservice from our other application.
I blogged about this a while back. You can have a read if you are interested.