Exception starting VARS with custom client

22 views
Skip to first unread message

Ambrose Bonnaire-Sergeant

unread,
Jun 3, 2011, 12:47:09 AM6/3/11
to mbari...@googlegroups.com, Ankur Sharda
Hi,

I have setup a server running PostgreSQL and have
verified that I can connect to it.

I have followed the instructions here to create a custom client jar:
http://vars.sourceforge.net/Development/howto_postgresql.shtml

However if I attempt to start the client, I get an exception. I have installed
the JDBC driver, deleted the old jpa jar and installed my custom one.

2011-06-03 04:41:20,650 [AWT-EventQueue-0] ERROR java.awt.EventDispatchThread  - Exception in thread [AWT-EventQueue-0]
java.lang.ExceptionInInitializerError
    at vars.annotation.AnnotationPersistenceServiceImpl$$FastClassByGuice$$9fb04ea2.newInstance(<generated>)
    at com.google.inject.internal.cglib.reflect.FastConstructor.newInstance(FastConstructor.java:40)
    at com.google.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
    at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
    at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
    at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
    at com.google.inject.Scopes$1$1.get(Scopes.java:54)
    at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
    at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
    at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
    at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84)
    at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
    at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758)
    at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804)
    at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754)
    at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:793)
    at vars.annotation.ui.App.<init>(App.java:74)
    at vars.annotation.ui.App$3.run(App.java:202)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
    at java.awt.EventQueue.access$000(EventQueue.java:85)
    at java.awt.EventQueue$1.run(EventQueue.java:603)
    at java.awt.EventQueue$1.run(EventQueue.java:601)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.util.MissingResourceException: Can't find bundle for base name annotation-jdbc, locale en_AU
    at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
    at java.util.ResourceBundle.getBundle(ResourceBundle.java:705)
    at vars.annotation.AnnotationPersistenceServiceImpl.<clinit>(AnnotationPersistenceServiceImpl.java:56)
    ... 35 more




Thanks for any pointers,
Ambrose

Brian Schlining

unread,
Jun 3, 2011, 11:23:02 AM6/3/11
to mbari...@googlegroups.com, Ankur Sharda
Hi Ankur,
Wow, that's one I've never seen before! Fortunately, I know exactly why it's happening. I'll put together a fix for it later today and send it to you.

Cheers

--
Brian Schlining

> --
> You received this message because you are subscribed to the Google Groups "mbari-vars" group.
> To post to this group, send email to mbari...@googlegroups.com (mailto:mbari...@googlegroups.com).
> To unsubscribe from this group, send email to mbari-vars+...@googlegroups.com (mailto:mbari-vars+...@googlegroups.com).
> For more options, visit this group at http://groups.google.com/group/mbari-vars?hl=en.


Brian Schlining

unread,
Jun 3, 2011, 11:38:48 AM6/3/11
to mbari...@googlegroups.com
p.s. THe error your getting isn't a problem with the JDBC driver. Instead, it's supposed to locate a file named annotation-jdbc.properties (which exists in vars-jpa.jar), but due to your locale it's munging the name and looking for annotation-jdbc_en_AU.properties. A quick fix is to unpack the vars-jpa.jar file and copy the annotation-jdbc.properties into a new file in the same directory named annotation-jdbc_en_AU.properties and pack it all back up again (The directions for unpakcing and packing the jar can be found at http://vars.sourceforge.net/Development/howto_postgresql.shtml).

If you're a little more patient, You can wait for a proper fix from me. I need to change the way property files are resolved so that they aren't looked up by locale.

--
Brian Schlining

Brian Schlining

unread,
Jun 3, 2011, 11:42:50 AM6/3/11
to mbari...@googlegroups.com, Ankur Sharda
p.p.s Can you email be the vars-jpa.jar file that you're using? Don't send it to the googlegroup list, just send it to 'brian AT mbari DOT org'.

Thanks

--
Brian Schlining


On Friday, June 3, 2011 at 8:23 AM, Brian Schlining wrote:

Brian Schlining

unread,
Jun 7, 2011, 12:06:38 PM6/7/11
to mbari...@googlegroups.com

When you first run VARS, you need to run the 'bin/knowledgebase' app first. It should prompt you to create a root node if none is found. I'm surprised it's not prompting you as I just tested it on postgresql not very long ago. Anyway, you can also run the "root node check" from the command line as:

bin/gsh -e "def t = new vars.ToolBox();def tb = t.injector.getInstance(vars.knowledgebase.ui.ToolBelt.class);new vars.knowledgebase.ui.actions.PopulateDatabaseAction(tb).doAction()"

Alternatively, the SQL for inserting the root node should be the following
INSERT INTO Concept(id) VALUES (25)
INSERT INTO ConceptName(id, ConceptName, ConceptID_FK, NameType) VALUES (25, 'object', 25, 'primary')

NOTE: I haven't run a test on this, so if it complains about missing values or null values not allowed just modifiy the insert to put in the need parameters. Also, I'm using 25 as a value for the primary key but the value isn't important as long as it's less than the values in the rows for Concept and ConceptName in the UniqueID table.

Cheers
-- B
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
MBARI
Software Engineer
br...@mbari.org (mailto:br...@mbari.org)
(831)775-1855
http://www.mbari.org/staff/brian
> I run "bin/annotation" and get this exception (added some context):
>
> I tried "bin/knowledgebase" and I get this:
>
> Do I need to initialize the knowledgebase somehow?
>
> Thanks,


Brian Schlining

unread,
Jun 7, 2011, 12:11:00 PM6/7/11
to Ambrose Bonnaire-Sergeant, mbari...@googlegroups.com
Hi Ambrose,

On Monday, June 6, 2011 at 8:40 PM, Ambrose Bonnaire-Sergeant wrote:

> Also
>
> I tried upgrading to Postgres 9.0, as you said you tried VARS with that version.
>
> Funny, that SQL file didn't import properly on 9.0 either
> http://code.google.com/p/vars-redux/source/browse/vars-jpa/src/main/sql/vars-insertInitialUniqueID.sql
WHOOPS! I changed the SQL on the link above to use ';' instead of 'GO'.
>
> Is that because it's specific to Aquafold?
Yes, Aqua Data Studio seems to be smart about converting the various flavors of SQL to something that a particular database likes.

Ambrose Bonnaire-Sergeant

unread,
Jun 8, 2011, 1:21:08 AM6/8/11
to mbari...@googlegroups.com, Ankur Sharda
Hi Brian,

The gsh call didn't work but the raw SQL did. I've successfully set up an administrator account, and I think
we're up and running.

Thanks,
Ambrose

--
You received this message because you are subscribed to the Google Groups "mbari-vars" group.
To post to this group, send email to mbari...@googlegroups.com.
To unsubscribe from this group, send email to mbari-vars+...@googlegroups.com.

Brian Schlining

unread,
Jun 8, 2011, 1:40:10 AM6/8/11
to mbari...@googlegroups.com
Hi Ambrose, 


The gsh call didn't work but the raw SQL did. I've successfully set up an administrator account, and I think we're up and running.

Great!! Keep me posted if you run into any problems. I'm happy to help out if needed.

p.s. Now that I think about it, I seem to remember there was a bug in the 6.0.2 that wasn't setting up the database correctly. I had patched that for a group in Louisiana, but I don't think I've rolled out a new release with that fix yet. I'll have to remember to post a new release soon. 

Cheers

-- B 
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
bschl...@gmail.com
Reply all
Reply to author
Forward
0 new messages