Skip to content

add instructions to copy jetty.xml to example/conf to access web demos #1425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2025

Conversation

gurpartap0306
Copy link
Contributor

@gurpartap0306 gurpartap0306 commented May 7, 2025

Summary

This PR addresses a configuration issue that caused the demo to fail during startup due to an XML parsing error in jetty.xml.

Issue Fixed

Before this change, starting the demo threw the following error:

ERROR | Failed to load: file [/Users/user/workspace/activemq-brokers/apache-activemq-6.1.6/examples/conf/activemq-demo.xml], reason: IOException parsing XML document from file [/Users/user/workspace/activemq-brokers/apache-activemq-6.1.6/examples/conf/jetty.xml]

This was caused by the application not being able to resolve jetty.xml from the filesystem path. By updating the reference to use the classpath and ensuring the correct path is included, this issue is now resolved.

Added instructions to copy jetty.xml to example/conf to access web demos that fixes the issue.

@gurpartap0306 gurpartap0306 force-pushed the fixDemoWebApp branch 6 times, most recently from 9b09fb8 to 9a69095 Compare May 9, 2025 17:39
Copy link
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add conf in classpath.

The default activemq.xml using related path (not classpath). Demo can do the same.

@gurpartap0306
Copy link
Contributor Author

Thanks for the feedback! Initially, we used a relative path like <import resource="jetty.xml" />, which worked during testing because the test setup moved the demo files from example/conf to conf. However, this caused the DemoWebApp to fail at runtime since jetty.xml doesn't exist in example/conf.

To resolve this, I added conf to the test classpath to align it with the runtime environment. I did not modify the runtime classpath, keeping the production setup unchanged.

Other option is to add copy of jetty.xml in example/conf and use relative path. Let me know if you'd prefer this approach.

@gurpartap0306 gurpartap0306 requested a review from jbonofre May 11, 2025 17:22
@jbonofre
Copy link
Member

@gurpartap0306 yeah, I would prefer to copy (or document the copy) jetty.xml in example/conf. I don't want to add conf in the classpath (as it can be problematic for security, side effect, etc).

@gurpartap0306
Copy link
Contributor Author

gurpartap0306 commented May 12, 2025

Thanks for the clarification. That makes sense. I'll update the PR with documentation to copy jetty.xml in example/conf.

@gurpartap0306 gurpartap0306 changed the title Fix jetty.xml loading issue in demo add instructions to copy jetty.xml to example/conf to acess web demos May 12, 2025
@gurpartap0306 gurpartap0306 changed the title add instructions to copy jetty.xml to example/conf to acess web demos add instructions to copy jetty.xml to example/conf to access web demos May 12, 2025
@jbonofre jbonofre merged commit d534af7 into apache:main May 26, 2025
1 check passed
jbonofre pushed a commit that referenced this pull request May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants