facebook

create Enterprise Application project using existing code

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #301023 Reply

    weihuo
    Member

    Hi,
    I am currently working on creating and building project based on existing code. the original project probably was created in NetBean. but I only have source code. the code structure looks like:
    –> test.ear(test.jar, test.war, meta-inf under it)
    ——-> test.jar(com under it)
    ————–> com–>a–>b> …. : EJB code sits here
    ——-> test.war(web.xml, jsp, web-inf under it)
    ————–> jspFolder1~n
    ————–> WEB-INF
    ——————–> classes
    —————————>com–>a–>b–>framework: servlet code sits here
    ————–> web.xml
    ——-> META-INF
    .jar directory java code import .war servlet code, and .war servlet code using .jar java classes.

    How should I build this project in myEclipse? I tried several ways, but I cannot went through build.

    Thanks a lot!

    #301032

    Loyal Water
    Member

    weihuo,
    You will have to create a new MyEclipse Enterprise Application project, add the EBJ and web modules to it and then copy paste your code into this project. I guess that should work. There is no other way of importing your project into MyEclipse.

    #301112

    weihuo
    Member

    @support-nipun wrote:

    weihuo,
    You will have to create a new MyEclipse Enterprise Application project, add the EBJ and web modules to it and then copy paste your code into this project. I guess that should work. There is no other way of importing your project into MyEclipse.

    Thanks,

    Now I created the project successfully and I can build. But I notice that the built java class file are different from what I built using ant. Does this hurt anything? Can I use the mixed classes in running environment?

    Thanks in advance.

    Wei

    #301117

    weihuo
    Member

    Hi Nipun,

    Thanks for your previous response. It was very helpful.
    Now I am trying to add database connection in myEclipse. our db is IBM DB2. After I configure a new connection, II try to open a connection. It complains “No license is present”. Do I miss something in the configure? here is the info about my config:
    Driver template: IBM DB2(Universal driver)
    Driver name: DB2
    Connection URL: jdbc:db2:TESTDB2
    user name:test
    pw:xxxx
    Driver Jars:ibm\sqllib\java\db2jcc.jar
    Driver classname: com.ibm.db2.jcc.db2Driver

    Thanks.

    Wei

    #301157

    support-joy
    Member

    Wei,

    I have researched over the net and came across this – http://confluence.atlassian.com/display/JIRAKB/Configuring+for+DB2+causes+com.ibm.db2.jcc.c.SqlException++No+license+is+present.
    Try to add “db2jcc_license_cu.jar” in your classpath as mentioned in the above link.

    #301176

    weihuo
    Member

    @support-joy wrote:

    Wei,

    I have researched over the net and came across this – http://confluence.atlassian.com/display/JIRAKB/Configuring+for+DB2+causes+com.ibm.db2.jcc.c.SqlException++No+license+is+present.
    Try to add “db2jcc_license_cu.jar” in your classpath as mentioned in the above link.

    Hi Joy,

    I tried to add this license jar, but it complains “Error while performing database login with the DB2 driver: Failure in loading T2 native library db2jcct2, reason: java.long.UnsatisfiedLinkError: Native Library C:\Program Files\IBM\SQLLIB\BIN\db2jcct2.dll already loaded in another classloader”. I am not sure what does this mean. here is my machine’s info:
    installed DB2 scheme;
    installed JBoss server and configured to connect to db;
    myEclipse.

    Thanks.

    Wei

    #301178

    weihuo
    Member

    Hi Joy,
    By the way, I added license jar in both classpath and Driver Jars.

    #301204

    support-joy
    Member

    weiho,

    Can you provide below detail to help me investigate this further.

    1. Can you copy and paste your installation details? You can get it from MyEclipse > Installation Summary > Installation Details
    2. Can you copy and paste your log file? You can get it from [your workspace dir]/.metadata/.log

    #301226

    weihuo
    Member

    @support-joy wrote:

    weiho,

    Can you provide below detail to help me investigate this further.

    1. Can you copy and paste your installation details? You can get it from MyEclipse > Installation Summary > Installation Details
    2. Can you copy and paste your log file? You can get it from [your workspace dir]/.metadata/.log

    Hi Joy,
    Now I can connect to DB2, and can execute query in SQL Editor. But I cannot see tables in DB Browser. I can only see:
    __DB2
    |__ Connected to DB2
    |
    |__MyEclipse Derby

    Could you help me to figure out the problem? Since I need to use this for Hibernate auto generate class-table mapping xml files.

    Thanks in advance.

    Wei

    #301256

    support-joy
    Member

    weiho,

    Can you provide below detail to help me investigate this further.
    1. Can you copy and paste your installation details? You can get it from MyEclipse > Installation Summary > Installation Details
    2. Do you have any 3rd party plug-ins installed in your MyEclipse? If so, can you please mention them?
    3. How do you connect to DB2 from MyEclipse? Can you please elaborate the issue?

    #301260

    weihuo
    Member

    @support-joy wrote:

    weiho,

    Can you provide below detail to help me investigate this further.
    1. Can you copy and paste your installation details? You can get it from MyEclipse > Installation Summary > Installation Details
    2. Do you have any 3rd party plug-ins installed in your MyEclipse? If so, can you please mention them?
    3. How do you connect to DB2 from MyEclipse? Can you please elaborate the issue?

    Hi Joy,
    1. the installation details:
    *** Date:
    Monday, August 10, 2009 8:55:36 AM EDT

    ** System properties:
    OS=WindowsXP
    OS version=5.1.0
    Java version=1.6.0_13

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 7.5
    Build id: 7.5-20090609

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 7.5
    Build id: 7.5-20090609

    Eclipse Plug-in Development Environment

    Version: 3.4.2.R342_v20090122-7T7U1E9imVKz-A8Vz-p_jRS
    Build id: M20080703-0800

    Eclipse Platform

    Version: 3.4.2.R342_v20090122-9I96EiWElHi8lheoJKJIvhM3JfVsYbRrgVIWL
    Build id: M20090211-1700

    Eclipse Graphical Editing Framework GEF

    Version: 3.4.2.v20090218-1145-67728084A56B4I233613552
    Build id: 200809101400

    Eclipse RCP

    Version: 3.4.200.R342_v20090122-989JESTEbig-SVaL8UJHcYBr4A63
    Build id: M20090211-1700

    Eclipse Java Development Tools

    Version: 3.4.2.r342_v20081217-7o7tEAoEEDWEm5HTrKn-svO4BbDI
    Build id: M20090211-1700

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    H:\MyEclipse\myeclipse.exe
    -name
    Myeclipse
    –launcher.library
    H:\Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
    -startup
    H:\Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
    -clean
    -configuration
    configuration
    -vm
    H:\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\bin\client\jvm.dll

    2. there is an error when I go to MyEclipse–>Manage MyEclipse Plug-ins. so I cannot get my installed plugins. I remember there were 4 plug-ins listed when I installed at the 1st time, and I installed 2 of them. if you can provider me the list, I can tell you which one I installed.

    3. my DB configuration:
    Driver template: IBM DB2(Universal driver)
    Driver name: mydb2
    Connection URL:jdbc:db2://localhost:50000/testdb2
    User name: db2inst1
    pw: test
    Driver Jars:db2jcc.jar and db2jcc_license_cu.jar
    Driver classname: com.ibm.db2.jcc.DB2Driver
    now I can run a query. but I cannot see tables which should list in DB Browser.

    Thanks

    Wei

    #301298

    Wei,
    I could not replicate this at my end. Are there any errors in the error log located at workspace dir > .metadata > .log?
    Also can you verify if you are able to connect and query the database externally (not form the db browser of the IDE)?

    #301302

    weihuo
    Member

    @support-shalini wrote:

    Wei,
    I could not replicate this at my end. Are there any errors in the error log located at workspace dir > .metadata > .log?
    Also can you verify if you are able to connect and query the database externally (not form the db browser of the IDE)?

    Hi Shalini,

    When I start myEclipse(with project in it), there are the following error in log file:
    java.lang.NullPointerException
    at com.genuitec.pulse2.client.services.update.PulseUpdateServices.getCatalogSoftware(Unknown Source)
    at com.genuitec.pulse2.client.services.update.PulseUpdateServices.getUpdateInformation(Unknown Source)
    at com.genuitec.eclipse.dashboard.DashboardJob.runDashboard(DashboardJob.java:117)
    at com.genuitec.eclipse.dashboard.DashboardJob.run(DashboardJob.java:50)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    !ENTRY org.eclipse.equinox.p2.ui.sdk 2 0 2009-08-11 08:33:00.633
    !MESSAGE Could not locate the running profile instance. The eclipse.p2.data.area and eclipse.p2.profile properties may not be set correctly in this application’s config.ini file.

    when I open an DB Browser view, and connect to DB, there are the following error in log file:
    !ENTRY com.genuitec.eclipse.sqlexplorer 4 4 2009-08-11 08:38:26.671
    !MESSAGE Error creating database model
    !STACK 0
    com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -443, SQLSTATE: 38553, SQLERRMC: SYSIBM.SQLTABLES;TABLES;SYSIBM:CLI:-805
    at com.ibm.db2.jcc.a.kg.d(kg.java:1411)
    at com.ibm.db2.jcc.c.kb.l(kb.java:367)
    at com.ibm.db2.jcc.c.kb.e(kb.java:92)
    at com.ibm.db2.jcc.c.w.e(w.java:72)
    at com.ibm.db2.jcc.c.dc.h(dc.java:203)
    at com.ibm.db2.jcc.a.kg.q(kg.java:1378)
    at com.ibm.db2.jcc.a.lg.d(lg.java:2436)
    at com.ibm.db2.jcc.a.mg.X(mg.java:188)
    at com.ibm.db2.jcc.a.t.a(t.java:7199)
    at com.ibm.db2.jcc.a.t.Wd(t.java:5799)
    at com.ibm.db2.jcc.a.t.getSchemas(t.java:5730)
    at net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getSchemas(SQLDatabaseMetaData.java:242)
    at com.genuitec.eclipse.sqlexplorer.model.DatabaseModel.initializeDatabaseModel(DatabaseModel.java:127)
    at com.genuitec.eclipse.sqlexplorer.model.DatabaseModel.initializeMetaData(DatabaseModel.java:61)
    at com.genuitec.eclipse.sqlexplorer.model.DatabaseModel.<init>(DatabaseModel.java:52)
    at com.genuitec.eclipse.sqlexplorer.model.SessionTreeNode.<init>(SessionTreeNode.java:73)
    at com.genuitec.eclipse.sqlexplorer.model.SessionTreeModel.createSessionTreeNode(SessionTreeModel.java:128)
    at com.genuitec.eclipse.sqlexplorer.actions.RetrievingTableDataProgress$RetrieveData.run(RetrievingTableDataProgress.java:48)
    at java.lang.Thread.run(Thread.java:619)

    Wei

    #301303

    weihuo
    Member

    Hi Shalini,

    By the way, I can connect to DB2 and do anything using command line and Toad.

    ~Wei

    #301349

    Wei,
    What is the version of DB2 that you are using?This is an issue with DB2
    DB2 Version 8.1, please refer to the following links
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-9950.html
    http://confluence.atlassian.com/display/DOC/Known+Issues+for+DB2

Viewing 15 posts - 1 through 15 (of 23 total)
Reply To: create Enterprise Application project using existing code

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in