WebLogic Server Version: 12.1.2.0.0 Descriptor - weblogic12c

I have a MVC spring application .
I am using this weblogic.xml descriptor (I want to get fid of Session Tracking: the JSESSION parameter that weblogic adds in the URL)
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
<jsp-descriptor>
<precompile>true</precompile>
</jsp-descriptor>
<!-- Added to resolve classpath problems when AOP is involved (hibernate, jcore, ...),
or compatibility problems between JARs provided in WLS as well as in the application.
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
-->
<context-root>ecat</context-root>
<!-- context-root>iot_devices</context-root-->
<!-- weblogic.xml entry -->
<session-descriptor>
<session-param>
<param-name>UrlRewritingEnabled</param-name>
<param-value>false</param-value>
</session-param>
</session-descriptor>
</weblogic-web-app>
but surprisingly I have this error:
[java] <23-May-2016 11:38:29 o'clock CEST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\Users\nunito\git\iot-devices\iot-devicesWeb\build\iot-devicesWeb/WEB-INF/weblogic.xml of module null. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
[java] problem: cvc-complex-type.2.4a: Expected elements 'timeout-secs#http://www.bea.com/ns/weblogic/weblogic-web-app invalidation-interval-secs#http://www.bea.com/ns/weblogic/weblogic-web-app debug-enabled#http://www.bea.com/ns/weblogic/weblogic-web-app id-length#http://www.bea.com/ns/weblogic/weblogic-web-app tracking-enabled#http://www.bea.com/ns/weblogic/weblogic-web-app cache-size#http://www.bea.com/ns/weblogic/weblogic-web-app max-in-memory-sessions#http://www.bea.com/ns/weblogic/weblogic-web-app cookies-enabled#http://www.bea.com/ns/weblogic/weblogic-web-app cookie-name#http://www.bea.com/ns/weblogic/weblogic-web-app cookie-path#http://www.bea.com/ns/weblogic/weblogic-web-app cookie-domain#http://www.bea.com/ns/weblogic/weblogic-web-app cookie-comment#http://www.bea.com/ns/weblogic/weblogic-web-app cookie-secure#http://www.bea.com/ns/weblogic/weblogic-web-app cookie-max-age-secs#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-store-type#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-store-cookie-name#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-store-dir#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-store-pool#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-data-source-jndi-name#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-session-flush-interval#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-session-flush-threshold#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-async-queue-timeout#http://www.bea.com/ns/weblogic/weblogic-web-app persistent-store-table#http://www.bea.com/ns/weblogic/weblogic-web-app jdbc-column-name-max-inactive-interval#http://www.bea.com/ns/weblogic/weblogic-web-app jdbc-connection-timeout-secs#http://www.bea.com/ns/weblogic/weblogic-web-app url-rewriting-enabled#http://www.bea.com/ns/weblogic/weblogic-web-app http-proxy-caching-of-cookies#http://www.bea.com/ns/weblogic/weblogic-web-app encode-session-id-in-query-params#http://www.bea.com/ns/weblogic/weblogic-web-app monitoring-attribute-name#http://www.bea.com/ns/weblogic/weblogic-web-app sharing-enabled#http://www.bea.com/ns/weblogic/weblogic-web-app' instead of 'session-param#http://www.bea.com/ns/weblogic/weblogic-web-app' here in element session-descriptor#http://www.bea.com/ns/weblogic/weblogic-web-app:<null>
[java] at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
[java] at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
[java] at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
[java] at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
[java] at weblogic.servlet.internal.WebAppDescriptor.getWeblogicWebAppBean(WebAppDescriptor.java:170)
[java] at weblogic.servlet.jsp.jspc20.initDescriptors(jspc20.java:504)
[java] at weblogic.servlet.jsp.jspc20.runBody(jspc20.java:235)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:158)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[java] at weblogic.jspc.main(jspc.java:22)

It seems that you're using the old tag structure for WebLogic.
WebLogic 10g,11g: UrlRewritingEnabled
WebLogic 12c: url-rewriting-enabled
So, your section should be something like this:
<session-descriptor>
<session-param>
<param-name>url-rewriting-enabled</param-name>
<param-value>false</param-value>
</session-param>
</session-descriptor>
Also, make sure to set cookie-secure to false if you intent to use url rewriting, since they conflict with each other. Check out the descriptor structure here.
Hope it helps !

