• 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

Wicket PackageResource/Java Properties combo testcase: file may not be accessed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello JavaRanchers, actually, I work on a working ranch (no kidding). OK here is a good Rant-and-Raver: I am running a testcase against a simple JDBC oriented class I created in a Java web app. The JDBC class' constructor attempts to use: org.apache.wicket.markup.html.PackageResource to access a Java Properties file. But before actual test completes it bails on the following exception. The target file (dbconn.properties) is copied to the same place under the Target directory. Is that thundering hooves of thought I hear?

********************************
ERROR - org.apache.wicket.markup.html.PackageResource$PackageResourceBlockedException: package resource com/mycompany/jdbc/dbconn.properties may not be accessed
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec <<< FAILURE!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might want to ask this in the Wicket forum; it's not really an advanced Java question, and people familiar with Wicket would probably have a better idea about how Wicket accesses resources. Without knowing anything about Wicket, I'd first look at how Wicket apps locate resources in a regular app (as opposed to isolated test case): are there any Wicket configuration files that need to be read?
 
And inside of my fortune cookie was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic