Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Apache TomEE 1.7.3 server.properties configurations

    server.properties:
    Code:
    webRoot: C:/apache-tomee-plus-1.7.3/webapps/ROOT/
    
    project.datasources: $webRoot/shared/ds
    project.ui: $webRoot/shared/ui
    project.apps: $webRoot/shared/app
    
    sql.defaultDS.driver.name: java:openejb/Resource/jdbc/DefaultDS
    sql.defaultDS.database.type: sqlserver
    sql.defaultDS.interface.type: jndi
    File Structure:
    Code:
    ROOT
    C:\apache-tomee-plus-1.7.3\
    
    WAR LOCATION
    C:\apache-tomee-plus-1.7.3\apps\alliance.ear\crm2.war
    
    WEB ROOT LOCATION
    C:\apache-tomee-plus-1.7.3\webapps\ROOT
    I am having Trouble with setting couple of issues setting up the WEB-INF/classes/server.properties :

    1. first issue webRoot setting it cannot auto detect the webRoot only way i can get it to work is to set it up with the Absolute Path which is not what i want it to do .. is there a way to configure a relative path since this will be installed differently in production . right now the war files is placed under the C:\apache-tomee-plus-1.7.3\apps\alliance.ear\ folder and root is in different location \webapps\ROOT as you can see from the previous file structure so i had to get it using the absolute path

    2. Second issue is using the JNDI configuration for SQL server :
    right now the my context for the jndi is " openejb:Resource/jdbc/DefaultDS " but thats giving me an warning and error
    we have been using this context in out existing application without any issues or problem where it did deploy correctly and allows to connect


    here is my Tomee.xml for the JNDI configuration
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <tomee>
        <!-- see http://tomee.apache.org/containers-and-resources.html -->
        <Resource id="jdbc/DefaultDS" type="DataSource">
            JdbcDriver com.microsoft.sqlserver.jdbc.SQLServerDriver
            JdbcUrl jdbc:sqlserver://localhost;selectMethod=direct;DatabaseName=myDB
            UserName user
            Password pass
            JtaManaged true
        </Resource>
    
        <!-- activate next line to be able to deploy applications in apps -->
        <Deployments dir="apps" />
    </tomee>
    added this to my web.xml :
    Code:
        <resource-ref>
            <res-ref-name>jdbc/DefaultDS</res-ref-name>
            <res-type>java:openejb/Resource/jdbc/DefaultDS</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
    here are the warnings and errors
    Code:
    11-28 11:27:30 [WARNING] Failed to create MBean for naming resource [jdbc/DefaultDS]
    javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
        at javax.management.ObjectName.construct(ObjectName.java:618)
        at javax.management.ObjectName.<init>(ObjectName.java:1382)
        at org.apache.catalina.mbeans.MBeanUtils.createObjectName(MBeanUtils.java:578)
        at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:181)
        at org.apache.catalina.deploy.NamingResources.addResource(NamingResources.java:378)
        at org.apache.tomee.catalina.OpenEJBNamingResource.addResource(OpenEJBNamingResource.java:102)
        at org.apache.tomee.catalina.TomcatJndiBuilder.mergeRef(TomcatJndiBuilder.java:653)
        at org.apache.tomee.catalina.TomcatJndiBuilder.mergeJndi(TomcatJndiBuilder.java:139)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1338)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1100)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5419)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    11-28 11:27:33 [SEVERE] Error merging Java EE JNDI entries in to war /crm2: Exception: Unable to load type 'java:openejb/Resource/jdbc/DefaultDS' for comp/env/jdbc/DefaultDS
    org.apache.openejb.OpenEJBException: Unable to load type 'java:openejb/Resource/jdbc/DefaultDS' for comp/env/jdbc/DefaultDS
        at org.apache.openejb.assembler.classic.JndiEncBuilder.getType(JndiEncBuilder.java:617)
        at org.apache.openejb.assembler.classic.JndiEncBuilder.buildMap(JndiEncBuilder.java:291)
        at org.apache.openejb.assembler.classic.JndiEncBuilder.buildBindings(JndiEncBuilder.java:173)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1387)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1100)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5419)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Any help would be appreciated with configuring Apache Tomee

  • #2
    With respect to the JNDI configuration, your res-type definition doesn't seem to be valid. A valid value here is a java type. See examples here: https://tomcat.apache.org/tomcat-7.0...ces-howto.html. And, as you can from the stack trace, it's the container that doesn't like this value, not any SmartClient/SmartGWT code. I think what you want is:

    Code:
    <resource-ref>
            <res-ref-name>jdbc/DefaultDS</res-ref-name>
            <es-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
       </resource-ref>
    In terms of the webRoot autodetection, can you please share the initial portion of the server init log that shows the relevant log statements? Also, are you using SmartClient or SmartGWT? Which version (and build date)? This last info should be part of the server startup logs.

    Comment


    • #3
      Thank you for the quick response i am using SmartClient "v11.1p_2017-11-08/Pro Deployment 2017-11-08"

      You are correct in regards to the web.xml i changed it to that resource-ref and the jndi is working now

      as for the AUTO_DETECTION for the webRoot
      here is the initial server log
      Code:
      11-28 13:23:02 [INFO] Server version:        Apache Tomcat (TomEE)/7.0.63 (1.7.3)
      11-28 13:23:02 [INFO] Server built:          Jun 30 2015 08:08:33 UTC
      11-28 13:23:02 [INFO] Server number:         7.0.63.0
      11-28 13:23:02 [INFO] OS Name:               Windows 7
      11-28 13:23:02 [INFO] OS Version:            6.1
      11-28 13:23:02 [INFO] Architecture:          x86
      11-28 13:23:02 [INFO] Java Home:             C:\Program Files (x86)\Java\jdk1.8.0_121\jre
      11-28 13:23:02 [INFO] JVM Version:           1.8.0_121-b13
      11-28 13:23:02 [INFO] JVM Vendor:            Oracle Corporation
      11-28 13:23:02 [INFO] CATALINA_BASE:         C:\apache-tomee-plus-1.7.3
      11-28 13:23:02 [INFO] CATALINA_HOME:         C:\apache-tomee-plus-1.7.3
      11-28 13:23:02 [INFO] Command line argument: -javaagent:C:\apache-tomee-plus-1.7.3\lib\openejb-javaagent.jar
      11-28 13:23:02 [INFO] Command line argument: -Xms512m
      11-28 13:23:02 [INFO] Command line argument: -Xmx1000m
      11-28 13:23:02 [INFO] Command line argument: -DiscUseSlf4j=true
      11-28 13:23:02 [INFO] Command line argument: -DiscUseLog4jConfig=false
      11-28 13:23:02 [INFO] Command line argument: -Djava.util.logging.config.file=C:\apache-tomee-plus-1.7.3\conf\logging.properties
      11-28 13:23:02 [INFO] Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
      11-28 13:23:02 [INFO] Command line argument: -Djava.endorsed.dirs=C:\apache-tomee-plus-1.7.3\endorsed
      11-28 13:23:02 [INFO] Command line argument: -Dcatalina.base=C:\apache-tomee-plus-1.7.3
      11-28 13:23:02 [INFO] Command line argument: -Dcatalina.home=C:\apache-tomee-plus-1.7.3
      11-28 13:23:02 [INFO] Command line argument: -Djava.io.tmpdir=C:\apache-tomee-plus-1.7.3\temp
      11-28 13:23:02 [INFO] The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jdk1.8.0_121\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Java\jdk1.8.0_131\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Live\Shared;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Skype\Phone\;C:\WORK\java\ant.tasks\apache-ant-1.9.9\bin;.
      11-28 13:23:02 [INFO] Initializing ProtocolHandler ["http-bio-8080"]
      11-28 13:23:02 [INFO] Initializing ProtocolHandler ["http-bio-8443"]
      11-28 13:23:02 [INFO] Initializing ProtocolHandler ["ajp-bio-8009"]
      11-28 13:23:03 [INFO] Using 'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
      11-28 13:23:03 [INFO] ********************************************************************************
      11-28 13:23:03 [INFO] OpenEJB http://tomee.apache.org/
      11-28 13:23:03 [INFO] Startup: Tue Nov 28 13:23:03 EST 2017
      11-28 13:23:03 [INFO] Copyright 1999-2015 (C) Apache OpenEJB/TomEE Project, All Rights Reserved.
      11-28 13:23:03 [INFO] Version: 4.7.3
      11-28 13:23:03 [INFO] Build date: 20151204
      11-28 13:23:03 [INFO] Build time: 06:14
      11-28 13:23:03 [INFO] ********************************************************************************
      11-28 13:23:03 [INFO] openejb.home = C:\apache-tomee-plus-1.7.3
      11-28 13:23:03 [INFO] openejb.base = C:\apache-tomee-plus-1.7.3
      11-28 13:23:03 [INFO] Created new singletonService org.apache.openejb.cdi.ThreadSingletonServiceImpl@32de6c
      11-28 13:23:03 [INFO] Succeeded in installing singleton service
      11-28 13:23:03 [INFO] openejb configuration file is 'C:\apache-tomee-plus-1.7.3\conf\tomee.xml'
      11-28 13:23:03 [INFO] Configuring Service(id=Tomcat Security Service, type=SecurityService, provider-id=Tomcat Security Service)
      11-28 13:23:03 [INFO] Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
      11-28 13:23:03 [INFO] Configuring Service(id=jdbc/DefaultDS, type=Resource, provider-id=Default JDBC Database)
      11-28 13:23:03 [INFO] Extracting jar: C:\apache-tomee-plus-1.7.3\apps\alliance.ear\crm2.war
      11-28 13:23:03 [INFO] Extracted path: C:\apache-tomee-plus-1.7.3\apps\alliance.ear\crm2
      11-28 13:23:11 [WARNING] Searched 33 classpath urls in 7622 milliseconds.  Average 230 milliseconds per url.
      11-28 13:23:11 [WARNING] Consider adjusting your openejb.deployments.classpath.exclude and openejb.deployments.classpath.include settings.  Current settings: exclude='', include='.*'
      11-28 13:23:11 [INFO] Configuring enterprise application: C:\apache-tomee-plus-1.7.3\apps\alliance.ear
      11-28 13:23:13 [SEVERE] Unable to load tag library tag class: com.isomorphic.hibernate.LoadDSFromDBTag
      11-28 13:23:14 [INFO] Tomee Detected
      11-28 13:23:14 [INFO] DBType = SqlServerType
      11-28 13:23:21 [INFO] Starting service Catalina
      11-28 13:23:21 [INFO] Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.63 (1.7.3)
      11-28 13:23:21 [INFO] ------------------------- localhost -> /crm2
      11-28 13:23:21 [WARNING] jar 'C:\apache-tomee-plus-1.7.3\apps\alliance.ear\crm2\WEB-INF\lib\validation-api-1.0.0.GA.jar' contains offending class: javax.validation.Validation. It will be ignored.
      11-28 13:23:21 [INFO] Using 'openejb.jndiname.format={interfaceClass.simpleName}'
      11-28 13:23:21 [INFO] Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@32de6c
      11-28 13:23:21 [INFO] OpenWebBeans Container is starting...
      11-28 13:23:21 [INFO] Adding OpenWebBeansPlugin : [CdiPlugin]
      11-28 13:23:21 [INFO] Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
      11-28 13:23:21 [INFO] All injection points were validated successfully.
      11-28 13:23:21 [INFO] OpenWebBeans Container has started, it took 9 ms.
      11-28 13:23:21 [WARNING] Security role name any used in an <auth-constraint> without being defined in a <security-role>
      11-28 13:23:21 [INFO] Isomorphic SmartClient/SmartGWT Framework - Initializing
      11-28 13:23:21 [INFO] Attempting to load framework.properties from CLASSPATH
      11-28 13:23:21 [INFO] Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/apache-tomee-plus-1.7.3/apps/alliance.ear/crm2/WEB-INF/lib/isomorphic_core_rpc.jar!/framework.properties
      11-28 13:23:21 [INFO] Attempting to load project.properties from CLASSPATH
      11-28 13:23:21 [INFO] Unable to locate project.properties in CLASSPATH
      11-28 13:23:21 [INFO] Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/C:/apache-tomee-plus-1.7.3/apps/alliance.ear/crm2/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_interfaces.properties
      11-28 13:23:21 [INFO] Attempting to load server.properties from CLASSPATH
      11-28 13:23:21 [INFO] Successfully loaded server.properties from CLASSPATH at location: file:/C:/apache-tomee-plus-1.7.3/apps/alliance.ear/crm2/WEB-INF/classes/server.properties
      11-28 13:23:21 [INFO] Logging system started.
      11-28 13:23:21 [SEVERE] Can't find marker file for webRoot: C:/apache-tomee-plus-1.7.3/apps/alliance.ear/crm2/isomorphic for configured/autodetected webRoot - if you moved the 'isomorphic' directory, please set isomorphicPathRootRelative in server.properties to the new location and restart the servlet engine.
      11-28 13:23:21 [INFO] WebRoot auto-detection failed - using container IO
      11-28 13:23:21 [INFO] Isomorphic SmartClient/SmartGWT Framework (v11.1p_2017-11-08/Pro Deployment 2017-11-08) - Initialization Complete
      11-28 13:23:21 [INFO] Isomorphic PreCache servlet loading
      11-28 13:23:21 [INFO] SmartClient pooling started for 'DataSource' objects
      11-28 13:23:21 [INFO] Isomorphic PreCache complete (108ms)
      11-28 13:23:21 [INFO] Isomorphic PreCache complete (108ms)
      11-28 13:23:21 [INFO] ------------------------- localhost -> /common
      11-28 13:23:21 [INFO] Using 'openejb.jndiname.format={interfaceClass.simpleName}'
      11-28 13:23:21 [INFO] Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@32de6c
      11-28 13:23:21 [INFO] OpenWebBeans Container is starting...
      11-28 13:23:21 [INFO] Adding OpenWebBeansPlugin : [CdiPlugin]
      11-28 13:23:21 [INFO] Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
      11-28 13:23:21 [INFO] All injection points were validated successfully.
      11-28 13:23:21 [INFO] OpenWebBeans Container has started, it took 5 ms.
      11-28 13:23:21 [INFO] ------------------------- localhost -> /avista/common
      11-28 13:23:21 [INFO] Using 'openejb.jndiname.format={interfaceClass.simpleName}'
      11-28 13:23:21 [INFO] Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@32de6c
      11-28 13:23:21 [INFO] OpenWebBeans Container is starting...
      11-28 13:23:21 [INFO] Adding OpenWebBeansPlugin : [CdiPlugin]
      11-28 13:23:21 [INFO] Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
      11-28 13:23:21 [INFO] All injection points were validated successfully.
      11-28 13:23:21 [INFO] OpenWebBeans Container has started, it took 5 ms.
      11-28 13:23:22 [INFO] Deploying web application directory C:\apache-tomee-plus-1.7.3\webapps\docs
      11-28 13:23:22 [INFO] ------------------------- localhost -> /docs
      11-28 13:23:22 [INFO] Configuring enterprise application: C:\apache-tomee-plus-1.7.3\webapps\docs
      11-28 13:23:22 [INFO] Enterprise application "C:\apache-tomee-plus-1.7.3\webapps\docs" loaded.
      11-28 13:23:22 [INFO] Assembling app: C:\apache-tomee-plus-1.7.3\webapps\docs
      11-28 13:23:22 [INFO] Using 'openejb.jndiname.format={interfaceClass.simpleName}'
      11-28 13:23:22 [INFO] Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@32de6c
      11-28 13:23:22 [INFO] OpenWebBeans Container is starting...
      11-28 13:23:22 [INFO] Adding OpenWebBeansPlugin : [CdiPlugin]
      11-28 13:23:22 [INFO] Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
      11-28 13:23:22 [INFO] All injection points were validated successfully.
      11-28 13:23:22 [INFO] OpenWebBeans Container has started, it took 4 ms.
      11-28 13:23:22 [INFO] Deployed Application(path=C:\apache-tomee-plus-1.7.3\webapps\docs)
      11-28 13:23:22 [INFO] Deployment of web application directory C:\apache-tomee-plus-1.7.3\webapps\docs has finished in 66 ms
      11-28 13:23:22 [INFO] Deploying web application directory C:\apache-tomee-plus-1.7.3\webapps\host-manager
      11-28 13:23:22 [INFO] ------------------------- localhost -> /host-manager
      11-28 13:23:22 [INFO] Configuring enterprise application: C:\apache-tomee-plus-1.7.3\webapps\host-manager
      11-28 13:23:22 [INFO] Enterprise application "C:\apache-tomee-plus-1.7.3\webapps\host-manager" loaded.
      11-28 13:23:22 [INFO] Assembling app: C:\apache-tomee-plus-1.7.3\webapps\host-manager
      11-28 13:23:22 [INFO] Using 'openejb.jndiname.format={interfaceClass.simpleName}'
      11-28 13:23:22 [INFO] Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@32de6c
      11-28 13:23:22 [INFO] OpenWebBeans Container is starting...
      11-28 13:23:22 [INFO] Adding OpenWebBeansPlugin : [CdiPlugin]
      11-28 13:23:22 [INFO] Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
      11-28 13:23:22 [INFO] All injection points were validated successfully.
      11-28 13:23:22 [INFO] OpenWebBeans Container has started, it took 4 ms.
      11-28 13:23:22 [INFO] using context file C:\apache-tomee-plus-1.7.3\webapps\host-manager\META-INF\context.xml
      11-28 13:23:22 [INFO] Deployed Application(path=C:\apache-tomee-plus-1.7.3\webapps\host-manager)
      11-28 13:23:22 [INFO] Deployment of web application directory C:\apache-tomee-plus-1.7.3\webapps\host-manager has finished in 85 ms
      11-28 13:23:22 [INFO] Deploying web application directory C:\apache-tomee-plus-1.7.3\webapps\manager
      11-28 13:23:22 [INFO] ------------------------- localhost -> /manager
      11-28 13:23:22 [INFO] Configuring enterprise application: C:\apache-tomee-plus-1.7.3\webapps\manager
      11-28 13:23:22 [INFO] Enterprise application "C:\apache-tomee-plus-1.7.3\webapps\manager" loaded.
      11-28 13:23:22 [INFO] Assembling app: C:\apache-tomee-plus-1.7.3\webapps\manager
      11-28 13:23:22 [INFO] Using 'openejb.jndiname.format={interfaceClass.simpleName}'
      11-28 13:23:22 [INFO] Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@32de6c
      11-28 13:23:22 [INFO] OpenWebBeans Container is starting...
      11-28 13:23:22 [INFO] Adding OpenWebBeansPlugin : [CdiPlugin]
      11-28 13:23:22 [INFO] Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
      11-28 13:23:22 [INFO] All injection points were validated successfully.
      11-28 13:23:22 [INFO] OpenWebBeans Container has started, it took 4 ms.
      11-28 13:23:22 [INFO] using context file C:\apache-tomee-plus-1.7.3\webapps\manager\META-INF\context.xml
      11-28 13:23:22 [INFO] Deployed Application(path=C:\apache-tomee-plus-1.7.3\webapps\manager)
      11-28 13:23:22 [INFO] Deployment of web application directory C:\apache-tomee-plus-1.7.3\webapps\manager has finished in 74 ms
      11-28 13:23:22 [INFO] Deploying web application directory C:\apache-tomee-plus-1.7.3\webapps\ROOT
      11-28 13:23:22 [INFO] ------------------------- localhost -> /
      11-28 13:23:25 [INFO] Configuring enterprise application: C:\apache-tomee-plus-1.7.3\webapps\ROOT
      11-28 13:23:25 [INFO] Enterprise application "C:\apache-tomee-plus-1.7.3\webapps\ROOT" loaded.
      11-28 13:23:25 [INFO] Assembling app: C:\apache-tomee-plus-1.7.3\webapps\ROOT
      11-28 13:23:25 [INFO] Using 'openejb.jndiname.format={interfaceClass.simpleName}'
      11-28 13:23:25 [INFO] Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@32de6c
      11-28 13:23:25 [INFO] OpenWebBeans Container is starting...
      11-28 13:23:25 [INFO] Adding OpenWebBeansPlugin : [CdiPlugin]
      11-28 13:23:25 [INFO] Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
      11-28 13:23:25 [INFO] All injection points were validated successfully.
      11-28 13:23:25 [INFO] OpenWebBeans Container has started, it took 3 ms.
      11-28 13:23:25 [INFO] Deployed Application(path=C:\apache-tomee-plus-1.7.3\webapps\ROOT)
      11-28 13:23:25 [INFO] Deployment of web application directory C:\apache-tomee-plus-1.7.3\webapps\ROOT has finished in 2,729 ms
      11-28 13:23:25 [INFO] Starting ProtocolHandler ["http-bio-8080"]
      11-28 13:23:25 [INFO] Starting ProtocolHandler ["http-bio-8443"]
      11-28 13:23:25 [INFO] Starting ProtocolHandler ["ajp-bio-8009"]
      11-28 13:23:25 [INFO] Server startup in 4058 ms

      Comment


      • #4
        Ok, thanks. To get the obvious out of the way, did you by any chance move the isomorphic/ directory from webRoot to somewhere else? I'm looking at these two log messages:

        Code:
        11-28 13:23:21 [INFO] Successfully loaded server.properties from CLASSPATH at location: file:/C:/apache-tomee-plus-1.7.3/apps/alliance.ear/crm2/WEB-INF/classes/server.properties
        11-28 13:23:21 [SEVERE] Can't find marker file for webRoot: C:/apache-tomee-plus-1.7.3/apps/alliance.ear/crm2/isomorphic for configured/autodetected webRoot - if you moved the 'isomorphic' directory, please set isomorphicPathRootRelative in server.properties to the new location and restart the servlet engine.
        Per the first log message, it looks like the webRoot should be C:/apache-tomee-plus-1.7.3/apps/alliance.ear/crm2 because the framework is clearly successfully loading a file from that dir. But then it can't find the isomorphic/ dir in there. Do you see it there on the filesystem and does the user the container is running as have permissions to read that directory?

        Comment


        • #5
          Tomee is extracting the crm2.war to a crm2 folder in our EAR file (Enterprise Application Archive ) folder .. but the ROOT folder where we have the isomorphic and the shared/ds folders are in a different directory as i mentioned before the file Structure note alliance.ear is our archive for all our EJB's and WAR files that are packaged together and deployed under the C:\apache-tomee-plus-1.7.3\apps\alliance.ear for easy installation in production... the Isomorphic is located in the root folder of the Tomee C:\apache-tomee-plus-1.7.3\webapps\ROOT along with all the ds.xml files in the shared folder also

          now the webRoot if i set it to the absolute path C:\apache-tomee-plus-1.7.3\webapps\ROOT every thing works .. the only problem is this path cant be hardcoded and should allow us to use the relative path or even the containers default ROOT path

          Comment


          • #6
            Can you share the configuration of the webapps in the ear? META-INF/application.xml at the .ear level, I think.

            Are the 'crm2' and 'ROOT' apps distinct? Or is the crm2 app being mapped to / and hence appearing in multiple places? I'm trying to see if our initializer is somehow firing somewhere it shouldn't or maybe they are distinct apps and both use SmartClient - in which case maybe this is a classloader issue...

            Anything more you can share about the intended layout and config would be helpful

            Comment


            • #7
              here is C:\apache-tomee-plus-1.7.3\apps\alliance.ear\META-INF\application.xml
              Code:
              <?xml version="1.0" encoding="UTF-8"?>
              <application>
                  <display-name>MAIN APPLICATION</display-name>
              
                   <module>
                      <ejb>ejb-utility.jar</ejb>
                  </module>
                  <module>
                      <ejb>ats_axiom.jar</ejb>
                  </module>
              
                  <module>
                      <ejb>ejb-shiftcal.jar</ejb>
                  </module>
              
                  <module>
                      <ejb>ejb-sm4.jar</ejb>
                  </module>
              
                  <module>
                      <ejb>rollstock_ejb.jar</ejb>
                  </module>
              
                  <module>
                      <web>
                          <web-uri>crm2.war</web-uri>
                          <context-root>crm2</context-root>
                      </web>
                  </module>    
              
                  <module>
                      <web>
                          <web-uri>common.war</web-uri>
                          <context-root>common</context-root>
                      </web>
                  </module>
                  <module>
                      <web>
                          <web-uri>avista_commonweb.war</web-uri>
                          <context-root>/avista/common</context-root>
                      </web>
                  </module>     
              </application>
              The CRM2 application gets deployed relative to the ROOT context so they are are not distinct in matter of deployment .. but they are is separate folders .

              Comment


              • #8
                In my testing, the EAR explodes the WAR in the apps/ directory. I'd like to understand how your configuration has both an apps/ and a webapps/ copy. Can you share your conf/tomee.xml? Any deviations from stock install there or in any other configuration files?

                Comment


                • #9
                  C:\apache-tomee-plus-1.7.3\conf\tomee.xml

                  Code:
                  <?xml version="1.0" encoding="UTF-8"?>
                  <tomee>
                      <!-- see http://tomee.apache.org/containers-and-resources.html -->
                      <Resource id="jdbc/DefaultDS" type="DataSource">
                          JdbcDriver com.microsoft.sqlserver.jdbc.SQLServerDriver
                          JdbcUrl jdbc:sqlserver://localhost;selectMethod=direct;DatabaseName=pltfloor
                          UserName user
                          Password pass
                          JtaManaged true
                      </Resource>
                  
                      <!-- activate next line to be able to deploy applications in apps -->
                      <Deployments dir="apps" />
                  </tomee>

                  Comment


                  • #10
                    if you look closely to the Log attached it clearly exploding the crm2.war into the EAR folder
                    Code:
                    11-28 13:23:03 [INFO] Configuring Service(id=jdbc/DefaultDS, type=Resource, provider-id=Default JDBC Database)
                    11-28 13:23:03 [INFO] Extracting jar: C:\apache-tomee-plus-1.7.3\apps\alliance.ear\crm2.war
                    11-28 13:23:03 [INFO] Extracted path: C:\apache-tomee-plus-1.7.3\apps\alliance.ear\crm2
                    its doing the same as u described which extracting the war into the EAR .. and not Exploding into webapps folder

                    webapps/ROOT\ folder only contains isomorphic and shared folders.

                    no other wars installed in the webapps/ROOT folder

                    Comment


                    • #11
                      Ok, so what is causing the webapps/ROOT deployment?

                      Comment


                      • #12
                        That is the default WEB application development i dont see where my CRM2.war is deploying in the webapps/Root folder ?
                        what version of TomEE are u using in your test environment ? would u like me to setup a quick tomee configuration and send it your way ?

                        Comment


                        • #13
                          I'm using 1.7.4 - so slightly different, but I can't imagine it accounts for this delta. I'm trying to understand how the isomorphic/ and shared/ folders are ending up in webapps/ROOT (which is what you said was happening in post #10)

                          Comment


                          • #14
                            I did that setup. i copied the isomorphic and shared folders to the webapps/ROOT
                            cause i would like the other wars in the EAR using the same isomorphic folder and shared folder

                            Comment


                            • #15
                              That is highly inadvisable. Although in advanced, very specific configurations you could theoretically have a shared location like this, it's really easy to run into trouble. First of all, doing this will require you to specify an explicit webRoot in server.properties - which is what you're trying to avoid doing (for good reason). There's no way for us to get outside of the deployment directory and figure out automatically that you've moved the isomorphic/ dir. And some containers would preclude filesystem access outside the deployment dir.

                              Furthermore, both client and server need to see the contents of both isomorphic/ and shared/ (the datasources contained in both of these dirs are used by both the client and server) and in almost every case, every app has its own copies of these and they shouldn't be shared between apps. Apps may also use different versions of SmartClient/SmartGWT and sharing these would cause really obscure gotcha bugs.

                              Bottom line is: don't do this. The only thing you're saving is disk space, and not very much at that.

                              Comment

                              Working...
                              X