Related

JBoss 7 (EAP 6) CLI configuration: 'queue-address' is not found among the supported properties: [selector, entries, durable]

I am on JBoss EAP 6 and my task is to migrate a server to the Cloud.
I get JBoss to start, but then some queue fails with:
[echo] try to connect to local JBoss...
Checking for listener at 127.0.0.1:17545
Checking for listener at 127.0.0.1:17545
waitfor: condition was met
Property "jboss.not.started" has not been set
[echo] ...connection is available.
[antcall] Exiting /app/project/app/jboss-6.4-inst1/pi-deploy/tools/extension/configure.xml.
[echo] env.JBOSS_HOME=/opt/inet/jboss-6.4
[java] Executing '/opt/dbsinfra/zst/jdk-1.8.0_161/jre/bin/java' with arguments:
[java] '-jar'
[java] '/opt/inet/jboss-6.4/jboss-modules.jar'
[java] '-mp'
[java] '/opt/inet/jboss-6.4/modules'
[java] 'org.jboss.as.cli'
[java] '--file=/app/project/app/jboss-6.4-inst1/pi-deploy/../bin/configure.cli'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[java] INFO [org.jboss.modules] JBoss Modules version 1.3.10.Final-redhat-1
[java] INFO [org.xnio] XNIO Version 3.0.16.GA-redhat-1
[java] INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.16.GA-redhat-1
[java] INFO [org.jboss.remoting] JBoss Remoting version 3.3.12.Final-redhat-2
[java] INFO [org.jboss.as.cli.CommandContext] The batch executed successfully
[java] The batch executed successfully
[java] ERROR [org.jboss.as.cli.CommandContext] 'queue-address' is not found among the supported properties: [selector, entries, durable]
[java] 'queue-address' is not found among the supported properties: [selector, entries, durable]
You can see that the server gets configured via command line interface (CLI):
[java] '--file=/app/project/app/jboss-6.4-inst1/pi-deploy/../bin/configure.cli'
The offending part of the configure.cli script is:
#######################################################################
#
# JMS Queues
#
#######################################################################
# JMS Queue for business events
/subsystem=messaging:add()
/subsystem=messaging/hornetq-server=default:add()
/subsystem=messaging/hornetq-server=default/jms-queue=BusinessEventQueue:add(\
entries=["/queue/BusinessEventQueue"],\
queue-address="jms.queue.BusinessEventQueue"\ <------ HERE
)
/subsystem=messaging/hornetq-server=default/in-vm-connector=in-vm:add(server-id="0")
/subsystem=messaging/hornetq-server=default/in-vm-acceptor=in-vm:add(server-id="0")
/subsystem=messaging/hornetq-server=default/pooled-connection-factory=InVmJMSConnectionFactory:add(\
entries=["java:/InVmJMSConnectionFactory"],\
connector={"in-vm" => undefined}\
)
/subsystem=ejb3:write-attribute(name="default-resource-adapter-name", value="InVmJMSConnectionFactory")
/subsystem=ejb3:write-attribute(name=default-mdb-instance-pool, value="mdb-strict-max-pool")
What I don't get here is:
We're moving from JBoss EAP 6.4 to JBoss EAP 6.4 and the old/previous server is running OK.
I have never come in touch with anything JMS-like...
Question:
What is queue-address="jms.queue.BusinessEventQueue" here? Is this some kind of name?
How do you probably fix this? -> replace by name param?
Thanks
PS: the situation is a little more complex as I cannot just change a local file. The files are pulled from an SVN repo, so any attempt involves a commit... etc.
You cannot use queue-address as an attribute for JMS-Queue "add" operation. As it's not a supported operation. Try the below command it should work.
/subsystem=messaging/hornetq-server=default/jms-queue=BusinessEventQueue:add(\
entries=["/queue/BusinessEventQueue"])
When new JMS queue is created queue-address is set to jms.queue.BusinessEventQueue" by default. You can use below CLI command to check the value.
/subsystem=messaging/hornetq-server=default/jms-queue=BusinessEventQueue:read-attribute(name=queue-address)
if you have use queue-address while adding new JMS-queue, you will have use something like below.
jms-queue add --queue-address=BusinessEventQueue --entries=/queue/BusinessEventQueue
jms.queue would be added by default not need to pass that part.

