glassfish

Invalid Deployment Descriptors in Deployment descriptor file WEB-INF/web.xml in archive

删除回忆录丶 提交于 2019-12-29 09:55:08
问题 i am working on Java project ,which is using GlassFish server.there is no error in project but when i tried to run it ,it is showing this error_ SEVERE: DPL8015: Invalid Deployment Descriptors in Deployment descriptor file WEB-INF/web.xml in archive [web]. Line 9 Column 22 -- cvc-complex-type.2.4.d: Invalid content was found starting with element 'description'. No child element is expected at this point. SEVERE: DPL8005: Deployment Descriptor parsing failure : cvc-complex-type.2.4.d: Invalid

Dependency exception when deploying maven project

二次信任 提交于 2019-12-29 09:09:09
问题 I' trying to deploy my maven project to Glassfish 4 but I get the following exception when it fails to deploy: Severe: Exception during lifecycle processing org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [IterableProvider<InjectionResolver<Object>>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 2 of [BackedAnnotatedConstructor] @Inject org.glassfish.jersey.internal.inject

Jersey-request for authentication

╄→гoц情女王★ 提交于 2019-12-29 08:16:28
问题 I have a working JavaEE 6 web application on Glassfish, this application already has a JSF frontend and has its authentication mechanism((Using CDI and annotation based security) So there is a login screen, user enters username password, press login button and Java EE authentication process begins. Now I want to "also" expose some of my service classes as a REST service (I will use Jersey probably), so it can also be reached from a mobile device. But what worries me is the login part. I will

Process files in Java EE [closed]

大兔子大兔子 提交于 2019-12-29 07:53:15
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have a system that is supposed to take large files containing documents and process these to split up the individual documents and create document objects to be persisted with JPA (or at least it is assumed in this question). The files are in the range of 1 document to 100 000

logback with EJB3.1

▼魔方 西西 提交于 2019-12-29 06:23:11
问题 I am using logback/slf4j to handle logging in my application. Everything was working perfectly until I started using EJBs. Once I added a stateless EJB to my app, the logger started ignoring my logback.xml and stopped using my appenders. I switched to a programmatic logger configuration to see what was wrong and now I am getting the following error when I try to use my logger within the EJB: org.slf4j.impl.JDK14LoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext stemming from

sun.security.ssl.SSLSessionImpl not found

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-29 05:36:27
问题 When I try to use okhttp or javax.ws.rs.client.Client the following error occur java.lang.NoSuchMethodError: sun.security.ssl.SSLSessionImpl.(Lsun/security/ssl/ProtocolVersion;Lsun/security/ssl/CipherSuite;Ljava/util/Collection;Lsun/security/ssl/SessionId;Ljava/lang/String;I)V Searching in the sun.security.ssl package, there is no SSLSessionImpl class Im using Mac OS 10.13.3 (17D102) java -version java version "1.8.0_162" Java(TM) SE Runtime Environment (build 1.8.0_162-b12) Java HotSpot(TM)

Making datasource in Glassfish

感情迁移 提交于 2019-12-29 04:55:09
问题 I am creating a JDBC connection pool resource for GlassFish, using the server's Admin Console. One of the fields on the page to create the pool is labeled 'Resource Type'. This field has four possible values: javax.sql.DataSource, javax.sql.XADataSource, javax.sql.ConnectionPoolDataSource and javax.sql.Driver, but the help text for the Create JDBC connection pool 'wizard' does not have much info about the advantages and disadvantages of these choices. When prompted to pick a resource type

Glassfish JAX-RS JSON Mapping Simple Example Internal Server Error 500 No Logs Produced

Deadly 提交于 2019-12-29 01:35:29
问题 I have created a simple REST service with two resources. The first resource works great and just returns MediaType.TEXT_PLAIN. For the second resource I wanted to try mapping POJO to Java and followed this example: https://github.com/jersey/jersey/tree/2.3.1/examples/json-moxy/src/main/java/org/glassfish/jersey/examples/jsonmoxy with my testbean defined as: @XmlRootElement public class Company { public String name; public String symbol; public String country; public Company(String name,

How to return a PNG image from Jersey REST service method to the browser

蹲街弑〆低调 提交于 2019-12-28 02:24:04
问题 I have a web server running with Jersey REST resources up and I wonder how to get an image/png reference for the browsers img tag; after submitting a Form or getting an Ajax response. The image processing code for adding graphics is working, just need to return it somehow. Code: @POST @Path("{fullsize}") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces("image/png") // Would need to replace void public void getFullImage(@FormDataParam("photo") InputStream imageIS, @FormDataParam("submit")

glass fish java can i send object through get request?

久未见 提交于 2019-12-25 18:42:36
问题 I have a class like this: class Customer { private int id; private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } } and I have a glass fish web service: i want to know it is possible to send a customer object using get (i know i can do this in post, but in get ... i don't know) this is what i tried: @GET @Path("/test") @Produces(MediaType.TEXT_PLAIN)