• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Not able to creat JAXB instance when i call JAXB unmarshller from JNotify

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Al,
Here is the issue when i try to create JAXB instance in jnotify watch
whenever a new file comes into the watched folder Jnotify notifies the name of newly created file..then jnotify listner check for the newly created file .
if newly created file is in XML format i call the parser function to parse this file and enter the details into the database
when i run parser function giving the input file name ,it works fine ..but when i pass this file name throught Jnotify it doent creat JAXB instance at run time and giving null pointer exception.
I printed the libraries before creating the JAXB context it gets the JAXB library at runtime but when it tries to create JAXB context it throws following exception.

java.lang.NullPointerException
at javax.xml.bind.ContextFinder.find(ContextFinder.java:270)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
at jnot.callparser(jnot.java:62)
at jnot.fileCreated(jnot.java:35)
at net.contentobjects.jnotify.win32.JNotifyAdapterWin32.notifyChangeEvent(Unknown Source)
at net.contentobjects.jnotify.win32.JNotifyAdapterWin32$1.notifyChange(Unknown Source)
at net.contentobjects.jnotify.win32.JNotify_win32.callbackProcessEvent(Unknown Source)

I tried with diffrent version JAXB but i coudnt solve this issue..could you please let me know what could be the issue?


Thanks in advance
Anju
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to XML.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic