[Design of Persistence on JBoss] - Fix for org.jboss.util.file.ArchiveBrowser
by bnoll
I'm not sure that this is the best place to post this, but I ran into the problem when doing JPA stuff, so this is where I came. If it needs to be moved, please do so.
The class org.jboss.util.file.ArchiveBrowser in jboss-archive-browsing-5.0.0alpha-200607201-119.jar seems to puke when the 'getBrowser' method encounters whitespace. It looks like this was a bug once upon a time (as per http://jira.jboss.com/jira/browse/JBCOMMON-1) that has resurfaced.
The offending lines are:
| File file = null;
| try
| {
| file = new File(new URI(url.toString()));
| }
| catch(URISyntaxException urisyntaxexception)
| {
| throw new RuntimeException("Not a valid URL: " + url, urisyntaxexception);
| }
The change should be as easy as saying...
| file = new File (new URI(url.toString().replace(" ", "+")));
|
There may be some utility down in the jboss common code or other open source library that I'm not aware of that encapsulates this functionality.
This is occurring when trying to run tests in a maven 2 project, and those tests depend on and refer to a jar in my local repo that contains the annotated persistent entities. I'm working on a Windows machine, so unfortunately, that jar lives in 'C:\Documents and Settings', which is causing the problem. I tried it on a mac, where my m2 repo doesn't contain a space, and it works just fine.
Here is a portion of the stack trace:
Caused by: java.lang.RuntimeException: Not a valid URL: file:/C:/Documents and Settings/bnoll/.m2/repository/org/appfuse/appfuse-jpa-common-working/2.0-SNAPSHOT/appfuse-jpa-common-working-2.0-SNAPSHOT.jar
at org.jboss.util.file.ArchiveBrowser.getBrowser(Unknown Source)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:610)
... 38 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999263#3999263
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999263
19 years, 3 months
[Design of JBoss Labs] - Re: Classpath Problem
by jthorn
Ok, after we put something in those properties it starts up with only a few classpath erros but when we try to hit the page we are now getting a null pointer exception and this shows up on the console:
Caused by: org.apache.jasper.JasperException: Exception in JSP: /layouts/jbossForge.jsp:15
12: <%
13: if (!response.isCommitted()) {
14: %>
15: <jsp:forward page="/repo-access/default/theme/jsp/jbossForge.jsp" />
16: <%
17: }
18: %>
Stacktrace:
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.portal.theme.LayoutDispatcher.execute(LayoutDispatcher.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.portal.server.servlet.CommandFilter.doFilter(CommandFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.jboss.portal.theme.LayoutDispatcher.include(LayoutDispatcher.java:139)
at org.jboss.portal.theme.impl.JSPLayout.assembleResponse(JSPLayout.java:34)
at org.jboss.portal.core.command.MarkupCommand.execute(MarkupCommand.java:360)
... 97 more
Caused by: javax.servlet.ServletException: /default/theme/jsp/jbossForge.jsp
at org.jboss.forge.common.FilesFromRepoFilter.doFilter(FilesFromRepoFilter.java:110)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
at org.apache.jsp.layouts.jbossForge_jsp._jspService(jbossForge_jsp.java:64)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
... 116 more
16:22:24,165 ERROR [[PortalServletWithPathMapping]] Servlet.service() for servlet PortalServletWithPathMapping threw exception
org.jboss.shotoku.exceptions.ResourceDoesNotExist: /default/theme/jsp/jbossForge.jsp
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999238#3999238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999238
19 years, 3 months
[Design of JBoss Labs] - Re: Classpath Problem
by jthorn
I'm also seeing some errors about the content manager which suggests to me the shotoku might not be configured right. Here is the shotoku.properties that we used to build. I know several of these properties arent set, is it ok to leave them blank or can anybody give me an idea what to put in them?
#
# Content managers configuration
# ------------------------------
#
# Default content manager id
shotoku.id.default = default
# All ids that will be available for use
shotoku.ids = default
# Definitions of content managers
shotoku.default.implementation = org.jboss.shotoku.svn.SvnContentManager
shotoku.default.url =
shotoku.default.username =
shotoku.default.password =
shotoku.default.localpath =
shotoku.default.fullupdate = 1
# Should externals be checked out during an update of the WC.
shotoku.default.externals = true
# shotoku.file.implementation = org.jboss.shotoku.files.FileContentManager
# shotoku.file.localpath =
# shotoku.jcr.implementation = org.jboss.shotoku.jcr.JcrContentManager
# shotoku.jcr.connector = org.jboss.shotoku.jcr.JackrabbitJcrConnector
# shotoku.jcr.configfile =
# shotoku.jcr.username =
# shotoku.jcr.password =
# shotoku.jcr.localpath =
#
# General configuration
# ---------------------
#
# Embedded/ application server mode
shotoku.embedded = false
# Size of a byte array that is allocated when transferring files to/from
# the client
shotoku.transfer.buffer.size = 1024
# Interval between service (and cache) updates, in milliseconds
shotoku.service.interval = 10000
# Number of created update threads (used for updating cache items)
shotoku.updatethread.count = 10
#
# Feeds configuration
# -------------------
#
# Content manager and directory in which feeds.properties is placed in shotoku
shotoku.internal.feeds.configcmid =
shotoku.internal.feeds.configdir =
# Interval between feed updates, in milliseconds
shotoku.internal.feeds.service.interval = 10000
#
# Tags configuration
# ------------------
#
# Should synchronization of tags be done
shotoku.internal.tags.synchronization = 1
# Content manager and base directory with which synchronization of Shotoku tags
# will be done
shotoku.internal.tags.cmid =
shotoku.internal.tags.cmdir =
# Interval between tag synchronization updates, in milliseconds
shotoku.internal.tags.service.interval = 10000
#
# Tests configuration
# -------------------
#
# Content manager and base directory in which tests will be done
shotoku.internal.tests.id = default
shotoku.internal.tests.dir = shotoku-test
#
# SVN content manager service configuration
# -----------------------------------------
# Interval between working copy updates, in milliseconds
shotoku.internal.svn.service.interval = 5000
# A debugging property which, when set to 0, will cause repositories not to be
# updated for the first time when being registered.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999198#3999198
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999198
19 years, 3 months