java-ee

Error deploying an app to JBoss 5 that was working fine on JBoss 4.2

非 Y 不嫁゛ 提交于 2019-12-13 12:27:25
问题 Im trying to deploy an application (.ear file) to JBoss 5, and I'm receiving the following error. The app deploys fine under 4.2.2. 15:31:33,172 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/ASE/ext/jboss-5.0.0.GA/server/all/dep loy/UGC-WS.ear state=PreReal mode=Manual requiredState=Real org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/C:/ASE/ext/jboss-5.0.0.GA/server/all/deploy/UGC-WS. ear/ugc-ws.war at org.jboss.deployers.spi

Writers and OutputStreams in Java EE applications and filters

空扰寡人 提交于 2019-12-13 12:18:35
问题 I've recently encountered the following exception... java.lang.IllegalStateException: Cannot obtain Writer because OutputStream is already in use I understand the nature of the exception; namely the code can use a Writer or OutputStream but never both in the same request. How is code further down the stack supposed to handle the case where one already exists? OR is there a design/arch pattern that can avoid this problem in the first place? Example; consider a 3rd party filter that decorates

Getting Selected Row Data from Datatable in JSF

谁说我不能喝 提交于 2019-12-13 12:17:30
问题 So, I have tried to implement the methods from Anthony/BalusC in this question: How to get selected row index in JSF datatable? but to no avail. I also went through @BalusC's "Using datatables" article (which is wonderful as always) but that was written for JSF1.2 and the 2.0 article doesn't really address getting the selected row data. When a user clicks the "Add to my favorites" button, the selected row is not getting passed to the backing bean, the navigation case is not being followed,

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet [duplicate]

前提是你 提交于 2019-12-13 12:06:39
问题 This question already has answers here : java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest (4 answers) Closed 3 years ago . I work on a web application, I created a web service with axis2 I integrated this web service in my application, but the problem is that when I try to retrieve the wsdl via the following URL: http: / / localhost: 8080 / ConsoleSynoptique / services / listServices. I get the following error: java.lang.NoClassDefFoundError: javax/servlet/http

Deploying war in Jboss 7.0.1 through Commandline

◇◆丶佛笑我妖孽 提交于 2019-12-13 11:45:53
问题 I have a war file and I need to deploy it on Jboss 7.0.1 Server. Now I have gone through the documentation, but didnt find any thing to deploy a war file. Moreover for deploying your build through command line you generally have to use maven. So do we need for the war as well? If so, does it affects the war file? FYI : I am using linux (CentOs5)... 回答1: You can deploy a .war file using the Management Command Line Interface. The specific documentation for it is located here: JBoss AS7 Admin

Java Configuring Build Paths or WEB-INF/lib folder [duplicate]

孤街浪徒 提交于 2019-12-13 11:36:49
问题 This question already has answers here : How to add JAR libraries to WAR project without facing java.lang.ClassNotFoundException? Classpath vs Build Path vs /WEB-INF/lib (6 answers) Closed 4 years ago . I've seen a lot of tutorials and applications that put their jars inside a build path while others put it inside their web-inf/lib folder, Are there any significant difference? What are the pros and cons of both? What is an indicator for me to put a certain jar inside the libs folder and put

Get NullPointerException in java EE application on Intellij Idea IDE

风格不统一 提交于 2019-12-13 11:23:52
问题 I'm trying to run this simple and small application but I don't understand which is the problem and consequently how to fix it. Here it is the code. It is very simple. One bean invoked by a client application in order to print out in the client terminal the well-known message Hello World. I have created the application by using Intellij Idea 13.0.3 IDE with Server GlassFish 4.0.0, Java JDK 8.0 and Java EE 7. EDIT I think I got those errors because I didn't deployed correctly my application. I

how to connect tomcat 7 and mysql

为君一笑 提交于 2019-12-13 10:59:46
问题 i m quite new to j2ee..... i just finished reading head first servlets and jsp .... for a practice project i was thinking to build a money tracker in which i can save my expenses and see them anytime in the future.... but for this i need a database , i googled for it and found that mysql is a good database but i know nothing about how to set tomcat to talk to mysql.... and i m using eclipse kepler with tomcat 7 ....... plz tell me what are the steps to follow to configure tomcat so that it

Caching mechanism cluster environment

三世轮回 提交于 2019-12-13 09:47:02
问题 If we use a static hash map for caching process in a normal class (Not a singelton class) will it work in cluster environment? 回答1: A static field's value is stored in the memory of the JVM, and each JVM will thus have its own static map. This can be OK, unless you want a unique cache for all the members of the cluster. 回答2: Seems like you're writing the requirements for a framework like Terracotta : http://terracotta.org/documentation/product-documentation-1page You're talking about JVM

How to convert byte array to image [duplicate]

橙三吉。 提交于 2019-12-13 08:55:20
问题 This question already has answers here : Show image as byte[] from database as graphic image in JSF page (2 answers) Closed 2 years ago . I have a SQL database that contains images stored as a byte array. I have done some searching and have not found much on how to convert these into a useable Image type for a JSF page. Any help would be greatly appreciated! Thanks in advance! (using JSF 2.0) 回答1: Just a create a controller that output the right media type (image/*) and output the bytes.