Setting up jPOS in Netbeans

1,457 views
Skip to first unread message

Pieter Botha

unread,
Sep 29, 2012, 4:53:17 AM9/29/12
to jpos-...@googlegroups.com
Hi,

I'm currently attempting to move all my stuff from vi/console to Netbeans. I'm able to compile and run jPOS using Q2 in the commandline (java -jar jpos.jar) - I do not have a special maven goal to run it currently.

Can someone please assist me in getting jPOS to run on Netbeans( my project layout is below)? Currently I've selected jPOS Core.Q2 as my main class and when I click run, I get the following:
Exception in thread "Q2-ab177be2-e1f8-4c7b-adfa-6ca449b2f360" java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key revision
at java.util.ResourceBundle.getObject(ResourceBundle.java:393)
at java.util.ResourceBundle.getString(ResourceBundle.java:353)
at org.jpos.q2.Q2.getRevision(Q2.java:762)
at org.jpos.q2.Q2.getVersionString(Q2.java:526)
at org.jpos.util.Logger.log(Logger.java:79)
at org.jpos.util.Log.error(Log.java:97)
at org.jpos.q2.Q2.run(Q2.java:192)
at java.lang.Thread.run(Thread.java:722)


Should you disagree with my layout of the project, please do say so and why :)

Layout:
<repository root>
  pom.xml   (parent POM having jPOS and my modules directory as modules)
  <modules>
    pom.xml (parent pom for my modules)
    <bath-tub>
       pom.xml (project pom to create the bath-tub jar)
    <mastercard>
       pom.xml (project pom to create the mastercard jar) 
   <projects/jPOS> (this is a git submodule)
     pom.xml (jPOS pom)
     <jpos>
       pom.xml (jPOS project pom)
       <target/jpos-1.8.7/deploy/lib>
          mastercard.jar
          bath-tub.jar

Thanks for any assistance!
  Pieter

Mark Salter

unread,
Oct 1, 2012, 9:56:42 AM10/1/12
to jPOS Users


On Sep 29, 9:53 am, Pieter Botha <i...@pnb.co.za> wrote:

> Currently I've selected jPOS Core.Q2 as my main class and
> when I click run, I get the following:
> Exception in thread "Q2-ab177be2-e1f8-4c7b-adfa-6ca449b2f360"
> java.util.MissingResourceException: Can't find resource for bundle
> java.util.PropertyResourceBundle, key revision
What have you set your classpath to for this run?

Do you have a file called revision.properties on your file system at
all?

If so, where is your revisions.properties?

--
Mark

Alejandro Revilla

unread,
Oct 1, 2012, 10:04:45 AM10/1/12
to jpos-...@googlegroups.com
If you're moving from vi, perhaps you could give IntelliJ IDEA a try, the fact that they have a VI plugin was the reason I moved to it and I'm quite happy with the choice. You can build an IDEA project using 'mvn idea:idea' in the jPOS top level directory. 

For NetBeans, it seems you should be able to just open the jPOS pom (http://maven.apache.org/netbeans-module.html)

--
@apr



--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.
Please support jPOS, contact: sa...@jpos.org
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
 
 
 

Pieter Botha

unread,
Oct 3, 2012, 4:37:31 AM10/3/12
to jpos-...@googlegroups.com
Hi Mark, Alejandro,

Between trying to get Eclipse and Netbeans to work, I commented out the Git section in the POM file which led to the revisions file not being created. Whenever I execute the build & run, git is not found and the dependency fails. Note that git is installed and is available via command line (in the path). 

I then tried IDEA and it just worked (except for moving my unit tests to a non-test directory). Everything compiled and ran without a problem which means Netbeans and Eclipse needs special configuration.

Pieter

Alejandro Revilla

unread,
Oct 3, 2012, 5:42:28 PM10/3/12
to jpos-...@googlegroups.com
Pieter,

The Git section is used just to let Q2 know which commit/revision you're running (when you run java -jar jpos.jar --version), it's useful for debugging purposes, but it's not a big deal if you don't use it. The big question is why you are building your own jPOS, you could just pull the compiled version from our maven repository, you just need to add:


   <repository>
      <id>jpos</id>
      <name>jPOS Central Repository</name>
      <url>http://jpos.org/maven</url>
      <layout>default</layout>
    </repository>
 
    <dependency>
      <groupid>org.jpos</groupid>
      <artifactid>jpos</artifactid>
      <version>1.8.7-SNAPSHOT</version>
    </dependency>

to get a recent build.

@apr


--

Pieter Botha

unread,
Oct 5, 2012, 9:33:00 AM10/5/12
to jpos-...@googlegroups.com
Hi Alejandro,

I'm making changes to some of the files and only when I'm finished with a particular section where I'm happy with the architecture of the solution, do I move out my source code and restore the original source-code.

Pieter

Alejandro Revilla

unread,
Oct 5, 2012, 11:07:10 AM10/5/12
to jpos-...@googlegroups.com
I lost you, don't understand.

--
@apr




--

Pieter Botha

unread,
Oct 8, 2012, 2:17:33 AM10/8/12
to jpos-...@googlegroups.com
Hi Alejandro,

To speed up development I'm making changes to source-code that resides in jPOS (such as EuroPackager which will become Mastercard Packager). When I'm happy that the particular code/solution is working, I create a new maven module and move the code out and restore the changed jPOS code to their original state. Once certified I'll see which code could be of use to jPOS and submit that.

Once I'm able to dev without any changes to jPOS I can convert to a maven binary dependancy. 

Having jPOS as a git source code check instead of the binary distribution,  I'm also able to almost run an environment such as dev/qa/prod as a git checkout (git pull get's you the latest for that branch and you just compile and install). 

Hope this helps.
  Pieter

Victor Salaman

unread,
Oct 8, 2012, 4:45:04 AM10/8/12
to jpos-...@googlegroups.com
Hi:

You should not have to modify the jPOS source code for normal development. 

To "speed development" you should create your own project, adding  the jPOS jar as a dependency. Doing this lets you create your own packager in any format desired. I would use the GenericPackager with an xml definition instead though :) …. 

In the end, if you want to contribute any code which may be of use to the community you can always fork jPOS, modify it and submit a pull-request as in https://github.com/jpos/jPOS/wiki/GitHub-workflow

Cheers,

/V

Troas Lutterodt

unread,
Feb 18, 2014, 3:30:00 AM2/18/14
to jpos-...@googlegroups.com

 Hi Victor Salaman,
Can you please help me to set up jpos q2 server. I have read the jpos guide, read some online articles but still cant get to understand the concept.
I am completely knew to some of the terminologies and my deadline is fast approaching.
Please help me to set it up and run q2 on a remote server with a public ip.
Am available to skype with you for a real time chat.
My skype id is ing.troas.
Thank you and hope to hear from you soon.


 
 

chhil

unread,
Feb 18, 2014, 3:59:02 AM2/18/14
to jpos-users
Alejandro has shared a draft programmers guide at http://jpos.org/doc/proguide-draft.pdf.
That should get you started.

-chhil


--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
 

 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/3addc342-798b-46db-a90d-b397355c78d5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alejandro Revilla

unread,
Feb 18, 2014, 1:00:23 PM2/18/14
to jPOS Users
Hi Troas,

While you coordinate a Skype call with Victor, you may want to take a look at this: https://netbeans.org/kb/docs/java/import-eclipse.html

You can call 'gradle eclipse' to create an Eclipse project, and then import it to Netbeans.

As an alternative, you can use this plugin: http://plugins.netbeans.org/plugin/44510/gradle-support


--
@apr


--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
Reply all
Reply to author
Forward
0 new messages