小编Boj*_*nSM的帖子

Maven编译错误:找不到符号

真的不知道该怎么把它作为一个问题的标题......

我有3个maven模块.第一个是父模块,它只包装子模块.没有什么花哨.在第二个模块中,我有一个抽象的测试类,有两个方法.

在第三个模块中,我有从第二个模块继承抽象类的测试类.

当我尝试使用maven构建它时,我收到编译错误,说它无法找到符号,这是第二个模块的抽象类.有趣的是,我在eclipse中没有得到任何编译错误.

这是第三个模块的pom:

<dependency>
  <groupId>${project.groupId}</groupId>
  <artifactId>SecondModule</artifactId>
  <version>${project.version}</version>
</dependency>



</dependencies>
  <build>
    <defaultGoal>install</defaultGoal>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
      </plugin>

      <!-- to generate the MANIFEST-FILE of the bundle -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Import-Package>*</Import-Package>
            <Export-Package></Export-Package>
            <Embed-Dependency>SecondModule</Embed-Dependency>
          </instructions>
        </configuration>
      </plugin>

    </plugins>
Run Code Online (Sandbox Code Playgroud)

这是我得到的错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project ThirdModule: Compilation failure: Compilation failure:
[ERROR] D:/workspace/project/ThirdModule/src/test/java/org/rrrrrrr/ssssss/thirdmodule/ConcreteTest.java:[7,56] cannot find symbol
[ERROR] symbol:   class AbstractTest
[ERROR] location: package org.rrrrrrr.ssssss.secondmodule
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

java maven-3 maven-compiler-plugin

4
推荐指数
1
解决办法
1万
查看次数

验证错误值无效

我知道这是一个常见的错误,并且有很多关于它的问题,但我必须创建一个新错误.

这是我的jsf页面:

<h:form id="clientCreatingForm">
    <p:selectOneMenu id="city" value="#{kkmBean.client.address.city}" style="width: 263px;" 
          converter="cityConveter" required="true" requiredMessage="You must choose one city">
          <f:selectItems value="#{kkmBean.cityList}" var="city" itemLabel="#{city.cityName}" itemValue="#{city.cityID}"/>
     </p:selectOneMenu>


     <p:commandButton value="Save client" type="button" onclick="confirm.show()" style="margin-top: 20px; margin-left: 30px; width: 180px;" />
     <p:commandButton value="Reset fields" type="reset" style="margin-top: 20px; margin-left: 30px; width: 180px;"/>

          <p:confirmDialog message="Are you sure, you want to save client?" 
               header="Save client" severity="info" widgetVar="confirm">

               <p:commandButton value="Yes, I am sure." oncomplete="confirm.hide()" 
                                         action="#{kkmBean.saveClient}" update=":warnings" style="font-size: 12px;"/>
               <p:commandButton value="No, I don't!" onclick="confirm.hide()" type="button" style="font-size: 12px;"/>
          </p:confirmDialog>
</h:form>
Run Code Online (Sandbox Code Playgroud)

这是托管bean:

@ManagedBean(name = …
Run Code Online (Sandbox Code Playgroud)

jsf jpa primefaces

3
推荐指数
1
解决办法
2万
查看次数

在数据库中保存塞尔维亚拉丁字符

我在数据库中保存塞尔维亚拉丁字符有问题,但只有当我从我的jsf应用程序保存它时.当我使用SQLyog直接在数据库中插入一些行时,一切都很好.当我尝试插入来自应用程序,而不是人物的东西:?,??在数据库中插入问号.

另一方面,当我从数据库中读取该行时,所有内容都正确显示,没有问号.

mysql jsf jdbc character-encoding

2
推荐指数
1
解决办法
2601
查看次数