jbossfuse: Cannot find the declaration of element 'blueprint'

While Deploying a War application into fuse container, Im getting the Exception: cvc-elt.1.a: Cannot find the declaration of element 'blueprint'
My blueprint schema is:
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
Exception detail:
org.ops4j.pax.web.pax-web-extender-war - 4.3.0 | Error deploying web application
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from ServletContext resource [/WEB-INF/camel-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration of element 'blueprint'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:397)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[205:org.apache.servicemix.bundles.spring-context:3.2.16.RELEASE_1]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:542)[205:org.apache.servicemix.bundles.spring-context:3.2.16.RELEASE_1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[205:org.apache.servicemix.bundles.spring-context:3.2.16.RELEASE_1]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)[310:org.apache.servicemix.bundles.spring-web:3.2.16.RELEASE_1]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext$3.call(HttpServiceContext.java:354)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext$3.call(HttpServiceContext.java:350)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.callContextInitialized(HttpServiceContext.java:349)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)[93:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)[94:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:601)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)[93:org.eclipse.jetty.server:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:260)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)[96:org.eclipse.jetty.util:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:279)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.end(HttpServiceStarted.java:1096)[116:org.ops4j.pax.web.pax-web-runtime:4.3.0]
at org.ops4j.pax.web.service.internal.HttpServiceProxy.end(HttpServiceProxy.java:417)[116:org.ops4j.pax.web.pax-web-runtime:4.3.0]
at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.end(RegisterWebAppVisitorWC.java:380)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:692)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.register(WebAppPublisher.java:237)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:182)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:135)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)[karaf.jar:2.4.0.redhat-630187]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)[karaf.jar:2.4.0.redhat-630187]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:101)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebObserver.deploy(WebObserver.java:219)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.WebObserver$1.doStart(WebObserver.java:179)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.extender.SimpleExtension.start(SimpleExtension.java:59)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at org.ops4j.pax.web.extender.war.internal.extender.AbstractExtender$1.run(AbstractExtender.java:281)[276:org.ops4j.pax.web.pax-web-extender-war:4.3.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration of element 'blueprint'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:201)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2143)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:788)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:733)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1754)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)[:2.11.0.SP4-redhat-1]
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:298)[:2.11.0.SP4-redhat-1]
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:389)[203:org.apache.servicemix.bundles.spring-beans:3.2.16.RELEASE_1]
... 49 more
Can anyone give a clue in this scenario?
In JBoss FUSE the war isn't a preferred way, you should use bundle instead, and use blueprint to configure the route. Please take a look at the camel quickstarts in JBoss FUSE kit.

Eclipse Web Service Client wizard and CXF

