The import cannot be resolved

745 views
Skip to first unread message

Luis E. Arevalo R.

unread,
Sep 11, 2013, 12:27:10 PM9/11/13
to idem...@googlegroups.com
Hi everybody:

Reading the developer's migration plan, I've tried to follow the steps presented by Red1. I created a new plugin, I added the dependencies, I imported the package and the code and I edited the MANIFEST.MF. When I've tried to do a RUN_ImportIdempiere, I have the first problems (variables can't set): I'm working within Eclipse and Ubuntu 13.04, and the sources are in $HOME/workspace/iDempiere. If I run the script in a virtual machine, in which iDempiere runs from installer and it installed in $HOME/iDempiere, there is no problem.

Anyway, I think that no problem because the sources and DB are fresh. My problem is with the next step. When I started the swingclient.product, Eclipse warns me the following error:

'The import org.compiere.model.MStorage cannot be resolved'

I'm pretty sure that the solution is very simple, but I'm newbie :( And these are my first steps programming iDempiere. Previously, I just worked with ADempiere, but like Super User, programming never.

I appreciate the answers, any help is welcome. Regards!

Jan Thielemann

unread,
Sep 12, 2013, 2:01:58 AM9/12/13
to idem...@googlegroups.com
Hi Luis,
i suggest you to take a look at our plugins development section: http://wiki.idempiere.org/en/Category:Plug-In_Development

What do you mean by "i added the dependencies, i importet the package and the code"? It's always the better idea to only use the "Required Plug-Ins" and not the "Imported Packages" section of the dependencies in the manifest. This might be a problem.

Is MStorage a custom model from your plugin? Does it come from another model? If so how did you generate it? Did you use a componentdefinition (and a java class) to create a model factory?

I don't know how RUN_ImportIdempiere works but i usually import the database dump and apply the migrations scripts by myself with these commands:
-For importing the DB seed (which you have to unzip from a jar file first): psql -U adempiere -d idempiere -f Adempiere_pg.dmp
-For applying migrationscripts:
      cd $iDepiereWorkspace/migration/
      ./migrate_postgres.sh i1.0a-i1.0b/ commit | psql -U adempiere -d idempiere
      ./migrate_postgres.sh i1.0b-i1.0c/ commit | psql -U adempiere -d idempiere
      ./migrate_postgres.sh i1.0c-release/ commit | psql -U adempiere -d idempiere

Maybe some of this is not necessarry and already included in the seed but it won't hurt your db if you run the scripts i guess.


Last but not least: welcome to the idempiere developer community :)
Message has been deleted
Message has been deleted

Luis E. Arevalo R.

unread,
Sep 13, 2013, 10:42:50 AM9/13/13
to idem...@googlegroups.com
El jueves, 12 de septiembre de 2013 03:01:58 UTC-3, Jan Thielemann escribió:
Hi Luis,

[...]

Hi Jan:

I posted two answers and have been deleted. I don't understand why :-/
Message has been deleted

Jan Thielemann

unread,
Sep 13, 2013, 1:04:30 PM9/13/13
to idem...@googlegroups.com
I see. Keep trying :)

Luis E. Arevalo R.

unread,
Sep 12, 2013, 9:31:08 AM9/12/13
to idem...@googlegroups.com
2013/9/12 Jan Thielemann <xxte...@gmail.com>
Hi Luis,

Hi Jan:
 
i suggest you to take a look at our plugins development section: http://wiki.idempiere.org/en/Category:Plug-In_Development

I've read it, but now I follow the steps of 'A developer's migration plan', by Redhuan D. Oon (http://goo.gl/1dfCG9).
 
What do you mean by "i added the dependencies, i importet the package and the code"? It's always the better idea to only use the "Required Plug-Ins" and not the "Imported Packages" section of the dependencies in the manifest. This might be a problem.

According to the guide I mentioned:

- I added the dependencies: open the MANIFEST.MF file, Go to the Dependencies tab and add the plugin that contains it which is  org.adempiere.plugins.utils. Also add the  org.adempiere.base.

- I imported the package: "Note that under Imported Packages I have selected a library reference for my ActiveMQ code to work (4). Thus I need not carry my own library jars within my plugin."

- I imported the code: I downloaded the sources provided by the author (http://goo.gl/p0szxc), and I put it under src.
 
Is MStorage a custom model from your plugin? Does it come from another model? If so how did you generate it? Did you use a componentdefinition (and a java class) to create a model factory?

I don't now. I just wanted to run the red1's plugin. For the nonce, I don't care the plugin content. I just want to understand the creation of a plugin, and then make "Pack In" and "Pack Out".

I don't know how RUN_ImportIdempiere works but i usually import the database dump and apply the migrations scripts by myself with these commands:
-For importing the DB seed (which you have to unzip from a jar file first): psql -U adempiere -d idempiere -f Adempiere_pg.dmp
-For applying migrationscripts:
      cd $iDepiereWorkspace/migration/
      ./migrate_postgres.sh i1.0a-i1.0b/ commit | psql -U adempiere -d idempiere
      ./migrate_postgres.sh i1.0b-i1.0c/ commit | psql -U adempiere -d idempiere
      ./migrate_postgres.sh i1.0c-release/ commit | psql -U adempiere -d idempiere

Maybe some of this is not necessarry and already included in the seed but it won't hurt your db if you run the scripts i guess.

I'll follow this steps, thanks.
 
Last but not least: welcome to the idempiere developer community :)

Thaks so much! At first I think I'll do only questions, but over time I hope to make my first contributions.

Greetings!

--
Luis Eduardo Arevalo Reyes                    User #354770 counter.li.org
Fono +56 9 81816644                                        http://www.luchox.cl
Reply all
Reply to author
Forward
0 new messages