Resolving Undeclared type error

219 views
Skip to first unread message

grja...@gmail.com

unread,
Jul 26, 2013, 10:49:21 AM7/26/13
to uimafi...@googlegroups.com
I am running my code on two different platforms.  On one, everything goes smoothly (Linux).  On the one I am currently working on which is a Windows 7 machine, I get a java.lang.IllegalArgumentException: Undeclared type [full path to class name] on line 154 of CasUtil which is getType.  It is the same code I am running, but different platforms.  Any hints as to what might be causing this?  The path name given in the error message is correct and is on the classpath.  I am running it from eclipse when I get this error.  On the other system, I am either invoking it through a command line script or by using maven.  Eclipse is the best option of the current machine I am working on.

Richard Eckart de Castilho

unread,
Jul 26, 2013, 1:26:11 PM7/26/13
to uimafi...@googlegroups.com
Are you relying on automatic type description? If so, did you make sure that META-INF/org.uimafit/types.txt is on the classpath and contains a reference to your type system XML descriptor, which must also be on the classpath?

-- Richard

Gregory Werner

unread,
Jul 26, 2013, 3:43:02 PM7/26/13
to uimafi...@googlegroups.com
Sorry to be of trouble, I have fixed it.  At least having this brief conversation got my mind going.  On my current platform, my package structure had changed.  In my XML descriptor file, I had not updated it to the new path and hence why the class was not found.

The way I am accessing the file is in my code with TypeSystemDescriptionFactory.createTypeSystemDescription(<my Type Descriptor>); so I guess I am not using the automatic type description. Perhaps something to read about for the future.

-Greg


--
You received this message because you are subscribed to a topic in the Google Groups "uimafit-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/uimafit-users/F9hL4Q2Iahc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to uimafit-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Richard Eckart de Castilho

unread,
Jul 26, 2013, 3:46:13 PM7/26/13
to uimafi...@googlegroups.com
Am 26.07.2013 um 21:43 schrieb Gregory Werner <grja...@gmail.com>:

> Sorry to be of trouble, I have fixed it. At least having this brief conversation got my mind going. On my current platform, my package structure had changed. In my XML descriptor file, I had not updated it to the new path and hence why the class was not found.

Nice :)

> The way I am accessing the file is in my code with TypeSystemDescriptionFactory.createTypeSystemDescription(<my Type Descriptor>); so I guess I am not using the automatic type description. Perhaps something to read about for the future.

Small typo I had here… it's "automatic type detection", not "description". See here:

https://code.google.com/p/uimafit/wiki/TypeDescriptorDetection

Cheers,

-- Richard
Reply all
Reply to author
Forward
0 new messages