I get the following exception when deploying a JSR 286 portlet into Oracle WebLogic Server 11g (to deploy it later in Oracle WebCenter 11g):
<19-ene-2010 13H32' CET> <Error> <oracle.portlet.server.containerimpl.PortletApplicationImpl> <BEA-000000> <Error al procesar el archivo "/WEB-INF/portlet.xml" en la lÝnea 6 columna 68.
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'portlet-app'
The error message is in spanish. It means:
"Error processing the file "/WEB-INF/portlet.xml at line 6 column 68"
The portlet.xml of my portlet seems to be correct and I've deployed it in other portal servers. So I don't understand the error message.
This is the portlet.xml of my portlet (eclipse XML validator said it was a valid XML)
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app version="2.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:dnd="http://www.denodo.com/widget/portlet/portletjsr286">
<portlet>
<description>Test Inter Portlet Communication (JSR286)</description>
<portlet-name>Test IPC</portlet-name>
<display-name>Test IPC</display-name>
<portlet-class>com.denodo.ipc.TestIPCPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<resource-bundle>PortletMessages</resource-bundle>
<portlet-info>
<title>Test IPC</title>
<short-title>Test IPC</short-title>
<keywords>Test IPC,Denodo</keywords>
</portlet-info>
</portlet>
</portlet-app>
How do I deploy my portlet
I convert my portlet into to a WSRP portlet by executing
java -jar wsrp-predeploy.jar source EAR target EAR
as explained in http://download.oracle.com/docs/cd/E12839_01/webcenter.1111/e12405/wcadm_portlet_prod.htm#CHDECJHI)
I try to deploy it into WebLogic with the WebLogic Console and I get this exception.
My Environment
WebCenter Suite (11.1.1.2.0) + WebLogic Server (10.3.2) downloaded from the oracle.com. Default configuration
S.O: Windows XP SP3
Thanks in advance for your time.
Have you tried using the openPortal portlet-container? The doc says it will install onto weblogic: https://portlet-container.dev.java.net/public/Download.html
Update: I just installed the portlet-container into the weblogic container and successfully deployed one of the sample portlets from this page: \http://portlet-container.dev.java.net/public/Samples.html
Related
my application is sending below request to print a document which has special characters
*<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<udp tag="crypto"><luid url="https://w3.servername.com/ocp/<FnQ+xwAAAYXgbc3dgA4=>.kuid" uid="Rm5RK3h3QUFBWVhnYmMzZGdBND0="/></udp>*
From my application, request goes to OCP client for document printing. OCP client is running on a remote machine and we see below error on OCP client side
2023-01-25 08:42:43,013 ERROR [upd-Dispatcher] - Problem with JAXB
javax.xml.bind.UnmarshalException: Premature end of file.
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.]
Same setup/flow works fine with Jboss 6.4 server. I added below properties in standalone file in jboss 7.3 but nothing works out. Any idea how this can be addressed in Jboss 7.3?
<property name="org.wildfly.undertow.ALLOW_UNESCAPED_CHARACTERS_IN_URL" value="true"/>
<property name="tomcat.util.http.parser.HttpParser.requestTargetAllow" value="!"#$%&'()*+,-./:;<=>?#[]^_`{|}~"/>
I tried adding below properties to escape the special characters and I was expecting it to work like it works in jboss 6.4 and print the document.
?#[]^_`{|}~"/>
I have followed this manual to migrate from GlassFish to WildFly:
http://wildfly.org/news/2014/02/06/GlassFish-to-WildFly-migration/
However I'm getting the following error when running my application in WildFly:
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "exampleProject-ear-1.0-SNAPSHOT.ear")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.persistenceunit.\"exampleProject-ear-1.0-SNAPSHOT.ear/exampleProject-web-1.0-SNAPSHOT.war#exampleProjectPU\".FIRST_PHASE is missing [jboss.naming.context.java.jdbc.__TimerPool]",
"jboss.persistenceunit.\"exampleProject-ear-1.0-SNAPSHOT.ear/exampleProject-web-1.0-SNAPSHOT.war#exampleProjectPU\" is missing [jboss.naming.context.java.jdbc.__TimerPool]"
]}
The error talks about jboss.naming.context.java.jdbc.__TimerPool. Any idea of what should I do? I'm using WildFly 10 and MySQL as database.
Forget about this. __TimerPool was the name of a Datasource in GlassFish and I was using it without knowing it, I simply removed the persistence.xml file that contained it and it worked.
Check your standalone.xml. It must be having a datasource with pool-name "exampleProjectPU" . Something like this. Please remove the full xml block.
<datasources>
<datasource jndi-name="xxx:exampleProjectPU" pool-name="exampleProjectPU" enabled="true">
<connection-url>jdbc:oracle:thin:#//host:port/SID</connection-url>
<driver>oracle</driver>
<security>
<user-name></user-name>
<password></password>
</security>
</datasource>
Go to deployments folder and check if there is any sample project with name "example project.war". If yes, remove it and start the server again. It should work fine.
try to change your mysql-connecter to bin file like mysql-connector-java-5.1.47-bin
make sure the name in is the some in jndi-name
I'm using OpenAM, with its embedded OpenDJ as the LDAP service, to protect my web application running on JBoss 7.
When I start my JBoss I get this error:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapUserDN'
...
Caused by: javax.naming.NameNotFoundException: ldap/idp/userDN -- service jboss.naming.context.java.ldap.idp.userDN
So apparently Spring is looking for the JNDI node ldap/idp/userDN. But the jboss configuration file that I got with the project has these entries:
<simple name="ldap/opendj/url" value="ldap://localhost:50389"/>
<simple name="ldap/opendj/userDN" value="cn=Directory Manager"/>
<simple name="ldap/opendj/password" value="mypassword"/>
<simple name="ldap/opendj/baseDN" value="dc=opensso,dc=java,dc=net"/>
And these properties are added to my JNDI tree on JBoss.
If I change these to "ldap/idp/userDN", for instance, then I get rid of the error, but I was wondering if there's anywhere, where "ldap/opendj/userDN" should be mapped to "ldap/idp/userDN", that I've missed.
If you're using Spring LDAP, the actual configuration of the ldap-context-source goes in the a spring config file, and might look like this:
<jee:jndi-lookup jndi-name="ldap/idp/url" id="ldapUrl"/>
<jee:jndi-lookup jndi-name="ldap/idp/userDN" id="ldapUserDN"/>
<jee:jndi-lookup jndi-name="ldap/idp/password" id="ldapPassword"/>
<jee:jndi-lookup jndi-name="ldap/idp/baseDN" id="ldapBaseDN"/>
<ldap:context-source url="#{ldapUrl}"
username="#{ldapUserDN}"
password="#{ldapPassword}"
base="#{ldapBaseDN}"
native-pooling="true"/>
So the jndi entries in your jboss config file should match the ones above.
I deploy an ear with a unique war inside with servlet 2.5 version.
When I try to start the application, the log shows this message and the server tries to start the application infinitely. It ends after 20 minutes throwing a java HeapException.
[11/18/13 11:12:24:235 CET] 00000044 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /opt/was/WebSphere/AppServer/profiles/AppSrv01/logs/ffdc/server1_a74ac991_13.11.18_11.12.24.2348371791741532456941.txt com.ibm.ws.classloader.ClassLoaderUtils.addDependents 238
[11/18/13 11:12:26:007 CET] 00000044 webapp I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: ISicres 8.2 GISS Servlet 2.5.
[11/18/13 11:12:26:490 CET] 00000044 WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_host/ISicres
If I deploy the same ear but with servlet 2.4 version, when I start the application, it starts in a few seconds.
The servlet 2.4 definition is the following:
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
The servlet 2.5 definition is the following:
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
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">
At the startup it shows the following exception in the log /opt/was/WebSphere/AppServer/profiles/AppSrv01/logs/ffdc/server1_a74ac991_13.11.18_11.12.24.2348371791741532456941.txt:
[11/18/13 11:12:24:234 CET] FFDC Exception:java.util.zip.ZipException SourceId:com.ibm.ws.classloader.ClassLoaderUtils.addDependents ProbeId:238 Reporter:java.lang.Class#e9e29e43
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:150)
at java.util.jar.JarFile.<init>(JarFile.java:149)
at java.util.jar.JarFile.<init>(JarFile.java:113)
at com.ibm.ws.classloader.ClassLoaderUtils.addDependents(ClassLoaderUtils.java:147)
at com.ibm.ws.classloader.ClassLoaderUtils.addDependents(ClassLoaderUtils.java:195)
at com.ibm.ws.classloader.ClassLoaderUtils.addDependentJars(ClassLoaderUtils.java:113)
at com.ibm.ws.classloader.ClassGraph.<init>(ClassGraph.java:117)
at com.ibm.ws.classloader.ClassLoaderManager.initialize(ClassLoaderManager.java:202)
at com.ibm.ws.classloader.ClassLoaderManager.<init>(ClassLoaderManager.java:166)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:923)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:769)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2172)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)
At the end, the server writes some headdump files. This is the content of the file 'javacore.20131118.103120.6704.0005.txt' written:
0SECTION TITLE subcomponent dump routine
NULL ===============================
1TICHARSET UTF-8
1TISIGINFO Dump Event "systhrow" (00040000) Detail "java/lang/OutOfMemoryError" "Java heap space" received
1TIDATETIME Date: 2013/11/18 at 10:34:30
1TIFILENAME Javacore filename: /opt/was/WebSphere/AppServer/profiles/AppSrv01/javacore.20131118.103120.6704.0005.txt
1TIREQFLAGS Request Flags: 0x81 (exclusive+preempt)
1TIPREPSTATE Prep State: 0x104 (exclusive_vm_access+trace_disabled)
NULL ------------------------------------------------------------------------
0SECTION GPINFO subcomponent dump routine
NULL ================================
2XHOSLEVEL OS Level : Linux 2.6.32.12-0.7-default
2XHCPUS Processors -
3XHCPUARCH Architecture : amd64
3XHNUMCPUS How Many : 1
3XHNUMASUP NUMA is either not supported or has been disabled by user
NULL
1XHERROR2 Register dump section only produced for SIGSEGV, SIGILL or SIGFPE.
NULL
NULL ------------------------------------------------------------------------
0SECTION ENVINFO subcomponent dump routine
NULL =================================
1CIJAVAVERSION JRE 1.6.0 Linux amd64-64 build 20120322_106210 (pxa6460_26sr2ifix-20120419_02(SR2+IV19661))
1CIVMVERSION VM build R26_Java626_SR2_20120322_1722_B106210
1CIJITVERSION r11_20120322_22976
1CIGCVERSION GC - R26_Java626_SR2_20120322_1722_B106210_CMPRSS
1CIJITMODES JIT enabled, AOT enabled, FSD disabled, HCR disabled
1CIRUNNINGAS Running as a standalone JVM
1CICMDLINE /opt/was/WebSphere/AppServer/java/bin/java -Declipse.security -Dwas.status.socket=44247
What could be the problem with WAS 8.5 and servlets 2.5 spec?
Without knowledge of the contents of your application I can only assume that extensive classpath scanning is going on (a lot of annotations were introduced in Java EE 6/Servlet 2.5). You should check with Reducing annotation searches during application deployment for possible solutions.
I am running JDeveloper 10.1.3.4 with the webcenter pre-configured oc4j.
I'm trying to portletize a vanilla JSF webcenter project.
I create a application using the webcenter application template.
Add a JSF JSP, simple called it index with all the default values.
Add a deployment profile and deploy to local oc4j
navigate to the jsf page and everything works.
right click on ViewController and add the library Portlet Faces Bridge
right click on ViewController and add a Portlet Deployment descriptor.
Edit portlet.xml with the values from link text
in portlet.xml i replace the Default page view with my /index.jspx
when i try to deploy to local oc4j i get the follow
---- Deployment started. ---- May 1, 2009 2:29:37 PM Target platform is
Standalone OC4J 10g 10.1.3
(localAppServer). Wrote WAR file to
C:\jdevstudio10134\jdev\mywork\test\ViewController\deploy\webapp2.war
Wrote EAR file to
C:\jdevstudio10134\jdev\mywork\test\ViewController\deploy\webapp2.ear
Backing up generic archive file
:/C:/jdevstudio10134/jdev/mywork/test/ViewController/deploy/webapp2_generic.ear
Creating WSDLs for the WSRP
Application WSDLs for the WSRP
Application have been created
Uploading file webapp2.ear ...
Uploading file webapp2.ear ...
Application Deployer for webapp2
STARTS. Copy the archive to
C:\jdevstudio10134\j2ee\home\applications\webapp2.ear
Initialize
C:\jdevstudio10134\j2ee\home\applications\webapp2.ear
begins... Unpacking webapp2.ear Done
unpacking webapp2.ear Unpacking
webapp2.war Done unpacking webapp2.war
Initialize
C:\jdevstudio10134\j2ee\home\applications\webapp2.ear
ends... Starting application : webapp2
Initializing ClassLoader(s)
application : webapp2 is in failed
state Operation failed with error:
java.lang.NullPointerException
Deployment failed Elapsed time for
deployment: 3 seconds
Deployment incomplete. #### May 1, 2009 2:29:40 PM
if i deploy the WAR file by hand and navigate to the page i get 500 internal server error.
09/05/01 14:49:21.984 webapp2: Servlet
error java.lang.NullPointerException
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
at oracle.portlet.server.bridges.jsf.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:73)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
.java:713)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
.java:370)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
.java:871)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
.java:453)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler
.java:221)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
.java:303)
at java.lang.Thread.run(Thread.java:595)
My portlet.xml file looks like
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<portlet-app version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
<portlet>
<description>myapp</description>
<portlet-name>test</portlet-name>
<display-name>myapp</display-name>
<portlet-class>oracle.portlet.server.bridges.jsf.FacesPortlet
</portlet-class>
<init-param>
<name>DefaultPage.view</name>
<value>/index.jspx</value>
</init-param>
<init-param>
<name>BridgeLifecycleListeners</name>
<value>
oracle.portlet.server.bridges.jsf.adf.ADFFacesBridgeLifecycleListener,
oracle.portlet.server.bridges.jsf.adf.BindingFacesBridgeLifecycleListener
</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>myapp</title>
<short-title>test</short-title>
</portlet-info>
</portlet>
</portlet-app>
...if i delete the file and redeploy the jspx page works fine.
you should move to jdev 11g which uses wls which is much better than oc4j