[Installation, Configuration & DEPLOYMENT] - MalformedURLException for cache config in a web app
by bob_ninja
I have a simple web app that tries to initialize and use a cache instance. I am running the latest AS BETA 4, using the ALL config that includes cache lib.
I copied one of the sample config files:
all/lib/jbosscache.jar/META-INF/replSync-service.xml
... into my app to avoid any issues. My code is simple:
// read configuration
final XmlConfigurationParser parser = new XmlConfigurationParser();
final Configuration config =
parser.parseStream(CacheContext.class.getResourceAsStream(conf_path));
// init cache
CacheFactory<String,Object> factory =
new DefaultCacheFactory<String,Object>();
cache = factory.createCache(config, true);
I have my own context class co-located with the config file. The server is generating this:
15:28:45,107 ERROR [XmlHelper] Configurator general error
java.net.MalformedURLException
at java.net.URL.(URL.java:601)
at java.net.URL.(URL.java:464)
at java.net.URL.(URL.java:413)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.jboss.cache.xml.XmlHelper.getDocumentRoot(XmlHelper.java:374)
at org.jboss.cache.factories.XmlConfigurationParser.parseStream(XmlConfigurationParser.java:
100)
at test.avaya.jbc.cache.CacheContext.init(CacheContext.java:60)
at test.avaya.jbc.cache.CacheContext.(CacheContext.java:47)
at test.avaya.jbc.cache.CacheContext.getInstance(CacheContext.java:33)
at test.avaya.jbc.VerifyFidelity.run(VerifyFidelity.java:72)
15:28:45,107 ERROR [STDERR] Exception in thread "Thread-28"
15:28:45,107 ERROR [STDERR] java.lang.NullPointerException
15:28:45,107 ERROR [STDERR] at org.jboss.cache.factories.XmlConfigurationParser.getMBeanElement(
XmlConfigurationParser.java:208)
15:28:45,107 ERROR [STDERR] at org.jboss.cache.factories.XmlConfigurationParser.parseStream(XmlC
onfigurationParser.java:101)
15:28:45,107 ERROR [STDERR] at test.avaya.jbc.cache.CacheContext.init(CacheContext.java:60)
15:28:45,107 ERROR [STDERR] at test.avaya.jbc.cache.CacheContext.(CacheContext.java:47)
15:28:45,107 ERROR [STDERR] at test.avaya.jbc.cache.CacheContext.getInstance(CacheContext.java:3
3)
15:28:45,107 ERROR [STDERR] at test.avaya.jbc.VerifyFidelity.run(VerifyFidelity.java:72)
Looks like it does locate the file fine and starts reading it, but then fails due to a URL. "getDocumentRoot" seems to imply an early failure at the start of the file. "determineDocVersion" might imply processing the 1st tag,
<?xml version="1.0" encoding="UTF-8"?>
Not sure. I don't really see any URLs there. In any case I only changed the cluster name, so this is the stock config file that same with AS. I would assume that it should parse fine.
Tried searching old posts, but found not clue. If there is another existing resource that explains this sort of issue, I would appreciate a tip.
Or just in general any tip, as what area I should focus on.
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145257#4145257
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145257
18 years, 3 months
[JBoss Portal] - Re: Error - Both MyFaces and the RI are on your classpath.
by ronnie8080
Peter,
Thank you so much for getting back.
I now understand the STDERR better.
However, I am not sure about how to remove the myfaces related jar as I do not remember having added them. In fact I have not done anything to the out of the box server other than run it. But, it seems that myfaces-api.jar and myfaces-impl.jar are present in three different location.
C:\JBoss-2.6.4_RI\jboss-portal-2.6.4\server\default\deploy\jboss-portal.sar\portal-admin.sar\portal-admin.war\WEB-INF\lib2
C:\JBoss-2.6.4_RI\jboss-portal-2.6.4\server\default\deploy\jboss-portal.sar\portal-identity.sar\portal-identity.war\WEB-INF\lib2
C:\JBoss-2.6.4_RI\jboss-portal-2.6.4\server\default\deploy\jboss-portal.sar\portal-wsrp.sar\portal-wsrp-admin.war\WEB-INF\lib2
I will remove these jars and try. Do I have to do anything extra after removing these jars.
Thank you so much.
Ronnie
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145254#4145254
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145254
18 years, 3 months
[JBoss Messaging] - Re: MQ migration help
by tnine
Great! I'm looking forward to deploying it. Check out the 2 queue definitions in my last post, StatementInput and StatementOutput. Statement output never fails, it just dumps data to disk, so I'm not worried that worried about its DLQ. In the event of a read failure, the program halts immediately. However I have defined its DLQ as StatementDLQ just to be safe. In regards to my StatementInput Queue, I set the DLQ to StatementDLQ, and set the MaxDeliveryAttempts to 2 since I don't want 10 retries. If the delivery off of StatementInput fails once, it will most likely fail the second time. I don't want the messages to expire, so I didn't set the ExpiryQueue property. I followed the configuration examples in the destinations-service.xml file. Did I configure the DLQ attributes incorrectly?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145253#4145253
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145253
18 years, 3 months