I'm trying to create a Web Service Client using the Eclipse Juno SR2 wizard. The service is correctly deployed and running on a Glassfish 3.1.2 server and I can see the WSDL file or create the client using Axis.
The problem arises if I try to use CXF (tried CXF 2.6.8 and 2.7.5) to create the client in a Dynamic Web project created for a GLassfish 3.1.2:
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -client -d /Users/dude/Documents/SOA/workspace/gf/.cxftmp/src -classdir /Users/dude/Documents/SOA/workspace/gf/build/classes -p http://testservice.csiaf.unifi.it/=it.unifi.csiaf.testservice -impl -validate -exsh false -dns true -dex true -wsdlLocation http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl -verbose -defaultValues -fe jaxws -db jaxb -wv 1.1 http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
wsdl2java - Apache CXF 2.6.8
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/dude/glassfish3/glassfish/modules/weld-osgi-bundle.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/apache-cxf-2.6.8/lib/slf4j-jdk14-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:420)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
Caused by: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:97)
at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.build(WSDLDefinitionBuilder.java:69)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:82)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:59)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:198)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
... 4 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:243)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:192)
at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:78)
... 10 more
Caused by: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:299)
at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:254)
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1423)
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1317)
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:233)
... 12 more
If I try to execute the wsdl2java as command line it works and .java files are created:
macpro:glassfish3 dude$ /usr/local/apache-cxf-2.6.8/bin/wsdl2java -client -d /Users/dude/Documents/SOA/workspace/gf/.cxftmp/src -classdir /Users/dude/Documents/SOA/workspace/gf/build/classes -p http://testservice.csiaf.unifi.it/=it.unifi.csiaf.testservice -impl -validate -exsh false -dns true -dex true -wsdlLocation http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl -verbose -defaultValues -fe jaxws -db jaxb -wv 1.1 http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -client -d /Users/dude/Documents/SOA/workspace/gf/.cxftmp/src -classdir /Users/dude/Documents/SOA/workspace/gf/build/classes -p http://testservice.csiaf.unifi.it/=it.unifi.csiaf.testservice -impl -validate -exsh false -dns true -dex true -wsdlLocation http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl -verbose -defaultValues -fe jaxws -db jaxb -wv 1.1 http://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
wsdl2java - Apache CXF 2.6.8
I suppose there's some problem in the Eclipse+CXF combo, since the command line works, but I've no clue about how to solve it. Any idea ?
You need to make sure Woodstox 4.2.0 is being picked up. Alternatively, set the system property org.apache.cxf.stax.allowInsecureParser to true
Try removing these 2 jar files from the glassfish\modules directory:
woodstox-core-asl.jar
stax2-api.jar
I think it will prevent the 2 JAR files (woodstox and stax2) from the CXF project from being used after deployment.
Try excluding this if it exists as a dependency somewhere, and use Woodstox 4.2.0:
<artifactId>wstx-asl</artifactId>
<groupId>org.codehaus.woodstox</groupId>
I faced the same issue in JDeveloper and that got resolved by adding "woodstox-core-asl-4.2.1.jar" to the classpath.
i was facing the same issue but deploying it to web sphere, and after a research of few hours figured out the exact version for woodstox, i.e. below
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<version>4.2.0</version>
</dependency>
This https://bugs.eclipse.org/bugs/show_bug.cgi?id=409070 link also helped to figured it out.
Both Java and .Net clients working fine.

GWTP - An error occurred while trying to write the image bundle

I am getting a lot of these errors while trying to build gwtp+mgwt app using ant-
Preparing method tabBarMoreImage
[java] [ERROR] An error occurred while trying to write the image bundle.
[java] javax.imageio.IIOException: Can't create output stream!
[java] at javax.imageio.ImageIO.write(ImageIO.java:1560)
...
Preparing method tabBarMostRecentImage
[java] [ERROR] An error occurred while trying to write the image bundle.
[java] javax.imageio.IIOException: Can't create output stream!
...
[java] Caused by: javax.imageio.IIOException: Can't create cache file!
[java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:397)
[java] at javax.imageio.ImageIO.write(ImageIO.java:1558)
[java] ... 33 more
[java] Caused by: java.io.IOException: Too many open files
[java] at java.io.UnixFileSystem.createFileExclusively(Native Method)
[java] at java.io.File.checkAndCreate(File.java:1704)
[java] at java.io.File.createTempFile(File.java:1792)
[java] at javax.imageio.stream.FileCacheImageOutputStream.(FileCacheImageOutputStream.java:71)
[java] at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(OutputStreamImageOutputStreamSpi.java:50)
[java] at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:393)
[java] ... 34 more
[java] Preparing method getButtonBarArrowDownImage
[java] [ERROR] An error occurred while trying to write the image bundle.
[java] javax.imageio.IIOException: Can't create output stream!
[java] at javax.imageio.ImageIO.write(ImageIO.java:1560)
[java] at com.google.gwt.resources.rg.ImageBundleBuilder.createImageBytes(ImageBundleBuilder.java:558)
[java] at com.google.gwt.resources.rg.ImageBundleBuilder.toPng(ImageBundleBuilder.java:544)
...
The application runs fine in dev mode. Any ideas?
Maybe GWT compiler is leaking file descriptors ( hence the "Too many open files" exception). Maybe you're on environment that has limited the number of open files per user (is this your own machine)?
Check all user limits with ulimit -a.
You can try to increase the open file limit by using ulimit -Hn <number>. This should at least help you diagnose.
Had exactly the same problem (and error message).
Found the solution in this thread on google groups (GWT)
I am using Linux (I don't know if that's your case)
In /etc/security/limits.conf I added
* soft nofile 65535
* hard nofile 65535
To apply the new settings, log out and in again.

