java-ee

Where to put a .jar file in an exploded EJB module

£可爱£侵袭症+ 提交于 2019-12-13 04:38:27
问题 I am deploying a JMS module to work alongside a servlet application. While I am writing (and testing and rewriting) my module, the module is not stored in a JAR file; it is in an exploded directory doubling as an Eclipse project directory. (In the production environment, it will be in a jar.) My JMS module does logging with log4j. My question is: where do I put the log4j.jar file so my EJB can find it? I tried various locations, including a directory named lib/, but nothing seemed to work. (I

Where are appengine projects located normally in the file system of the server via ssh?

跟風遠走 提交于 2019-12-13 04:33:16
问题 I have a standard java based web application and I have someone who wants to take a look at it and possibly change a file or add a file via ssh. But we cannot locate the project folder of the appengine project in Google's cloud shell. So where exactly are app engine project files normally located? 回答1: You cannot directly access the app's files from the cloud shell because the cloud shell doesn't run on the same instance as your app code. In the standard environment you also can't access the

Tomcat server not loading more than 2 applications

廉价感情. 提交于 2019-12-13 04:26:52
问题 My Tomcat 7 server does not load more than 2 application... My System configuration is, windows server 2012 - 64 bit 32gb ram jdk 1.7 When i deploy my applications i got following errors Feb 01, 2014 2:45:39 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/kqvoucher] threw exception [Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open

best practice to expand a project at production with liquibase

喜夏-厌秋 提交于 2019-12-13 04:25:12
问题 I have a java ee project with an existing database. Now I expand my project local by using the liquibase-maven-plugin. The project create automatically a tag and makes an update . Are there any steps or preparations I have to take care of before deploying this project at the production? Local f.e. I played with the generateChangeLog command, which creates a xml-schema file of the existing database. Do I need this file for any purpose? Actually I just can set first of all a tag and then go on

java ee: class not found despite valid import?!

为君一笑 提交于 2019-12-13 04:21:58
问题 I use jersey to create some sort of RESTful API. To get information about the current request, I use the HttpServletRequest Object. I am able to compile the project without problems or errors, but when I run it, I get the following error: [INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ backend --- [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl

log4j only can view error level on my java-Enterprise application-Module ejb- with spring

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 04:21:21
问题 I'm working on my java Enterprise application in ejb module with Netbeans. When I run "MyClass.java" I only view error level. MyEnterpriseApplication-ejb:Source Packages: package com.mycompany; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class MyClass { public static final Logger logger = LogManager.getLogger(MyClass.class); public static void main(String[] arg) { ApplicationContext context = new ClassPathXmlApplicationContext("classpath:context

integration of jsf2.0 and spring 3.1 and hibernate 4.1

故事扮演 提交于 2019-12-13 04:19:59
问题 i want to integrate jsf2.0 and spring 3.1 and hibernate 4.1. but tomcat has error 404:description The requested resource (/jsfspringhiber/page/default.jsf) is not available. what is wrong? following is my web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml

JPA - strange behavior using EntityManager remove() method

蹲街弑〆低调 提交于 2019-12-13 04:16:28
问题 I am in a configuration (JTA - CMT) in which I have to remove an entity object after creating it. I use em.remove(object) after finding it, but remove doesn't work, or it seems to be not working. What happens is that the object I want and try, to remove is still in DB. Once the removal operation is performed, if I later try to retrieve the records from the entity table it belongs to, I GET THIS OBJECT (obviously with the other objects I previously saved). My check into the entity table,

JEE6 Long Polling WebServlet - Exception after calling AsyncContext#complete

青春壹個敷衍的年華 提交于 2019-12-13 04:07:29
问题 I am trying to implement long polling, however after calling AsyncContext.complete() I get an exception from Weld: Warnung: Error invoking requestDestroyed method on ServletRequestListener org.jboss.weld.servlet.WeldListener java.lang.NullPointerException at org.jboss.weld.context.AbstractBoundContext.deactivate(AbstractBoundContext.java:71) at org.jboss.weld.context.http.HttpRequestContextImpl.deactivate(HttpRequestContextImpl.java:70) at org.jboss.weld.servlet.WeldListener.requestDestroyed

Isn't it necessary to mention the name of archive in the Resource tag?

女生的网名这么多〃 提交于 2019-12-13 03:54:15
问题 To connect to derby database while using Tomcat , I downloaded the jar of core Apache Derby database engine (version : 10.9.1.0). I kept this jar file under the lib folder in Tomcat. Now I was told to add the following in context.xml of Tomcat . <Resource name="jdbc/PollDatasource" auth="Container" type="javax.sql.DataSource" driverClassName="org.apache.derby.jdbc.EmbeddedDriver" url="jdbc:derby://localhost:1527/polldatabase;create=true" username="suhail" password="suhail" maxActive="20"