• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
David W Brown
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!