Trying to configure an active MQ broker with a plugin in Java, where should <bean class="..."> attribute be pointing to?

I'm trying to configure an activemq broker with a plugin installed, but can't seem to get the qualified name of the plugin class right in the broker configuration file.
I have pasted the error message followed by the broker config below. Basicallly in the element I'm specifying
class="file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin"
which is absolute path to the XmlValidationPlugin.class file(have tried appending .class to path above but I get the same error).
Initially I assumed that the class attribute should be pointing to the .class file but have tried pointing it to .java and still doesn't work.
I have read the active MQ faq on developing plugins, FAQs, spring documentation etc.
My class path is
.;JAVA_HOME\lib;C:\Marcus\JavaProjects\Project;C:\Marcus\JavaProjects\Project\build\prod\classes
and JAVA_HOME is:
C:\Program Files\Java\jdk1.7.0_03
all the java source resides in
C:\Marcus\JavaProjects\Project\src
and the .class files are in
C:\Marcus\JavaProjects\Project\build\prod\classes
( file structure in classes mirrors that in src,so for example
com.foo.jms.amqplugin.XmlValidationPlugin
will have its .class file in
classes/com/foo/jms/amqplugin )
the plugin in question is XmlValidationPlugin.java, and is in folder src in package:
com.foo.jms.amqplugin
I have tried putting XmlValidationPlugin.class in a JAR and putting the JAR in activemqinstalldir/lib,( as was recommended to other people who had a similar problem) but this has not helped.
I have spent a day and a half on this already, and would really appreciate if anyone has any idea what the value of the plugins class attribute should be, as I have tried everything... Thanks in advance!
TOP OF ERROR OUTPUT:
C:\Program Files\apache-activemq-5.5.1>bin\activemq xbean:file:C:/Marcus/JavaProjects/Project/config/custom-broker.xml
Java Runtime: Oracle Corporation 1.7.0_03 C:\Program Files\Java\jdk1.7.0_03\jre
Heap sizes: current=15872k free=14246k max=506816k
JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\Program Files\apache-
activemq-5.5.1\bin\../conf;C:\Program Files\apache-activemq-5.5.1\bin\../conf; -Dactivemq.home=C:\Program Files\apache-activemq-5.5.1\bin\.. -Dactivemq.base=C:\Program Files\apache-activemq-5.5.1\bin\
..
ACTIVEMQ_HOME: C:\Program Files\apache-activemq-5.5.1\bin\..
ACTIVEMQ_BASE: C:\Program Files\apache-activemq-5.5.1\bin\..
Loading message broker from: xbean:file:C:/Marcus/JavaProjects/Project/config/custom-broker.xml
INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1#7a8ba4: startup date [Thu Apr 12 10:38:26 CEST 2012]; root of context hierarchy
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin. Reason: java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin; nested exception is java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin
java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin.
Reason: java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin; nested exception is java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
...
BROKER CONFIG FILE:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<!--The <broker> element is used to configure the ActiveMQ broker. -->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost"
dataDirectory="${activemq.base}/data">
...
<!--plugin-->
<plugins>
<bean xmlns="http://www.springframework.org/schema/beans"
id="xmlValidationPlugin"
class="com.foo.jms.amqplugin.XmlValidationPlugin"/>
</plugins>
</broker>
</beans>
Basicallly in the element I'm specifying class="file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin" which is absolute path to the XmlValidationPlugin.class file(have tried appending .class to path above but I get the same error). Initially I assumed that the class attribute should be pointing to the .class file but have tried pointing it to .java and still doesn't work.
It seems that the error you are getting is from the classloader.
Reason: java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin; nested exception is java.lang.ClassNotFoundException: file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin
Classloader expects a fully qualified class-name instead of a path to the class file. Try to specify the fully qualified class name instead of the path to the class file .
Instead of:
file:C:/Marcus/JavaProjects/Project/build/prod/classes/com/foo/jms/amqplugin/XmlValidationPlugin
Use:
com.foo.jms.amqplugin.XmlValidationPlugin
and do make sure that CLASSPATH environment variable will contain: C:/Marcus/JavaProjects/Project/build/prod/classes
If ActiveMQ uses some custom classloader for loading plug-ins (I do not know the details), you might need to specify the classpath in some ActivemMQ-specific way.