Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to deploy generic application from jdeveloper 12c to weblogic 12c

DevM3Oct 31 2016 — edited Nov 1 2016

hello,

I'm created a restful webservice as a generic application using jdeveloper 12.1.3 but when I trying to deploy it I got errors.

the following steps that I did

1-create generic application in jdeveloper

2-create java class "getEmployees" and I added the annotations of restful web service as following

@Path("restservice")

public class getEmployees {

        @GET

        @Produces("application/xml")

        @Path("/")

        public ResposeList getAllEmployees() throws SQLException {

            Statement stmt;

            ResultSet rset;

            String query;

   

            Connection conn = getDBConnection();

            stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);

            query = "SELECT * FROM Employees ORDER BY employee_id";

            rset = stmt.executeQuery(query);

   

            List<Object> names = new ArrayList<Object>();

            while (rset.next()) {

                names.add(rset.getString("FIRST_NAME"));

            }

            ResposeList respNames = new ResposeList();

            respNames.setList(names);

   

            return respNames;

        }

       

        }

3- on the project properties I created new EAR deployement profile but when I deploy I have the following errors

[10:08:54 AM] Retrieving existing application information

[10:08:54 AM] Running dependency analysis...

[10:08:54 AM] Deploying profile...

[10:08:55 AM] Wrote Enterprise Application Module to C:\JDeveloper\mywork\RestWS\deploy\RestWS_EAR.ear

[10:08:59 AM] Deploying 1 data source(s) to the server...

[10:08:59 AM] Deploying Application...

[10:09:02 AM] [Deployer:149193]Operation "deploy" on application "RestWS_EAR" has failed on "DefaultServer".

[10:09:02 AM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application RestWS_EAR on DefaultServer.: The EAR file RestWS_EAR has no META-INF/application.xml and no modules could be found in it.

[10:09:02 AM] weblogic.management.DeploymentException: The EAR file RestWS_EAR has no META-INF/application.xml and no modules could be found in it

[10:09:02 AM] Deployment cancelled.

[10:09:03 AM] ----  Deployment incomplete  ----.

[10:09:03 AM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)

Whould anyone help me to deploy my generic application.

thanks

This post has been answered by dvohra21 on Oct 31 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2016
Added on Oct 31 2016
6 comments
1,255 views