java-ee

Weblogic: How to prevent “A mismatch exists between the bean code and generated code” when deploying

北慕城南 提交于 2019-12-12 05:27:02
问题 I use WLST (scripted) automatic deployment on WebLogic 12c (12.1.3 - latest). This automatically deploys my enterprise application on a managed server (not admin server). Note: The error also occurs if I execute the deployment manually. Sometimes I get this exception: A mismatch exists between the bean code and generated code. ... My application does not get deployed then. This cannot be fixed by deploying again, only deleting the deployment with the help of the AdminServer console works

Google drive api ver3 how share on my web page

寵の児 提交于 2019-12-12 05:24:26
问题 Can somebody help me? I could add the file to my webPage in version 2 like this (img1): drive.files().get(fileID).execute().getAlternateLink()); How i can do this in ver3 ?? All of this method return null: getWebContentLink ,getWebViewLink,getThumbnailLink 2) How i can get full access auth? Google examples doesn't works img1 回答1: In Drive v3, to retrieve metadata properties (i.e. WebViewLink, thumbnailLink,emailAddress, etc.), you will only need to specify the individual fields required by

Tomcat not shutting down when Spring boot app is deployed with ehcache

自古美人都是妖i 提交于 2019-12-12 05:17:02
问题 I have strange problem with tomcat, I have a spring boot application deployed on tomcat(Stand alone not embedded). I am able to start tomcat successfully and it is working fine with out any issues. But when I run shutdown(invoking shutdown.sh script) it is showing connection refused. I have tried out this Tomcat doesn't stop. How can I debug this?, but does not solve my problem. I have tried removing my spring boot application and it is working fine with out any issues. I am able to start and

Removing escape characters

假如想象 提交于 2019-12-12 05:13:12
问题 I have tried the following logic to escape the special chars in a string and also to remove the escape chars from the escaped string. public static void main(String a[]) { String keyword = "otterbox 3500 series { { waterproof case \\(clear) phones"; System.out.println("INut keyword is "+keyword); StringBuilder sb = new StringBuilder(); // * and ? is not included as they are wild card for (int i = 0; i < keyword.length(); i++){ char c = keyword.charAt(i); if (c == '\\' || c == '!' || c == '('

use of EntityManagerFactory causing duplicate primary key exceptions

谁说胖子不能爱 提交于 2019-12-12 05:11:13
问题 Hey guys, my goal is create an EntityManager using properties dependent on which database is in use. I've seen something like this done in all my Google searches(I made the code more basic for the purpose of this question): @PersistenceUnit private EntityManagerFactory emf; private EntityManager em; private Properties props; @PostConstruct public void createEntityManager(){ //if oracle set oracle properties else set postgres properties emf = Persistence.createEntityManagerFactory("app-x"); em

Problems with Java EE SDK

◇◆丶佛笑我妖孽 提交于 2019-12-12 04:58:17
问题 I need help with Java SDKs. I have installed Java SE SDK, and I also installed Java EE SDK. However, where are the JARs in the Java EE SDK? Isn't Java EE SDK a superset of Java SE SDK? Do I need both? It doesn't seem that I successfully manages to add all libraries in IntelliJ. 回答1: Java EE is an abstract API. The application server (e.g. Glassfish, JBoss AS, Tomcat, etc) is the concrete implementation. The Java EE download link on oracle.com contains the concrete reference implementation of

WebSphere embeddable EJB container with Hibernate throws java.lang.ClassNotFoundException: com.ibm.websphere.jtaextensions.SynchronizationCallback

我们两清 提交于 2019-12-12 04:57:50
问题 I am using the embeddable EJB container of WebSphere 8 to write some unit tests for my EJBs with JUnit4. I have a simple java project in MyEclipse where I reference the EJB project. The EJB project uses Hibernate 3.5 for persistence and the datasource JNDI in hibernate.cfg.xml is jdbc/connectionname which is defined in the properties of the embeddable container. The embeddable container starts successfully, the EJBs can be found successfully and the datasource is also found successfully.

which phase should i use to intercept the login attempt in JSF

空扰寡人 提交于 2019-12-12 04:51:33
问题 i am using a PhaseListener And i can see that my credentials is available directly from the RESTORE_VIEW all the way up to INVOKE_APPLICATION and RENDER_RESPONSE. Which all makes sense. I wonder what the best practice is when it comes to validating these credentials. I am thinking of i could validate at the RESTORE_VIEW. I am pretty sure i dont want to wait until the UPDATE_MODEL since i believe that might be a security risk. Though a little more uncertain if i should let the phase run

Newbie: Web.xml Eclipse. xsi:schemaLocation & xmlns:web

拜拜、爱过 提交于 2019-12-12 04:47:12
问题 2.5 xsd and 3.0 xsd. Why there are 2 xsd? Project Spec: Server info: Apache Tomcat/7.0.27 Servlet version: 3.0 JSP version: 2.1 Java version: 1.6.0_32 <?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/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">

need a servlet to download a file from path like /home/Bureau

房东的猫 提交于 2019-12-12 04:40:00
问题 Need a servlet to download a file from path like /home/Bureau.. in jee gwt I used this but isn't work and I went to download all file's type image String filePath = request.getParameter("file"); String fileName = "test"; FileInputStream fileToDownload = new FileInputStream(filePath); // ServletOutputStream output = response.getOutputStream(); response.setHeader("Content-Type", "image/png"); //response.setContentType("image/png"); response.setHeader("Content-Disposition", "attachment; filename