Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 504185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:28:15+00:00 2026-05-13T06:28:15+00:00

I have an application that is based on Swing, Spring 2.5.2, Hibernate 3.3.1. If

  • 0

I have an application that is based on Swing, Spring 2.5.2, Hibernate 3.3.1.

If my application is run from a directory that contains a space character, for example D:\hudson\jobs\FooBar - Fast Build, then I get this error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [spring-persistence.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/D:/hudson/jobs/FooBar%20-%20Fast%20Build/workspace/commons/target/classes/
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1302)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:463)
    ...
Caused by: java.lang.RuntimeException: error trying to scan <jar-file>: file:/D:/hudson/jobs/FooBar%20-%20Fast%20Build/workspace/commons/target/classes/
    at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:635)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350)
    ...
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: D:\hudson\jobs\FooBar%20-%20Fast%20Build\workspace\commons\target\classes (The system cannot find the path specified)
    at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:74)
    at org.jboss.util.file.FileProtocolArchiveBrowserFactory.create(FileProtocolArchiveBrowserFactory.java:48)
    ...
Caused by: java.io.FileNotFoundException: D:\hudson\jobs\FooBar%20-%20Fast%20Build\workspace\commons\target\classes (The system cannot find the path specified)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:114)
    at java.util.jar.JarFile.<init>(JarFile.java:133)
    at java.util.jar.JarFile.<init>(JarFile.java:97)
    at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:69)
    ... 49 more

(note that in this case, the error occurs during a unit test launched by a Hudson job)

As you can see, each space character is replaced by a %20 in the URL, which may be the source of the problem…

Do you have any idea why this happens, and how to solve it (of course, renamming the whole path of my application will solve the problem, but it is not the kind of answer that I am looking for 😉 ) ?

ps: I don’t know if it can help you, but the bean entityManagerFactory is created in the spring-persistence.xml file with the following definition:

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="persistenceUnitName" value="oraclePersistenceUnit"/>
    <property name="dataSource" ref="dataSource"/>
</bean>

(the properties are defined in another place of the spring definition, or in a persistence.xml file)


The error is thrown when I run the following code in my application:

applicationContext = new ClassPathXmlApplicationContext("/my-spring-config.xml");

my-spring-config is located in the src/main/resources directory of my application.
I’ve also tested with a FileSystemXmlApplicationContext instead, but the problem still occurs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:28:15+00:00Added an answer on May 13, 2026 at 6:28 am

    In fact, this is due to a bug in the version of hibernate-entitymanager I was using (3.3.1.ga).

    By replacing this version with the latest one (3.4.0.GA), the problem does not occur anymore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a swing based application where I have a JList that periodically get's
I have created an application that creates bar graph based on inputs read from
I have a web application that's based on Spring and the application contexts, applicationContext.xml
We have a swing based application that does complex processing on data. One of
I have an application that builds a left menu that is based on a
I have an application that can filter a datagridview based on date using a
We have a sharepoint based application that uses a custom database for storing metadata/files
I have a PHP based application that I need to work on both a
I have a web application that dynamically loads assemblies based on database configuration entries
I have an android application that requres a login based on users in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.