以前总是在myeclipse 下用tomcat开发调试,然后将代码打包成ear发布到weblogic上,
但是最近一个项目中,布署到weblogic后出现了一个问题而在tomcat上是正常的,所以想在开发的时候就用weblogic调试。
于是,在myecipse的prefrence中类似tomcat那样配置好了weblogic,然后也可以通过myeclise正常启动weblogic,但是没有看到启动时读资源文件,应用似乎没有起动,试了下,能进入weblogic控制台,应用确实没有起起来,请问这是什么原因?

解决方案 »

  1.   

    可能你在WEB。XML一些配置没写全吧,WEBLOGIC配置要比TOMCAT规范些,有些在TOMCAT里不写也行,但具体什么没配置,得看你自己的了
      

  2.   

    weblogic的版本号?看看你的项目发布上了么?
      

  3.   

    weblogic console 除了JNDI,不需要配置什么吧?以前是Deployments中install我的ear包,现在我把那个删除了,一切按照tomcat的方式来进行
    这样的步骤有没有什么问题呢 ?没有在开发过程中用weblogic,不知道是不是出了什么初级的错误?
      

  4.   

    那可能JNDI没配置好,
    WEB。XML里加这段看看
    <resource-ref>
    <res-ref-name>jdbc/XXX</res-ref-name> 你写你的
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
      

  5.   

    <bean id="dataSource"  class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName">
         <value>myDS</value>
       </property>
    </bean>
    把应用打包发布到weblogic上面是正常的,然后把这个发布好的应用删除掉,
    在myeclipse中发布,路径,它是自动发布到了一个名为autodeploy的文件夹下面,是编译好的
    为什么接下来在myeclise中启动weblogic ,应用没有启动,也没有报错,可以进入weblogic的管理页面,访问不到我的应用
      

  6.   

    项目WEB-INF文件夹中有weblogic.xml文件么?另外看看你的访问方式。
      

  7.   

    有weblogic.xml,
    访问应用的时候出现这个:Error 503--Service Unavailable 
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.5.4 503 Service Unavailable
    The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay may be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.Note: The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection.
     
      

  8.   

    OK,问题已经解决,原来是通过myeclipse发布后,要进入weblogic的console将应用start,果然是初级错误啊,呵呵,流下汗....
    麻烦各位了,提前中秋快乐!