java-ee

How to generate wadl file for resteasy in jboss

孤者浪人 提交于 2020-01-02 07:06:24
问题 I want to generate a wadl file for my project which is using resteasy + Jboss 6.4 + Maven. There are many examples given for jersey but not for resteasy does anyone used it for resteasy 回答1: Resteasy since 3.0.14.Final do support WADL generation. You need to add resteasy-wadl to your dependency manager (e.g. maven): <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-wadl</artifactId> <version>3.0.19.Final</version> </dependency> then declare a new servlet endpoint in your

How to solve SplitsrcTargetPreparation exception in Oracle weblogic server?

故事扮演 提交于 2020-01-02 06:00:31
问题 I am trying to run a simple Restful web service example on oracle weblogic server . but i am getting this issue while run the project on server. Publishing to Oracle Weblogic server at localhost has encountered a problem.Runtime exception occurred in publish task 'SplitsrcTargetPreparation'. Have a look on screen sort. What i have to do ? 回答1: None of the other answers solved my problem, but I finally found a solution. I'm not claiming that this is the best or only way of resolving this issue

Generating WAR and EAR artifacts inside the same Gradle project

删除回忆录丶 提交于 2020-01-02 05:46:20
问题 Suppose that I have a Gradle web project with a standard web project layout src/main/webapp . Project myproject-web , build.gradle : apply plugin: 'java' apply plugin: 'eclipse-wtp' apply plugin: 'war' I know that I can wrap the resulting .war file generated by myproject-web inside an .ear if I define a secondary project (say, myproject-ear ) which applies the ear plugin and references myproject-web as a dependency: Project myproject-ear , build.gradle : deploy project(':myproject-web') I

Exception handling strategy - reuse exception codes

不想你离开。 提交于 2020-01-02 05:35:07
问题 I'm working on an application where the process goes on like this UI --> backend process --> result to UI. In my Java code, I have handled my exceptions using try-catch, But in the code I have so many repeated exceptions that may throw same exceptions in different classes, which reduces the readability and code reuse. So, I am planning to do a exception handling strategy so that instead of throwing the same exception in different classes, I need to organize the exception and reuse the

Unit testing in Java EE environment

二次信任 提交于 2020-01-02 05:02:11
问题 We're migrating our application into a Java EE container, and looking for tools to use for unit testing (and integration testing) our migrated app. Our requirements include: Ad-hoc testing: the ability to run tests manually, on demand (to be used by developers while developing code) Batch testing: the ability to run a large (and growing) set of tests regularly In-Container: integration tests that use EJBs as they are deployed in the container Unit testing: Testing of classes not necessarily

Maven - Nexus: find dependent projects

≡放荡痞女 提交于 2020-01-02 04:34:13
问题 Is there a way in nexus to find all the projects that depend on a particular dependency? We have a list of projects in our nexus repository. We'd need to find all the projects that use a particular dependency. 回答1: The Artifact Usage Nexus Plugin is an open source plugin for Nexus that can do that. A list of further available plugins and integrations is available in the free Nexus book. Be sure to use the correct version of Nexus with the plugin or fork the project and update it to your

Unable to compile class for JSP: cannot be resolved to a type

烂漫一生 提交于 2020-01-02 04:31:31
问题 I am developing a Dynamic web project. Project is running well on local server but not on live. On live server it throws exception at the line I have used any java object: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 7 in the jsp file: /groups.jsp CollectionAppService cannot be resolved to a type 4: <% 5: String json = "[]"; 6: try { 7: CollectionAppService collectionAppService = new CollectionAppService(); 8: json = collectionAppService

Unable to compile class for JSP: cannot be resolved to a type

拈花ヽ惹草 提交于 2020-01-02 04:31:10
问题 I am developing a Dynamic web project. Project is running well on local server but not on live. On live server it throws exception at the line I have used any java object: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 7 in the jsp file: /groups.jsp CollectionAppService cannot be resolved to a type 4: <% 5: String json = "[]"; 6: try { 7: CollectionAppService collectionAppService = new CollectionAppService(); 8: json = collectionAppService

Unable to inject @ApplicationScoped bean in JAX-RS service

空扰寡人 提交于 2020-01-02 04:10:30
问题 I've created JAX-RS service in which I want to inject an application scoped bean. The problem is that the bean is not injected. How is this caused and how can I solve it? JAX-RS service: @Path("room") public class RoomService { @Inject GameController gc; public RoomService() {} @Path("create") @GET @Produces("application/json") public String create() { Room r = new Room(); gc.addRoom(r); // gc is null return r.toJson(); } } Application scoped bean import java.util.ArrayList; import javax

Spring can't see beans between servlet-context and contextConfigLocation beans

让人想犯罪 __ 提交于 2020-01-02 04:09:06
问题 I have a spring mvc project set up like so: <servlet> <servlet-name>appServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-contexts/servlet-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-contexts/configuration-context.xml<